0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-19 01:48:33 +00:00
* 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:
Bastien Guerry 2013-02-18 18:07:04 +01:00
parent 4708a4804f
commit e8a6b56db9

View file

@ -5198,8 +5198,7 @@ The following commands are available:
(org-set-tag-faces 'org-tag-faces org-tag-faces))
;; Calc embedded
(org-set-local 'calc-embedded-open-mode "# ")
(mapc (lambda(c) (modify-syntax-entry (string-to-char (car c)) "w p"))
org-emphasis-alist)
;; Modify a few syntax entries
(modify-syntax-entry ?< "(")
(modify-syntax-entry ?> ")")
(modify-syntax-entry ?{ "(")
@ -5297,6 +5296,13 @@ The following commands are available:
;; Try to set org-hide correctly
(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)
(abbrev-table-put org-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)
(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)
;; If the user wants maximum table support, we need to hijack
;; some standard editing functions