diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 607269d39..631c6d03c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2148,10 +2148,10 @@ The following commands are available: (org-add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local) (org-add-hook 'pre-command-hook 'org-unhighlight nil 'local) ;; Make sure properties are removed when copying text - (make-local-variable 'filter-buffer-substring-functions) - (add-hook 'filter-buffer-substring-functions - (lambda (fun start end delete) - (substring-no-properties (funcall fun start end delete)))) + (org-add-hook 'filter-buffer-substring-functions + (lambda (fun start end delete) + (substring-no-properties (funcall fun start end delete))) + nil t) (unless org-agenda-keep-modes (setq org-agenda-follow-mode org-agenda-start-with-follow-mode org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el index 2dfc4addc..b02a7ceff 100644 --- a/lisp/org-crypt.el +++ b/lisp/org-crypt.el @@ -139,11 +139,11 @@ See `org-crypt-disable-auto-save'." (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) ((eq org-crypt-disable-auto-save 'encrypt) (message "org-decrypt: Enabling re-encryption on auto-save.") - (add-hook 'auto-save-hook - (lambda () - (message "org-crypt: Re-encrypting all decrypted entries due to auto-save.") - (org-encrypt-entries)) - nil t)) + (org-add-hook 'auto-save-hook + (lambda () + (message "org-crypt: Re-encrypting all decrypted entries due to auto-save.") + (org-encrypt-entries)) + nil t)) (t nil)))) (defun org-crypt-key-for-heading () @@ -264,7 +264,7 @@ See `org-crypt-disable-auto-save'." "Add a hook to automatically encrypt entries before a file is saved to disk." (add-hook 'org-mode-hook - (lambda () (add-hook 'before-save-hook 'org-encrypt-entries nil t)))) + (lambda () (org-add-hook 'before-save-hook 'org-encrypt-entries nil t)))) (add-hook 'org-reveal-start-hook 'org-decrypt-entry) diff --git a/lisp/org-indent.el b/lisp/org-indent.el index 5221e4458..44311e388 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -182,11 +182,11 @@ during idle time." (org-set-local 'org-hide-leading-stars-before-indent-mode org-hide-leading-stars) (org-set-local 'org-hide-leading-stars t)) - (make-local-variable 'filter-buffer-substring-functions) - (add-hook 'filter-buffer-substring-functions - (lambda (fun start end delete) - (org-indent-remove-properties-from-string - (funcall fun start end delete)))) + (org-add-hook 'filter-buffer-substring-functions + (lambda (fun start end delete) + (org-indent-remove-properties-from-string + (funcall fun start end delete))) + nil t) (org-add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local) (org-add-hook 'before-change-functions 'org-indent-notify-modified-headline nil 'local) diff --git a/lisp/ox.el b/lisp/ox.el index d35f0a9a1..1b7ec2e1d 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -5557,7 +5557,7 @@ files or buffers, only the display. header-line-format '(:eval (format " %-12s | %6s | %s" "Back-End" "Age" "Source"))) - (add-hook 'post-command-hook 'org-export-stack-refresh nil t) + (org-add-hook 'post-command-hook 'org-export-stack-refresh nil t) (set (make-local-variable 'revert-buffer-function) 'org-export-stack-refresh))