aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-10-26 00:31:15 -0700
committerPaul Eggert2011-10-26 00:31:15 -0700
commitc03500e05a53e1717a7cd659bbe085014507eadd (patch)
tree6bc3699c4adebb9d173578086756c1582f96e373 /lisp
parent225a2cff910d3fbc2cca2cdef6d3eecfce9e74e5 (diff)
parent71d4c2a518e58b37f42c0d57e5c0507af5792133 (diff)
downloademacs-c03500e05a53e1717a7cd659bbe085014507eadd.tar.gz
emacs-c03500e05a53e1717a7cd659bbe085014507eadd.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/progmodes/octave-inf.el3
-rw-r--r--lisp/progmodes/octave-mod.el4
-rw-r--r--lisp/subr.el40
4 files changed, 38 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 95113007f27..60f1db123cf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12011-10-26 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/octave-mod.el:
4 * progmodes/octave-inf.el: Update maintainer.
5
62011-10-26 Chong Yidong <cyd@gnu.org>
7
8 * subr.el (with-wrapper-hook): Rewrite doc.
9
12011-10-25 Michael Albinus <michael.albinus@gmx.de> 102011-10-25 Michael Albinus <michael.albinus@gmx.de>
2 11
3 * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for 12 * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index e9d890c3f26..421f476016e 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> 5;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
6;; Author: John Eaton <jwe@bevo.che.wisc.edu> 6;; Author: John Eaton <jwe@bevo.che.wisc.edu>
7;; Maintainer: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> 7;; Maintainer: FSF
8;; Keywords: languages 8;; Keywords: languages
9;; Package: octave-mod 9;; Package: octave-mod
10 10
@@ -68,6 +68,7 @@ mode, set this to (\"-q\" \"--traditional\")."
68 (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) 68 (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring)
69 (define-key map [menu-bar inout list-history] 69 (define-key map [menu-bar inout list-history]
70 '("List Input History" . inferior-octave-dynamic-list-input-ring)) 70 '("List Input History" . inferior-octave-dynamic-list-input-ring))
71 ;; FIXME: free C-h so it can do the describe-prefix-bindings.
71 (define-key map "\C-c\C-h" 'info-lookup-symbol) 72 (define-key map "\C-c\C-h" 'info-lookup-symbol)
72 map) 73 map)
73 "Keymap used in Inferior Octave mode.") 74 "Keymap used in Inferior Octave mode.")
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 5e13b8533e7..28e25a35c70 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> 5;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
6;; Author: John Eaton <jwe@octave.org> 6;; Author: John Eaton <jwe@octave.org>
7;; Maintainer: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> 7;; Maintainer: FSF
8;; Keywords: languages 8;; Keywords: languages
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -223,6 +223,7 @@ parenthetical grouping.")
223 (define-key map "\C-c]" 'smie-close-block) 223 (define-key map "\C-c]" 'smie-close-block)
224 (define-key map "\C-c/" 'smie-close-block) 224 (define-key map "\C-c/" 'smie-close-block)
225 (define-key map "\C-c\C-f" 'octave-insert-defun) 225 (define-key map "\C-c\C-f" 'octave-insert-defun)
226 ;; FIXME: free C-h so it can do the describe-prefix-bindings.
226 (define-key map "\C-c\C-h" 'info-lookup-symbol) 227 (define-key map "\C-c\C-h" 'info-lookup-symbol)
227 (define-key map "\C-c\C-il" 'octave-send-line) 228 (define-key map "\C-c\C-il" 'octave-send-line)
228 (define-key map "\C-c\C-ib" 'octave-send-block) 229 (define-key map "\C-c\C-ib" 'octave-send-block)
@@ -236,6 +237,7 @@ parenthetical grouping.")
236 (define-key map "\C-c\C-i\C-f" 'octave-send-defun) 237 (define-key map "\C-c\C-i\C-f" 'octave-send-defun)
237 (define-key map "\C-c\C-i\C-r" 'octave-send-region) 238 (define-key map "\C-c\C-i\C-r" 'octave-send-region)
238 (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) 239 (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer)
240 ;; FIXME: free C-h so it can do the describe-prefix-bindings.
239 (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer) 241 (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer)
240 (define-key map "\C-c\C-i\C-k" 'octave-kill-process) 242 (define-key map "\C-c\C-i\C-k" 'octave-kill-process)
241 map) 243 map)
diff --git a/lisp/subr.el b/lisp/subr.el
index c88cef0ba0f..7ac287d2473 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1364,18 +1364,26 @@ All symbols are bound before the VALUEFORMs are evalled."
1364 ,@(mapcar (lambda (binder) `(setq ,@binder)) binders) 1364 ,@(mapcar (lambda (binder) `(setq ,@binder)) binders)
1365 ,@body)) 1365 ,@body))
1366 1366
1367(defmacro with-wrapper-hook (var args &rest body) 1367(defmacro with-wrapper-hook (hook args &rest body)
1368 "Run BODY wrapped with the VAR hook. 1368 "Run BODY, using wrapper functions from HOOK with additional ARGS.
1369VAR is a special hook: its functions are called with a first argument 1369HOOK is an abnormal hook. Each hook function in HOOK \"wraps\"
1370which is the \"original\" code (the BODY), so the hook function can wrap 1370around the preceding ones, like a set of nested `around' advices.
1371the original function, or call it any number of times (including not calling 1371
1372it at all). This is similar to an `around' advice. 1372Each hook function should accept an argument list consisting of a
1373VAR is normally a symbol (a variable) in which case it is treated like 1373function FUN, followed by the additional arguments in ARGS.
1374a hook, with a buffer-local and a global part. But it can also be an 1374
1375arbitrary expression. 1375The FUN passed to the first hook function in HOOK performs BODY,
1376ARGS is a list of variables which will be passed as additional arguments 1376if it is called with arguments ARGS. The FUN passed to each
1377to each function, after the initial argument, and which the first argument 1377successive hook function is defined based on the preceding hook
1378expects to receive when called." 1378functions; if called with arguments ARGS, it does what the
1379`with-wrapper-hook' call would do if the preceding hook functions
1380were the only ones present in HOOK.
1381
1382In the function definition of each hook function, FUN can be
1383called any number of times (including not calling it at all).
1384That function definition is then used to construct the FUN passed
1385to the next hook function, if any. The last (or \"outermost\")
1386FUN is then called once."
1379 (declare (indent 2) (debug (form sexp body))) 1387 (declare (indent 2) (debug (form sexp body)))
1380 ;; We need those two gensyms because CL's lexical scoping is not available 1388 ;; We need those two gensyms because CL's lexical scoping is not available
1381 ;; for function arguments :-( 1389 ;; for function arguments :-(
@@ -1404,11 +1412,11 @@ expects to receive when called."
1404 ;; Once there are no more functions on the hook, run 1412 ;; Once there are no more functions on the hook, run
1405 ;; the original body. 1413 ;; the original body.
1406 (apply (lambda ,args ,@body) ,argssym))))) 1414 (apply (lambda ,args ,@body) ,argssym)))))
1407 (funcall ,runrestofhook ,var 1415 (funcall ,runrestofhook ,hook
1408 ;; The global part of the hook, if any. 1416 ;; The global part of the hook, if any.
1409 ,(if (symbolp var) 1417 ,(if (symbolp hook)
1410 `(if (local-variable-p ',var) 1418 `(if (local-variable-p ',hook)
1411 (default-value ',var))) 1419 (default-value ',hook)))
1412 (list ,@args))))) 1420 (list ,@args)))))
1413 1421
1414(defun add-to-list (list-var element &optional append compare-fn) 1422(defun add-to-list (list-var element &optional append compare-fn)