Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
16140f7e
Commit
16140f7e
authored
Feb 06, 2016
by
Artur Malabarba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/menu-bar.el (menu-bar-options-menu): New search submenu
(menu-bar-search-options-menu): New variable
parent
3db6adb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
6 deletions
+49
-6
lisp/menu-bar.el
lisp/menu-bar.el
+49
-6
No files found.
lisp/menu-bar.el
View file @
16140f7e
...
...
@@ -1250,6 +1250,52 @@ mail status in mode line"))
:enable (not (truncated-partial-width-window-p))))
menu))
(defvar menu-bar-search-options-menu
(let ((menu (make-sparse-keymap "
Search
Options
")))
(dolist (x '((character-fold-to-regexp "
Fold
Characters
" "
Character
folding
")
(isearch-symbol-regexp "
Whole
Symbols
" "
Whole
symbol
")
(word-search-regexp "
Whole
Words
" "
Whole
word
")))
(bindings--define-key menu (vector (nth 0 x))
`(menu-item ,(nth 1 x)
(lambda ()
(interactive)
(setq search-default-mode #',(nth 0 x))
(message ,(format "
%s
search
enabled
" (nth 2 x))))
:help ,(format "
Enable
%s
search
" (downcase (nth 2 x)))
:button (:radio . (eq search-default-mode #',(nth 0 x))))))
(bindings--define-key menu [regexp-search]
'(menu-item "
Regular
Expression
"
(lambda ()
(interactive)
(setq search-default-mode t)
(message "
Regular-expression
search
enabled
"))
:help "
Enable
regular-expression
search
"
:button (:radio . (eq search-default-mode t))))
(bindings--define-key menu [regular-search]
'(menu-item "
Literal
Search
"
(lambda ()
(interactive)
(when search-default-mode
(setq search-default-mode nil)
(when (symbolp search-default-mode)
(message "
Literal
search
enabled
"))))
:help "
Disable
special
search
modes
"
:button (:radio . (not search-default-mode))))
(bindings--define-key menu [custom-separator]
menu-bar-separator)
(bindings--define-key menu [case-fold-search]
(menu-bar-make-toggle
toggle-case-fold-search case-fold-search
"
Ignore
Case
"
"
Case-Insensitive
Search
%s
"
"
Ignore
letter-case
in
search
commands
"))
menu))
(defvar menu-bar-options-menu
(let ((menu (make-sparse-keymap "
Options
")))
(bindings--define-key menu [customize]
...
...
@@ -1361,12 +1407,9 @@ mail status in mode line"))
(:visible (and (boundp 'cua-enable-cua-keys)
(not cua-enable-cua-keys)))))
(bindings--define-key menu [case-fold-search]
(menu-bar-make-toggle
toggle-case-fold-search case-fold-search
"
Ignore
Case
for
Search
"
"
Case-Insensitive
Search
%s
"
"
Ignore
letter-case
in
search
commands
"))
(bindings--define-key menu [search-options]
`(menu-item "
Default
Search
Options
"
,menu-bar-search-options-menu))
(bindings--define-key menu [line-wrapping]
`(menu-item "
Line
Wrapping
in
This
Buffer
"
...
...
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