emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/imenu.el [emacs-unicode-2]
Date: Wed, 27 Oct 2004 01:48:08 -0400

Index: emacs/lisp/imenu.el
diff -c emacs/lisp/imenu.el:1.94.4.5 emacs/lisp/imenu.el:1.94.4.6
*** emacs/lisp/imenu.el:1.94.4.5        Thu Oct 14 08:50:01 2004
--- emacs/lisp/imenu.el Wed Oct 27 05:42:00 2004
***************
*** 62,67 ****
--- 62,69 ----
  
  ;;; Code:
  
+ (require 'newcomment)
+ 
  (eval-when-compile (require 'cl))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
***************
*** 796,827 ****
                  (regexp (nth 1 pat))
                  (index (nth 2 pat))
                  (function (nth 3 pat))
!                 (rest (nthcdr 4 pat)))
              ;; Go backwards for convenience of adding items in order.
              (goto-char (point-max))
              (while (re-search-backward regexp nil t)
!               (imenu-progress-message prev-pos nil t)
                (setq beg (match-beginning index))
!               ;; 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))))))))
          (set-syntax-table old-table)))
      (imenu-progress-message prev-pos 100 t)
      ;; Sort each submenu by position.
--- 798,834 ----
                  (regexp (nth 1 pat))
                  (index (nth 2 pat))
                  (function (nth 3 pat))
!                 (rest (nthcdr 4 pat))
!                 cs)
              ;; Go backwards for convenience of adding items in order.
              (goto-char (point-max))
              (while (re-search-backward regexp nil t)
!               (goto-char (match-end index))
                (setq beg (match-beginning index))
!               (if (setq cs (save-match-data (comment-beginning)))
!                   (goto-char cs)      ; 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)))))))))
          (set-syntax-table old-table)))
      (imenu-progress-message prev-pos 100 t)
      ;; Sort each submenu by position.




reply via email to

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