Subject: Re: [PATCH] bug#19391: 25.0.50; eshell-buffer-shorthand breaks command dollar expansion

From: Samer Masterson <[email-masked]>
Date: Tue, 24 Feb 2015 02:59:46 -0800

Hi,

My copyright papers have been processed. Can we apply this to master?

Best,
Samer

2 files changed, 17 insertions(+), 28 deletions(-)
 lisp/ChangeLog        |   10 ++++++++++
 lisp/eshell/esh-io.el |   35 +++++++----------------------------

	Modified   lisp/ChangeLog
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 45ba279..9aec808 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
+2014-12-19  Samer Masterson  <samer <at> samertm.com>
+
+	* eshell/esh-io.el (eshell-get-target, eshell-buffer-shorthand):
+	Remove eshell-buffer-shorthand (bug#19391).
+
 2014-11-28  Martin Rudalics  <rudalics <at> gmx.at>

 	Fix two issues around help-window-select.  (Bug#11039) (Bug#19012)
	Modified   lisp/eshell/esh-io.el
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index ebbca58..3f70f48 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -98,19 +98,6 @@ other buffers) ."
   :type 'integer
   :group 'eshell-io)

-(defcustom eshell-buffer-shorthand nil
-  "If non-nil, a symbol name can be used for a buffer in redirection.
-If nil, redirecting to a buffer requires buffer name syntax.  If this
-variable is set, redirection directly to Lisp symbols will be
-impossible.
-
-Example:
-
-  echo hello > '*scratch*  ; works if `eshell-buffer-shorthand' is t
-  echo hello > #<buffer *scratch*>  ; always works"
-  :type 'boolean
-  :group 'eshell-io)
-
 (defcustom eshell-print-queue-size 5
   "The size of the print queue, for doing buffered printing.
 This is basically a speed enhancement, to avoid blocking the Lisp code
@@ -355,21 +342,13 @@ it defaults to `insert'."
 		   (goto-char (point-max))))
 	    (point-marker))))))

-   ((or (bufferp target)
-	(and (boundp 'eshell-buffer-shorthand)
-	     (symbol-value 'eshell-buffer-shorthand)
-	     (symbolp target)
-	     (not (memq target '(t nil)))))
-    (let ((buf (if (bufferp target)
-		   target
-		 (get-buffer-create
-		  (symbol-name target)))))
-      (with-current-buffer buf
-	(cond ((eq mode 'overwrite)
-	       (erase-buffer))
-	      ((eq mode 'append)
-	       (goto-char (point-max))))
-	(point-marker))))
+   ((bufferp target)
+    (with-current-buffer target
+      (cond ((eq mode 'overwrite)
+             (erase-buffer))
+            ((eq mode 'append)
+             (goto-char (point-max))))
+      (point-marker)))

    ((functionp target) nil)