aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog17
-rw-r--r--lisp/iswitchb.el35
2 files changed, 28 insertions, 24 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e50414ba7fe..bd2dbf465d5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12008-03-05 Juanma Barranquero <lekktu@gmail.com>
2
3 * iswitchb.el: Don't check for `cadr' and `last'.
4 (iswitchb-define-mode-map, iswitchb-default-keybindings):
5 Add obsolescence declaration and remove redundant info from docstring.
6 (iswitchb-set-common-completion, iswitchb-set-matches)
7 (iswitchb-get-matched-buffers, iswitchb-visit-buffer): Use `let'.
8 (recentf-list, most-len, most-is-exact):
9 Don't wrap defvars within `eval-when-compile'.
10
12008-03-05 Glenn Morris <rgm@gnu.org> 112008-03-05 Glenn Morris <rgm@gnu.org>
2 12
3 * ediff-hook.el (ediff-cond-compile-for-xemacs-or-emacs): Remove. 13 * ediff-hook.el (ediff-cond-compile-for-xemacs-or-emacs): Remove.
@@ -40,7 +50,7 @@
40 50
41 * progmodes/compile.el (compilation-menu-map): 51 * progmodes/compile.el (compilation-menu-map):
42 (compilation-mode-map): 52 (compilation-mode-map):
43 * progmodes/grep.el (grep-mode-map): Add :help. 53 * progmodes/grep.el (grep-mode-map): Add :help.
44 54
45 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Define and 55 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Define and
46 initialize in one step. Add :help. Use :enable to activate menu 56 initialize in one step. Add :help. Use :enable to activate menu
@@ -51,7 +61,7 @@
51 61
52 * ediff-init.el (ediff-color-display-p): Simplify. 62 * ediff-init.el (ediff-color-display-p): Simplify.
53 (Xor): Remove unused function. 63 (Xor): Remove unused function.
54 (ediff-with-syntax-table): Simplify for emacs. 64 (ediff-with-syntax-table): Simplify for Emacs.
55 65
56 * ediff-hook.el (menu-bar-ediff-menu): Don't depend on the 66 * ediff-hook.el (menu-bar-ediff-menu): Don't depend on the
57 menu-bar being loaded, it always is. 67 menu-bar being loaded, it always is.
@@ -63,8 +73,7 @@
63 73
642008-03-04 Alan Mackenzie <acm@muc.de> 742008-03-04 Alan Mackenzie <acm@muc.de>
65 75
66 * progmodes/cc-mode.el (c-neutralize-syntax-in-CPP): Fix coding 76 * progmodes/cc-mode.el (c-neutralize-syntax-in-CPP): Fix coding bug.
67 bug.
68 77
69 * progmodes/cc-langs.el (c-before-font-lock-function): Fix bug in 78 * progmodes/cc-langs.el (c-before-font-lock-function): Fix bug in
70 doc-string, "c-old-LEN" -> "c-old-END". 79 doc-string, "c-old-LEN" -> "c-old-END".
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index c259edcc954..e14d8ed53f9 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -244,11 +244,6 @@
244 244
245;;; Code: 245;;; Code:
246 246
247;; CL needed for cadr and last
248(if (not (and (fboundp 'cadr)
249 (fboundp 'last)))
250 (require 'cl))
251
252(require 'font-lock) 247(require 'font-lock)
253 248
254;;; User Variables 249;;; User Variables
@@ -526,9 +521,7 @@ selected.")
526 521
527;;; ISWITCHB KEYMAP 522;;; ISWITCHB KEYMAP
528(defun iswitchb-define-mode-map () 523(defun iswitchb-define-mode-map ()
529 "Set up the keymap for `iswitchb-buffer'. 524 "Set up the keymap for `iswitchb-buffer'."
530This is obsolete. Use \\[iswitchb-mode] or customize the
531variable `iswitchb-mode'."
532 (interactive) 525 (interactive)
533 (let (map) 526 (let (map)
534 ;; generated every time so that it can inherit new functions. 527 ;; generated every time so that it can inherit new functions.
@@ -549,6 +542,10 @@ variable `iswitchb-mode'."
549 (setq iswitchb-mode-map map) 542 (setq iswitchb-mode-map map)
550 (run-hooks 'iswitchb-define-mode-map-hook))) 543 (run-hooks 'iswitchb-define-mode-map-hook)))
551 544
545(make-obsolete 'iswitchb-define-mode-map
546 "use M-x iswitchb-mode or customize the variable `iswitchb-mode'."
547 "21.1")
548
552;;; MAIN FUNCTION 549;;; MAIN FUNCTION
553(defun iswitchb () 550(defun iswitchb ()
554 "Switch to buffer matching a substring. 551 "Switch to buffer matching a substring.
@@ -688,7 +685,7 @@ the selection process begins. Used by isearchb.el."
688 "Find common completion of `iswitchb-text' in `iswitchb-matches'. 685 "Find common completion of `iswitchb-text' in `iswitchb-matches'.
689The result is stored in `iswitchb-common-match-string'." 686The result is stored in `iswitchb-common-match-string'."
690 687
691 (let* (val) 688 (let (val)
692 (setq iswitchb-common-match-string nil) 689 (setq iswitchb-common-match-string nil)
693 (if (and iswitchb-matches 690 (if (and iswitchb-matches
694 (not iswitchb-regexp) ;; testing 691 (not iswitchb-regexp) ;; testing
@@ -778,8 +775,7 @@ If no buffer exactly matching the prompt exists, maybe create a new one."
778 (setq iswitchb-exit 'findfile) 775 (setq iswitchb-exit 'findfile)
779 (exit-minibuffer)) 776 (exit-minibuffer))
780 777
781(eval-when-compile 778(defvar recentf-list)
782 (defvar recentf-list))
783 779
784(defun iswitchb-next-match () 780(defun iswitchb-next-match ()
785 "Put first element of `iswitchb-matches' at the end of the list." 781 "Put first element of `iswitchb-matches' at the end of the list."
@@ -888,7 +884,7 @@ current frame, rather than all frames, regardless of value of
888 "Set `iswitchb-matches' to the list of buffers matching prompt." 884 "Set `iswitchb-matches' to the list of buffers matching prompt."
889 (if iswitchb-rescan 885 (if iswitchb-rescan
890 (setq iswitchb-matches 886 (setq iswitchb-matches
891 (let* ((buflist iswitchb-buflist)) 887 (let ((buflist iswitchb-buflist))
892 (iswitchb-get-matched-buffers iswitchb-text iswitchb-regexp 888 (iswitchb-get-matched-buffers iswitchb-text iswitchb-regexp
893 buflist)) 889 buflist))
894 iswitchb-virtual-buffers nil))) 890 iswitchb-virtual-buffers nil)))
@@ -898,7 +894,7 @@ current frame, rather than all frames, regardless of value of
898 "Return buffers matching REGEXP. 894 "Return buffers matching REGEXP.
899If STRING-FORMAT is nil, consider REGEXP as just a string. 895If STRING-FORMAT is nil, consider REGEXP as just a string.
900BUFFER-LIST can be list of buffers or list of strings." 896BUFFER-LIST can be list of buffers or list of strings."
901 (let* ((case-fold-search (iswitchb-case)) 897 (let ((case-fold-search (iswitchb-case))
902 name ret) 898 name ret)
903 (if (null string-format) (setq regexp (regexp-quote regexp))) 899 (if (null string-format) (setq regexp (regexp-quote regexp)))
904 (setq iswitchb-invalid-regexp nil) 900 (setq iswitchb-invalid-regexp nil)
@@ -1051,7 +1047,7 @@ Return the modified list with the last element prepended to it."
1051;;; VISIT CHOSEN BUFFER 1047;;; VISIT CHOSEN BUFFER
1052(defun iswitchb-visit-buffer (buffer) 1048(defun iswitchb-visit-buffer (buffer)
1053 "Visit buffer named BUFFER according to `iswitchb-method'." 1049 "Visit buffer named BUFFER according to `iswitchb-method'."
1054 (let* (win newframe) 1050 (let (win newframe)
1055 (cond 1051 (cond
1056 ((eq iswitchb-method 'samewindow) 1052 ((eq iswitchb-method 'samewindow)
1057 (switch-to-buffer buffer)) 1053 (switch-to-buffer buffer))
@@ -1123,9 +1119,7 @@ If BUFFER is visible in the current frame, return nil."
1123(defun iswitchb-default-keybindings () 1119(defun iswitchb-default-keybindings ()
1124 "Set up default keybindings for `iswitchb-buffer'. 1120 "Set up default keybindings for `iswitchb-buffer'.
1125Call this function to override the normal bindings. This function also 1121Call this function to override the normal bindings. This function also
1126adds a hook to the minibuffer. 1122adds a hook to the minibuffer."
1127
1128Obsolescent. Use `iswitchb-mode'."
1129 (interactive) 1123 (interactive)
1130 (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup) 1124 (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
1131 (global-set-key "\C-xb" 'iswitchb-buffer) 1125 (global-set-key "\C-xb" 'iswitchb-buffer)
@@ -1133,6 +1127,8 @@ Obsolescent. Use `iswitchb-mode'."
1133 (global-set-key "\C-x4\C-o" 'iswitchb-display-buffer) 1127 (global-set-key "\C-x4\C-o" 'iswitchb-display-buffer)
1134 (global-set-key "\C-x5b" 'iswitchb-buffer-other-frame)) 1128 (global-set-key "\C-x5b" 'iswitchb-buffer-other-frame))
1135 1129
1130(make-obsolete 'iswitchb-default-keybindings 'iswitchb-mode "21.1")
1131
1136(defun iswitchb-buffer () 1132(defun iswitchb-buffer ()
1137 "Switch to another buffer. 1133 "Switch to another buffer.
1138 1134
@@ -1235,9 +1231,8 @@ Copied from `icomplete-exhibit' with two changes:
1235 (insert (iswitchb-completions 1231 (insert (iswitchb-completions
1236 contents)))))) 1232 contents))))))
1237 1233
1238(eval-when-compile 1234(defvar most-len)
1239 (defvar most-len) 1235(defvar most-is-exact)
1240 (defvar most-is-exact))
1241 1236
1242(defun iswitchb-output-completion (com) 1237(defun iswitchb-output-completion (com)
1243 (if (= (length com) most-len) 1238 (if (= (length com) most-len)