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

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

bug#13892: 24.3.50; Provide for customizing default regexp in hi-lock co


From: Jambunathan K
Subject: bug#13892: 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: bin6TNnfZdNB4.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: bin7jOIi3gH1g.bin
Description: subr.el.diff


reply via email to

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