]> git.eshelyaron.com Git - emacs.git/commitdiff
(add-log-current-defun): Support more C DEFUN forms.
authorSam Steingold <sds@gnu.org>
Mon, 21 Mar 2005 14:37:36 +0000 (14:37 +0000)
committerSam Steingold <sds@gnu.org>
Mon, 21 Mar 2005 14:37:36 +0000 (14:37 +0000)
lisp/ChangeLog
lisp/add-log.el

index acf70150ce275a2ed7eadbfb847a0bf48adbadba..e7374fbff1d029764485982b65f9a3feb2a67822 100644 (file)
@@ -1,3 +1,7 @@
+2005-03-21  Sam Steingold  <sds@gnu.org>
+
+       * add-log.el (add-log-current-defun): Support more C DEFUN forms.
+
 2005-03-21  Thien-Thi Nguyen  <ttn@gnu.org>
 
        * progmodes/dcl-mode.el (dcl-font-lock-keywords):
index ce98760222d1fef94b7a9668e4c4f0d4ab0d4140..7706a6977552db4f9b16977e0eea277a9334c2f6 100644 (file)
@@ -812,7 +812,7 @@ Has a preference of looking backwards."
                                 (looking-at "[ \t\n]"))
                       (forward-line -1))
                     ;; See if this is using the DEFUN macro used in Emacs,
-                    ;; or the DEFUN macro used by the C library.
+                    ;; or the DEFUN macro used by the C library:
                     (if (condition-case nil
                             (and (save-excursion
                                    (end-of-line)
@@ -824,16 +824,20 @@ Has a preference of looking backwards."
                                    (looking-at "DEFUN\\b"))
                                  (>= location tem))
                           (error nil))
+                         ;; DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory, ...) ==> Ffile_name_directory
+                         ;; DEFUN(POSIX::STREAM-LOCK, stream lockp &key BLOCK SHARED START LENGTH) ==> POSIX::STREAM-LOCK
                         (progn
                           (goto-char tem)
                           (down-list 1)
-                          (if (= (char-after (point)) ?\")
-                              (progn
-                                (forward-sexp 1)
-                                (skip-chars-forward " ,")))
+                          (when (= (char-after (point)) ?\")
+                             (forward-sexp 1)
+                             (search-forward ","))
+                           (skip-syntax-forward " ")
                           (buffer-substring-no-properties
                            (point)
-                           (progn (forward-sexp 1)
+                           (progn (search-forward ",")
+                                   (forward-char -1)
+                                   (skip-syntax-backward " ")
                                   (point))))
                       (if (looking-at "^[+-]")
                           (change-log-get-method-definition)