emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: imenu fails in mode without comment-start-skip defined


From: Richard Stallman
Subject: Re: imenu fails in mode without comment-start-skip defined
Date: Sat, 20 Nov 2004 20:10:21 -0500

Is this enough to do the job?  I would think so; if no comment syntax
is defined, it assumes the line is not in a comment.

Perhaps comment-beginning should do this.  What do you think?

*** imenu.el    29 Oct 2004 12:15:26 -0400      1.103
--- imenu.el    20 Nov 2004 11:29:58 -0500      
***************
*** 814,820 ****
              (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)
--- 814,821 ----
              (while (re-search-backward regexp nil t)
                (goto-char (match-end index))
                (setq beg (match-beginning index))
!               (if (setq cs (and comment-start-skip
!                                 (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)




reply via email to

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