emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1cdd0e8 5/5: Disable history expansion in eshell (B


From: Noam Postavsky
Subject: [Emacs-diffs] master 1cdd0e8 5/5: Disable history expansion in eshell (Bug#29157)
Date: Sun, 3 Dec 2017 15:41:03 -0500 (EST)

branch: master
commit 1cdd0e8cd801aa1d6f04ab4d8e6097a46af8c951
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Disable history expansion in eshell (Bug#29157)
    
    History expansion is not so useful since interactive history commands
    are already provided.  It can produce surprising errors when the user
    is not aware of the history designator syntax.
    * lisp/eshell/em-hist.el (eshell-hist-initialize): Don't add
    eshell-expand-history-references to eshell-expand-input-functions.
    * etc/NEWS: Announce it.
---
 etc/NEWS               | 9 +++++++++
 lisp/eshell/em-hist.el | 3 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 6b3e7fc..cbd50f0 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -113,6 +113,15 @@ styles as configured by the variable 'completion-styles'.
 These macros are analogue to 'let' and 'let*', but create bindings that
 are evaluated lazily.
 
+** Eshell
+
+---
+*** Expansion of history event designators is disabled by default.
+To restore the old behavior, use
+
+    (add-hook 'eshell-expand-input-functions
+              #'eshell-expand-history-references)
+
 
 * New Modes and Packages in Emacs 27.1
 
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 8084c12..df462a7 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -218,9 +218,6 @@ Returns nil if INPUT is prepended by blank space, otherwise 
non-nil."
 
 (defun eshell-hist-initialize ()
   "Initialize the history management code for one Eshell buffer."
-  (add-hook 'eshell-expand-input-functions
-           'eshell-expand-history-references nil t)
-
   (when (eshell-using-module 'eshell-cmpl)
     (add-hook 'pcomplete-try-first-hook
              'eshell-complete-history-reference nil t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]