comparison lisp/add-log.el @ 83395:b31326248cf6

Merged from miles@gnu.org--gnu-2005 (patch 142-148, 615-628) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-616 Add lisp/mh-e/.arch-inventory * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-617 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-618 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-619 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-620 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-621 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-622 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-623 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-624 Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-625 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-626 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-627 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-628 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-142 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-143 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-144 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-145 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-146 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-147 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-148 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-435
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 01 Nov 2005 06:23:08 +0000
parents 1e2706559fdf
children 4b89f1c6c558
comparison
equal deleted inserted replaced
83394:7d093d9d4479 83395:b31326248cf6
824 (goto-char maybe-beg) 824 (goto-char maybe-beg)
825 (end-of-defun))) 825 (end-of-defun)))
826 ;; If the desired position is within the defun we found, 826 ;; If the desired position is within the defun we found,
827 ;; find the function name. 827 ;; find the function name.
828 (when (< location (point)) 828 (when (< location (point))
829 ;; Move back over function body.
829 (backward-sexp 1) 830 (backward-sexp 1)
830 (let (beg tem) 831 (let (beg)
831 832 ;; Skip back over typedefs and arglist.
833 ;; Stop at the function definition itself
834 ;; or at the line that follows end of function doc string.
832 (forward-line -1) 835 (forward-line -1)
833 ;; Skip back over typedefs of arglist.
834 (while (and (not (bobp)) 836 (while (and (not (bobp))
835 (looking-at "[ \t\n]")) 837 (looking-at "[ \t\n]")
838 (not (looking-back "[*]/)\n" (- (point) 4))))
836 (forward-line -1)) 839 (forward-line -1))
837 ;; See if this is using the DEFUN macro used in Emacs, 840 ;; If we found a doc string, this must be the DEFUN macro
838 ;; or the DEFUN macro used by the C library: 841 ;; used in Emacs. Move back to the DEFUN line.
839 (if (condition-case nil 842 (when (looking-back "[*]/)\n" (- (point) 4))
840 (and (save-excursion 843 (backward-sexp 1)
841 (end-of-line) 844 (beginning-of-line))
842 (while (= (preceding-char) ?\\) 845 ;; Is this a DEFUN construct? And is LOCATION in it?
843 (end-of-line 2)) 846 (if (and (looking-at "DEFUN\\b")
844 (backward-sexp 1) 847 (>= location (point)))
845 (beginning-of-line)
846 (setq tem (point))
847 (looking-at "DEFUN\\b"))
848 (>= location tem))
849 (error nil))
850 ;; DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory, ...) ==> Ffile_name_directory 848 ;; DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory, ...) ==> Ffile_name_directory
851 ;; DEFUN(POSIX::STREAM-LOCK, stream lockp &key BLOCK SHARED START LENGTH) ==> POSIX::STREAM-LOCK 849 ;; DEFUN(POSIX::STREAM-LOCK, stream lockp &key BLOCK SHARED START LENGTH) ==> POSIX::STREAM-LOCK
852 (progn 850 (progn
853 (goto-char tem)
854 (down-list 1) 851 (down-list 1)
855 (when (= (char-after (point)) ?\") 852 (when (= (char-after (point)) ?\")
856 (forward-sexp 1) 853 (forward-sexp 1)
857 (search-forward ",")) 854 (search-forward ","))
858 (skip-syntax-forward " ") 855 (skip-syntax-forward " ")
861 (progn (search-forward ",") 858 (progn (search-forward ",")
862 (forward-char -1) 859 (forward-char -1)
863 (skip-syntax-backward " ") 860 (skip-syntax-backward " ")
864 (point)))) 861 (point))))
865 (if (looking-at "^[+-]") 862 (if (looking-at "^[+-]")
863 ;; C++.
866 (change-log-get-method-definition) 864 (change-log-get-method-definition)
867 ;; Ordinary C function syntax. 865 ;; Ordinary C function syntax.
868 (setq beg (point)) 866 (setq beg (point))
869 (if (and 867 (if (and
870 ;; Protect against "Unbalanced parens" error. 868 ;; Protect against "Unbalanced parens" error.