comparison lisp/prim/minibuf.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children b82b59fe008d
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
345 (or mode-motion-hook 345 (or mode-motion-hook
346 ;;####disgusting 346 ;;####disgusting
347 (setq mode-motion-hook 'minibuffer-mouse-tracker)) 347 (setq mode-motion-hook 'minibuffer-mouse-tracker))
348 (make-local-variable 'mouse-track-click-hook) 348 (make-local-variable 'mouse-track-click-hook)
349 (add-hook 'mouse-track-click-hook 349 (add-hook 'mouse-track-click-hook
350 'minibuffer-maybe-select-highlighted-completion)) 350 'minibuffer-smart-maybe-select-highlighted-completion))
351 (set-window-buffer window buffer) 351 (set-window-buffer window buffer)
352 (select-window window) 352 (select-window window)
353 (set-window-hscroll window 0) 353 (set-window-hscroll window 0)
354 (buffer-enable-undo buffer) 354 (buffer-enable-undo buffer)
355 (message nil) 355 (message nil)
997 (goto-char p)))))))))) 997 (goto-char p))))))))))
998 998
999 (defun minibuffer-smart-select-kludge-filename (string) 999 (defun minibuffer-smart-select-kludge-filename (string)
1000 (save-excursion 1000 (save-excursion
1001 (set-buffer mouse-grabbed-buffer) ; the minibuf 1001 (set-buffer mouse-grabbed-buffer) ; the minibuf
1002 (let ((kludge-string (append (buffer-string) string))) 1002 (let ((kludge-string (concat (buffer-string) string)))
1003 (if (or (and (fboundp 'ange-ftp-ftp-path) 1003 (if (or (and (fboundp 'ange-ftp-ftp-path)
1004 (ange-ftp-ftp-path kludge-string)) 1004 (ange-ftp-ftp-path kludge-string))
1005 (and (fboundp 'efs-ftp-path) (efs-ftp-path kludge-string))) 1005 (and (fboundp 'efs-ftp-path) (efs-ftp-path kludge-string)))
1006 ;; #### evil evil evil, but more so. 1006 ;; #### evil evil evil, but more so.
1007 string 1007 string
1013 any valid completions which are visible on the frame will highlight 1013 any valid completions which are visible on the frame will highlight
1014 when the mouse moves over them. Clicking \\<minibuffer-local-map>\ 1014 when the mouse moves over them. Clicking \\<minibuffer-local-map>\
1015 \\[minibuffer-smart-select-highlighted-completion] will select the 1015 \\[minibuffer-smart-select-highlighted-completion] will select the
1016 highlighted completion under the mouse. 1016 highlighted completion under the mouse.
1017 1017
1018 If the mouse is clicked while while not over a highlighted completion, 1018 If the mouse is clicked while not over a highlighted completion,
1019 then the global binding of \\[minibuffer-smart-select-highlighted-completion] \ 1019 then the global binding of \\[minibuffer-smart-select-highlighted-completion] \
1020 will be executed instead. In this\nway you can get at the normal global \ 1020 will be executed instead. In this\nway you can get at the normal global \
1021 behavior of \\[minibuffer-smart-select-highlighted-completion] as well as 1021 behavior of \\[minibuffer-smart-select-highlighted-completion] as well as
1022 the special minibuffer behavior." 1022 the special minibuffer behavior."
1023 (interactive "e") 1023 (interactive "e")