]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/lisp-mode.el (preceding-sexp): Exclude leading "," which
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 11 May 2014 03:48:15 +0000 (23:48 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 11 May 2014 03:48:15 +0000 (23:48 -0400)
are a hindrance for C-x C-e.

lisp/ChangeLog
lisp/emacs-lisp/lisp-mode.el

index b7a0f49bdedc27367dbafe0320818e0cada1d8e0..a44ba6dc000b21cc076a7d99184bcb04038f4198 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/lisp-mode.el (preceding-sexp): Exclude leading "," which
+       are a hindrance for C-x C-e.
+
 2014-05-11  Leo Liu  <sdl.web@gmail.com>
 
        * net/rcirc.el (rcirc-sentinel): Fix last change.
index 690aa3d7460aae0f1b2286abbafcd99d163380f1..21529894fedf7f081b89abd798e00db63f13d969 100644 (file)
@@ -1017,26 +1017,20 @@ If CHAR is not a character, return nil."
              (forward-sexp -1))))
 
        (save-restriction
-         ;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in
-         ;; `variable' so that the value is returned, not the
-         ;; name
-         (if (and ignore-quotes
-                  (eq (following-char) ?`))
+         (if (and ignore-quotes (eq (following-char) ?`))
+              ;; vladimir@cs.ualberta.ca 30-Jul-1997: Skip ` in `variable' so
+              ;; that the value is returned, not the name.
              (forward-char))
+          (when (looking-at ",@?") (goto-char (match-end 0)))
          (narrow-to-region (point-min) opoint)
          (setq expr (read (current-buffer)))
-         ;; If it's an (interactive ...) form, it's more
-         ;; useful to show how an interactive call would
-         ;; use it.
-         (and (consp expr)
-              (eq (car expr) 'interactive)
+          ;; If it's an (interactive ...) form, it's more useful to show how an
+          ;; interactive call would use it.
+          ;; FIXME: Is it really the right place for this?
+          (when (eq (car-safe expr) 'interactive)
               (setq expr
-                    (list 'call-interactively
-                          (list 'quote
-                                (list 'lambda
-                                      '(&rest args)
-                                      expr
-                                      'args)))))
+                  `(call-interactively
+                    (lambda (&rest args) ,expr args))))
          expr)))))