Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
6e30a99a
Commit
6e30a99a
authored
May 26, 1998
by
Richard M. Stallman
Browse files
(minibuffer-history-case-insensitive-variables): New var.
(previous-matching-history-element): Implement it.
parent
fdc4f7a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
lisp/simple.el
lisp/simple.el
+16
-3
No files found.
lisp/simple.el
View file @
6e30a99a
...
...
@@ -652,12 +652,21 @@ in this use of the minibuffer.")
(
defun
minibuffer-history-initialize
()
(
setq
minibuffer-text-before-history
nil
))
(
defcustom
minibuffer-history-case-insensitive-variables
nil
"
*Minibuffer
history
variables
for
which
matching
should
ignore
case.
If
a
history
variable
is
a
member
of
this
list,
then
the
\\[previous-matching-history-element]
and
\\[next-matching-history-element]
\
commands
ignore
case
when
searching
it,
regardless
of
`
case-fold-search
'.
"
:type '(repeat variable)
:group 'minibuffer)
(defun previous-matching-history-element (regexp n)
"
Find
the
previous
history
element
that
matches
REGEXP.
\(Previous
history
elements
refer
to
earlier
actions.
)
With
prefix
argument
N,
search
for
Nth
previous
match.
If
N
is
negative,
find
the
next
or
Nth
next
match.
An uppercase letter in REGEXP makes the search case-sensitive."
An
uppercase
letter
in
REGEXP
makes
the
search
case-sensitive.
See
also
`
minibuffer-history-case-insensitive-variables
'.
"
(interactive
(let* ((enable-recursive-minibuffers t)
(regexp (read-from-minibuffer "
Previous
element
matching
(
regexp
)
:
"
...
...
@@ -678,8 +687,12 @@ An uppercase letter in REGEXP makes the search case-sensitive."
(let ((history (symbol-value minibuffer-history-variable))
(case-fold-search
(if (isearch-no-upper-case-p regexp t) ; assume isearch.el is dumped
;; Respect the user's setting for case-fold-search:
case-fold-search
;; On some systems, ignore case for file names.
(if (memq minibuffer-history-variable
minibuffer-history-case-insensitive-variables)
t
;; Respect the user's setting for case-fold-search:
case-fold-search)
nil))
prevpos
(pos minibuffer-history-position))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment