emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r112897: Tidy module initialisation functions


From: Aidan Gauland
Subject: [Emacs-diffs] trunk r112897: Tidy module initialisation functions
Date: Sun, 09 Jun 2013 06:41:07 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112897
revision-id: address@hidden
parent: address@hidden
committer: Aidan Gauland <address@hidden>
branch nick: trunk
timestamp: Sun 2013-06-09 18:39:40 +1200
message:
  Tidy module initialisation functions
  * eshell/em-term.el (eshell-visual-command-p): New function.
  (eshell-term-initialize): Move long lambda to separate function 
eshell-visual-command-p.
  * eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda.
  * eshell/em-script.el (eshell-script-initialize): Add missing #' to lambda.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-06-08 13:35:55 +0000
+++ b/lisp/ChangeLog    2013-06-09 06:39:40 +0000
@@ -1,3 +1,10 @@
+2013-06-09  Aidan Gauland  <address@hidden>
+
+       * eshell/em-term.el (eshell-visual-command-p): New function.
+       (eshell-term-initialize): Move long lambda to separate function 
eshell-visual-command-p.
+       * eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda.
+       * eshell/em-script.el (eshell-script-initialize): Add missing #' to 
lambda.
+
 2013-06-08  Leo Liu  <address@hidden>
 
        * progmodes/octave.el (octave-add-log-current-defun): New function.

=== modified file 'lisp/eshell/em-dirs.el'
--- a/lisp/eshell/em-dirs.el    2013-06-02 09:19:09 +0000
+++ b/lisp/eshell/em-dirs.el    2013-06-09 06:39:40 +0000
@@ -207,8 +207,8 @@
   (when eshell-cd-on-directory
     (make-local-variable 'eshell-interpreter-alist)
     (setq eshell-interpreter-alist
-         (cons (cons (lambda (file args)
-                       (eshell-lone-directory-p file))
+         (cons (cons #'(lambda (file args)
+                          (eshell-lone-directory-p file))
                      'eshell-dirs-substitute-cd)
                eshell-interpreter-alist)))
 

=== modified file 'lisp/eshell/em-script.el'
--- a/lisp/eshell/em-script.el  2013-06-02 09:19:09 +0000
+++ b/lisp/eshell/em-script.el  2013-06-09 06:39:40 +0000
@@ -61,9 +61,10 @@
   "Initialize the script parsing code."
   (make-local-variable 'eshell-interpreter-alist)
   (setq eshell-interpreter-alist
-       (cons '((lambda (file args)
-                 (string= (file-name-nondirectory file)
-                          "eshell")) . eshell/source)
+       (cons (cons #'(lambda (file args)
+                        (string= (file-name-nondirectory file)
+                                 "eshell"))
+                    'eshell/source)
              eshell-interpreter-alist))
   (make-local-variable 'eshell-complex-commands)
   (setq eshell-complex-commands

=== modified file 'lisp/eshell/em-term.el'
--- a/lisp/eshell/em-term.el    2013-06-03 18:12:51 +0000
+++ b/lisp/eshell/em-term.el    2013-06-09 06:39:40 +0000
@@ -132,18 +132,22 @@
   "Initialize the `term' interface code."
   (make-local-variable 'eshell-interpreter-alist)
   (setq eshell-interpreter-alist
-       (cons (cons (function
-                    (lambda (command args)
-                      (let ((command (file-name-nondirectory command)))
-                        (or (member command eshell-visual-commands)
-                            (member (car args)
-                                    (cdr (assoc command 
eshell-visual-subcommands)))
-                            (cl-intersection args
-                                             (cdr (assoc command 
eshell-visual-options))
-                                             :test 'string=)))))
+       (cons (cons #'eshell-visual-command-p
                    'eshell-exec-visual)
              eshell-interpreter-alist)))
 
+(defun eshell-visual-command-p (command args)
+  "Returns non-nil when given a visual command.
+If either COMMAND or a subcommand in ARGS (e.g. git log) is a
+visual command, returns non-nil."
+  (let ((command (file-name-nondirectory command)))
+    (or (member command eshell-visual-commands)
+        (member (car args)
+                (cdr (assoc command eshell-visual-subcommands)))
+        (cl-intersection args
+                         (cdr (assoc command eshell-visual-options))
+                         :test 'string=))))
+
 (defun eshell-exec-visual (&rest args)
   "Run the specified PROGRAM in a terminal emulation buffer.
 ARGS are passed to the program.  At the moment, no piping of input is


reply via email to

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