* loccur.el - loccur function should be autoloaded
@ 2019-08-05 4:14 pwr
2019-08-06 8:10 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: pwr @ 2019-08-05 4:14 UTC (permalink / raw)
To: emacs-devel
Since the command loccur will nearly always be called before loccur-mode, this
should be autoloaded to avoid needing to explicitly require the mode (in this
modern age of package-initialize).
---
/Users/Paul/.emacs.d/backups/!Users!Paul!.emacs.d!packages!loccur-1.2.3!loccur.el~ 2019-08-05
14:06:10.000000000 +1000
+++ /Users/Paul/.emacs.d/packages/loccur-1.2.3/loccur.el 2019-08-05
14:08:58.000000000 +1000
@@ -166,6 +166,7 @@
(when (overlay-get ovl loccur-overlay-visible-property-name)
(overlay-put ovl 'face (if loccur-highlight-matching-regexp
'loccur-face nil))))))
+;;;###autoload
(defun loccur (regex)
"Perform a simple grep in current buffer.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: loccur.el - loccur function should be autoloaded
2019-08-05 4:14 loccur.el - loccur function should be autoloaded pwr
@ 2019-08-06 8:10 ` Stefan Monnier
2019-08-06 12:42 ` pwr
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2019-08-06 8:10 UTC (permalink / raw)
To: pwr; +Cc: emacs-devel
> Since the command loccur will nearly always be called before loccur-mode, this
> should be autoloaded to avoid needing to explicitly require the mode (in this
> modern age of package-initialize).
Indeed, thanks. Autloading loccur-mode is not very useful, in contrast.
I also added an autoload cookie for loccur-current, since the doc
suggests it as another entry point (I didn't add loccur-previous-match,
OTOH, since this one only works after another loccur use).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-06 12:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-05 4:14 loccur.el - loccur function should be autoloaded pwr
2019-08-06 8:10 ` Stefan Monnier
2019-08-06 12:42 ` pwr
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.