emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99451: Make `initials' completion wo


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99451: Make `initials' completion work for /hh -> /home/horn again (bug#5524).
Date: Thu, 04 Feb 2010 23:21:11 -0500
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99451
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2010-02-04 23:21:11 -0500
message:
  Make `initials' completion work for /hh -> /home/horn again (bug#5524).
  * minibuffer.el (completion-initials-expand): Only check the presence
  of delims *within* the boundaries, since otherwise the / delim is
  always found for files.
modified:
  lisp/ChangeLog
  lisp/minibuffer.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-02-05 01:53:40 +0000
+++ b/lisp/ChangeLog    2010-02-05 04:21:11 +0000
@@ -1,5 +1,10 @@
 2010-02-05  Stefan Monnier  <address@hidden>
 
+       Make `initials' completion work for /hh -> /home/horn again (bug#5524).
+       * minibuffer.el (completion-initials-expand): Only check the presence
+       of delims *within* the boundaries, since otherwise the / delim is
+       always found for files.
+
        Fix up various corner case problems.
        * doc-view.el (doc-view-last-page-number): New function.
        (doc-view-mode, doc-view-last-page, doc-view-goto-page): Use it.
@@ -18,8 +23,8 @@
        Change strategy for marking < and > as template delimiters: mark
        them strictly in matching pairs.
 
-       * cc-mode.el (c-before-change): Use
-       c-get-state-before-change-functions.
+       * cc-mode.el (c-before-change):
+       Use c-get-state-before-change-functions.
        (c-common-init): Adapt to use
        c-get-state-before-change-functions (note plural).
 
@@ -31,7 +36,7 @@
        * cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props)
        (c-clear-<>-pair-props, c-clear-<-pair-props-if-match-after)
        (c-clear->-pair-props-if-match-before)
-       (c-before-change-check-<>-operators): new functions.
+       (c-before-change-check-<>-operators): New functions.
        (c-after-change-check-<>-operators): Use macro
        c-unmark-<->-as-paren.
 

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2010-01-13 08:35:10 +0000
+++ b/lisp/minibuffer.el        2010-02-05 04:21:11 +0000
@@ -2063,9 +2063,12 @@
 ;; Complete /ums to /usr/monnier/src or lch to list-command-history.
 
 (defun completion-initials-expand (str table pred)
-  (unless (or (zerop (length str))
-              (string-match completion-pcm--delim-wild-regex str))
-    (let ((bounds (completion-boundaries str table pred "")))
+  (let ((bounds (completion-boundaries str table pred "")))
+    (unless (or (zerop (length str))
+                ;; Only check within the boundaries, since the
+                ;; boundary char (e.g. /) might be in delim-regexp.
+                (string-match completion-pcm--delim-wild-regex str
+                              (car bounds)))
       (if (zerop (car bounds))
           (mapconcat 'string str "-")
         ;; If there's a boundary, it's trickier.  The main use-case


reply via email to

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