[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog simple.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog simple.el |
Date: |
Wed, 19 Aug 2009 02:32:03 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 09/08/19 02:32:02
Modified files:
lisp : ChangeLog simple.el
Log message:
(choose-completion-string): Don't rely on
minibuffer-completing-file-name
and ad-hoc checks to decide whether to continue completion or not.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15964&r2=1.15965
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.1003&r2=1.1004
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15964
retrieving revision 1.15965
diff -u -b -r1.15964 -r1.15965
--- ChangeLog 19 Aug 2009 02:15:19 -0000 1.15964
+++ ChangeLog 19 Aug 2009 02:31:59 -0000 1.15965
@@ -1,5 +1,9 @@
2009-08-19 Stefan Monnier <address@hidden>
+ * simple.el (choose-completion-string): Don't rely on
+ minibuffer-completing-file-name and ad-hoc checks to decide whether
+ to continue completion or not.
+
* minibuffer.el (minibuffer-hide-completions): New function.
(completion--do-completion): Use it.
(completions-annotations): New face.
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.1003
retrieving revision 1.1004
diff -u -b -r1.1003 -r1.1004
--- simple.el 13 Aug 2009 00:57:22 -0000 1.1003
+++ simple.el 19 Aug 2009 02:32:02 -0000 1.1004
@@ -368,7 +368,7 @@
(interactive "p")
(next-error-no-select (- (or n 1))))
-;;; Internal variable for `next-error-follow-mode-post-command-hook'.
+;; Internal variable for `next-error-follow-mode-post-command-hook'.
(defvar next-error-follow-last-line nil)
(define-minor-mode next-error-follow-minor-mode
@@ -382,8 +382,8 @@
(add-hook 'post-command-hook 'next-error-follow-mode-post-command-hook nil
t)
(make-local-variable 'next-error-follow-last-line)))
-;;; Used as a `post-command-hook' by `next-error-follow-mode'
-;;; for the *Compilation* *grep* and *Occur* buffers.
+;; Used as a `post-command-hook' by `next-error-follow-mode'
+;; for the *Compilation* *grep* and *Occur* buffers.
(defun next-error-follow-mode-post-command-hook ()
(unless (equal next-error-follow-last-line (line-number-at-pos))
(setq next-error-follow-last-line (line-number-at-pos))
@@ -4475,8 +4475,8 @@
(/= arg 1) t nil)))))
-;;; Many people have said they rarely use this feature, and often type
-;;; it by accident. Maybe it shouldn't even be on a key.
+;; Many people have said they rarely use this feature, and often type
+;; it by accident. Maybe it shouldn't even be on a key.
(put 'set-goal-column 'disabled t)
(defun set-goal-column (arg)
@@ -5855,13 +5855,19 @@
minibuffer-completion-table
;; If this is reading a file name, and the file name chosen
;; is a directory, don't exit the minibuffer.
- (if (and minibuffer-completing-file-name
- (file-directory-p (field-string (point-max))))
+ (let* ((result (buffer-substring (field-beginning) (point)))
+ (bounds
+ (completion-boundaries result minibuffer-completion-table
+ minibuffer-completion-predicate
+ "")))
+ (if (eq (car bounds) (length result))
+ ;; The completion chosen leads to a new set of completions
+ ;; (e.g. it's a directory): don't exit the minibuffer yet.
(let ((mini (active-minibuffer-window)))
(select-window mini)
(when minibuffer-auto-raise
(raise-frame (window-frame mini))))
- (exit-minibuffer)))))))
+ (exit-minibuffer))))))))
(define-derived-mode completion-list-mode nil "Completion List"
"Major mode for buffers showing lists of possible completions.
@@ -6319,8 +6325,8 @@
See also `normal-erase-is-backspace'."
(interactive "P")
(let ((enabled (or (and arg (> (prefix-numeric-value arg) 0))
- (and (not arg)
- (not (eq 1 (terminal-parameter
+ (not (or arg
+ (eq 1 (terminal-parameter
nil 'normal-erase-is-backspace)))))))
(set-terminal-parameter nil 'normal-erase-is-backspace
(if enabled 1 0))