]> code.delx.au - gnu-emacs-elpa/commitdiff
Fixed checkdoc issues
authorAlexey Veretennikov <alexey.veretennikov@gmail.com>
Thu, 11 Jun 2015 17:37:32 +0000 (19:37 +0200)
committerAlexey Veretennikov <alexey.veretennikov@gmail.com>
Sun, 27 Dec 2015 19:39:38 +0000 (20:39 +0100)
loccur.el

index 863bee35a300ccf46b434ade41834de4ea9841ce..56c92d7a9e80b84be8751dea315b584cdeadcf15 100644 (file)
--- a/loccur.el
+++ b/loccur.el
 ;; !SECTION! Possible highlighting of the matching regex\r
 \r
 (defvar loccur-highlight-matching-regexp t\r
-  "If set to a non-nil value, the part of the line matching the\r
-regex is highlighted. Use loccur-toggle-highlight to modify its\r
-value interactively.")\r
+  "Determines if the part of the line matching the regex is highlighted.\r
+If set to a non-nil value, highlight.  Use `loccur-toggle-highlight' to\r
+modify its value interactively.")\r
 \r
 (defcustom loccur-jump-beginning-of-line nil\r
-  "Determines if cursor shall be at the beginning of the line\r
-when the loccur function is called.")\r
+  "Set cursor to the beginning of the line when the loccur function is called.")\r
 \r
 (defun loccur-toggle-highlight()\r
   "Toggles the highlighting of the part of the line matching the\r
@@ -103,6 +102,7 @@ regex given in the loccur buffer."
     (,(kbd "RET") . loccur-current)))\r
 \r
 (defun loccur-toggle-mode (regex)\r
+  "Toggle the function `loccur-mode' for REGEX."\r
   (if (or loccur-mode\r
           (null regex)\r
           (zerop (length regex)))\r
@@ -120,11 +120,11 @@ regex given in the loccur buffer."
 ;; !SUBSECTION! History\r
 \r
 (defvar loccur-history nil\r
-  "History of previously searched expressions for the prompt")\r
+  "History of previously searched expressions for the prompt.")\r
 (make-variable-buffer-local 'loccur-history)\r
 \r
 (defvar loccur-last-match nil\r
-  "Last match found")\r
+  "Last match found.")\r
 (make-variable-buffer-local 'loccur-last-match)\r
 \r
 \r
@@ -141,7 +141,8 @@ regex given in the loccur buffer."
   "A list of currently active overlays.")\r
 (make-variable-buffer-local 'loccur-overlay-list)\r
 \r
-(defun loccur-create-highlighted-overlays(buffer-matches)\r
+(defun loccur-create-highlighted-overlays (buffer-matches)\r
+  "Create the list of overlays for BUFFER-MATCHES."\r
   (let ((overlays\r
          (mapcar (lambda (match)\r
                    (make-overlay\r
@@ -158,6 +159,7 @@ regex given in the loccur buffer."
 \r
 \r
 (defun loccur-create-invisible-overlays (ovl-bounds)\r
+  "Create a list of invisible overlays by given OVL-BOUNDS."\r
   (let ((overlays\r
          (mapcar (lambda (bnd)\r
                    (make-overlay\r
@@ -175,11 +177,13 @@ regex given in the loccur buffer."
 \r
 \r
 (defun loccur-remove-overlays ()\r
+  "Remove all overlays."\r
   (remove-overlays (point-min) (point-max) loccur-overlay-property-name t)\r
   (setq loccur-overlay-list nil))\r
 \r
 \r
 (defun loccur-create-overlay-bounds-btw-lines (buffer-matches)\r
+  "Create a list of overlays between matched lines BUFFER-MATCHES."\r
   (let ((prev-end (point-min))\r
         (overlays (list)))\r
     (when buffer-matches\r
@@ -198,11 +202,10 @@ regex given in the loccur buffer."
 ;; !SECTION! Main functions, those actually performing the loccur\r
 \r
 (defun loccur (regex)\r
-  "Perform a simple grep in current buffer for the regular\r
-expression REGEX\r
+  "Perform a simple grep in current buffer.\r
 \r
 This command hides all lines from the current buffer except those\r
-containing the regular expression REGEX. A second call of the function\r
+containing the regular expression REGEX.  A second call of the function\r
 unhides lines again"\r
   (interactive\r
    (if loccur-mode\r
@@ -222,7 +225,7 @@ unhides lines again"
   (loccur (current-word)))\r
 \r
 (defun loccur-prompt ()\r
-  "Returns the default value of the prompt.\r
+  "Return the default value of the prompt.\r
 \r
 Default value for prompt is a current word or active region(selection),\r
 if its size is 1 line"\r
@@ -241,6 +244,9 @@ if its size is 1 line"
 \r
 \r
 (defun loccur-1 (regex)\r
+  "Implementation of the `loccur' functionality.\r
+\r
+REGEX is an argument to `loccur'."\r
   (let* ((buffer-matches (loccur-find-matches regex))\r
          (ovl-bounds (loccur-create-overlay-bounds-btw-lines buffer-matches)))\r
     (setq loccur-overlay-list\r
@@ -253,7 +259,9 @@ if its size is 1 line"
 \r
 \r
 (defun loccur-find-matches (regex)\r
-  "Returns a list of 4-number tuples, specifying begnning of the line,\r
+  "Find all occurences in the current buffer for given REGEX.\r
+\r
+Returns a list of 4-number tuples, specifying begnning of the line,\r
 1st match begin of a line, 1st match end of a line, end of a line\r
 containing match"\r
   (save-excursion\r