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 [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/add-log.el [lexbind]
Date: Wed, 08 Dec 2004 19:35:16 -0500

Index: emacs/lisp/add-log.el
diff -c emacs/lisp/add-log.el:1.138.2.7 emacs/lisp/add-log.el:1.138.2.8
*** emacs/lisp/add-log.el:1.138.2.7     Fri Oct 29 02:05:08 2004
--- emacs/lisp/add-log.el       Wed Dec  8 23:36:16 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]