emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#13892: closed (24.3.50; Provide for customizing de


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13892: closed (24.3.50; Provide for customizing default regexp in hi-lock commands)
Date: Fri, 08 Mar 2013 04:31:02 +0000

Your message dated Fri, 08 Mar 2013 09:59:42 +0530
with message-id <address@hidden>
and subject line Re: bug#13892: 24.3.50; Provide for customizing default regexp 
in hi-lock commands
has caused the debbugs.gnu.org bug report #13892,
regarding 24.3.50; Provide for customizing default regexp in hi-lock commands
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
13892: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13892
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.50; Provide for customizing default regexp in hi-lock commands Date: Wed, 06 Mar 2013 23:26:09 +0530
Provide for customizing default regexp in hi-lock commands

See bug#13687 & Co. disussion surrounding this feature-let.  

Let me know if the patch is OK, so that I can install it in trunk.

Attachment: binxUiFIh5btC.bin
Description: hi-lock.el.diff


I also need a ready-made function for retrieving the regexp for symbol
at point.

I can install this as a new defun in subr.el

    (defun find-tag-default-as-regexp ()
      (let* ((tagf (or find-tag-default-function
                       (get major-mode 'find-tag-default-function)
                       'find-tag-default))
             (tag (funcall tagf)))
        (cond ((not tag))
              ((eq tagf 'find-tag-default)
               (format "\\_<%s\\_>" (regexp-quote tag)))
              (t (regexp-quote tag)))))

or

Augment existing `find-tag-default' to take an optional argument like so


Attachment: binQD7WokGwNH.bin
Description: subr.el.diff


--- End Message ---
--- Begin Message --- Subject: Re: bug#13892: 24.3.50; Provide for customizing default regexp in hi-lock commands Date: Fri, 08 Mar 2013 09:59:42 +0530 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
Juri Linkov <address@hidden> writes:

>> +(defvar hi-lock-read-regexp-defaults-function
>> +  'hi-lock-read-regexp-defaults
>> +  "Function that provides default regexp(s) for highlighting commands.
>> +This function should take one argument OP and return one of nil,
>> +a regexp or a list of regexps for use with highlighting command
>> +OP.  OP, a symbol, can be one of `phrase', `line' or `nil'
>> +signifying commands `hi-lock-face-phrase-buffer',
>> +`hi-lock-line-face-buffer' and `hi-lock-face-buffer'
>> +respectively.
>
> Requiring an additional argument `op' means that we wouldn't
> be able to customize `hi-lock-read-regexp-defaults-function'
> to just `find-tag-default' or `find-tag-default-as-regexp'.
> I think there is no need to distinguish between different
> hi-lock commands since one user would very likely prefer
> the one way to get the default for all hi-lock commands,
> so you could call `hi-lock-read-regexp-defaults-function'
> without arguments.

Committed as bzr revision 111971.

I have removed OP, updated the docstring.  I have also introduced
`find-tag-default-as-regexp' in subr.el.



--- End Message ---

reply via email to

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