/[emacs]/emacs/lisp/ido.el
ViewVC logotype

Diff of /emacs/lisp/ido.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64 by lute, Mon Jul 4 23:08:54 2005 UTC revision 1.65 by kfstorm, Fri Jul 8 09:44:47 2005 UTC
# Line 881  the file name using normal `read-file-na Line 881  the file name using normal `read-file-na
881    :type '(repeat symbol)    :type '(repeat symbol)
882    :group 'ido)    :group 'ido)
883    
884    (defcustom ido-before-fallback-functions '()
885      "List of functions to call before calling a fallback command.
886    The fallback command is passed as an argument to the functions."
887      :type 'hook
888      :group 'ido)
889    
890  ;;; Internal Variables  ;;; Internal Variables
891    
892  ;; Persistent variables  ;; Persistent variables
# Line 1918  If INITIAL is non-nil, it specifies the Line 1924  If INITIAL is non-nil, it specifies the
1924  (defun ido-buffer-internal (method &optional fallback prompt default initial switch-cmd)  (defun ido-buffer-internal (method &optional fallback prompt default initial switch-cmd)
1925    ;; Internal function for ido-switch-buffer and friends    ;; Internal function for ido-switch-buffer and friends
1926    (if (not ido-mode)    (if (not ido-mode)
1927        (call-interactively (or fallback 'switch-to-buffer))        (progn
1928            (run-hook-with-args 'ido-before-fallback-functions
1929                                (or fallback 'switch-to-buffer))
1930            (call-interactively (or fallback 'switch-to-buffer)))
1931      (let* ((ido-context-switch-command switch-cmd)      (let* ((ido-context-switch-command switch-cmd)
1932             (ido-current-directory nil)             (ido-current-directory nil)
1933             (ido-directory-nonreadable nil)             (ido-directory-nonreadable nil)
# Line 1937  If INITIAL is non-nil, it specifies the Line 1946  If INITIAL is non-nil, it specifies the
1946    
1947         ((eq ido-exit 'fallback)         ((eq ido-exit 'fallback)
1948          (let ((read-buffer-function nil))          (let ((read-buffer-function nil))
1949              (run-hook-with-args 'ido-before-fallback-functions
1950                                  (or fallback 'switch-to-buffer))
1951            (call-interactively (or fallback 'switch-to-buffer))))            (call-interactively (or fallback 'switch-to-buffer))))
1952    
1953         ;; Check buf is non-nil.         ;; Check buf is non-nil.
# Line 2068  If INITIAL is non-nil, it specifies the Line 2079  If INITIAL is non-nil, it specifies the
2079          ;; we don't want to change directory of current buffer.          ;; we don't want to change directory of current buffer.
2080          (let ((default-directory ido-current-directory)          (let ((default-directory ido-current-directory)
2081                (read-file-name-function nil))                (read-file-name-function nil))
2082              (run-hook-with-args 'ido-before-fallback-functions
2083                                  (or fallback 'find-file))
2084            (call-interactively (or fallback 'find-file))))            (call-interactively (or fallback 'find-file))))
2085    
2086         ((eq ido-exit 'switch-to-buffer)         ((eq ido-exit 'switch-to-buffer)
# Line 2134  If INITIAL is non-nil, it specifies the Line 2147  If INITIAL is non-nil, it specifies the
2147          (setq filename (concat ido-current-directory filename))          (setq filename (concat ido-current-directory filename))
2148          (ido-record-command fallback filename)          (ido-record-command fallback filename)
2149          (ido-record-work-directory)          (ido-record-work-directory)
2150            (run-hook-with-args 'ido-before-fallback-functions fallback)
2151          (funcall fallback filename))          (funcall fallback filename))
2152    
2153         ((eq method 'insert)         ((eq method 'insert)
# Line 4210  If REQUIRE-MATCH is non-nil, an existing Line 4224  If REQUIRE-MATCH is non-nil, an existing
4224           (buf (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match)))           (buf (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match)))
4225      (if (eq ido-exit 'fallback)      (if (eq ido-exit 'fallback)
4226          (let ((read-buffer-function nil))          (let ((read-buffer-function nil))
4227              (run-hook-with-args 'ido-before-fallback-functions 'read-buffer)
4228            (read-buffer prompt default require-match))            (read-buffer prompt default require-match))
4229        buf)))        buf)))
4230    
# Line 4256  See `read-file-name' for additional para Line 4271  See `read-file-name' for additional para
4271        (setq filename 'fallback)))        (setq filename 'fallback)))
4272      (if (eq filename 'fallback)      (if (eq filename 'fallback)
4273          (let ((read-file-name-function nil))          (let ((read-file-name-function nil))
4274              (run-hook-with-args 'ido-before-fallback-functions 'read-file-name)
4275            (read-file-name prompt dir default-filename mustmatch initial predicate))            (read-file-name prompt dir default-filename mustmatch initial predicate))
4276        filename)))        filename)))
4277    

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26