aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog33
-rw-r--r--lisp/comint.el6
-rw-r--r--lisp/emacs-lisp/easy-mmode.el5
-rw-r--r--lisp/facemenu.el2
-rw-r--r--lisp/gnus/ChangeLog7
-rw-r--r--lisp/gnus/mml.el4
-rw-r--r--lisp/ido.el8
-rw-r--r--lisp/net/tramp-sh.el17
-rw-r--r--lisp/notifications.el3
-rw-r--r--lisp/progmodes/octave-inf.el3
-rw-r--r--lisp/progmodes/octave-mod.el4
-rw-r--r--lisp/subr.el40
12 files changed, 92 insertions, 40 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b20ebccea89..88248f00559 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,36 @@
12011-10-26 Michael Albinus <michael.albinus@gmx.de>
2
3 * ido.el (ido-file-name-all-completions-1): Do not require
4 tramp.el explicitely. (Bug#7583)
5
62011-10-26 Stefan Monnier <monnier@iro.umontreal.ca>
7
8 * progmodes/octave-mod.el:
9 * progmodes/octave-inf.el: Update maintainer.
10
112011-10-26 Chong Yidong <cyd@gnu.org>
12
13 * subr.el (with-wrapper-hook): Rewrite doc.
14
152011-10-25 Michael Albinus <michael.albinus@gmx.de>
16
17 * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for
18 filenames "/method:foo:". (Bug#9793)
19
202011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
21
22 * comint.el (comint-get-old-input-default): Fix use-prompt-regexp case
23 (bug#9865).
24
252011-10-24 Glenn Morris <rgm@gnu.org>
26
27 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. (Bug#9819)
28
292011-10-24 Michael Albinus <michael.albinus@gmx.de>
30
31 * notifications.el: Add the requirement of a running D-Bus session
32 bus to the Commentary.
33
12011-10-24 Juri Linkov <juri@jurta.org> 342011-10-24 Juri Linkov <juri@jurta.org>
2 35
3 * isearch.el (isearch-occur): Let-bind `search-spaces-regexp' to 36 * isearch.el (isearch-occur): Let-bind `search-spaces-regexp' to
diff --git a/lisp/comint.el b/lisp/comint.el
index 591be5e2d9d..b91b82adb21 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2151,8 +2151,10 @@ current line, if point is on an output field.
2151If `comint-use-prompt-regexp' is non-nil, then return 2151If `comint-use-prompt-regexp' is non-nil, then return
2152the current line with any initial string matching the regexp 2152the current line with any initial string matching the regexp
2153`comint-prompt-regexp' removed." 2153`comint-prompt-regexp' removed."
2154 (let ((bof (field-beginning))) 2154 (let (bof)
2155 (if (null (get-char-property bof 'field)) ;Not `output'. 2155 (if (and (not comint-use-prompt-regexp)
2156 ;; Make sure we're in an input rather than output field.
2157 (null (get-char-property (setq bof (field-beginning)) 'field)))
2156 (field-string-no-properties bof) 2158 (field-string-no-properties bof)
2157 (comint-bol) 2159 (comint-bol)
2158 (buffer-substring-no-properties (point) (line-end-position))))) 2160 (buffer-substring-no-properties (point) (line-end-position)))))
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index b1cb0615e43..4b6f4d634ca 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -94,8 +94,9 @@ Optional LIGHTER is displayed in the modeline when the mode is on.
94Optional KEYMAP is the default keymap bound to the mode keymap. 94Optional KEYMAP is the default keymap bound to the mode keymap.
95 If non-nil, it should be a variable name (whose value is a keymap), 95 If non-nil, it should be a variable name (whose value is a keymap),
96 or an expression that returns either a keymap or a list of 96 or an expression that returns either a keymap or a list of
97 arguments for `easy-mmode-define-keymap'. If KEYMAP is not a symbol, 97 arguments for `easy-mmode-define-keymap'. If you supply a KEYMAP
98 this also defines the variable MODE-map. 98 argument that is not a symbol, this macro defines the variable
99 MODE-map and gives it the value that KEYMAP specifies.
99 100
100BODY contains code to execute each time the mode is enabled or disabled. 101BODY contains code to execute each time the mode is enabled or disabled.
101 It is executed after toggling the mode, and before running MODE-hook. 102 It is executed after toggling the mode, and before running MODE-hook.
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 54b17d58f33..4f9db02b5e1 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -645,6 +645,8 @@ a list of colors that the current display can handle."
645 ;; text in menu entries) and `SystemWindowText' (the default 645 ;; text in menu entries) and `SystemWindowText' (the default
646 ;; color w32 uses for the text in windows and dialogs) may 646 ;; color w32 uses for the text in windows and dialogs) may
647 ;; be the same display color and be adjacent in the list. 647 ;; be the same display color and be adjacent in the list.
648 ;; These system colors all have names prefixed with "System",
649 ;; which is hardcoded in w32fns.c (SYSTEM_COLOR_PREFIX).
648 ;; This makes them different to any other color. Bug#9722 650 ;; This makes them different to any other color. Bug#9722
649 (not (and (eq system-type 'windows-nt) 651 (not (and (eq system-type 'windows-nt)
650 (string-match-p "^System" (car (car l)))))) 652 (string-match-p "^System" (car (car l))))))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 592d0671c26..8b4e993149e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12011-10-26 Daiki Ueno <ueno@unixuser.org>
2
3 * mml.el (mml-quote-region): Quote <#secure> tag.
4 (mml-generate-mime-1): Unquote <#secure> tag.
5
12011-10-20 Chong Yidong <cyd@gnu.org> 62011-10-20 Chong Yidong <cyd@gnu.org>
2 7
3 * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24, 8 * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24,
@@ -18548,7 +18553,7 @@
18548 gnus-requst-update-info with explicit code to sync the in-memory 18553 gnus-requst-update-info with explicit code to sync the in-memory
18549 info read flags with the marks being sync'd to the backend. 18554 info read flags with the marks being sync'd to the backend.
18550 18555
18551 *gnus-util.el (gnus-pp): Add optional stream to match pp API. 18556 * gnus-util.el (gnus-pp): Add optional stream to match pp API.
18552 18557
185532004-09-28 Teodor Zlatanov <tzz@lifelogs.com> 185582004-09-28 Teodor Zlatanov <tzz@lifelogs.com>
18554 18559
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 0d2ae2a845a..352fa329e3e 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -525,7 +525,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
525 ;; Remove quotes from quoted tags. 525 ;; Remove quotes from quoted tags.
526 (goto-char (point-min)) 526 (goto-char (point-min))
527 (while (re-search-forward 527 (while (re-search-forward
528 "<#!+/?\\(part\\|multipart\\|external\\|mml\\)" 528 "<#!+/?\\(part\\|multipart\\|external\\|mml\\|secure\\)"
529 nil t) 529 nil t)
530 (delete-region (+ (match-beginning 0) 2) 530 (delete-region (+ (match-beginning 0) 2)
531 (+ (match-beginning 0) 3)))))) 531 (+ (match-beginning 0) 3))))))
@@ -1232,7 +1232,7 @@ If not set, `default-directory' will be used."
1232 (goto-char (point-min)) 1232 (goto-char (point-min))
1233 ;; Quote parts. 1233 ;; Quote parts.
1234 (while (re-search-forward 1234 (while (re-search-forward
1235 "<#!*/?\\(multipart\\|part\\|external\\|mml\\)" nil t) 1235 "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)" nil t)
1236 ;; Insert ! after the #. 1236 ;; Insert ! after the #.
1237 (goto-char (+ (match-beginning 0) 2)) 1237 (goto-char (+ (match-beginning 0) 2))
1238 (insert "!"))))) 1238 (insert "!")))))
diff --git a/lisp/ido.el b/lisp/ido.el
index 88599013ce6..fda4c0316f7 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3457,8 +3457,6 @@ This is to make them appear as if they were \"virtual buffers\"."
3457 (nconc ido-temp-list items) 3457 (nconc ido-temp-list items)
3458 (setq ido-temp-list items))) 3458 (setq ido-temp-list items)))
3459 3459
3460(declare-function tramp-tramp-file-p "tramp" (name))
3461
3462(defun ido-file-name-all-completions-1 (dir) 3460(defun ido-file-name-all-completions-1 (dir)
3463 (cond 3461 (cond
3464 ((ido-nonreadable-directory-p dir) '()) 3462 ((ido-nonreadable-directory-p dir) '())
@@ -3466,8 +3464,6 @@ This is to make them appear as if they were \"virtual buffers\"."
3466 ;; Caller must have done that if necessary. 3464 ;; Caller must have done that if necessary.
3467 3465
3468 ((and ido-enable-tramp-completion 3466 ((and ido-enable-tramp-completion
3469 (or (fboundp 'tramp-completion-mode-p)
3470 (require 'tramp nil t))
3471 (string-match "\\`/[^/]+[:@]\\'" dir)) 3467 (string-match "\\`/[^/]+[:@]\\'" dir))
3472 ;; Strip method:user@host: part of tramp completions. 3468 ;; Strip method:user@host: part of tramp completions.
3473 ;; Tramp completions do not include leading slash. 3469 ;; Tramp completions do not include leading slash.
@@ -3480,7 +3476,9 @@ This is to make them appear as if they were \"virtual buffers\"."
3480 ;; /ftp:user@host:./ => ok 3476 ;; /ftp:user@host:./ => ok
3481 (and 3477 (and
3482 (not (string= "/ftp:" dir)) 3478 (not (string= "/ftp:" dir))
3483 (tramp-tramp-file-p dir) 3479 (file-remote-p dir)
3480 ;; tramp-ftp-file-name-p is available only when tramp
3481 ;; has been loaded.
3484 (fboundp 'tramp-ftp-file-name-p) 3482 (fboundp 'tramp-ftp-file-name-p)
3485 (funcall 'tramp-ftp-file-name-p dir) 3483 (funcall 'tramp-ftp-file-name-p dir)
3486 (string-match ":\\'" dir) 3484 (string-match ":\\'" dir)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 56424f79476..55732194bc8 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1594,17 +1594,14 @@ and gid of the corresponding user is taken. Both parameters must be integers."
1594 1594
1595(defun tramp-sh-handle-file-directory-p (filename) 1595(defun tramp-sh-handle-file-directory-p (filename)
1596 "Like `file-directory-p' for Tramp files." 1596 "Like `file-directory-p' for Tramp files."
1597 ;; Care must be taken that this function returns `t' for symlinks
1598 ;; pointing to directories. Surely the most obvious implementation
1599 ;; would be `test -d', but that returns false for such symlinks.
1600 ;; CCC: Stefan Monnier says that `test -d' follows symlinks. And
1601 ;; I now think he's right. So we could be using `test -d', couldn't
1602 ;; we?
1603 ;;
1604 ;; Alternatives: `cd %s', `test -d %s'
1605 (with-parsed-tramp-file-name filename nil 1597 (with-parsed-tramp-file-name filename nil
1606 (with-file-property v localname "file-directory-p" 1598 ;; `file-directory-p' is used as predicate for filename completion.
1607 (tramp-run-test "-d" filename)))) 1599 ;; Sometimes, when a connection is not established yet, it is
1600 ;; desirable to return t immediately for "/method:foo:". It can
1601 ;; be expected that this is always a directory.
1602 (or (zerop (length localname))
1603 (with-file-property v localname "file-directory-p"
1604 (tramp-run-test "-d" filename)))))
1608 1605
1609(defun tramp-sh-handle-file-writable-p (filename) 1606(defun tramp-sh-handle-file-writable-p (filename)
1610 "Like `file-writable-p' for Tramp files." 1607 "Like `file-writable-p' for Tramp files."
diff --git a/lisp/notifications.el b/lisp/notifications.el
index 42cd40df36b..a4e7fdd5425 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -30,6 +30,9 @@
30;; 30;;
31;; (require 'notifications) 31;; (require 'notifications)
32 32
33;; For proper usage, Emacs must be started in an environment with an
34;; active D-Bus session bus.
35
33;;; Code: 36;;; Code:
34(eval-when-compile 37(eval-when-compile
35 (require 'cl)) 38 (require 'cl))
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)