diff options
author | Bastien Guerry <bzg@altern.org> | 2012-04-28 21:36:58 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-04-28 21:36:58 +0200 |
commit | c5f73635d085d9d9e92d8baf062015cbe00f97da (patch) | |
tree | 0f485c624899f5ff1ed5c355916e8e035644e0a8 | |
parent | 69d2d4e130cd88e9b53f2c3afcd1480ba59979c6 (diff) | |
download | org-mode-c5f73635d085d9d9e92d8baf062015cbe00f97da.tar.gz |
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.
-rw-r--r-- | lisp/org-agenda.el | 9 | ||||
-rw-r--r-- | lisp/org-indent.el | 15 |
2 files changed, 13 insertions, 11 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 27b740a..6a31585 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -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 diff --git a/lisp/org-indent.el b/lisp/org-indent.el index 43de325..97a1ec3 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -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) |