aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/comint.el12
2 files changed, 15 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6c29a93950d..1ebca8675ce 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,11 @@
12011-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * comint.el (comint--table-subvert): Quote the all-completions output
4 (bug#9160).
5
12011-10-17 Martin Rudalics <rudalics@gmx.at> 62011-10-17 Martin Rudalics <rudalics@gmx.at>
2 7
3 * ido.el (ido-default-buffer-method): Remove redundant :type 8 * ido.el (ido-default-buffer-method): Remove redundant :type entry.
4 entry.
5 9
6 * menu-bar.el (menu-bar-file-menu): Add entry for making new 10 * menu-bar.el (menu-bar-file-menu): Add entry for making new
7 window on right of selected. (Bug#9350) Reword other window 11 window on right of selected. (Bug#9350) Reword other window
@@ -14,8 +18,8 @@
14 18
152011-10-15 Chong Yidong <cyd@stupidchicken.com> 192011-10-15 Chong Yidong <cyd@stupidchicken.com>
16 20
17 * net/network-stream.el (network-stream-open-starttls): Improve 21 * net/network-stream.el (network-stream-open-starttls):
18 detection of failure due to lack of TLS support. 22 Improve detection of failure due to lack of TLS support.
19 23
20 * mail/sendmail.el (sendmail-query-once): Tweak prompt message, 24 * mail/sendmail.el (sendmail-query-once): Tweak prompt message,
21 putting the input text in front and in bold. 25 putting the input text in front and in bold.
diff --git a/lisp/comint.el b/lisp/comint.el
index 52580db6186..c3ec17b02f4 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3079,9 +3079,9 @@ SS1 = (unquote SS2)."
3079 3079
3080(defun comint--table-subvert (table s1 s2 &optional quote-fun unquote-fun) 3080(defun comint--table-subvert (table s1 s2 &optional quote-fun unquote-fun)
3081 "Completion table that replaces the prefix S1 with S2 in STRING. 3081 "Completion table that replaces the prefix S1 with S2 in STRING.
3082When TABLE, S1 and S2 are provided by `apply-partially', the result 3082The result is a completion table which completes strings of the
3083is a completion table which completes strings of the form (concat S1 S) 3083form (concat S1 S) in the same way as TABLE completes strings of
3084in the same way as TABLE completes strings of the form (concat S2 S)." 3084the form (concat S2 S)."
3085 (lambda (string pred action) 3085 (lambda (string pred action)
3086 (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil 3086 (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil
3087 completion-ignore-case)) 3087 completion-ignore-case))
@@ -3106,13 +3106,15 @@ in the same way as TABLE completes strings of the form (concat S2 S)."
3106 ((eq action t) 3106 ((eq action t)
3107 (let ((bounds (completion-boundaries str table pred ""))) 3107 (let ((bounds (completion-boundaries str table pred "")))
3108 (if (>= (car bounds) (length s2)) 3108 (if (>= (car bounds) (length s2))
3109 res 3109 (if quote-fun (mapcar quote-fun res) res)
3110 (let ((re (concat "\\`" 3110 (let ((re (concat "\\`"
3111 (regexp-quote (substring s2 (car bounds)))))) 3111 (regexp-quote (substring s2 (car bounds))))))
3112 (delq nil 3112 (delq nil
3113 (mapcar (lambda (c) 3113 (mapcar (lambda (c)
3114 (if (string-match re c) 3114 (if (string-match re c)
3115 (substring c (match-end 0)))) 3115 (let ((str (substring c (match-end 0))))
3116 (if quote-fun
3117 (funcall quote-fun str) str))))
3116 res)))))) 3118 res))))))
3117 ;; E.g. action=nil and it's the only completion. 3119 ;; E.g. action=nil and it's the only completion.
3118 (res)))))) 3120 (res))))))