APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1553719596 0
# Wed Mar 27 20:46:36 2019 +0000
# Node ID e2ab121db02725cba44e974c06262301bd5edf3b
# Parent 1891d40eea7023046d32a7891a2065c65618370f
Don't rely on #'user-name-completion-1's current behaviour, comint.el
2019-03-27 Aidan Kehoe <kehoea(a)parhasard.net>
* comint.el (comint-dynamic-complete-as-username):
Update this to reflect pending changes removing
#'user-name-completion-1.
diff -r 1891d40eea70 -r e2ab121db027 ChangeLog
--- a/ChangeLog Sun Jun 10 17:11:11 2018 +0100
+++ b/ChangeLog Wed Mar 27 20:46:36 2019 +0000
@@ -1,3 +1,9 @@
+2019-03-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * comint.el (comint-dynamic-complete-as-username):
+ Update this to reflect pending changes removing
+ #'user-name-completion-1.
+
2018-06-10 Aidan Kehoe <kehoea(a)parhasard.net>
* Makefile (VERSION): XEmacs package 2.46 released.
diff -r 1891d40eea70 -r e2ab121db027 comint.el
--- a/comint.el Sun Jun 10 17:11:11 2018 +0100
+++ b/comint.el Wed Mar 27 20:46:36 2019 +0000
@@ -2318,15 +2318,25 @@
(filename (or (comint-match-partial-filename) ""))
(pathdir (file-name-directory filename))
(pathnondir (file-name-nondirectory filename)))
- (if (and (fboundp 'user-name-completion-1)
- (string-match "^[~]" pathnondir)
+ (if (and (> (length pathnondir) 0) (eql ?~ (aref pathnondir 0))
(not pathdir))
(let* ((user (substring pathnondir 1))
- (compl+uniq (user-name-completion-1 user))
- (completion (car compl+uniq))
- (uniq (cdr compl+uniq)))
+ completion uniq completion+uniq)
+ (if (fboundp 'user-name-completion-1)
+ (setq completion+uniq (user-name-completion-1 user)
+ completion (car completion+uniq)
+ uniq (cdr completion+uniq))
+ (if (eval-when-compile
+ (subrp (symbol-function 'multiple-value-call)))
+ (multiple-value-setq (completion uniq)
+ (user-name-completion user))
+ ;; This will work with a 21.4 byte compiler on a 21.5 XEmacs:
+ (eval '(multiple-value-setq (completion uniq)
+ (user-name-completion user)))))
(cond ((null completion)
- (if minibuffer-p (ding) (message "No completions of %s"
filename))
+ (if minibuffer-p
+ (ding)
+ (message "No completions of %s" filename))
(setq success nil))
((eq completion t) ; Means already completed "file".
(insert dirsuffix)
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
Show replies by date