diff options
| author | blais <blais@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2006-08-24 19:21:10 +0000 |
|---|---|---|
| committer | blais <blais@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2006-08-24 19:21:10 +0000 |
| commit | 16aaa965c4b8bc124dce84fd82cb9569a200b9e8 (patch) | |
| tree | fbc1efea2e311ec7103580892d154bfa274f46f6 /tools | |
| parent | e75343fa81583035cfef5ba6340f5473fcdc1807 (diff) | |
| download | docutils-16aaa965c4b8bc124dce84fd82cb9569a200b9e8.tar.gz | |
Applied patch from Denis Shaposhnikov for Xemacs portability. Thanks Denis.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4700 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/editors/emacs/rst.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/editors/emacs/rst.el b/tools/editors/emacs/rst.el index ffa1f1b27..421fd6179 100644 --- a/tools/editors/emacs/rst.el +++ b/tools/editors/emacs/rst.el @@ -940,7 +940,7 @@ b. a negative numerical argument, which generally inverts the (toggle-style (and current-prefix-arg (not reverse-direction)))) - (if (and transient-mark-mode mark-active) + (if (rst-portable-mark-active-p) ;; Adjust decorations within region. (rst-promote-region current-prefix-arg) ;; Adjust decoration around point. @@ -2004,7 +2004,7 @@ EVENT is the input event." (error "Cannot mark zero sections")) (cond ((and allow-extend (or (and (eq last-command this-command) (mark t)) - (and transient-mark-mode mark-active))) + (rst-portable-mark-active-p))) (set-mark (save-excursion (goto-char (mark)) @@ -3375,6 +3375,16 @@ column is used (fill-column vs. end of previous/next line)." )) +(defun rst-portable-mark-active-p () + "A portable (GNU, Xemacs) function that returns true if the +mark is active." + (or + (and (fboundp 'region-active-p) + (region-active-p) (region-exists-p)) + (and (boundp 'transient-mark-mode) + transient-mark-mode mark-active))) + + (provide 'rst) ;;; rst.el ends here |
