diff options
| author | Jambunathan K | 2013-03-08 09:48:16 +0530 |
|---|---|---|
| committer | Jambunathan K | 2013-03-08 09:48:16 +0530 |
| commit | eb1a6e153a556de71886eb0d3f4deb7e6674c35c (patch) | |
| tree | c7b690e69b6d3446635734cd7e12eb7805ed71e3 /lisp/replace.el | |
| parent | 0bce5d9eb88ed1020385874ca8b3367ad6ee4359 (diff) | |
| download | emacs-eb1a6e153a556de71886eb0d3f4deb7e6674c35c.tar.gz emacs-eb1a6e153a556de71886eb0d3f4deb7e6674c35c.zip | |
Provide for customizing default regexp in hi-lock commands (Bug#13892).
* lisp/hi-lock.el (hi-lock-read-regexp-defaults-function): New var.
(hi-lock-read-regexp-defaults): New defun.
(hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Propagate above change. Update
docstring.
* lisp/subr.el (find-tag-default-as-regexp): New defun.
* lisp/replace.el (read-regexp): Propagate above change.
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 86b1aa27069..ceb0fe4a63e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -603,15 +603,7 @@ If HISTORY is nil, `regexp-history' is used." | |||
| 603 | (append | 603 | (append |
| 604 | suggestions | 604 | suggestions |
| 605 | (list | 605 | (list |
| 606 | ;; Regexp for tag at point. | 606 | (find-tag-default-as-regexp) |
| 607 | (let* ((tagf (or find-tag-default-function | ||
| 608 | (get major-mode 'find-tag-default-function) | ||
| 609 | 'find-tag-default)) | ||
| 610 | (tag (funcall tagf))) | ||
| 611 | (cond ((not tag) "") | ||
| 612 | ((eq tagf 'find-tag-default) | ||
| 613 | (format "\\_<%s\\_>" (regexp-quote tag))) | ||
| 614 | (t (regexp-quote tag)))) | ||
| 615 | (car regexp-search-ring) | 607 | (car regexp-search-ring) |
| 616 | (regexp-quote (or (car search-ring) "")) | 608 | (regexp-quote (or (car search-ring) "")) |
| 617 | (car (symbol-value query-replace-from-history-variable))))) | 609 | (car (symbol-value query-replace-from-history-variable))))) |