summaryrefslogtreecommitdiff
path: root/lisp/iswitchb.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-09-25 12:13:02 +0800
committerChong Yidong <cyd@gnu.org>2012-09-25 12:13:02 +0800
commit59f7af816e98a74abf42d724bcfdfa9bfe9964ce (patch)
tree4e9fb47afd9f6acad1829128e5ced04211150084 /lisp/iswitchb.el
parentb06eeda8060af5dad5b2b7317093d9c183971a0a (diff)
downloademacs-59f7af816e98a74abf42d724bcfdfa9bfe9964ce.tar.gz
Use declare forms, where possible, to mark obsolete functions.
* lisp/allout.el (allout-passphrase-hint-string): Likewise. (allout-init): Use a declare form to mark obsolete. * lisp/calendar/calendar.el (calendar-version): * lisp/calendar/icalendar.el (icalendar-extract-ical-from-buffer) (icalendar-convert-diary-to-ical): * lisp/cus-edit.el (custom-mode): * lisp/ansi-color.el (ansi-color-unfontify-region): * lisp/international/latin1-disp.el (latin1-char-displayable-p): * lisp/progmodes/cwarn.el (turn-on-cwarn-mode): * lisp/progmodes/which-func.el (which-func-update-1): Use define-obsolete-function-alias. * lisp/bookmark.el (bookmark-jump-noselect): Use a declare form to mark this function obsolete. * lisp/calendar/cal-x.el (calendar-two-frame-setup) (calendar-only-one-frame-setup, calendar-one-frame-setup): * lisp/calendar/calendar.el (american-calendar, european-calendar) (calendar-for-loop): * lisp/comint.el (comint-dynamic-simple-complete) (comint-dynamic-complete-as-filename, comint-unquote-filename): * lisp/desktop.el (desktop-load-default): * lisp/dired-x.el (dired-omit-here-always) (dired-hack-local-variables, dired-default-directory): * lisp/emacs-lisp/derived.el (derived-mode-class): * lisp/emacs-lisp/timer.el (timer-set-time-with-usecs): * lisp/emacs-lock.el (toggle-emacs-lock): * lisp/epa.el (epa-display-verify-result): * lisp/epg.el (epg-sign-keys, epg-start-sign-keys) (epg-passphrase-callback-function): * lisp/eshell/esh-util.el (eshell-for): * lisp/eshell/eshell.el (eshell-remove-from-window-buffer-names) (eshell-add-to-window-buffer-names): * lisp/files.el (locate-file-completion): * lisp/imenu.el (imenu-example--create-c-index) (imenu-example--create-lisp-index) (imenu-example--lisp-extract-index-name) (imenu-example--name-and-position): * lisp/international/mule-cmds.el (princ-list): * lisp/international/mule-diag.el (decode-codepage-char): * lisp/international/mule-util.el (detect-coding-with-priority): * lisp/iswitchb.el (iswitchb-read-buffer): * lisp/mail/mailalias.el (mail-complete): * lisp/mail/sendmail.el (mail-sent-via): * lisp/mouse.el (mouse-popup-menubar-stuff, mouse-popup-menubar) (mouse-major-mode-menu): * lisp/password-cache.el (password-read-and-add): * lisp/pcomplete.el (pcomplete-parse-comint-arguments): * lisp/progmodes/sh-script.el (sh-maybe-here-document): * lisp/replace.el (query-replace-regexp-eval): * lisp/savehist.el (savehist-load): * lisp/simple.el (choose-completion-delete-max-match): * lisp/term.el (term-dynamic-simple-complete): * lisp/vc/ediff-init.el (ediff-check-version): * lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically): * lisp/vc/vc.el (vc-diff-switches-list): * lisp/view.el (view-return-to-alist-update): Likewise. * lisp/iswitchb.el (iswitchb-read-buffer): Move code of iswitchb-define-mode-map here, and delete that obsolete function. * lisp/subr.el (eval-next-after-load, makehash, insert-string) (assoc-ignore-representation, assoc-ignore-case): Use declare to mark obsolete. (mode-line-inverse-video): Variable deleted. * lisp/emacs-lisp/byte-run.el (make-obsolete): Doc fix; emphasize that this applies to functions. * lisp/erc/erc.el (erc-send-command): Use define-obsolete-function-alias. * lisp/international/mule-util.el (string-to-sequence): Remove. * lisp/net/newst-backend.el (newsticker-cache-filename): * lisp/net/newst-treeview.el (newsticker-groups-filename): Fix incorrect obsolescence declaration. * lisp/net/snmp-mode.el (snmp-font-lock-keywords-3): Don't use obsolete font-lock-reference-face. * lisp/url/url-parse.el (url-recreate-url-attributes): * lisp/url/url-util.el (url-generate-unique-filename): Use declare to mark obsolete. * src/xdisp.c (mode_line_inverse_video): Delete obsolete variable.
Diffstat (limited to 'lisp/iswitchb.el')
-rw-r--r--lisp/iswitchb.el54
1 files changed, 19 insertions, 35 deletions
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 624c3500939..13ab41cf83a 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -527,33 +527,6 @@ selected.")
;;; FUNCTIONS
-;;; ISWITCHB KEYMAP
-(defun iswitchb-define-mode-map ()
- "Set up the keymap for `iswitchb-buffer'."
- (interactive)
- (let (map)
- ;; generated every time so that it can inherit new functions.
- ;;(or iswitchb-mode-map
-
- (setq map (copy-keymap minibuffer-local-map))
- (define-key map "?" 'iswitchb-completion-help)
- (define-key map "\C-s" 'iswitchb-next-match)
- (define-key map "\C-r" 'iswitchb-prev-match)
- (define-key map "\t" 'iswitchb-complete)
- (define-key map "\C-j" 'iswitchb-select-buffer-text)
- (define-key map "\C-t" 'iswitchb-toggle-regexp)
- (define-key map "\C-x\C-f" 'iswitchb-find-file)
- (define-key map "\C-n" 'iswitchb-toggle-ignore)
- (define-key map "\C-c" 'iswitchb-toggle-case)
- (define-key map "\C-k" 'iswitchb-kill-buffer)
- (define-key map "\C-m" 'iswitchb-exit-minibuffer)
- (setq iswitchb-mode-map map)
- (run-hooks 'iswitchb-define-mode-map-hook)))
-
-(make-obsolete 'iswitchb-define-mode-map
- "use M-x iswitchb-mode or customize the variable `iswitchb-mode'."
- "21.1")
-
;;; MAIN FUNCTION
(defun iswitchb ()
"Switch to buffer matching a substring.
@@ -619,14 +592,25 @@ If START is a string, the selection process is started with that
string.
If MATCHES-SET is non-nil, the buflist is not updated before
the selection process begins. Used by isearchb.el."
- (let
- (
- buf-sel
- iswitchb-final-text
- (icomplete-mode nil) ;; prevent icomplete starting up
- )
-
- (iswitchb-define-mode-map)
+ ;; The map is generated every time so that it can inherit new
+ ;; functions.
+ (let ((map (copy-keymap minibuffer-local-map))
+ buf-sel iswitchb-final-text map
+ icomplete-mode) ; prevent icomplete starting up
+ (define-key map "?" 'iswitchb-completion-help)
+ (define-key map "\C-s" 'iswitchb-next-match)
+ (define-key map "\C-r" 'iswitchb-prev-match)
+ (define-key map "\t" 'iswitchb-complete)
+ (define-key map "\C-j" 'iswitchb-select-buffer-text)
+ (define-key map "\C-t" 'iswitchb-toggle-regexp)
+ (define-key map "\C-x\C-f" 'iswitchb-find-file)
+ (define-key map "\C-n" 'iswitchb-toggle-ignore)
+ (define-key map "\C-c" 'iswitchb-toggle-case)
+ (define-key map "\C-k" 'iswitchb-kill-buffer)
+ (define-key map "\C-m" 'iswitchb-exit-minibuffer)
+ (setq iswitchb-mode-map map)
+ (run-hooks 'iswitchb-define-mode-map-hook)
+
(setq iswitchb-exit nil)
(setq iswitchb-default
(if (bufferp default)