Enhance XEmacs compatibility
* lisp/org-list.el (org-list-search-unenclosed-generic): Replace call to booleanp. * lisp/org-compat.el (org-decompose-region): New defsubst. * lisp/org.el (org-toggle-pretty-entities): (org-unfontify-region): Use `org-decompose-region'.
This commit is contained in:
parent
217ceb8983
commit
c41409c530
|
@ -162,6 +162,15 @@ If DELETE is non-nil, delete all those overlays."
|
|||
(let ((x (org-get-x-clipboard-compat value)))
|
||||
(if x (org-no-properties x)))))
|
||||
|
||||
(defsubst org-decompose-region (beg end)
|
||||
"Decompose from BEG to END."
|
||||
(if (featurep 'xemacs)
|
||||
(let ((modified-p (buffer-modified-p))
|
||||
(buffer-read-only nil))
|
||||
(remove-text-properties beg end '(composition nil))
|
||||
(set-buffer-modified-p modified-p))
|
||||
(decompose-region beg end)))
|
||||
|
||||
;; Miscellaneous functions
|
||||
|
||||
(defun org-add-hook (hook function &optional append local)
|
||||
|
|
|
@ -343,7 +343,7 @@ Arguments SEARCH, RE, BOUND and NOERR are similar to those in
|
|||
(while t
|
||||
;; 1. No match: return to origin or bound, depending on NOERR.
|
||||
(unless (funcall search re bound noerr)
|
||||
(throw 'exit (and (goto-char (if (booleanp noerr) origin bound))
|
||||
(throw 'exit (and (goto-char (if (memq noerr '(t nil)) origin bound))
|
||||
nil)))
|
||||
;; 2. Match not in block or protected: return point. Else
|
||||
;; skip the block and carry on.
|
||||
|
|
|
@ -5543,7 +5543,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
|
|||
(message "Entities are displayed as UTF8 characers")
|
||||
(save-restriction
|
||||
(widen)
|
||||
(decompose-region (point-min) (point-max))
|
||||
(org-decompose-region (point-min) (point-max))
|
||||
(message "Entities are displayed plain"))))
|
||||
|
||||
(defun org-fontify-entities (limit)
|
||||
|
@ -5643,7 +5643,7 @@ If KWD is a number, get the corresponding match group."
|
|||
(inhibit-read-only t) (inhibit-point-motion-hooks t)
|
||||
(inhibit-modification-hooks t)
|
||||
deactivate-mark buffer-file-name buffer-file-truename)
|
||||
(decompose-region beg end)
|
||||
(org-decompose-region beg end)
|
||||
(remove-text-properties
|
||||
beg end
|
||||
(if org-indent-mode
|
||||
|
|
Loading…
Reference in New Issue