unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 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

* Re: loccur.el - loccur function should be autoloaded
  2019-08-06  8:10 ` Stefan Monnier
@ 2019-08-06 12:42   ` pwr
  0 siblings, 0 replies; 3+ messages in thread
From: pwr @ 2019-08-06 12:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> 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).

I was just cloning the ELPA repo but then saw your commit. Thanks :)




^ 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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).