[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/loccur ca9c215 1/2: * packages/loccur/loccur.el (loccur
From: |
Stefan Monnier |
Subject: |
[elpa] externals/loccur ca9c215 1/2: * packages/loccur/loccur.el (loccur, loccur-current): Autoload. |
Date: |
Mon, 30 Nov 2020 18:40:31 -0500 (EST) |
branch: externals/loccur
commit ca9c2159f35d251a70cd03a3b2cfd3760565f3c7
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* packages/loccur/loccur.el (loccur, loccur-current): Autoload.
Suggested by Paul <pwr@sdf.org>.
(loccur-mode): Don't autoload any more.
---
loccur.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/loccur.el b/loccur.el
index 2cd7bee..e4293f4 100644
--- a/loccur.el
+++ b/loccur.el
@@ -1,6 +1,6 @@
;;; loccur.el --- Perform an occur-like folding in current buffer -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2016 Free Software Foundation, Inc
+;; Copyright (C) 2009-2019 Free Software Foundation, Inc
;;
;; Author: Alexey Veretennikov <alexey.veretennikov@gmail.com>
;;
@@ -30,13 +30,12 @@
;;
;; Add the following to your .emacs file:
;;
-;; (require 'loccur)
-;; ;; defines shortcut for loccur of the current word
-;; (define-key global-map [(control o)] 'loccur-current)
-;; ;; defines shortcut for the interactive loccur command
-;; (define-key global-map [(control meta o)] 'loccur)
-;; ;; defines shortcut for the loccur of the previously found word
-;; (define-key global-map [(control shift o)] 'loccur-previous-match)
+;; ;; defines shortcut for loccur of the current word
+;; (define-key global-map [(control o)] 'loccur-current)
+;; ;; defines shortcut for the interactive loccur command
+;; (define-key global-map [(control meta o)] 'loccur)
+;; ;; defines shortcut for the loccur of the previously found word
+;; (define-key global-map [(control shift o)] 'loccur-previous-match)
;;
;;; Issues:
;; Using with smooth-scrolling.el sometimes
@@ -90,7 +89,6 @@
map)
"Keymap for the variable `loccur-mode'.")
-;;;###autoload
(define-minor-mode loccur-mode
"Minor mode for navigating through the file.
Hides all lines without matches like `occur' does, but without opening
@@ -136,6 +134,7 @@ Default: t"
(defvar-local loccur-current-search nil
"The expression to search in the current active mode.")
+;;;###autoload
(defun loccur-current ()
"Call `loccur' for the current word."
(interactive)
@@ -166,6 +165,7 @@ REGEX is regexp to search"
(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.