File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,9 @@ In that case, sender names are aligned to the margin edge.")
195195(defvar ement-images-queue )
196196(defvar ement-notify-limit-room-name-width )
197197
198+ ; ; Defined in Emacs 28.1: silence byte-compilation warning in earlier versions.
199+ (defvar browse-url-handlers )
200+
198201; ;;; Customization
199202
200203(defgroup ement-room nil
@@ -1922,8 +1925,11 @@ and erases the buffer."
19221925 imenu-create-index-function #'ement-room--imenu-create-index-function
19231926 ; ; TODO: Use EWOC header/footer for, e.g. typing messages.
19241927 ement-ewoc (ewoc-create #'ement-room--pp-thing ))
1925- (setq-local browse-url-handlers (cons (cons ement-room-matrix.to-url-regexp #'ement-room-browse-url )
1926- browse-url-handlers))
1928+ (when (boundp 'browse-url-handlers )
1929+ ; ; NOTE: This variable was added in Emacs 28.1. In earlier versions, these links
1930+ ; ; won't work within Ement.
1931+ (setq-local browse-url-handlers (cons (cons ement-room-matrix.to-url-regexp #'ement-room-browse-url )
1932+ browse-url-handlers)))
19271933 (setq-local completion-at-point-functions
19281934 '(ement-room--complete-members-at-point ement-room--complete-rooms-at-point))
19291935 (setq-local window-scroll-functions
You can’t perform that action at this time.
0 commit comments