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.
This commit is contained in:
Stefan Kangas 2021-02-10 13:59:09 +01:00
parent d0826e592a
commit 70d562b43e
4 changed files with 5 additions and 38 deletions

View file

@ -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)
"\\(.+\\)$"))

View file

@ -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)))))
)

View file

@ -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))

View file

@ -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))