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

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

[elpa] externals/code-cells acf4fda9b6 21/36: Add autoload for code-cell


From: ELPA Syncer
Subject: [elpa] externals/code-cells acf4fda9b6 21/36: Add autoload for code-cells-speed-key
Date: Mon, 28 Feb 2022 15:57:42 -0500 (EST)

branch: externals/code-cells
commit acf4fda9b6e7058191e72c7c700b877eef8c8936
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>

    Add autoload for code-cells-speed-key
---
 code-cells.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/code-cells.el b/code-cells.el
index 4424b5179d..331892f66b 100644
--- a/code-cells.el
+++ b/code-cells.el
@@ -139,6 +139,7 @@ via `pulse-momentary-highlight-region'."
                              '(pulse-momentary-highlight-region start end))
                           (funcall ',fun start end)))))
 
+;;;###autoload
 (defun code-cells-speed-key (command)
   "Return a speed key definition, suitable for passing to `define-key'.
 The resulting keybinding will only have any effect when the point
@@ -146,9 +147,9 @@ is at the beginning of a cell heading, in which case it 
executes
 COMMAND."
   (list 'menu-item nil command
         :filter (lambda (d)
-                  (if (and (bolp)
-                           (looking-at (code-cells-boundary-regexp)))
-                      d))))
+                  (when (and (bolp)
+                             (looking-at (code-cells-boundary-regexp)))
+                    d))))
 
 ;;; Minor mode
 



reply via email to

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