From: Kaushal <kaushal.modi@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Suggestion to have highlight related bindings consistent between search-map and hi-lock-map
Date: Fri, 10 Jul 2015 15:02:43 -0400 [thread overview]
Message-ID: <CAFyQvY1bmTOsa2XQBQ9c1RPsrgHhGQaHt3VZttVY-L4cQRG5-w@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4332 bytes --]
Hi,
I was trying to using the binding for highlight-regexp and I got confused
if the prefix was "C-x w r" or "M-s h r". I "grepping" (actually agging), I
found that below are the ONLY bindings that begin with "C-x w .." and "M-s
h .." (with the exact same number of bindings too).
Can we make the bindings consistent so that it doesn't matter is the user
is using "C-x w" or "M-s h"?
km²~/downloads/:git/emacs/lisp> ag 'define.*C\-xw'
hi-lock.el
277: (define-key map "\C-xwi" 'hi-lock-find-patterns)
278: (define-key map "\C-xwl" 'highlight-lines-matching-regexp)
279: (define-key map "\C-xwp" 'highlight-phrase)
280: (define-key map "\C-xwh" 'highlight-regexp)
281: (define-key map "\C-xw." 'highlight-symbol-at-point)
282: (define-key map "\C-xwr" 'unhighlight-regexp)
283: (define-key map "\C-xwb" 'hi-lock-write-interactive-patterns)
km²~/downloads/:git/emacs/lisp> ag 'define.*search-map\s+"h'
bindings.el
935:(define-key search-map "hf" 'hi-lock-find-patterns)
932:(define-key search-map "hl" 'highlight-lines-matching-regexp)
931:(define-key search-map "hp" 'highlight-phrase)
930:(define-key search-map "hr" 'highlight-regexp)
933:(define-key search-map "h." 'highlight-symbol-at-point)
934:(define-key search-map "hu" 'unhighlight-regexp)
936:(define-key search-map "hw" 'hi-lock-write-interactive-patterns)
Some bindings are consistent but some are not. Here are the inconsistent
ones:
hi-lock.el 277: (define-key map "\C-xwi" 'hi-lock-find-patterns)
bindings.el 935: (define-key search-map "hf" 'hi-lock-find-patterns)
hi-lock.el 282: (define-key map "\C-xwr" 'unhighlight-regexp)
bindings.el 934: (define-key search-map "hu" 'unhighlight-regexp)
hi-lock.el 280: (define-key map "\C-xwh" 'highlight-regexp)
bindings.el 930: (define-key search-map "hr" 'highlight-regexp)
hi-lock.el 283: (define-key map "\C-xwb"
'hi-lock-write-interactive-patterns)
bindings.el 936: (define-key search-map "hw"
'hi-lock-write-interactive-patterns)
*** Here are my suggested consistent bindings to fix the inconsistent ones:
***
- Currently "C-x w f" is undefined; "f" for find patterns
hi-lock.el 277: (define-key map "\C-xwf" 'hi-lock-find-patterns) ;
changed
bindings.el 935: (define-key search-map "hf" 'hi-lock-find-patterns) ;
no change
- Currently "C-x w u" is undefined; "u" for unhighlight
hi-lock.el 282: (define-key map "\C-xwu" 'unhighlight-regexp) ;
changed
bindings.el 934: (define-key search-map "hu" 'unhighlight-regexp) ; no
change
- "C-x w r" which was earlier bound to unhighlight-regexp should now be
bound to highlight-regexp; "r" for regexp
hi-lock.el 280: (define-key map "\C-xwr" 'highlight-regexp) ;
changed
bindings.el 930: (define-key search-map "hr" 'highlight-regexp) ; no
change
- Currently "C-x w w" is undefined; "w" for write interactive patterns
hi-lock.el 283: (define-key map "\C-xww"
'hi-lock-write-interactive-patterns) ; changed
bindings.el 936: (define-key search-map "hw"
'hi-lock-write-interactive-patterns) ; no change
Well.. turns out only 4 bindings need to change in hi-lock.el to make these
consistent.
|------------+-------------+---------------------+------------------------------------|
| search-map | hi-lock-map | last key in binding | function
|
|------------+-------------+---------------------+------------------------------------|
| M-s h | C-x w | l |
highlight-lines-matching-regexp |
| M-s h | C-x w | p | highlight-phrase
|
| M-s h | C-x w | . |
highlight-symbol-at-point |
|------------+-------------+---------------------+------------------------------------|
| M-s h | C-x w | f | hi-lock-find-patterns
|
| M-s h | C-x w | u | unhighlight-regexp
|
| M-s h | C-x w | r | highlight-regexp
|
| M-s h | C-x w | w |
hi-lock-write-interactive-patterns |
|------------+-------------+---------------------+------------------------------------|
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 11430 bytes --]
next reply other threads:[~2015-07-10 19:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 19:02 Kaushal [this message]
2015-07-11 18:50 ` Suggestion to have highlight related bindings consistent between search-map and hi-lock-map Kaushal
2015-07-11 19:48 ` Juri Linkov
2015-07-11 19:51 ` Kaushal
2015-07-12 7:07 ` Vaidheeswaran C
2015-07-12 13:21 ` Kaushal
2015-07-12 14:48 ` Vaidheeswaran C
2015-07-12 14:48 ` Vaidheeswaran C
2015-07-12 15:15 ` Eli Zaretskii
2015-07-12 15:33 ` Vaidheeswaran C
2015-07-12 16:25 ` Eli Zaretskii
2015-07-12 16:41 ` Kaushal
2015-07-19 7:59 ` Vaidheeswaran C
2015-07-29 2:00 ` Kaushal
2015-07-29 22:31 ` Juri Linkov
2015-07-30 22:48 ` Stefan Monnier
2015-07-31 1:32 ` Kaushal
2015-08-18 16:22 ` Kaushal
2015-08-19 22:23 ` Juri Linkov
2015-08-20 1:09 ` Kaushal
2016-02-02 20:45 ` Kaushal Modi
2016-02-05 0:54 ` Juri Linkov
2016-02-05 1:48 ` John Wiegley
2016-02-05 17:00 ` Kaushal Modi
2016-02-07 17:57 ` John Wiegley
2016-02-07 19:23 ` Alan Mackenzie
2015-07-15 15:44 ` David Koppelman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFyQvY1bmTOsa2XQBQ9c1RPsrgHhGQaHt3VZttVY-L4cQRG5-w@mail.gmail.com \
--to=kaushal.modi@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.