emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion to have highlight related bindings consistent between sea


From: David Koppelman
Subject: Re: Suggestion to have highlight related bindings consistent between search-map and hi-lock-map
Date: Wed, 15 Jul 2015 10:44:14 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

The change is fine with me, the consistency makes sense. (I don't
use the default hi-lock bindings anyway.)

David


Kaushal <address@hidden> writes:

> 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"?
> kmA^2~/downloads/:git/emacs/lisp> ag 'define.*C\-xw'
> hi-lock.el
> 277: A  A (define-key map "\C-xwi" 'hi-lock-find-patterns)
> 278: A  A (define-key map "\C-xwl" 'highlight-lines-matching-regexp)
> 279: A  A (define-key map "\C-xwp" 'highlight-phrase)
> 280: A  A (define-key map "\C-xwh" 'highlight-regexp)
> 281: A  A (define-key map "\C-xw." 'highlight-symbol-at-point)
> 282: A  A (define-key map "\C-xwr" 'unhighlight-regexp)
> 283: A  A (define-key map "\C-xwb" 'hi-lock-write-interactive-patterns)
> kmA^2~/downloads/:git/emacs/lisp> ag 'define.*search-map\s+"h'
> bindings.el
> 935:(define-key search-map "hf" A  'hi-lock-find-patterns)
> 932:(define-key search-map "hl" A  'highlight-lines-matching-regexp)
> 931:(define-key search-map "hp" A  'highlight-phrase)
> 930:(define-key search-map "hr" A  'highlight-regexp)
> 933:(define-key search-map "h." A  'highlight-symbol-at-point)
> 934:(define-key search-map "hu" A  'unhighlight-regexp)
> 936:(define-key search-map "hw" A  'hi-lock-write-interactive-patterns)
> a**Some bindings are consistent but some are not. Here are the
> inconsistent ones:
> hi-lock.el A 277: (define-key map A  A  A  A "\C-xwi"
> 'hi-lock-find-patterns)
> bindings.el 935: (define-key search-map A  A  "hf" 'hi-lock-find-patterns)
> hi-lock.el A 282: (define-key map A  A  A  A "\C-xwr" 'unhighlight-regexp)
> bindings.el 934: (define-key search-map A  A  "hu" 'unhighlight-regexp)
> hi-lock.el A 280: (define-key map A  A  A  A "\C-xwh" 'highlight-regexp)
> bindings.el 930: (define-key search-map A  A  "hr" 'highlight-regexp)
> hi-lock.el A 283: (define-key map A  A  A  A "\C-xwb"
> 'hi-lock-write-interactive-patterns)
> bindings.el 936: (define-key search-map A  A  "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 A 277: (define-key map A  A  A  A "\C-xwf"
> 'hi-lock-find-patterns) ; changed
> bindings.el 935: (define-key search-map A  A  "hf" 'hi-lock-find-patterns)
> ; no change
> - Currently "C-x w u" is undefined; "u" for unhighlight
> hi-lock.el A 282: (define-key map A  A  A  A "\C-xwu" 'unhighlight-regexp)
> ; changed
> bindings.el 934: (define-key search-map A  A  "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 A 280: (define-key map A  A  A  A "\C-xwr" 'highlight-regexp) ;
> changed
> bindings.el 930: (define-key search-map A  A  "hr" 'highlight-regexp) ; no
> change
> - Currently "C-x w w" is undefined; "w" for write interactive patterns
> hi-lock.el A 283: (define-key map A  A  A  A "\C-xww"
> 'hi-lock-write-interactive-patterns) ; changed
> bindings.el 936: (define-key search-map A  A  "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.
> a**
> |------------+-------------+---------------------+------------------------------------|
> | search-map | hi-lock-map | last key in binding | function A  A  A  A  A 
> A  A  A  A  A  A  A  A  |
> |------------+-------------+---------------------+------------------------------------|
> | M-s h A  A  A | C-x w A  A  A  | l A  A  A  A  A  A  A  A  A  |
> highlight-lines-matching-regexp A  A |
> | M-s h A  A  A | C-x w A  A  A  | p A  A  A  A  A  A  A  A  A  |
> highlight-phrase A  A  A  A  A  A  A  A  A  |
> | M-s h A  A  A | C-x w A  A  A  | . A  A  A  A  A  A  A  A  A  |
> highlight-symbol-at-point A  A  A  A  A |
> |------------+-------------+---------------------+------------------------------------|
> | M-s h A  A  A | C-x w A  A  A  | f A  A  A  A  A  A  A  A  A  |
> hi-lock-find-patterns A  A  A  A  A  A  A |
> | M-s h A  A  A | C-x w A  A  A  | u A  A  A  A  A  A  A  A  A  |
> unhighlight-regexp A  A  A  A  A  A  A  A  |
> | M-s h A  A  A | C-x w A  A  A  | r A  A  A  A  A  A  A  A  A  |
> highlight-regexp A  A  A  A  A  A  A  A  A  |
> | M-s h A  A  A | C-x w A  A  A  | w A  A  A  A  A  A  A  A  A  |
> hi-lock-write-interactive-patterns |
> |------------+-------------+---------------------+------------------------------------|
> --
> Kaushal Modi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]