projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5f7343
)
Silence warning with global minor mode :predicate
author
Stefan Kangas
<stefankangas@gmail.com>
Sat, 29 Jun 2024 12:38:57 +0000
(14:38 +0200)
committer
Stefan Kangas
<stefankangas@gmail.com>
Sat, 29 Jun 2024 12:39:35 +0000
(14:39 +0200)
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Silence byte-compiler warning when :predicate is used.
lisp/emacs-lisp/easy-mmode.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/easy-mmode.el
b/lisp/emacs-lisp/easy-mmode.el
index 12712cb2bc3b32f889052b416f57b3fc19cd2f2e..7006ae6c78541e792fd620974f829d7a905690e1 100644
(file)
--- a/
lisp/emacs-lisp/easy-mmode.el
+++ b/
lisp/emacs-lisp/easy-mmode.el
@@
-524,7
+524,8
@@
on if the hook has explicitly disabled it.
(progn
(put ',global-mode 'globalized-minor-mode t)
:autoload-end
- (defvar-local ,MODE-major-mode nil))
+ (defvar-local ,MODE-major-mode nil)
+ ,@(when predicate `((defvar ,MODE-predicate))))
;; The actual global minor-mode
(define-minor-mode ,global-mode
,(concat (format "Toggle %s in all buffers.\n" pretty-name)