Fix commit 5cdf84ea68
* org.el (org-mode): Don't make characters from `org-emphasis-alist' word constituants. (org-mode-transpose-word-syntax-table): Rename from `org-syntax-table'. (org-transpose-words): Use `org-mode-transpose-word-syntax-table'. Thanks to Achim Gratz and T.F. Torrey for reporting the broken tests.
This commit is contained in:
parent
4708a4804f
commit
e8a6b56db9
20
lisp/org.el
20
lisp/org.el
|
@ -5198,8 +5198,7 @@ The following commands are available:
|
||||||
(org-set-tag-faces 'org-tag-faces org-tag-faces))
|
(org-set-tag-faces 'org-tag-faces org-tag-faces))
|
||||||
;; Calc embedded
|
;; Calc embedded
|
||||||
(org-set-local 'calc-embedded-open-mode "# ")
|
(org-set-local 'calc-embedded-open-mode "# ")
|
||||||
(mapc (lambda(c) (modify-syntax-entry (string-to-char (car c)) "w p"))
|
;; Modify a few syntax entries
|
||||||
org-emphasis-alist)
|
|
||||||
(modify-syntax-entry ?< "(")
|
(modify-syntax-entry ?< "(")
|
||||||
(modify-syntax-entry ?> ")")
|
(modify-syntax-entry ?> ")")
|
||||||
(modify-syntax-entry ?{ "(")
|
(modify-syntax-entry ?{ "(")
|
||||||
|
@ -5297,6 +5296,13 @@ The following commands are available:
|
||||||
;; Try to set org-hide correctly
|
;; Try to set org-hide correctly
|
||||||
(set-face-foreground 'org-hide (org-find-invisible-foreground)))
|
(set-face-foreground 'org-hide (org-find-invisible-foreground)))
|
||||||
|
|
||||||
|
(defvar org-mode-transpose-word-syntax-table
|
||||||
|
(let ((st (make-syntax-table)))
|
||||||
|
(mapc (lambda(c) (modify-syntax-entry
|
||||||
|
(string-to-char (car c)) "w p" st))
|
||||||
|
org-emphasis-alist)
|
||||||
|
st))
|
||||||
|
|
||||||
(when (fboundp 'abbrev-table-put)
|
(when (fboundp 'abbrev-table-put)
|
||||||
(abbrev-table-put org-mode-abbrev-table
|
(abbrev-table-put org-mode-abbrev-table
|
||||||
:parents (list text-mode-abbrev-table)))
|
:parents (list text-mode-abbrev-table)))
|
||||||
|
@ -19043,6 +19049,16 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
|
||||||
(org-defkey map (vector 'remap old) new)
|
(org-defkey map (vector 'remap old) new)
|
||||||
(substitute-key-definition old new map global-map)))))
|
(substitute-key-definition old new map global-map)))))
|
||||||
|
|
||||||
|
(defun org-transpose-words ()
|
||||||
|
"Transpose words for Org.
|
||||||
|
This uses the `org-mode-transpose-word-syntax-table' syntax
|
||||||
|
table, which interprets characters in `org-emphasis-alist' as
|
||||||
|
word constituants."
|
||||||
|
(interactive)
|
||||||
|
(with-syntax-table org-mode-transpose-word-syntax-table
|
||||||
|
(call-interactively 'transpose-words)))
|
||||||
|
(org-remap org-mode-map 'transpose-words 'org-transpose-words)
|
||||||
|
|
||||||
(when (eq org-enable-table-editor 'optimized)
|
(when (eq org-enable-table-editor 'optimized)
|
||||||
;; If the user wants maximum table support, we need to hijack
|
;; If the user wants maximum table support, we need to hijack
|
||||||
;; some standard editing functions
|
;; some standard editing functions
|
||||||
|
|
Loading…
Reference in New Issue