mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-11 09:20:51 +00:00
* progmodes/subword.el (superword-mode): Use forward-sexp' instead of
forward-symbol'.
This commit is contained in:
parent
aa534cb70b
commit
75a2f98113
@ -1,3 +1,8 @@
|
||||
2013-03-29 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* progmodes/subword.el (superword-mode): Use `forward-sexp'
|
||||
instead of `forward-symbol'.
|
||||
|
||||
2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/edebug.el (edebug-mode): Make it a minor mode.
|
||||
|
@ -154,7 +154,7 @@ as words.
|
||||
"Do the same as `forward-word' but on subwords.
|
||||
See the command `subword-mode' for a description of subwords.
|
||||
Optional argument ARG is the same as for `forward-word'."
|
||||
(interactive "p")
|
||||
(interactive "^p")
|
||||
(unless arg (setq arg 1))
|
||||
(cond
|
||||
((< 0 arg)
|
||||
@ -168,16 +168,26 @@ Optional argument ARG is the same as for `forward-word'."
|
||||
|
||||
(put 'subword-forward 'CUA 'move)
|
||||
|
||||
(defalias 'subword-right 'subword-forward)
|
||||
|
||||
(defun subword-backward (&optional arg)
|
||||
"Do the same as `backward-word' but on subwords.
|
||||
See the command `subword-mode' for a description of subwords.
|
||||
Optional argument ARG is the same as for `backward-word'."
|
||||
(interactive "p")
|
||||
(interactive "^p")
|
||||
(subword-forward (- (or arg 1))))
|
||||
|
||||
(defalias 'subword-left 'subword-backward)
|
||||
(defun subword-right (&optional arg)
|
||||
"Do the same as `right-word' but on subwords."
|
||||
(interactive "^p")
|
||||
(if (eq (current-bidi-paragraph-direction) 'left-to-right)
|
||||
(subword-forward arg)
|
||||
(subword-backward arg)))
|
||||
|
||||
(defun subword-left (&optional arg)
|
||||
"Do the same as `left-word' but on subwords."
|
||||
(interactive "^p")
|
||||
(if (eq (current-bidi-paragraph-direction) 'left-to-right)
|
||||
(subword-backward arg)
|
||||
(subword-forward arg)))
|
||||
|
||||
(defun subword-mark (arg)
|
||||
"Do the same as `mark-word' but on subwords.
|
||||
@ -299,7 +309,7 @@ edit them as words.
|
||||
;;
|
||||
(defun subword-forward-internal ()
|
||||
(if superword-mode
|
||||
(forward-symbol 1)
|
||||
(forward-sexp 1)
|
||||
(if (and
|
||||
(save-excursion
|
||||
(let ((case-fold-search nil))
|
||||
@ -315,7 +325,7 @@ edit them as words.
|
||||
|
||||
(defun subword-backward-internal ()
|
||||
(if superword-mode
|
||||
(forward-symbol -1)
|
||||
(forward-sexp -1)
|
||||
(if (save-excursion
|
||||
(let ((case-fold-search nil))
|
||||
(re-search-backward subword-backward-regexp nil t)))
|
||||
|
Loading…
Reference in New Issue
Block a user