branch: externals/code-cells
commit acf4fda9b6e7058191e72c7c700b877eef8c8936
Author: Augusto Stoffel <[email protected]>
Commit: Augusto Stoffel <[email protected]>

    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