[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/imenu.el
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/imenu.el |
Date: |
Thu, 02 Dec 2004 19:33:22 -0500 |
Index: emacs/lisp/imenu.el
diff -c emacs/lisp/imenu.el:1.105 emacs/lisp/imenu.el:1.106
*** emacs/lisp/imenu.el:1.105 Thu Nov 25 02:57:47 2004
--- emacs/lisp/imenu.el Fri Dec 3 00:21:37 2004
***************
*** 798,805 ****
(unwind-protect ; for syntax table
(save-match-data
(set-syntax-table table)
- (if (or comment-start comment-start-skip)
- (comment-normalize-vars))
;; map over the elements of imenu-generic-expression
;; (typically functions, variables ...)
--- 798,803 ----
***************
*** 809,816 ****
(index (nth 2 pat))
(function (nth 3 pat))
(rest (nthcdr 4 pat))
! start
! cs)
;; Go backwards for convenience of adding items in order.
(goto-char (point-max))
(while (and (re-search-backward regexp nil t)
--- 807,813 ----
(index (nth 2 pat))
(function (nth 3 pat))
(rest (nthcdr 4 pat))
! start)
;; Go backwards for convenience of adding items in order.
(goto-char (point-max))
(while (and (re-search-backward regexp nil t)
***************
*** 820,856 ****
(setq start (point))
(goto-char (match-end index))
(setq beg (match-beginning index))
! (setq cs (and (or comment-start comment-start-skip)
! (save-match-data
! (comment-beginning))))
! (if cs
! (goto-char (min cs beg)) ; skip this one, it's in a comment
! (goto-char beg)
! (imenu-progress-message prev-pos nil t)
! ;; Add this sort of submenu only when we've found an
! ;; item for it, avoiding empty, duff menus.
! (unless (assoc menu-title index-alist)
! (push (list menu-title) index-alist))
! (if imenu-use-markers
! (setq beg (copy-marker beg)))
! (let ((item
! (if function
! (nconc (list (match-string-no-properties index)
! beg function)
! rest)
! (cons (match-string-no-properties index)
! beg)))
! ;; This is the desired submenu,
! ;; starting with its title (or nil).
! (menu (assoc menu-title index-alist)))
! ;; Insert the item unless it is already present.
! (unless (member item (cdr menu))
! (setcdr menu
! (cons item (cdr menu)))))
! ;; Move to the start of the entire match,
! ;; to ensure we keep moving backwards
! ;; as long as the match is nonempty.
! (goto-char start)))))
(set-syntax-table old-table)))
(imenu-progress-message prev-pos 100 t)
;; Sort each submenu by position.
--- 817,848 ----
(setq start (point))
(goto-char (match-end index))
(setq beg (match-beginning index))
! (goto-char beg)
! (imenu-progress-message prev-pos nil t)
! ;; Add this sort of submenu only when we've found an
! ;; item for it, avoiding empty, duff menus.
! (unless (assoc menu-title index-alist)
! (push (list menu-title) index-alist))
! (if imenu-use-markers
! (setq beg (copy-marker beg)))
! (let ((item
! (if function
! (nconc (list (match-string-no-properties index)
! beg function)
! rest)
! (cons (match-string-no-properties index)
! beg)))
! ;; This is the desired submenu,
! ;; starting with its title (or nil).
! (menu (assoc menu-title index-alist)))
! ;; Insert the item unless it is already present.
! (unless (member item (cdr menu))
! (setcdr menu
! (cons item (cdr menu)))))
! ;; Move to the start of the entire match,
! ;; to ensure we keep moving backwards
! ;; as long as the match is nonempty.
! (goto-char start))))
(set-syntax-table old-table)))
(imenu-progress-message prev-pos 100 t)
;; Sort each submenu by position.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/imenu.el,
Richard M . Stallman <=