emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/add-log.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/add-log.el [emacs-unicode-2]
Date: Wed, 08 Dec 2004 01:51:04 -0500

Index: emacs/lisp/add-log.el
diff -c emacs/lisp/add-log.el:1.146.2.4 emacs/lisp/add-log.el:1.146.2.5
*** emacs/lisp/add-log.el:1.146.2.4     Thu Nov  4 08:55:35 2004
--- emacs/lisp/add-log.el       Wed Dec  8 05:02:12 2004
***************
*** 779,787 ****
                   (forward-line 1))
                 (or (eobp)
                     (forward-char 1))
!                (beginning-of-defun)
!                (when (progn (end-of-defun)
!                             (< location (point)))
                   (backward-sexp 1)
                   (let (beg tem)
  
--- 779,806 ----
                   (forward-line 1))
                 (or (eobp)
                     (forward-char 1))
!                (let (maybe-beg)
!                  ;; Try to find the containing defun.
!                  (beginning-of-defun)
!                  (end-of-defun)
!                  ;; If the defun we found ends before the desired position,
!                  ;; see if there's a DEFUN construct
!                  ;; between that end and the desired position.
!                  (when (save-excursion
!                          (and (> location (point))
!                               (re-search-forward "^DEFUN" 
!                                                  (save-excursion
!                                                    (goto-char location)
!                                                    (line-end-position))
!                                                  t)
!                               (re-search-forward "^{" nil t)
!                               (setq maybe-beg (point))))
!                    ;; If so, go to the end of that instead.
!                    (goto-char maybe-beg)
!                    (end-of-defun)))
!                ;; If the desired position is within the defun we found,
!                ;; find the function name.
!                (when (< location (point))
                   (backward-sexp 1)
                   (let (beg tem)
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]