76 |
:type 'boolean |
:type 'boolean |
77 |
:group 'eshell-unix) |
:group 'eshell-unix) |
78 |
|
|
79 |
(defcustom eshell-plain-locate-behavior nil |
(defcustom eshell-plain-locate-behavior (eshell-under-xemacs-p) |
80 |
"*If non-nil, standalone \"locate\" commands will behave normally. |
"*If non-nil, standalone \"locate\" commands will behave normally. |
81 |
Standalone in this context means not redirected, and not on the |
Standalone in this context means not redirected, and not on the |
82 |
receiving side of a command pipeline." |
receiving side of a command pipeline." |
641 |
(defun eshell-occur-mode-mouse-goto (event) |
(defun eshell-occur-mode-mouse-goto (event) |
642 |
"In Occur mode, go to the occurrence whose line you click on." |
"In Occur mode, go to the occurrence whose line you click on." |
643 |
(interactive "e") |
(interactive "e") |
644 |
(let (buffer pos) |
(let (pos) |
645 |
(save-excursion |
(save-excursion |
646 |
(set-buffer (window-buffer (posn-window (event-end event)))) |
(set-buffer (window-buffer (posn-window (event-end event)))) |
647 |
(save-excursion |
(save-excursion |
648 |
(goto-char (posn-point (event-end event))) |
(goto-char (posn-point (event-end event))) |
649 |
(setq pos (occur-mode-find-occurrence)) |
(setq pos (occur-mode-find-occurrence)))) |
|
(setq buffer occur-buffer))) |
|
650 |
(pop-to-buffer (marker-buffer pos)) |
(pop-to-buffer (marker-buffer pos)) |
651 |
(goto-char (marker-position pos)))) |
(goto-char (marker-position pos)))) |
652 |
|
|
682 |
(if string (insert string)) |
(if string (insert string)) |
683 |
(setq string nil |
(setq string nil |
684 |
files (cdr files))))) |
files (cdr files))))) |
|
(setq occur-buffer (current-buffer)) |
|
685 |
(local-set-key [mouse-2] 'eshell-occur-mode-mouse-goto) |
(local-set-key [mouse-2] 'eshell-occur-mode-mouse-goto) |
686 |
(local-set-key [(control ?c) (control ?c)] |
(local-set-key [(control ?c) (control ?c)] |
687 |
'eshell-occur-mode-goto-occurrence) |
'eshell-occur-mode-goto-occurrence) |