瀏覽代碼

Fix lexical variable warning

* lisp/org.el (org-fast-tag-selection): Don't use add-to-list with
  lexical variable.

Reported-by: Vicente Vera <vicentemvp@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104363>
Kyle Meyer 9 年之前
父節點
當前提交
cb7f44f1af
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -15256,7 +15256,7 @@ Returns the new tags string, or nil to not change the current settings."
 					    (org-get-buffer-tags))))))
 		    (quit (setq tg "")))
 		  (when (string-match "\\S-" tg)
-		    (add-to-list 'buffer-tags (list tg))
+		    (cl-pushnew (list tg) buffer-tags :test #'equal)
 		    (if (member tg current)
 			(setq current (delete tg current))
 		      (push tg current)))