* add-log.el (add-log-current-defun): To find the name of the
authorJim Blandy <jimb@redhat.com>
Mon, 21 Jun 1993 00:51:36 +0000 (00:51 +0000)
committerJim Blandy <jimb@redhat.com>
Mon, 21 Jun 1993 00:51:36 +0000 (00:51 +0000)
function being defined in emacs-lisp-mode, lisp-mode, and
scheme-mode, skip an opening paren and an s-expression, instead of
just one word.  This allows us to properly recognize things like
define-key and define-macro.

lisp/add-log.el

index d121a76..6c468a9 100644 (file)
@@ -267,7 +267,9 @@ Has a preference of looking backwards."
                          (progn (forward-sexp -1)
                                 (>= location (point))))
                     (progn
-                      (forward-word 1)
+                      (if (looking-at "\\s(")
+                          (forward-char 1))
+                      (forward-sexp 1)
                       (skip-chars-forward " ")
                       (buffer-substring (point)
                                         (progn (forward-sexp 1) (point))))))