Use `add-to-invisibility-spec' directly

This commit is contained in:
Carsten Dominik 2010-04-18 19:26:30 +02:00
parent a000f6163d
commit c2e5b13a2d
6 changed files with 21 additions and 20 deletions

View File

@ -1,5 +1,9 @@
2010-04-18 Carsten Dominik <carsten.dominik@gmail.com>
* babel/lisp/org-babel.el (org-babel-hide-hash): Use
`add-to-invisibility-spec'.
(org-babel-result-hide-spec):
* lisp/org-learn.el (require): `calendar' is now required already
by org.el on top level.

View File

@ -394,7 +394,7 @@ added to the header-arguments-alist."
"Hide the hash in the current results line. Only the initial
`org-babel-hash-show' characters of the hash will remain
visible."
(org-add-to-invisibility-spec '(org-babel-hide-hash . t))
(add-to-invisibility-spec '(org-babel-hide-hash . t))
(save-excursion
(when (and (re-search-forward org-babel-result-regexp nil t)
(match-string 3))
@ -432,7 +432,7 @@ with C-c C-c."
(add-hook 'org-ctrl-c-ctrl-c-hook 'org-babel-hash-at-point)
(defun org-babel-result-hide-spec ()
(org-add-to-invisibility-spec '(org-babel-hide-result . t)))
(add-to-invisibility-spec '(org-babel-hide-result . t)))
(add-hook 'org-mode-hook 'org-babel-result-hide-spec)
(defvar org-babel-hide-result-overlays nil

View File

@ -1,5 +1,15 @@
2010-04-18 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-mode, org-org-menu): Use `add-to-invisibility-spec'.
* org-table.el (orgtbl-mode): Use `add-to-invisibility-spec'.
* org-compat.el (org-make-overlay, org-delete-overlay)
(org-overlay-start, org-overlay-end, org-overlay-put)
(org-overlay-get, org-overlay-move, org-overlay-buffer): Functions
removed.
(org-add-to-invisibility-spec): Function removed.
* org-html.el (org-export-as-html-and-open): Add argument to
kill-buffer.

View File

@ -182,19 +182,6 @@ Works on both Emacs and XEmacs."
;; Invisibility compatibility
(defun org-add-to-invisibility-spec (arg)
"Add elements to `buffer-invisibility-spec'.
See documentation for `buffer-invisibility-spec' for the kind of elements
that can be added."
(cond
((fboundp 'add-to-invisibility-spec)
(add-to-invisibility-spec arg))
((or (null buffer-invisibility-spec) (eq buffer-invisibility-spec t))
(setq buffer-invisibility-spec (list arg)))
(t
(setq buffer-invisibility-spec
(cons arg buffer-invisibility-spec)))))
(defun org-remove-from-invisibility-spec (arg)
"Remove elements from `buffer-invisibility-spec'."
(if (fboundp 'remove-from-invisibility-spec)

View File

@ -3454,7 +3454,7 @@ table editor in arbitrary modes.")
(concat orgtbl-line-start-regexp "\\|"
auto-fill-inhibit-regexp)
orgtbl-line-start-regexp))
(org-add-to-invisibility-spec '(org-cwidth))
(add-to-invisibility-spec '(org-cwidth))
(when (fboundp 'font-lock-add-keywords)
(font-lock-add-keywords nil orgtbl-extra-font-lock-keywords)
(org-restart-font-lock))

View File

@ -4365,9 +4365,9 @@ The following commands are available:
(easy-menu-add org-org-menu)
(easy-menu-add org-tbl-menu)
(org-install-agenda-files-menu)
(if org-descriptive-links (org-add-to-invisibility-spec '(org-link)))
(org-add-to-invisibility-spec '(org-cwidth))
(org-add-to-invisibility-spec '(org-hide-block . t))
(if org-descriptive-links (add-to-invisibility-spec '(org-link)))
(add-to-invisibility-spec '(org-cwidth))
(add-to-invisibility-spec '(org-hide-block . t))
(when (featurep 'xemacs)
(org-set-local 'line-move-ignore-invisible t))
(org-set-local 'outline-regexp org-outline-regexp)
@ -16687,7 +16687,7 @@ See the individual commands for more information."
["Previous link" org-previous-link t]
"--"
["Descriptive Links"
(progn (org-add-to-invisibility-spec '(org-link)) (org-restart-font-lock))
(progn (add-to-invisibility-spec '(org-link)) (org-restart-font-lock))
:style radio
:selected (member '(org-link) buffer-invisibility-spec)]
["Literal Links"