فهرست منبع

Deprecate `org-get-local-tags' and `org-get-local-tags-at'

* contrib/lisp/org-drill.el (org-drill-entry-p):
(org-drill-entry-leech-p):
* lisp/org-bibtex.el (org-bibtex-headline):
(org-get-local-tags-at): Use `org-get-tags'.
* lisp/org.el (org-get-local-tags-at):
(org-get-local-tags): Move to...
* lisp/org-compat.el: ... here.
Nicolas Goaziou 7 سال پیش
والد
کامیت
7d2ebc3ffa
4فایلهای تغییر یافته به همراه13 افزوده شده و 13 حذف شده
  1. 2 2
      contrib/lisp/org-drill.el
  2. 2 3
      lisp/org-bibtex.el
  3. 9 0
      lisp/org-compat.el
  4. 0 8
      lisp/org.el

+ 2 - 2
contrib/lisp/org-drill.el

@@ -761,7 +761,7 @@ situation use `org-part-of-drill-entry-p'."
   (save-excursion
     (when marker
       (org-drill-goto-entry marker))
-    (member org-drill-question-tag (org-get-local-tags))))
+    (member org-drill-question-tag (org-get-tags nil t))))
 
 
 (defun org-drill-goto-entry (marker)
@@ -793,7 +793,7 @@ drill entry."
 (defun org-drill-entry-leech-p ()
   "Is the current entry a 'leech item'?"
   (and (org-drill-entry-p)
-       (member "leech" (org-get-local-tags))))
+       (member "leech" (org-get-tags nil t))))
 
 
 ;; (defun org-drill-entry-due-p ()

+ 2 - 3
lisp/org-bibtex.el

@@ -354,9 +354,8 @@ and `org-exclude-tags-from-inheritance'."
 					    (append org-bibtex-tags
 						    org-bibtex-no-export-tags))
 			      tag))
-			  (if org-bibtex-inherit-tags
-			      (org-get-tags)
-			    (org-get-local-tags-at)))))))
+			  (if org-bibtex-inherit-tags (org-get-tags)
+			    (org-get-tags nil t)))))))
     (when type
       (let ((entry (format
 		    "@%s{%s,\n%s\n}\n" type id

+ 9 - 0
lisp/org-compat.el

@@ -385,6 +385,15 @@ use of this function is for the stuck project list."
 
 (define-obsolete-function-alias 'org-get-tags-at 'org-get-tags "Org 9.2")
 
+(defun org-get-local-tags ()
+  "Get a list of tags defined in the current headline."
+  (declare (obsolete "use `org-get-tags' instead." "Org 9.2"))
+  (org-get-tags nil 'local))
+
+(defun org-get-local-tags-at (&optional pos)
+  "Get a list of tags defined in the current headline."
+  (declare (obsolete "use `org-get-tags' instead." "Org 9.2"))
+  (org-get-tags pos 'local))
 
 ;;;; Obsolete link types
 

+ 0 - 8
lisp/org.el

@@ -14151,14 +14151,6 @@ When DOWNCASE is non-nil, expand downcased TAGS."
 (defvar org-tags-overlay (make-overlay 1 1))
 (delete-overlay org-tags-overlay)
 
-(defun org-get-local-tags-at (&optional pos)
-  "Get a list of tags defined in the current headline."
-  (org-get-tags pos 'local))
-
-(defun org-get-local-tags ()
-  "Get a list of tags defined in the current headline."
-  (org-get-tags nil 'local))
-
 (defun org-add-prop-inherited (s)
   (add-text-properties 0 (length s) '(inherited t) s)
   s)