emacs-diffs
[Top][All Lists]
Advanced

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

master 70d562b 1/3: Declare empty macro imenu-progress-menu obsolete


From: Stefan Kangas
Subject: master 70d562b 1/3: Declare empty macro imenu-progress-menu obsolete
Date: Wed, 10 Feb 2021 08:44:23 -0500 (EST)

branch: master
commit 70d562b43e0db4e76fbf51f30ec2f51290f525d1
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Declare empty macro imenu-progress-menu obsolete
    
    * lisp/imenu.el: Remove commented out code.
    (imenu-progress-message): Declare macro obsolete.
    
    * lisp/erc/erc-imenu.el (erc-create-imenu-index):
    * lisp/net/snmp-mode.el (snmp-mode-imenu-create-index):
    * lisp/progmodes/antlr-mode.el (antlr-imenu-create-index-function):
    Don't use or mention above obsolete macro.
---
 lisp/erc/erc-imenu.el        |  2 --
 lisp/imenu.el                | 31 ++-----------------------------
 lisp/net/snmp-mode.el        |  5 +----
 lisp/progmodes/antlr-mode.el |  5 ++---
 4 files changed, 5 insertions(+), 38 deletions(-)

diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el
index 1a2d8e2..ecdfc2a 100644
--- a/lisp/erc/erc-imenu.el
+++ b/lisp/erc/erc-imenu.el
@@ -73,13 +73,11 @@ Don't rely on this function, read it first!"
        (topic-change-alist '())
        prev-pos)
     (goto-char (point-max))
-    (imenu-progress-message prev-pos 0)
     (while (if (bolp)
               (> (forward-line -1)
                  -1)
             (progn (forward-line 0)
                    t))
-      (imenu-progress-message prev-pos nil t)
       (save-match-data
        (when (looking-at (concat (regexp-quote erc-notice-prefix)
                                  "\\(.+\\)$"))
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 2a557e0..72d1c40 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -151,18 +151,6 @@ element should come before the second.  The arguments are 
cons cells;
   :type 'integer
   :group 'imenu)
 
-;; No longer used.  KFS 2004-10-27
-;; (defcustom imenu-scanning-message "Scanning buffer for index (%3d%%)"
-;;   "Progress message during the index scanning of the buffer.
-;; If non-nil, user gets a message during the scanning of the buffer.
-;;
-;; Relevant only if the mode-specific function that creates the buffer
-;; index use `imenu-progress-message', and not useful if that is fast, in
-;; which case you might as well set this to nil."
-;;   :type '(choice string
-;;              (const :tag "None" nil))
-;;   :group 'imenu)
-
 (defcustom imenu-space-replacement "."
   "The replacement string for spaces in index names.
 Used when presenting the index in a completion buffer to make the
@@ -280,26 +268,11 @@ The function in this variable is called when selecting a 
normal index-item.")
        (not (functionp (cadr item)))))
 
 (defmacro imenu-progress-message (_prevpos &optional _relpos _reverse)
-  "Macro to display a progress message.
-RELPOS is the relative position to display.
-If RELPOS is nil, then the relative position in the buffer
-is calculated.
-PREVPOS is the variable in which we store the last position displayed."
-
+  "This macro is obsolete and does nothing."
+  (declare (obsolete nil "28.1"))
 ;; Made obsolete/empty, as computers are now faster than the eye, and
 ;; it had problems updating the messages correctly, and could shadow
 ;; more important messages/prompts in the minibuffer.  KFS 2004-10-27.
-
-;;  `(and
-;;    imenu-scanning-message
-;;    (let ((pos ,(if relpos
-;;                relpos
-;;              `(imenu--relative-position ,reverse))))
-;;     (if ,(if relpos t
-;;         `(> pos (+ 5 ,prevpos)))
-;;      (progn
-;;        (message imenu-scanning-message pos)
-;;        (setq ,prevpos pos)))))
 )
 
 
diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el
index 983e6d9..2fbe744 100644
--- a/lisp/net/snmp-mode.el
+++ b/lisp/net/snmp-mode.el
@@ -474,13 +474,11 @@ lines for the purposes of this function."
        (index-table-alist '())
        (index-trap-alist '())
         (case-fold-search nil) ; keywords must be uppercase
-       prev-pos token end)
+        token end)
     (goto-char (point-min))
-    (imenu-progress-message prev-pos 0)
     ;; Search for a useful MIB item (that's not in a comment)
     (save-match-data
       (while (re-search-forward snmp-clause-regexp nil t)
-        (imenu-progress-message prev-pos)
         (setq
          end (match-end 0)
          token (cons (match-string 1)
@@ -498,7 +496,6 @@ lines for the purposes of this function."
                (push token index-tc-alist)))
         (goto-char end)))
     ;; Create the menu
-    (imenu-progress-message prev-pos 100)
     (setq index-alist (nreverse index-alist))
     (and index-tc-alist
         (push (cons "Textual Conventions" (nreverse index-tc-alist))
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index e5b9ac0..d92c8c3 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -1246,9 +1246,8 @@ IF TOKENREFS-ONLY is non-nil, just return alist with 
tokenref names."
   (let ((items nil)
        (classes nil)
        (continue t))
-    ;; Using `imenu-progress-message' would require imenu for compilation, but
-    ;; nobody is missing these messages.  The generic imenu function searches
-    ;; backward, which is slower and more likely not to work during editing.
+    ;; The generic imenu function searches backward, which is slower
+    ;; and more likely not to work during editing.
     (antlr-with-syntax-table antlr-action-syntax-table
       (antlr-invalidate-context-cache)
       (goto-char (point-min))



reply via email to

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