emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org b9637ef142: Remove uses of `filter-buffer-substring


From: ELPA Syncer
Subject: [elpa] externals/org b9637ef142: Remove uses of `filter-buffer-substring-functions'
Date: Sun, 8 Dec 2024 09:59:52 -0500 (EST)

branch: externals/org
commit b9637ef14273f35e77ca9efe82fbab178c24993f
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Ihor Radchenko <yantar92@posteo.net>

    Remove uses of `filter-buffer-substring-functions'
    
    * lisp/org-agenda.el (org-agenda-mode):
    * lisp/org-indent.el (org-indent-mode): Remove Emacs<24.4
    compatibility code that is checking the obsolete (and to be removed in
    Emacs 31) `filter-buffer-substring-functions'.
    
    Org mode only supports Emacs 27 and later.
---
 lisp/org-agenda.el | 10 ++--------
 lisp/org-indent.el | 20 ++++----------------
 2 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 6b586899fd..ebfccf19ea 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2375,14 +2375,8 @@ The following commands are available:
   (add-hook 'post-command-hook #'org-agenda-update-agenda-type nil 'local)
   (add-hook 'pre-command-hook #'org-unhighlight nil 'local)
   ;; Make sure properties are removed when copying text
-  (if (boundp 'filter-buffer-substring-functions)
-      (add-hook 'filter-buffer-substring-functions
-               (lambda (fun start end delete)
-                  (substring-no-properties (funcall fun start end delete)))
-               nil t)
-    ;; Emacs >= 24.4.
-    (add-function :filter-return (local 'filter-buffer-substring-function)
-                  #'substring-no-properties))
+  (add-function :filter-return (local 'filter-buffer-substring-function)
+                #'substring-no-properties)
   (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 cabed6acf7..a0a0740eef 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -193,15 +193,8 @@ during idle time."
     (when org-indent-mode-turns-on-hiding-stars
       (setq-local org-hide-leading-stars t))
     (org-indent--compute-prefixes)
-    (if (boundp '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)))
-                 nil t)
-      ;; Emacs >= 24.4.
-      (add-function :filter-return (local 'filter-buffer-substring-function)
-                   #'org-indent-remove-properties-from-string))
+    (add-function :filter-return (local 'filter-buffer-substring-function)
+                  #'org-indent-remove-properties-from-string)
     (add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local)
     (add-hook 'before-change-functions
              'org-indent-notify-modified-headline nil 'local)
@@ -224,13 +217,8 @@ during idle time."
       (set-marker org-indent--initial-marker nil))
     (when (local-variable-p 'org-hide-leading-stars)
       (kill-local-variable 'org-hide-leading-stars))
-    (if (boundp 'filter-buffer-substring-functions)
-       (remove-hook 'filter-buffer-substring-functions
-                    (lambda (fun start end delete)
-                      (org-indent-remove-properties-from-string
-                       (funcall fun start end delete))))
-      (remove-function (local 'filter-buffer-substring-function)
-                      #'org-indent-remove-properties-from-string))
+    (remove-function (local 'filter-buffer-substring-function)
+                     #'org-indent-remove-properties-from-string)
     (remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local)
     (remove-hook 'before-change-functions
                 'org-indent-notify-modified-headline 'local)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]