0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-06-03 22:45:14 +02:00
commit 1a69d99ce1
2 changed files with 10 additions and 11 deletions

View file

@ -2157,13 +2157,12 @@ The following commands are available:
;; while letting `kill-all-local-variables' kill the rest
(let ((save (buffer-local-variables)))
(kill-all-local-variables)
(mapc 'make-local-variable org-agenda-local-vars)
(mapc #'make-local-variable org-agenda-local-vars)
(dolist (elem save)
(let ((var (car elem))
(val (cdr elem)))
(when (and val
(member var org-agenda-local-vars))
(set var val)))))
(pcase elem
(`(,var ,val) ;ignore unbound variables
(when (and val (memq var org-agenda-local-vars))
(set var val))))))
(setq-local org-agenda-this-buffer-is-sticky t))
(org-agenda-sticky
;; Creating a sticky Agenda buffer for the first time

View file

@ -9410,11 +9410,11 @@ auto-fill\\|normal-auto-fill\\|fill-paragraph\\|indent-\\)"
"Clone local variables from FROM-BUFFER.
Optional argument REGEXP selects variables to clone."
(dolist (pair (buffer-local-variables from-buffer))
(let ((name (car pair)))
(when (and (symbolp name)
(not (memq name org-unique-local-variables))
(or (null regexp) (string-match regexp (symbol-name name))))
(set (make-local-variable name) (cdr pair))))))
(pcase pair
(`(,name ,_) ;ignore unbound variables
(when (and (not (memq name org-unique-local-variables))
(or (null regexp) (string-match-p regexp (symbol-name name))))
(set (make-local-variable name) (cdr pair)))))))
;;;###autoload
(defun org-run-like-in-org-mode (cmd)