diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2012-04-19 19:20:26 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2012-04-19 19:20:26 +0200 |
commit | 4d6769e1bb5109e9cec202350d5252234970d525 (patch) | |
tree | 7fd60e2bc3321983873845a489edb4afc8ed5e84 /lisp/imenu.el | |
parent | 376cbaccd90fe54837eb452f5d6c1cda42e0e8fc (diff) | |
download | emacs-4d6769e1bb5109e9cec202350d5252234970d525.tar.gz |
lisp/*: Add declarations, remove unused bindings, mark unused args.
* lisp/avoid.el (mouse-avoidance-mode): Mark unused arg.
(mouse-avoidance-nudge-mouse): Remove unused binding.
* lisp/imenu.el (imenu-default-goto-function): Mark unused args.
(imenu-progress-message): Remove obsolete macro; all callers changed.
* lisp/mouse.el (mouse-menu-major-mode-map):
* lisp/emacs-lisp/authors.el (authors-scan-change-log)
(authors-add-to-author-list):
* lisp/emacs-lisp/avl-tree.el (avl-tree--enter-balance):
* lisp/emacs-lisp/smie.el (smie-auto-fill):
* lisp/mail/sendmail.el (mail-bury):
* lisp/mail/unrmail.el (unrmail):
* lisp/net/tls.el (open-tls-stream):
* lisp/textmodes/picture.el (picture-mouse-set-point):
Remove unused bindings.
* lisp/subr.el (keymap-canonicalize): Remove unused binding.
(read-passwd): Mark unused arg.
* lisp/tutorial.el (tutorial--display-changes): Remove unused binding.
(tutorial--save-tutorial-to): Remove unused variable.
* lisp/emacs-lisp/package.el (define-package, package-menu-mark-delete)
(package-menu-mark-install, package-menu-mark-unmark): Mark unused args.
(package-generate-autoloads, package-menu--generate)
(package-menu--find-upgrades): Remove unused bindings.
* lisp/emulation/cua-rect.el (cua-restrict-regexp-rectangle)
(cua-restrict-prefix-rectangle): Doc fixes. Remove unused bindings.
(cua--mouse-ignore, cua--delete-rectangle, cua--extract-rectangle)
(cua--indent-rectangle, cua-open-rectangle, cua-close-rectangle)
(cua-blank-rectangle, cua-string-rectangle, cua-replace-in-rectangle)
(cua-incr-rectangle, cua-sequence-rectangle, cua--convert-rectangle-as)
(cua--rectangle-aux-replace, cua--left-fill-rectangle)
(cua-scroll-rectangle-up, cua-scroll-rectangle-down)
(cua-delete-char-rectangle): Mark unused args.
(cua-align-rectangle): Remove unused binding.
* lisp/mail/rmail.el (compilation--message->loc)
(epa--find-coding-system-for-mime-charset): Declare.
* lisp/net/dbus.el (dbus-register-service): Declare.
(dbus-name-owner-changed-handler): Remove unused binding.
* lisp/nxml/nxml-mode.el (nxml-electric-slash, nxml-in-mixed-content-p)
(nxml-compute-indent-from-matching-start-tag): Remove unused variables.
(nxml-scan-backward-within): Mark unused arg.
(nxml-dynamic-markup-word): Remove unused binding.
Diffstat (limited to 'lisp/imenu.el')
-rw-r--r-- | lisp/imenu.el | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/lisp/imenu.el b/lisp/imenu.el index 08e6338b39e..ceea9420c4c 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -266,29 +266,6 @@ The function in this variable is called when selecting a normal index-item.") (and (consp (cdr item)) (listp (cadr item)) (not (eq (car (cadr item)) 'lambda)))) -;; 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. -(defmacro imenu-progress-message (prevpos &optional relpos reverse) - -;; 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))))) -) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; @@ -338,13 +315,10 @@ Don't move point." (let ((index-alist '()) (index-var-alist '()) (index-type-alist '()) - (index-unknown-alist '()) - prev-pos) + (index-unknown-alist '())) (goto-char (point-max)) - (imenu-progress-message prev-pos 0) ;; Search for the function (while (beginning-of-defun) - (imenu-progress-message prev-pos nil t) (save-match-data (and (looking-at "(def") (save-excursion @@ -371,7 +345,6 @@ Don't move point." (forward-sexp 2) (push (imenu-example--name-and-position) index-unknown-alist))))))) - (imenu-progress-message prev-pos 100) (and index-var-alist (push (cons "Variables" index-var-alist) index-alist)) @@ -396,15 +369,13 @@ Don't move point." (defun imenu-example--create-c-index (&optional regexp) (let ((index-alist '()) - prev-pos char) + char) (goto-char (point-min)) - (imenu-progress-message prev-pos 0) ;; Search for the function (save-match-data (while (re-search-forward (or regexp imenu-example--function-name-regexp-c) nil t) - (imenu-progress-message prev-pos) (backward-up-list 1) (save-excursion (goto-char (scan-sexps (point) 1)) @@ -412,7 +383,6 @@ Don't move point." ;; Skip this function name if it is a prototype declaration. (if (not (eq char ?\;)) (push (imenu-example--name-and-position) index-alist)))) - (imenu-progress-message prev-pos 100) (nreverse index-alist))) (make-obsolete 'imenu-example--create-c-index "your own" "23.2") @@ -684,22 +654,19 @@ The alternate method, which is the one most often used, is to call (cond ((and imenu-prev-index-position-function imenu-extract-index-name-function) (let ((index-alist '()) (pos (point)) - prev-pos name) + name) (goto-char (point-max)) - (imenu-progress-message prev-pos 0 t) ;; Search for the function (while (funcall imenu-prev-index-position-function) (when (= pos (point)) (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) (setq pos (point)) - (imenu-progress-message prev-pos nil t) (save-excursion (setq name (funcall imenu-extract-index-name-function))) (and (stringp name) ;; [ydi] updated for imenu-use-markers (push (cons name (if imenu-use-markers (point-marker) (point))) index-alist))) - (imenu-progress-message prev-pos 100 t) index-alist)) ;; Use generic expression if possible. ((and imenu-generic-expression) @@ -765,7 +732,6 @@ They may also be nested index alists like: depending on PATTERNS." (let ((index-alist (list 'dummy)) - prev-pos (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) (not (local-variable-p 'font-lock-defaults))) imenu-case-fold-search @@ -782,7 +748,6 @@ depending on PATTERNS." (modify-syntax-entry c (cdr syn) table)) (car syn)))) (goto-char (point-max)) - (imenu-progress-message prev-pos 0 t) (unwind-protect ; for syntax table (save-match-data (set-syntax-table table) @@ -820,7 +785,6 @@ depending on PATTERNS." (goto-char (match-beginning index)) (beginning-of-line) (setq beg (point)) - (imenu-progress-message prev-pos nil t) ;; Add this sort of submenu only when we've found an ;; item for it, avoiding empty, duff menus. (unless (assoc menu-title index-alist) @@ -845,7 +809,6 @@ depending on PATTERNS." ;; keep making progress backwards. (goto-char start)))) (set-syntax-table old-table))) - (imenu-progress-message prev-pos 100 t) ;; Sort each submenu by position. ;; This is in case one submenu gets items from two different regexps. (dolist (item index-alist) @@ -1039,7 +1002,7 @@ to `imenu-update-menubar'.") (imenu item) nil)) -(defun imenu-default-goto-function (name position &optional rest) +(defun imenu-default-goto-function (_name position &optional _rest) "Move to the given position. NAME is ignored. POSITION is where to move. REST is also ignored. |