aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2009-01-14 02:29:52 +0000
committerJuanma Barranquero2009-01-14 02:29:52 +0000
commit9f3618b5f0bcbbe8e133041befac1497d2597ccb (patch)
tree35ade5fe9a46bb801b12eb4086c1a82e0c2ca9a0
parente5524cbabd7410f63d047f2fd8afebd5ce470f32 (diff)
downloademacs-9f3618b5f0bcbbe8e133041befac1497d2597ccb.tar.gz
emacs-9f3618b5f0bcbbe8e133041befac1497d2597ccb.zip
* minibuffer.el (minibuffer-message): Fix regexp so it doesn't exclude
MESSAGEs with internal square brackets (i.e., " this [test] message"). Use `string-match-p'. (completion--make-envvar-table, completion--file-name-table) (completion-pcm--string->pattern, completion-pcm--all-completions) (completion-pcm--filename-try-filter): Use `string-match-p'.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/minibuffer.el14
2 files changed, 17 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d917297e933..f99721f3c83 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12009-01-14 Juanma Barranquero <lekktu@gmail.com>
2
3 * minibuffer.el (minibuffer-message): Fix regexp so it doesn't exclude
4 MESSAGEs with internal square brackets (i.e., " this [test] message").
5 Use `string-match-p'.
6 (completion--make-envvar-table, completion--file-name-table)
7 (completion-pcm--string->pattern, completion-pcm--all-completions)
8 (completion-pcm--filename-try-filter): Use `string-match-p'.
9
12009-01-14 Juri Linkov <juri@jurta.org> 102009-01-14 Juri Linkov <juri@jurta.org>
2 11
3 * progmodes/bug-reference.el (bug-reference-fontify): Check for 12 * progmodes/bug-reference.el (bug-reference-fontify): Check for
@@ -16,7 +25,7 @@
16 25
172009-01-13 Jason Rumney <jasonr@gnu.org> 262009-01-13 Jason Rumney <jasonr@gnu.org>
18 27
19 * faces.el (face-valid-attribute-values): No stipple on w32. (Bug#884) 28 * faces.el (face-valid-attribute-values): No stipple on w32. (Bug#884)
20 29
212009-01-12 Juanma Barranquero <lekktu@gmail.com> 302009-01-12 Juanma Barranquero <lekktu@gmail.com>
22 31
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index fc42905c3df..9e762d4ba32 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -250,7 +250,7 @@ Enclose MESSAGE in [...] if this is not yet the case.
250If ARGS are provided, then pass MESSAGE through `format'." 250If ARGS are provided, then pass MESSAGE through `format'."
251 ;; Clear out any old echo-area message to make way for our new thing. 251 ;; Clear out any old echo-area message to make way for our new thing.
252 (message nil) 252 (message nil)
253 (setq message (if (and (null args) (string-match "\\[.+\\]" message)) 253 (setq message (if (and (null args) (string-match-p "\\` *\\[.+\\]\\'" message))
254 ;; Make sure we can put-text-property. 254 ;; Make sure we can put-text-property.
255 (copy-sequence message) 255 (copy-sequence message)
256 (concat " [" message "]"))) 256 (concat " [" message "]")))
@@ -949,7 +949,7 @@ the completions buffer."
949 949
950(defun completion--make-envvar-table () 950(defun completion--make-envvar-table ()
951 (mapcar (lambda (enventry) 951 (mapcar (lambda (enventry)
952 (substring enventry 0 (string-match "=" enventry))) 952 (substring enventry 0 (string-match-p "=" enventry)))
953 process-environment)) 953 process-environment))
954 954
955(defconst completion--embedded-envvar-re 955(defconst completion--embedded-envvar-re
@@ -985,7 +985,7 @@ the completions buffer."
985 ;; FIXME: Actually, this is not always right in the presence of 985 ;; FIXME: Actually, this is not always right in the presence of
986 ;; envvars, but there's not much we can do, I think. 986 ;; envvars, but there's not much we can do, I think.
987 (let ((start (length (file-name-directory string))) 987 (let ((start (length (file-name-directory string)))
988 (end (string-match "/" (cdr action)))) 988 (end (string-match-p "/" (cdr action))))
989 (list* 'boundaries start end))) 989 (list* 'boundaries start end)))
990 990
991 (t 991 (t
@@ -1359,7 +1359,7 @@ or a symbol chosen among `any', `star', `point'."
1359 (p 0) 1359 (p 0)
1360 (p0 0)) 1360 (p0 0))
1361 1361
1362 (while (setq p (string-match completion-pcm--delim-wild-regex string p)) 1362 (while (setq p (string-match-p completion-pcm--delim-wild-regex string p))
1363 (push (substring string p0 p) pattern) 1363 (push (substring string p0 p) pattern)
1364 (if (eq (aref string p) ?*) 1364 (if (eq (aref string p) ?*)
1365 (progn 1365 (progn
@@ -1415,7 +1415,7 @@ PATTERN is as returned by `completion-pcm--string->pattern'."
1415 compl 1415 compl
1416 (let ((poss ())) 1416 (let ((poss ()))
1417 (dolist (c compl) 1417 (dolist (c compl)
1418 (when (string-match regex c) (push c poss))) 1418 (when (string-match-p regex c) (push c poss)))
1419 poss))))) 1419 poss)))))
1420 1420
1421(defun completion-pcm--hilit-commonality (pattern completions) 1421(defun completion-pcm--hilit-commonality (pattern completions)
@@ -1614,9 +1614,9 @@ filter out additional entries (because TABLE migth not obey PRED)."
1614 (regexp-opt completion-ignored-extensions) 1614 (regexp-opt completion-ignored-extensions)
1615 "\\)\\'"))) 1615 "\\)\\'")))
1616 (dolist (f all) 1616 (dolist (f all)
1617 (unless (string-match re f) (push f try))) 1617 (unless (string-match-p re f) (push f try)))
1618 (or try all)))) 1618 (or try all))))
1619 1619
1620 1620
1621(defun completion-pcm--merge-try (pattern all prefix suffix) 1621(defun completion-pcm--merge-try (pattern all prefix suffix)
1622 (cond 1622 (cond