/[emacs]/emacs/lisp/imenu.el
ViewVC logotype

Diff of /emacs/lisp/imenu.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.103 by rms, Thu Nov 4 10:00:53 2004 UTC revision 1.104 by rms, Sat Nov 20 23:31:34 2004 UTC
# Line 808  depending on PATTERNS." Line 808  depending on PATTERNS."
808                    (index (nth 2 pat))                    (index (nth 2 pat))
809                    (function (nth 3 pat))                    (function (nth 3 pat))
810                    (rest (nthcdr 4 pat))                    (rest (nthcdr 4 pat))
811                      start
812                    cs)                    cs)
813                ;; Go backwards for convenience of adding items in order.                ;; Go backwards for convenience of adding items in order.
814                (goto-char (point-max))                (goto-char (point-max))
815                (while (re-search-backward regexp nil t)                (while (re-search-backward regexp nil t)
816                    (setq start (point))
817                  (goto-char (match-end index))                  (goto-char (match-end index))
818                  (setq beg (match-beginning index))                  (setq beg (match-beginning index))
819                  (if (setq cs (save-match-data (comment-beginning)))                  (setq cs (and comment-start-skip
820                      (goto-char cs)      ; skip this one, it's in a comment                                (save-match-data (comment-beginning))))
821                    (if cs
822                        (goto-char (min cs beg)) ; skip this one, it's in a comment
823                    (goto-char beg)                    (goto-char beg)
824                    (imenu-progress-message prev-pos nil t)                    (imenu-progress-message prev-pos nil t)
825                    ;; Add this sort of submenu only when we've found an                    ;; Add this sort of submenu only when we've found an
# Line 837  depending on PATTERNS." Line 841  depending on PATTERNS."
841                      ;; Insert the item unless it is already present.                      ;; Insert the item unless it is already present.
842                      (unless (member item (cdr menu))                      (unless (member item (cdr menu))
843                        (setcdr menu                        (setcdr menu
844                                (cons item (cdr menu)))))))))                                (cons item (cdr menu)))))
845                      ;; Move to the start of the entire match,
846                      ;; to ensure we keep moving backwards
847                      ;; as long as the match is nonempty.
848                      (goto-char start)))))
849            (set-syntax-table old-table)))            (set-syntax-table old-table)))
850      (imenu-progress-message prev-pos 100 t)      (imenu-progress-message prev-pos 100 t)
851      ;; Sort each submenu by position.      ;; Sort each submenu by position.

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.104

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26