]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-unix.el
* x-dnd.el (x-dnd-open-local-file, x-dnd-open-file): Improved error
[gnu-emacs] / lisp / eshell / em-unix.el
index c568a4286f4cf39878957af8525a321f5fbd7953..8446eb1aa9dde96d17d6feefebc5969d7b71cf02 100644 (file)
@@ -76,7 +76,7 @@ receiving side of a command pipeline."
   :type 'boolean
   :group 'eshell-unix)
 
-(defcustom eshell-plain-locate-behavior nil
+(defcustom eshell-plain-locate-behavior (eshell-under-xemacs-p)
   "*If non-nil, standalone \"locate\" commands will behave normally.
 Standalone in this context means not redirected, and not on the
 receiving side of a command pipeline."
@@ -141,9 +141,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
 
 (defun eshell-unix-initialize ()
   "Initialize the UNIX support/emulation code."
-  (make-local-hook 'eshell-post-command-hook)
   (when (eshell-using-module 'eshell-cmpl)
-    (make-local-hook 'pcomplete-try-first-hook)
     (add-hook 'pcomplete-try-first-hook
              'eshell-complete-host-reference nil t))
   (make-local-variable 'eshell-complex-commands)
@@ -572,9 +570,12 @@ symlink, then revert to the system's definition of cat."
   (if (or eshell-in-pipeline-p
          (catch 'special
            (eshell-for arg args
-             (unless (let ((attrs (eshell-file-attributes arg)))
-                       (and attrs (memq (aref (nth 8 attrs) 0)
-                                        '(?d ?l ?-))))
+             (unless (or (and (stringp arg)
+                              (> (length arg) 0)
+                              (eq (aref arg 0) ?-))
+                         (let ((attrs (eshell-file-attributes arg)))
+                           (and attrs (memq (aref (nth 8 attrs) 0)
+                                            '(?d ?l ?-)))))
                (throw 'special t)))))
       (let ((ext-cat (eshell-search-path "cat")))
        (if ext-cat
@@ -640,13 +641,12 @@ Concatenate FILE(s), or standard input, to standard output.")
 (defun eshell-occur-mode-mouse-goto (event)
   "In Occur mode, go to the occurrence whose line you click on."
   (interactive "e")
-  (let (buffer pos)
+  (let (pos)
     (save-excursion
       (set-buffer (window-buffer (posn-window (event-end event))))
       (save-excursion
        (goto-char (posn-point (event-end event)))
-       (setq pos (occur-mode-find-occurrence))
-       (setq buffer occur-buffer)))
+       (setq pos (occur-mode-find-occurrence))))
     (pop-to-buffer (marker-buffer pos))
     (goto-char (marker-position pos))))
 
@@ -682,7 +682,6 @@ available..."
                (if string (insert string))
                (setq string nil
                      files (cdr files)))))
-         (setq occur-buffer (current-buffer))
          (local-set-key [mouse-2] 'eshell-occur-mode-mouse-goto)
          (local-set-key [(control ?c) (control ?c)]
                         'eshell-occur-mode-goto-occurrence)
@@ -954,7 +953,7 @@ Show wall-clock time elapsed during execution of COMMAND.")
                      (not eshell-in-subcommand-p))))
        (throw 'eshell-replace-command
               (eshell-parse-command "*diff" orig-args))
-      (setq args (eshell-copy-list orig-args))
+      (setq args (copy-sequence orig-args))
       (if (< (length args) 2)
          (throw 'eshell-replace-command
                 (eshell-parse-command "*diff" orig-args)))
@@ -1016,4 +1015,5 @@ Show wall-clock time elapsed during execution of COMMAND.")
 
 ;;; Code:
 
+;;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9
 ;;; em-unix.el ends here