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

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

Re: imenu fails in cperl


From: Richard Stallman
Subject: Re: imenu fails in cperl
Date: Tue, 23 Nov 2004 21:27:23 -0500

    The problem is that cperl uses something from imenu that's no longer
    defined.

I think it would work if you recompile cperl-mode with the latest
imenu.el.  But please try this patch.

*** cperl-mode.el       20 Nov 2004 15:22:15 -0500      1.56
--- cperl-mode.el       23 Nov 2004 15:12:10 -0500      
***************
*** 4191,4202 ****
        (goto-char start)
        (setq end (set-marker (make-marker) end)) ; indentation changes pos
        (or (bolp) (beginning-of-line 2))
-       (or (fboundp 'imenu-progress-message)
-           (message "Indenting... For feedback load `imenu'..."))
        (while (and (<= (point) end) (not (eobp))) ; bol to check start
-         (and (fboundp 'imenu-progress-message)
-              (imenu-progress-message
-               pm (/ (* 100 (- (point) start)) (- end start -1))))
          (setq st (point))
          (if (or
               (setq empty (looking-at "[ \t]*\n"))
--- 4191,4197 ----
***************
*** 4232,4241 ****
                             (skip-chars-backward " \t")
                             (skip-chars-backward "#")
                             (setq new-comm-indent (current-column))))))))
!       (beginning-of-line 2))
!               (if (fboundp 'imenu-progress-message)
!            (imenu-progress-message pm 100)
!         (message nil)))
        ;; Now run the update hooks
        (and after-change-functions
           cperl-update-end
--- 4227,4233 ----
                             (skip-chars-backward " \t")
                             (skip-chars-backward "#")
                             (setq new-comm-indent (current-column))))))))
!       (beginning-of-line 2)))
        ;; Now run the update hooks
        (and after-change-functions
           cperl-update-end
***************
*** 4385,4401 ****
        packages ends-ranges p marker
        (prev-pos 0) char fchar index index1 name (end-range 0) package)
      (goto-char (point-min))
-     (if noninteractive
-       (message "Scanning Perl for index")
-       (imenu-progress-message prev-pos 0))
      (cperl-update-syntaxification (point-max) (point-max))
      ;; Search for the function
      (progn ;;save-match-data
        (while (re-search-forward
              (or regexp cperl-imenu--function-name-regexp-perl)
              nil t)
-       (or noninteractive
-           (imenu-progress-message prev-pos))
        (cond
         ((and                          ; Skip some noise if building tags
           (match-beginning 2)          ; package or sub
--- 4377,4388 ----
***************
*** 4465,4472 ****
          (setq index1 (cons (concat "=" name) (cdr index)))
          (push index index-pod-alist)
          (push index1 index-unsorted-alist)))))
-     (or noninteractive
-       (imenu-progress-message prev-pos 100))
      (setq index-alist
          (if (default-value 'imenu-sort-function)
              (sort index-alist (default-value 'imenu-sort-function))
--- 4452,4457 ----
***************
*** 5549,5564 ****
    (let ((index-alist '())
        (prev-pos 0) index index1 name package prefix)
      (goto-char (point-min))
-     (if noninteractive
-       (message "Scanning XSUB for index")
-       (imenu-progress-message prev-pos 0))
      ;; Search for the function
      (progn ;;save-match-data
        (while (re-search-forward
              "^\\([ \t]*MODULE\\>[^\n]*\\<PACKAGE[ \t]*=[ 
\t]*\\([a-zA-Z_][a-zA-Z_0-9:]*\\)\\>\\|\\([a-zA-Z_][a-zA-Z_0-9]*\\)(\\|[ 
\t]*BOOT:\\)"
              nil t)
-       (or noninteractive
-           (imenu-progress-message prev-pos))
        (cond
         ((match-beginning 2)           ; SECTION
          (setq package (buffer-substring (match-beginning 2) (match-end 2)))
--- 5534,5544 ----
***************
*** 5586,5593 ****
          (setq index (imenu-example--name-and-position))
          (setcar index (concat package "::BOOT:"))
          (push index index-alist)))))
-     (or noninteractive
-       (imenu-progress-message prev-pos 100))
      index-alist))
  
  (defvar cperl-unreadable-ok nil)
--- 5566,5571 ----




reply via email to

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