]> git.eshelyaron.com Git - emacs.git/commitdiff
* shell.el (explicit-bash-args): Remove obsolete hack for Bash 1.x.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 Jul 2013 02:33:54 +0000 (19:33 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 Jul 2013 02:33:54 +0000 (19:33 -0700)
The hack didn't work outside English locales anyway.

etc/NEWS
lisp/ChangeLog
lisp/shell.el

index 548063446eeaafafe1db6f7e9d001686f75d2ea0..869277fa84dbbcf8d0174a7fbfc355716e7e2699 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -456,6 +456,13 @@ module.
 *** The Info-edit command is obsolete.  Editing Info nodes by hand
 has not been relevant for some time.
 
+** Shell
+
+*** `explicit-bash-args' now always defaults to use --noediting.
+During initialization, Emacs no longer expends a process to decide
+whether it is safe to use Bash's --noediting option.  These days
+--noediting is ubiquitous; it was introduced in 1996 in Bash version 2.
+
 \f
 * New Modes and Packages in Emacs 24.4
 
index 6dcbb90b0f6a00d7ec5684bf988a1fa425a27eb5..d11db5d303e94721f813e0d8238c27921fba14ab 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * shell.el (explicit-bash-args): Remove obsolete hack for Bash 1.x.
+       The hack didn't work outside English locales anyway.
+
 2013-07-15  Juanma Barranquero  <lekktu@gmail.com>
 
        * simple.el (define-alternatives): Rename from alternatives-define,
index 51a0ffc4fe869c4f1ba0e35ef5d0e95944ef5a06..a78ab7f81abdaa4ec186112d2026848b2bb16762 100644 (file)
@@ -284,21 +284,9 @@ Value is a list of strings, which may be nil."
 ;; Note: There are no explicit references to the variable `explicit-bash-args'.
 ;; It is used implicitly by M-x shell when the interactive shell is `bash'.
 (defcustom explicit-bash-args
-  (let* ((prog (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name)
-                  (getenv "ESHELL") shell-file-name))
-        (name (file-name-nondirectory prog)))
-    ;; Tell bash not to use readline, except for bash 1.x which
-    ;; doesn't grok --noediting.  Bash 1.x has -nolineediting, but
-    ;; process-send-eof cannot terminate bash if we use it.
-    (if (and (not purify-flag)
-            (equal name "bash")
-            (file-executable-p prog)
-            (string-match "bad option"
-                          (shell-command-to-string
-                           (concat (shell-quote-argument prog)
-                                   " --noediting"))))
-       '("-i")
-      '("--noediting" "-i")))
+  ;; Tell bash not to use readline.  It's safe to assume --noediting now,
+  ;; as it was introduced in 1996 in Bash version 2.
+  '("--noediting" "-i")
   "Args passed to inferior shell by \\[shell], if the shell is bash.
 Value is a list of strings, which may be nil."
   :type '(repeat (string :tag "Argument"))