emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/symbol-overlay 7fa58ecaa7 144/152: Avoid positional argume


From: ELPA Syncer
Subject: [nongnu] elpa/symbol-overlay 7fa58ecaa7 144/152: Avoid positional arguments to define-minor-mode
Date: Thu, 7 Jul 2022 12:04:23 -0400 (EDT)

branch: elpa/symbol-overlay
commit 7fa58ecaa7577581b80ecc5e6830bbd0fa3c22ad
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Avoid positional arguments to define-minor-mode
    
    Back in Emacs-21.1, `define-minor-mode' grew keyword arguments to
    replace its old positional arguments.  Starting with Emacs-28.1
    warning will be omitted if positional arguments are still used.
---
 symbol-overlay.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/symbol-overlay.el b/symbol-overlay.el
index 28f7753364..2150c5e4f8 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -216,10 +216,14 @@ You can re-bind the commands to any keys you prefer.")
       (with-current-buffer buf
         (insert (substitute-command-keys "\\{symbol-overlay-map}"))))))
 
+(defvar symbol-overlay-mode-map (make-sparse-keymap)
+  "Keymap for `symbol-overlay-mode'.")
+
 ;;;###autoload
 (define-minor-mode symbol-overlay-mode
   "Minor mode for auto-highlighting symbol at point."
-  nil " SO" (make-sparse-keymap)
+  :lighter " SO"
+  :keymap symbol-overlay-mode-map
   (if symbol-overlay-mode
       (progn
         (add-hook 'post-command-hook 'symbol-overlay-post-command nil t)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]