diff options
author | Bastien Guerry <bzg@altern.org> | 2011-08-23 16:55:48 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-08-23 16:55:48 +0200 |
commit | 7475d7da1fcc73e9c619b2d620d370c9f54867c9 (patch) | |
tree | 6c9a302b5fc888ab102585ad77cf46de80bd81eb | |
parent | f893659b272ef80c1da8c0420d55b6237a4c3f00 (diff) | |
download | org-mode-7475d7da1fcc73e9c619b2d620d370c9f54867c9.tar.gz |
org.el: Remove `org-link-display-descriptive' and use `org-descriptive-links'.
* org.el (org-link-display-descriptive): Remove this option
and rely on the existing `org-descriptive-links' instead.
(org-toggle-link-display): Use `org-descriptive-links'.
Without this change, both options are redundant. This also
fixes a bug about using `org-descriptive-links' in the `org-mode'
function, that initialize the display using `org-descriptive-links'
instead of `org-link-display-descriptive'.
Thanks to Thomas S. Dye for spotting this.
-rw-r--r-- | lisp/org.el | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/lisp/org.el b/lisp/org.el index de8c72b..e052ad4 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1268,10 +1268,14 @@ See the manual for examples." (function))))) (defcustom org-descriptive-links t - "Non-nil means hide link part and only show description of bracket links. -Bracket links are like [[link][description]]. This variable sets the initial -state in new org-mode buffers. The setting can then be toggled on a -per-buffer basis from the Org->Hyperlinks menu." + "Non-nil means Org will display descriptive links. +E.g. [[http://orgmode.org][Org website]] will be displayed as +\"Org Website\", hiding the link itself and just displaying its +description. When set to `nil', Org will display the full links +literally. + +You can interactively set the value of this variable by calling +`org-toggle-link-display' or from the menu Org>Hyperlinks menu." :group 'org-link :type 'boolean) @@ -1327,18 +1331,6 @@ description to use." :group 'org-link :type 'function) -(defcustom org-link-display-descriptive t - "Non-nil means Org will display descriptive links. -E.g. [[http://orgmode.org][Org website]] will be displayed as -\"Org Website\", hiding the link itself and just displaying its -description. When set to `nil', Org will display the full links -literally. - -You can interactively set the value of this variable using the -`org-toggle-link-display'." - :group 'org-link - :type 'boolean) - (defgroup org-link-store nil "Options concerning storing links in Org-mode." :tag "Org Store Link" @@ -18458,12 +18450,12 @@ See the individual commands for more information." ["Descriptive Links" org-toggle-link-display :style radio - :selected org-link-display-descriptive + :selected org-descriptive-links ] ["Literal Links" org-toggle-link-display :style radio - :selected (not org-link-display-descriptive)]) + :selected (not org-descriptive-links)]) "--" ("TODO Lists" ["TODO/DONE/-" org-todo t] @@ -20524,13 +20516,13 @@ if no description is present" (defun org-toggle-link-display () "Toggle the literal or descriptive display of links." (interactive) - (if org-link-display-descriptive + (if org-descriptive-links (progn (org-remove-from-invisibility-spec '(org-link)) (org-restart-font-lock) - (setq org-link-display-descriptive nil)) + (setq org-descriptive-links nil)) (progn (add-to-invisibility-spec '(org-link)) (org-restart-font-lock) - (setq org-link-display-descriptive t)))) + (setq org-descriptive-links t)))) ;; Speedbar support |