# HG changeset patch # User Sam Steingold # Date 1111415856 0 # Node ID a974294c56fa3b9d5ee8e8809d98afabf640c016 # Parent a4546ff66ff305feb408fc22387f72d7dabdbdf3 (add-log-current-defun): Support more C DEFUN forms. diff -r a4546ff66ff3 -r a974294c56fa lisp/ChangeLog --- a/lisp/ChangeLog Mon Mar 21 07:44:22 2005 +0000 +++ b/lisp/ChangeLog Mon Mar 21 14:37:36 2005 +0000 @@ -1,3 +1,7 @@ +2005-03-21 Sam Steingold + + * add-log.el (add-log-current-defun): Support more C DEFUN forms. + 2005-03-21 Thien-Thi Nguyen * progmodes/dcl-mode.el (dcl-font-lock-keywords): diff -r a4546ff66ff3 -r a974294c56fa lisp/add-log.el --- a/lisp/add-log.el Mon Mar 21 07:44:22 2005 +0000 +++ b/lisp/add-log.el Mon Mar 21 14:37:36 2005 +0000 @@ -812,7 +812,7 @@ (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 @@ (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)