+2009-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * ido.el (ido-everywhere): Use define-minor-mode.
+
+ * buff-menu.el (list-buffers, ctl-x-map):
+ Mark the entry points with ;;;###autoload cookies.
+
+
2009-10-14 Dan Nicolaescu <dann@ics.uci.edu>
* vc-git.el (vc-git-dir-extra-headers): Set the branch name
2009-10-08 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-file-name-real-user, tramp-file-name-domain)
- (tramp-file-name-real-host, tramp-file-name-port): Apply
- `save-match-data.
+ (tramp-file-name-real-host, tramp-file-name-port):
+ Apply `save-match-data.
* net/tramp-smb.el (tramp-smb-handle-copy-directory): Handle the
case both directories are remote.
(tramp-smb-handle-expand-file-name): Implement "~" expansion.
- (tramp-smb-maybe-open-connection): Flush the cache only if
- necessary.
+ (tramp-smb-maybe-open-connection): Flush the cache only if necessary.
2009-10-08 Chong Yidong <cyd@stupidchicken.com>
(ede-proj-target-makefile-objectcode): Use it.
* cedet/ede/source.el (ede-want-any-source-files-p)
- (ede-want-any-auxiliary-files-p, ede-want-any-files-p): Return
- search result. This error was introduced while merging.
+ (ede-want-any-auxiliary-files-p, ede-want-any-files-p):
+ Return search result. This error was introduced while merging.
2009-10-07 Juanma Barranquero <lekktu@gmail.com>
2009-10-07 Glenn Morris <rgm@gnu.org>
- * emacs-lisp/autoload.el (batch-update-autoloads): Remove useless use of
- concat.
+ * emacs-lisp/autoload.el (batch-update-autoloads): Remove useless use
+ of concat.
2009-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
(const :tag "Switch off all" nil))
:group 'ido)
-(defcustom ido-everywhere nil
- "Use ido everywhere for reading file names and directories.
-Setting this variable directly does not work. Use `customize' or
-call the function `ido-everywhere'."
- :set #'(lambda (symbol value)
- (ido-everywhere (if value 1 -1)))
- :initialize 'custom-initialize-default
- :type 'boolean
- :group 'ido)
-
(defcustom ido-case-fold case-fold-search
"Non-nil if searching of buffer and file names should ignore case."
:type 'boolean
;; ido kill emacs hook
(ido-save-history))
+(define-minor-mode ido-everywhere
+ "Toggle using ido speed-ups everywhere file and directory names are read.
+With ARG, turn ido speed-up on if arg is positive, off otherwise."
+ :global t
+ :group 'ido
+ (when (get 'ido-everywhere 'file)
+ (setq read-file-name-function (car (get 'ido-everywhere 'file)))
+ (put 'ido-everywhere 'file nil))
+ (when (get 'ido-everywhere 'buffer)
+ (setq read-buffer-function (car (get 'ido-everywhere 'buffer)))
+ (put 'ido-everywhere 'buffer nil))
+ (when ido-everywhere
+ (when (memq ido-mode '(both file))
+ (put 'ido-everywhere 'file (cons read-file-name-function nil))
+ (setq read-file-name-function 'ido-read-file-name))
+ (when (memq ido-mode '(both buffer))
+ (put 'ido-everywhere 'buffer (cons read-buffer-function nil))
+ (setq read-buffer-function 'ido-read-buffer))))
+
(defvar ido-minor-mode-map-entry nil)
;;;###autoload
(define-key map [remap insert-file] 'ido-insert-file)
(define-key map [remap list-directory] 'ido-list-directory)
(define-key map [remap dired] 'ido-dired)
- (define-key map [remap find-file-other-window] 'ido-find-file-other-window)
- (define-key map [remap find-file-read-only-other-window] 'ido-find-file-read-only-other-window)
- (define-key map [remap find-file-other-frame] 'ido-find-file-other-frame)
- (define-key map [remap find-file-read-only-other-frame] 'ido-find-file-read-only-other-frame))
+ (define-key map [remap find-file-other-window]
+ 'ido-find-file-other-window)
+ (define-key map [remap find-file-read-only-other-window]
+ 'ido-find-file-read-only-other-window)
+ (define-key map [remap find-file-other-frame]
+ 'ido-find-file-other-frame)
+ (define-key map [remap find-file-read-only-other-frame]
+ 'ido-find-file-read-only-other-frame))
(when (memq ido-mode '(buffer both))
(define-key map [remap switch-to-buffer] 'ido-switch-buffer)
- (define-key map [remap switch-to-buffer-other-window] 'ido-switch-buffer-other-window)
- (define-key map [remap switch-to-buffer-other-frame] 'ido-switch-buffer-other-frame)
+ (define-key map [remap switch-to-buffer-other-window]
+ 'ido-switch-buffer-other-window)
+ (define-key map [remap switch-to-buffer-other-frame]
+ 'ido-switch-buffer-other-frame)
(define-key map [remap insert-buffer] 'ido-insert-buffer)
(define-key map [remap kill-buffer] 'ido-kill-buffer)
(define-key map [remap display-buffer] 'ido-display-buffer))
(message "Ido mode %s" (if ido-mode "enabled" "disabled")))
-(defun ido-everywhere (arg)
- "Toggle using ido speed-ups everywhere file and directory names are read.
-With ARG, turn ido speed-up on if arg is positive, off otherwise."
- (interactive "P")
- (setq ido-everywhere (if arg
- (> (prefix-numeric-value arg) 0)
- (not ido-everywhere)))
- (when (get 'ido-everywhere 'file)
- (setq read-file-name-function (car (get 'ido-everywhere 'file)))
- (put 'ido-everywhere 'file nil))
- (when (get 'ido-everywhere 'buffer)
- (setq read-buffer-function (car (get 'ido-everywhere 'buffer)))
- (put 'ido-everywhere 'buffer nil))
- (when ido-everywhere
- (when (memq ido-mode '(both file))
- (put 'ido-everywhere 'file (cons read-file-name-function nil))
- (setq read-file-name-function 'ido-read-file-name))
- (when (memq ido-mode '(both buffer))
- (put 'ido-everywhere 'buffer (cons read-buffer-function nil))
- (setq read-buffer-function 'ido-read-buffer))))
-
-
;;; IDO KEYMAP
(defun ido-init-completion-maps ()
"Set up the completion keymaps used by `ido'."