emacs-diffs
[Top][All Lists]
Advanced

[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: Mon, 11 May 2009 15:35:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/05/11 15:35:48

Modified files:
        lisp           : ChangeLog simple.el 

Log message:
        (completion-setup-function):
        Only modify the default-directory in *Completions* (bug#3250).
        Take partial-completion into account when setting default-directory.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15635&r2=1.15636
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.986&r2=1.987

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15635
retrieving revision 1.15636
diff -u -b -r1.15635 -r1.15636
--- ChangeLog   10 May 2009 22:01:20 -0000      1.15635
+++ ChangeLog   11 May 2009 15:35:44 -0000      1.15636
@@ -1,3 +1,9 @@
+2009-05-11  Stefan Monnier  <address@hidden>
+
+       * simple.el (completion-setup-function):
+       Only modify the default-directory in *Completions* (bug#3250).
+       Take partial-completion into account when setting default-directory.
+
 2009-05-10  Chong Yidong  <address@hidden>
 
        * emacs-lisp/cl-macs.el (lexical-let*): Doc fix (Bug#3178).
@@ -16,26 +22,22 @@
 
 2009-05-08  Kenichi Handa  <address@hidden>
 
-       * international/encoded-kb.el (encoded-kbd-setup-keymap): Fix for
-       big5.
-
-       * international/mule-diag.el (describe-coding-system): Fix for
-       big5.
+       * international/encoded-kb.el (encoded-kbd-setup-keymap):
+       * international/mule-diag.el (describe-coding-system): Fix for big5.
 
 2009-05-07  Martin Rudalics  <address@hidden>
 
        * window.el (split-window-sensibly): New function.
        (split-height-threshold, split-width-threshold): State in
-       doc-string that these affect split-window-sensibly.  Change
-       customization subtype from number to integer.
+       doc-string that these affect split-window-sensibly.
+       Change customization subtype from number to integer.
        (window--splittable-p): Rename to window-splittable-p since it's
-       referred to in doc-string of split-window-sensibly.  Update
-       doc-string.
+       referred to in doc-string of split-window-sensibly.  Update doc-string.
        (window--try-to-split-window): Unconditionally call
        split-window-preferred-function and move splitting functionality
        to split-window-sensibly (Bug#3142).
-       (split-window-preferred-function): Rewrite doc-string.  Don't
-       allow nil as customization type.
+       (split-window-preferred-function): Rewrite doc-string.
+       Don't allow nil as customization type.
 
 2009-05-07  Chong Yidong  <address@hidden>
 
@@ -104,8 +106,8 @@
        * progmodes/cc-langs.el (c-constant-kwds): New ObjC keywords
        "YES", "NO", "NS_DURING", "NS_HANDLER", "NS_ENDHANDLER".
 
-       * progmodes/cc-align.el (c-lineup-ObjC-method-call-colons): New
-       function.
+       * progmodes/cc-align.el (c-lineup-ObjC-method-call-colons):
+       New function.
 
 2009-04-29  Chong Yidong  <address@hidden>
 
@@ -114,8 +116,8 @@
 2009-04-29  Ulrich Mueller  <address@hidden>
 
        * files.el (hack-local-variables-prop-line)
-       (hack-local-variables, dir-locals-read-from-file): Bind
-       read-circle to nil before reading.
+       (hack-local-variables, dir-locals-read-from-file):
+       Bind read-circle to nil before reading.
 
 2009-04-28  Geert Kloosterman  <address@hidden>  (tiny change)
 

Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.986
retrieving revision 1.987
diff -u -b -r1.986 -r1.987
--- simple.el   25 Apr 2009 15:27:48 -0000      1.986
+++ simple.el   11 May 2009 15:35:47 -0000      1.987
@@ -5851,20 +5851,22 @@
 ;; after the text of the completion list buffer is written.
 (defun completion-setup-function ()
   (let* ((mainbuf (current-buffer))
-         (mbuf-contents (minibuffer-completion-contents))
-         common-string-length)
+         (base-dir
     ;; When reading a file name in the minibuffer,
-    ;; set default-directory in the minibuffer
-    ;; so it will get copied into the completion list buffer.
+          ;; try and find the right default-directory to set in the
+          ;; completion list buffer.
+          ;; FIXME: Why do we do that, actually?  --Stef
     (if minibuffer-completing-file-name
-       (with-current-buffer mainbuf
-         (setq default-directory
-                (file-name-directory (expand-file-name mbuf-contents)))))
+              (file-name-as-directory
+               (expand-file-name
+                (substring (minibuffer-completion-contents)
+                           0 (or completion-base-size 0)))))))
     (with-current-buffer standard-output
       (let ((base-size completion-base-size)) ;Read before killing localvars.
         (completion-list-mode)
         (set (make-local-variable 'completion-base-size) base-size))
       (set (make-local-variable 'completion-reference-buffer) mainbuf)
+      (if base-dir (setq default-directory base-dir))
       (unless completion-base-size
         ;; This shouldn't be needed any more, but further analysis is needed
         ;; to make sure it's the case.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]