Skip to content

Commit

Permalink
counsel.el: Pacify byte-compiler
Browse files Browse the repository at this point in the history
The byte-compiler complains when a varaliased user option is used
before its declaration, so move the declarations to their call site.
Keep varaliases and declarations together.
  • Loading branch information
basil-conto authored and abo-abo committed Aug 7, 2018
1 parent af806ee commit 8122c3a
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions counsel.el
Expand Up @@ -2947,16 +2947,6 @@ otherwise continue prompting for tags."
(org-agenda-set-tags nil nil))
(fset 'org-set-tags store))))

(define-obsolete-variable-alias 'counsel-org-goto-display-style
'counsel-outline-display-style "0.10.0")
(define-obsolete-variable-alias 'counsel-org-headline-display-style
'counsel-outline-display-style "0.10.0")

(define-obsolete-variable-alias 'counsel-org-goto-separator
'counsel-outline-path-separator "0.10.0")
(define-obsolete-variable-alias 'counsel-org-headline-path-separator
'counsel-outline-path-separator "0.10.0")

(define-obsolete-variable-alias 'counsel-org-goto-display-tags
'counsel-org-headline-display-tags "0.10.0")

Expand All @@ -2978,12 +2968,6 @@ otherwise continue prompting for tags."
:type 'boolean
:group 'ivy)

(define-obsolete-variable-alias 'counsel-org-goto-face-style
'counsel-outline-face-style "0.10.0")

(define-obsolete-variable-alias 'counsel-org-goto-custom-faces
'counsel-outline-custom-faces "0.10.0")

(declare-function org-get-heading "org")
(declare-function org-goto-marker-or-bmk "org")
(declare-function outline-next-heading "outline")
Expand Down Expand Up @@ -3165,6 +3149,45 @@ include attachments of other Org buffers."
(defvar counsel-org-agenda-headlines-history nil
"History for `counsel-org-agenda-headlines'.")

(define-obsolete-variable-alias 'counsel-org-goto-display-style
'counsel-outline-display-style "0.10.0")
(define-obsolete-variable-alias 'counsel-org-headline-display-style
'counsel-outline-display-style "0.10.0")

(defcustom counsel-outline-display-style 'path
"The style used when displaying matched outline headings.
If `headline', the title is displayed with leading stars
indicating the outline level.
If `path', the path hierarchy is displayed. For each entry the
title is shown. Entries are separated with
`counsel-outline-path-separator'.
If `title' or any other value, only the title of the heading is
displayed.
For displaying tags and TODO keywords in `org-mode' buffers, see
`counsel-org-headline-display-tags' and
`counsel-org-headline-display-todo', respectively."
:type '(choice
(const :tag "Title only" title)
(const :tag "Headline" headline)
(const :tag "Path" path))
:group 'ivy)

(define-obsolete-variable-alias 'counsel-org-goto-separator
'counsel-outline-path-separator "0.10.0")
(define-obsolete-variable-alias 'counsel-org-headline-path-separator
'counsel-outline-path-separator "0.10.0")

(defcustom counsel-outline-path-separator "/"
"String separating path entries in matched outline headings.
This variable has no effect unless
`counsel-outline-display-style' is set to `path'."
:type 'string
:group 'ivy)

(declare-function org-get-outline-path "org")

(defun counsel-org-agenda-headlines--candidates ()
Expand Down Expand Up @@ -3892,34 +3915,8 @@ TREEP is used to expand internal nodes."
(counsel-imenu)))

;;** `counsel-outline'
(defcustom counsel-outline-display-style 'path
"The style used when displaying matched outline headings.
If `headline', the title is displayed with leading stars
indicating the outline level.
If `path', the path hierarchy is displayed. For each entry the
title is shown. Entries are separated with
`counsel-outline-path-separator'.
If `title' or any other value, only the title of the heading is
displayed.
For displaying tags and TODO keywords in `org-mode' buffers, see
`counsel-org-headline-display-tags' and
`counsel-org-headline-display-todo', respectively."
:type '(choice
(const :tag "Title only" title)
(const :tag "Headline" headline)
(const :tag "Path" path))
:group 'ivy)

(defcustom counsel-outline-path-separator "/"
"String separating path entries in matched outline headings.
This variable has no effect unless
`counsel-outline-display-style' is set to `path'."
:type 'string
:group 'ivy)
(define-obsolete-variable-alias 'counsel-org-goto-face-style
'counsel-outline-face-style "0.10.0")

(defcustom counsel-outline-face-style nil
"Determines how to style outline headings during completion.
Expand Down Expand Up @@ -3958,6 +3955,9 @@ For displaying tags and TODO keywords in `org-mode' buffers, see
(const :tag "No style" nil))
:group 'ivy)

(define-obsolete-variable-alias 'counsel-org-goto-custom-faces
'counsel-outline-custom-faces "0.10.0")

(defcustom counsel-outline-custom-faces nil
"List of faces for custom display of outline headings.
Expand Down

0 comments on commit 8122c3a

Please sign in to comment.