Parcourir la source

org.el: New alias: `org-highlight-links' -> `org-activate-links'

* org.el (org-highlight-links): Rename from
`org-activate-links'.  Update docstring.
(org-update-radio-target-regexp, org-set-font-lock-defaults):
Use `org-highlight-links'.
Bastien Guerry il y a 11 ans
Parent
commit
198140aa68
1 fichiers modifiés avec 17 ajouts et 8 suppressions
  1. 17 8
      lisp/org.el

+ 17 - 8
lisp/org.el

@@ -1726,11 +1726,18 @@ adaptive  Use relative path for files in the current directory and sub-
 	  (const noabbrev)
 	  (const adaptive)))
 
-(defcustom org-activate-links '(bracket angle plain radio tag date footnote)
-  "Types of links that should be activated in Org-mode files.
-This is a list of symbols, each leading to the activation of a certain link
-type.  In principle, it does not hurt to turn on most link types - there may
-be a small gain when turning off unused link types.  The types are:
+(defvaralias 'org-activate-links 'org-highlight-links)
+(defcustom org-highlight-links '(bracket angle plain radio tag date footnote)
+  "Types of links that should be highlighted in Org-mode files.
+
+This is a list of symbols, each one of them leading to the
+highlighting of a certain link type.
+
+You can still open links that are not highlighted.
+
+In principle, it does not hurt to turn on highlighting for all
+link types.  There may be a small gain when turning off unused
+link types.  The types are:
 
 bracket   The recommended [[link][description]] or [[link]] links with hiding.
 angle     Links in angular brackets that may contain whitespace like
@@ -1741,8 +1748,10 @@ tag       Tag settings in a headline (link to tag search).
 date      Time stamps (link to calendar).
 footnote  Footnote labels.
 
-Changing this variable requires a restart of Emacs to become effective."
+If you set this variable during an Emacs session, use `org-mode-restart'
+in the Org buffer so that the change takes effect."
   :group 'org-link
+  :group 'org-appearance
   :type '(set :greedy t
 	      (const :tag "Double bracket links" bracket)
 	      (const :tag "Angular bracket links" angle)
@@ -6122,7 +6131,7 @@ Also refresh fontification if needed."
 	 (while (re-search-forward old-regexp nil t)
 	   (org-element-cache-refresh (match-beginning 1)))))
       ;; Re fontify buffer.
-      (when (memq 'radio org-activate-links)
+      (when (memq 'radio org-highlight-links)
 	(org-restart-font-lock)))))
 
 (defun org-hide-wide-columns (limit)
@@ -6246,7 +6255,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
 (defun org-set-font-lock-defaults ()
   "Set font lock defaults for the current buffer."
   (let* ((em org-fontify-emphasized-text)
-	 (lk org-activate-links)
+	 (lk org-highlight-links)
 	 (org-font-lock-extra-keywords
 	  (list
 	   ;; Call the hook