aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-11-25 03:59:19 +0000
committerStefan Monnier2009-11-25 03:59:19 +0000
commitcb190d7d5f3a63086e3f28981ca175945305a3c0 (patch)
treef42d80d31cf0faa3ae6276887c07790bd9b685eb
parente2ec6dd51362e1fe7c9b66cf8eac2c3366ba3e92 (diff)
downloademacs-cb190d7d5f3a63086e3f28981ca175945305a3c0.tar.gz
emacs-cb190d7d5f3a63086e3f28981ca175945305a3c0.zip
(string-prefix-p): New function.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/subr.el7
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e0125c85b73..d02dbadd9ca 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12009-11-25 Stefan Monnier <monnier@iro.umontreal.ca> 12009-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * subr.el (string-prefix-p): New function.
4
3 * man.el (Man-completion-cache): New var. 5 * man.el (Man-completion-cache): New var.
4 (Man-completion-table): Use it. 6 (Man-completion-table): Use it.
5 7
diff --git a/lisp/subr.el b/lisp/subr.el
index 2bc4c6b2bd2..9cbf4ab9ffc 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3193,6 +3193,13 @@ and replace a sub-expression, e.g.
3193 (setq matches (cons (substring string start l) matches)) ; leftover 3193 (setq matches (cons (substring string start l) matches)) ; leftover
3194 (apply #'concat (nreverse matches))))) 3194 (apply #'concat (nreverse matches)))))
3195 3195
3196(defun string-prefix-p (str1 str2 &optional ignore-case)
3197 "Return non-nil if STR1 is a prefix of STR2.
3198If IGNORE-CASE is non-nil, the comparison is done without paying attention
3199to case differences."
3200 (eq t (compare-strings str1 nil nil
3201 str2 0 (length str1) ignore-case)))
3202
3196;;;; invisibility specs 3203;;;; invisibility specs
3197 3204
3198(defun add-to-invisibility-spec (element) 3205(defun add-to-invisibility-spec (element)