mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-19 20:18:32 +00:00
org-agenda.el: Define `org-toggle-sticky-agenda' before calling it
This commit is contained in:
parent
fb2af507f0
commit
d832837693
|
@ -1852,18 +1852,6 @@ works you probably want to add it to `org-agenda-custom-commands' for good."
|
|||
|
||||
|
||||
;;; Multiple agenda buffers support
|
||||
|
||||
(defcustom org-agenda-sticky nil
|
||||
"Non-nil means agenda q key will bury agenda buffers.
|
||||
Agenda commands will then show existing buffer instead of generating new ones.
|
||||
When nil, `q' will kill the single agenda buffer."
|
||||
:group 'org-agenda
|
||||
:type 'boolean
|
||||
:set (lambda (var val)
|
||||
(if (boundp var)
|
||||
(org-toggle-sticky-agenda (if val 1 0))
|
||||
(set var val))))
|
||||
|
||||
(defun org-toggle-sticky-agenda (&optional arg)
|
||||
"Toggle `org-agenda-sticky'."
|
||||
(interactive "P")
|
||||
|
@ -1880,6 +1868,17 @@ When nil, `q' will kill the single agenda buffer."
|
|||
(message "Sticky agenda was %s"
|
||||
(if org-agenda-sticky "enabled" "disabled"))))))
|
||||
|
||||
(defcustom org-agenda-sticky nil
|
||||
"Non-nil means agenda q key will bury agenda buffers.
|
||||
Agenda commands will then show existing buffer instead of generating new ones.
|
||||
When nil, `q' will kill the single agenda buffer."
|
||||
:group 'org-agenda
|
||||
:type 'boolean
|
||||
:set (lambda (var val)
|
||||
(if (boundp var)
|
||||
(org-toggle-sticky-agenda (if val 1 0))
|
||||
(set var val))))
|
||||
|
||||
(defvar org-agenda-buffer nil
|
||||
"Agenda buffer currently being generated.")
|
||||
|
||||
|
|
Loading…
Reference in a new issue