mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 18:00:49 +00:00
Replace obsolete variable `buffer-substring-filters'.
* org-agenda.el (org-agenda-mode): Replace obsolete variable `buffer-substring-filters'. * org-indent.el (org-indent-mode): Ditto.
This commit is contained in:
parent
69d2d4e130
commit
c5f73635d0
|
@ -1953,11 +1953,10 @@ The following commands are available:
|
|||
(org-add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local)
|
||||
(org-add-hook 'pre-command-hook 'org-unhighlight nil 'local)
|
||||
;; Make sure properties are removed when copying text
|
||||
(when (boundp 'buffer-substring-filters)
|
||||
(org-set-local 'buffer-substring-filters
|
||||
(cons (lambda (x)
|
||||
(set-text-properties 0 (length x) nil x) x)
|
||||
buffer-substring-filters)))
|
||||
(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))))
|
||||
(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
|
||||
|
|
|
@ -183,9 +183,11 @@ during idle time." nil " Ind" nil
|
|||
(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 'buffer-substring-filters)
|
||||
(add-to-list 'buffer-substring-filters
|
||||
'org-indent-remove-properties-from-string)
|
||||
(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 'after-change-functions 'org-indent-refresh-maybe nil 'local)
|
||||
(org-add-hook 'before-change-functions
|
||||
'org-indent-notify-modified-headline nil 'local)
|
||||
|
@ -209,9 +211,10 @@ during idle time." nil " Ind" nil
|
|||
(when (boundp 'org-hide-leading-stars-before-indent-mode)
|
||||
(org-set-local 'org-hide-leading-stars
|
||||
org-hide-leading-stars-before-indent-mode))
|
||||
(setq buffer-substring-filters
|
||||
(delq 'org-indent-remove-properties-from-string
|
||||
buffer-substring-filters))
|
||||
(remove-hook 'filter-buffer-substring-functions
|
||||
(lambda (fun start end delete)
|
||||
(org-indent-remove-properties-from-string
|
||||
(funcall fun start end delete))))
|
||||
(remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local)
|
||||
(remove-hook 'before-change-functions
|
||||
'org-indent-notify-modified-headline 'local)
|
||||
|
|
Loading…
Reference in a new issue