[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6373a48 105/399: counsel.el: Fix compiler warning
From: |
Oleh Krehel |
Subject: |
[elpa] master 6373a48 105/399: counsel.el: Fix compiler warning |
Date: |
Sat, 20 Jul 2019 14:56:58 -0400 (EDT) |
branch: master
commit 6373a48df3049bac9569bc453d1e42e96d8004f8
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el: Fix compiler warning
---
counsel.el | 176 +++++++++++++++++++++++++++++++------------------------------
1 file changed, 89 insertions(+), 87 deletions(-)
diff --git a/counsel.el b/counsel.el
index 3bb472c..41ae5ea 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3068,6 +3068,75 @@ otherwise continue prompting for tags."
(file-name-nondirectory (file-name-nondirectory buffer-file-name))
(buffer-name (buffer-name))))
+(defvar counsel-outline-settings
+ '((emacs-lisp-mode
+ :outline-regexp ";;[;*]+[\s\t]+"
+ :outline-level counsel-outline-level-emacs-lisp)
+ (org-mode
+ :outline-title counsel-outline-title-org
+ :action counsel-org-goto-action
+ :history counsel-org-goto-history
+ :caller counsel-org-goto)
+ ;; markdown-mode package
+ (markdown-mode
+ :outline-title counsel-outline-title-markdown)
+ ;; Built-in mode or AUCTeX package
+ (latex-mode
+ :outline-title counsel-outline-title-latex))
+ "Alist mapping major modes to their `counsel-outline' settings.
+
+Each entry is a pair (MAJOR-MODE . PLIST). `counsel-outline'
+checks whether an entry exists for the current buffer's
+MAJOR-MODE and, if so, loads the settings specified by PLIST
+instead of the default settings. The following settings are
+recognized:
+
+- `:outline-regexp' is a regexp to match the beggining of an
+ outline heading. It is only checked at the start of a line and
+ so need not start with \"^\".
+ Defaults to the value of the variable `outline-regexp'.
+
+- `:outline-level' is a function of no arguments which computes
+ the level of an outline heading. It is called with point at
+ the beginning of `outline-regexp' and with the match data
+ corresponding to `outline-regexp'.
+ Defaults to the value of the variable `outline-level'.
+
+- `:outline-title' is a function of no arguments which returns
+ the title of an outline heading. It is called with point at
+ the end of `outline-regexp' and with the match data
+ corresponding to `outline-regexp'.
+ Defaults to the function `counsel-outline-title'.
+
+- `:action' is a function of one argument, the selected outline
+ heading to jump to. This setting corresponds directly to its
+ eponymous `ivy-read' keyword, as used by `counsel-outline', so
+ the type of the function's argument depends on the value
+ returned by `counsel-outline-candidates'.
+ Defaults to the function `counsel-outline-action'.
+
+- `:history' is a history list, usually a symbol representing a
+ history list variable. It corresponds directly to its
+ eponymous `ivy-read' keyword, as used by `counsel-outline'.
+ Defaults to the symbol `counsel-outline-history'.
+
+- `:caller' is a symbol to uniquely idendify the caller to
+ `ivy-read'. It corresponds directly to its eponymous
+ `ivy-read' keyword, as used by `counsel-outline'.
+ Defaults to the symbol `counsel-outline'.
+
+- `:display-style' overrides the variable
+ `counsel-outline-display-style'.
+
+- `:path-separator' overrides the variable
+ `counsel-outline-path-separator'.
+
+- `:face-style' overrides the variable
+ `counsel-outline-face-style'.
+
+- `:custom-faces' overrides the variable
+ `counsel-outline-custom-faces'.")
+
;;;###autoload
(defun counsel-org-goto-all ()
"Go to a different location in any org file."
@@ -4071,73 +4140,6 @@ This variable has no effect unless
`counsel-outline-face-style'
is set to `custom'."
:type '(repeat face))
-(defvar counsel-outline-settings
- '((emacs-lisp-mode
- :outline-regexp ";;[;*]+[\s\t]+"
- :outline-level counsel-outline-level-emacs-lisp)
- (org-mode
- :outline-title counsel-outline-title-org
- :action counsel-org-goto-action
- :history counsel-org-goto-history
- :caller counsel-org-goto)
- (markdown-mode ; markdown-mode package
- :outline-title counsel-outline-title-markdown)
- (latex-mode ; Built-in mode or AUCTeX package
- :outline-title counsel-outline-title-latex))
- "Alist mapping major modes to their `counsel-outline' settings.
-
-Each entry is a pair (MAJOR-MODE . PLIST). `counsel-outline'
-checks whether an entry exists for the current buffer's
-MAJOR-MODE and, if so, loads the settings specified by PLIST
-instead of the default settings. The following settings are
-recognized:
-
-- `:outline-regexp' is a regexp to match the beggining of an
- outline heading. It is only checked at the start of a line and
- so need not start with \"^\".
- Defaults to the value of the variable `outline-regexp'.
-
-- `:outline-level' is a function of no arguments which computes
- the level of an outline heading. It is called with point at
- the beginning of `outline-regexp' and with the match data
- corresponding to `outline-regexp'.
- Defaults to the value of the variable `outline-level'.
-
-- `:outline-title' is a function of no arguments which returns
- the title of an outline heading. It is called with point at
- the end of `outline-regexp' and with the match data
- corresponding to `outline-regexp'.
- Defaults to the function `counsel-outline-title'.
-
-- `:action' is a function of one argument, the selected outline
- heading to jump to. This setting corresponds directly to its
- eponymous `ivy-read' keyword, as used by `counsel-outline', so
- the type of the function's argument depends on the value
- returned by `counsel-outline-candidates'.
- Defaults to the function `counsel-outline-action'.
-
-- `:history' is a history list, usually a symbol representing a
- history list variable. It corresponds directly to its
- eponymous `ivy-read' keyword, as used by `counsel-outline'.
- Defaults to the symbol `counsel-outline-history'.
-
-- `:caller' is a symbol to uniquely idendify the caller to
- `ivy-read'. It corresponds directly to its eponymous
- `ivy-read' keyword, as used by `counsel-outline'.
- Defaults to the symbol `counsel-outline'.
-
-- `:display-style' overrides the variable
- `counsel-outline-display-style'.
-
-- `:path-separator' overrides the variable
- `counsel-outline-path-separator'.
-
-- `:face-style' overrides the variable
- `counsel-outline-face-style'.
-
-- `:custom-faces' overrides the variable
- `counsel-outline-custom-faces'.")
-
(defun counsel-outline-title ()
"Return title of current outline heading.
Intended as a value for the `:outline-title' setting in
@@ -4201,26 +4203,26 @@ HEADING is located at the position of MARKER. SETTINGS
is a
plist entry from `counsel-outline-settings', which see.
PREFIX is a string prepended to all candidates."
(let* ((bol-regex (concat "^\\(?:"
- (or (plist-get settings :outline-regexp)
- outline-regexp)
- "\\)"))
- (outline-title-fn (or (plist-get settings :outline-title)
- #'counsel-outline-title))
- (outline-level-fn (or (plist-get settings :outline-level)
- outline-level))
- (display-style (or (plist-get settings :display-style)
- counsel-outline-display-style))
- (path-separator (or (plist-get settings :path-separator)
- counsel-outline-path-separator))
- (face-style (or (plist-get settings :face-style)
- counsel-outline-face-style))
- (custom-faces (or (plist-get settings :custom-faces)
- counsel-outline-custom-faces))
- (stack-level 0)
- (orig-point (point))
- (stack (and prefix (list (counsel-outline--add-face
- prefix 0 face-style custom-faces))))
- cands name level marker)
+ (or (plist-get settings :outline-regexp)
+ outline-regexp)
+ "\\)"))
+ (outline-title-fn (or (plist-get settings :outline-title)
+ #'counsel-outline-title))
+ (outline-level-fn (or (plist-get settings :outline-level)
+ outline-level))
+ (display-style (or (plist-get settings :display-style)
+ counsel-outline-display-style))
+ (path-separator (or (plist-get settings :path-separator)
+ counsel-outline-path-separator))
+ (face-style (or (plist-get settings :face-style)
+ counsel-outline-face-style))
+ (custom-faces (or (plist-get settings :custom-faces)
+ counsel-outline-custom-faces))
+ (stack-level 0)
+ (orig-point (point))
+ (stack (and prefix (list (counsel-outline--add-face
+ prefix 0 face-style custom-faces))))
+ cands name level marker)
(save-excursion
(setq counsel-outline--preselect 0)
(goto-char (point-min))
- [elpa] master cdd7ada 094/399: counsel.el (counsel-url-expand): Avoid null error, (continued)
- [elpa] master cdd7ada 094/399: counsel.el (counsel-url-expand): Avoid null error, Oleh Krehel, 2019/07/20
- [elpa] master 089107a 099/399: counsel.el (counsel-ag): Add a keyword argument caller, Oleh Krehel, 2019/07/20
- [elpa] master 776fbb7 103/399: Make ivy-switch-buffer-occur work with multi-pass regex builders, Oleh Krehel, 2019/07/20
- [elpa] master 8b4c939 100/399: counsel.el (counsel-cd): Add, Oleh Krehel, 2019/07/20
- [elpa] master 0c8cfe8 106/399: ivy-hydra.el (ivy-dispatching-done-idle): Add, Oleh Krehel, 2019/07/20
- [elpa] master 4c52362 110/399: swiper.el (swiper-occur): Make wgrep work for narrowed buffers, Oleh Krehel, 2019/07/20
- [elpa] master 8c1a2fa 107/399: Allow all re-builders to use ivy-highlight-grep-commands, Oleh Krehel, 2019/07/20
- [elpa] master 78b62f2 102/399: README.md: Mention char-fold-to-regexp, Oleh Krehel, 2019/07/20
- [elpa] master a601e40 104/399: counsel.el (counsel-org-goto-all): Use org-mode outline settings, Oleh Krehel, 2019/07/20
- [elpa] master 468e914 109/399: counsel.el (counsel--file-name-filter): Clean up style, Oleh Krehel, 2019/07/20
- [elpa] master 6373a48 105/399: counsel.el: Fix compiler warning,
Oleh Krehel <=
- [elpa] master 164fecb 108/399: Make find-file-occur work with multi-pass regex builders, Oleh Krehel, 2019/07/20
- [elpa] master 3b677d4 113/399: counsel.el (counsel-file-jump-args): Fix dotfiles not being shown, Oleh Krehel, 2019/07/20
- [elpa] master ffa2d8f 112/399: counsel.el (counsel-unicode-char): Fix sorting, Oleh Krehel, 2019/07/20
- [elpa] master 18d7f84 117/399: counsel.el (counsel-yank-pop-action): Also works for strings, Oleh Krehel, 2019/07/20
- [elpa] master c56ad2a 114/399: ivy-hydra.el (ivy-dispatching-done-hydra): Improve, Oleh Krehel, 2019/07/20
- [elpa] master 344aebc 116/399: counsel.el (counsel-dired-jump): Improve, Oleh Krehel, 2019/07/20
- [elpa] master b27ef9e 111/399: counsel.el (counsel-git-cands): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 1b5af1e 115/399: counsel.el (counsel-file-jump-args): Adjust, Oleh Krehel, 2019/07/20
- [elpa] master 05763ae 121/399: counsel.el (counsel-git): Fix default-directory, Oleh Krehel, 2019/07/20
- [elpa] master aef1242 118/399: ivy-overlay.el (ivy-overlay-impossible-p): Simplify, Oleh Krehel, 2019/07/20