From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: superword-mode
Date: Wed, 27 Mar 2013 11:19:12 -0400 [thread overview]
Message-ID: <87fvzgswen.fsf@lifelogs.com> (raw)
In-Reply-To: 51530A2A.1090702@lanl.gov
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
On Wed, 27 Mar 2013 09:03:06 -0600 Davis Herring <herring@lanl.gov> wrote:
DH> On 03/26/2013 01:04 PM, Ted Zlatanov wrote:
>> +(defun subword-right (&optional arg)
>> + (interactive "p")
>> + (subword-forward arg))
DH> Shouldn't this be bidi-aware (as is right-word)?
(: .tniop doog ,seY
Does the attached work properly? If yes I can install.
Ted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: superword-mode-bidifix.patch --]
[-- Type: text/x-diff, Size: 1082 bytes --]
=== modified file 'lisp/progmodes/subword.el'
--- lisp/progmodes/subword.el 2013-03-27 14:04:34 +0000
+++ lisp/progmodes/subword.el 2013-03-27 15:10:46 +0000
@@ -168,8 +168,6 @@
(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.
@@ -177,7 +175,19 @@
(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.
next prev parent reply other threads:[~2013-03-27 15:19 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1UIiBH-0005sm-Vy@vcs.savannah.gnu.org>
2013-03-21 23:44 ` [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax Stefan Monnier
2013-03-21 23:49 ` Ted Zlatanov
2013-03-22 1:32 ` Stefan Monnier
2013-03-22 13:03 ` Ted Zlatanov
2013-03-22 13:14 ` Tom Tromey
2013-03-22 13:38 ` Ted Zlatanov
2013-03-22 14:18 ` Stefan Monnier
2013-03-22 14:46 ` Ted Zlatanov
2013-03-22 17:30 ` Stefan Monnier
2013-03-22 19:13 ` Ted Zlatanov
2013-03-23 16:01 ` Stefan Monnier
2013-03-26 9:17 ` Ted Zlatanov
2013-03-26 17:06 ` Stefan Monnier
2013-03-26 19:04 ` superword-mode (was: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax.) Ted Zlatanov
2013-03-27 1:23 ` superword-mode Stefan Monnier
2013-03-27 3:18 ` superword-mode Masatake YAMATO
2013-03-27 9:31 ` superword-mode Andreas Schwab
2013-03-27 13:06 ` superword-mode Ted Zlatanov
2013-03-27 13:14 ` superword-mode Stefan Monnier
2013-03-27 13:04 ` superword-mode Ted Zlatanov
2013-03-27 13:50 ` superword-mode Stefan Monnier
2013-03-27 14:06 ` superword-mode Ted Zlatanov
2013-03-27 15:03 ` superword-mode Davis Herring
2013-03-27 15:19 ` Ted Zlatanov [this message]
2013-03-27 15:33 ` superword-mode Ted Zlatanov
2013-03-27 16:33 ` superword-mode Stefan Monnier
2013-03-27 19:31 ` superword-mode Ted Zlatanov
2013-03-27 22:23 ` superword-mode Stefan Monnier
2013-03-28 23:00 ` superword-mode Ted Zlatanov
2013-03-29 13:26 ` superword-mode Ted Zlatanov
2013-03-29 16:23 ` superword-mode Andreas Röhler
2013-03-29 16:43 ` superword-mode Ted Zlatanov
2013-03-29 17:49 ` superword-mode Andreas Röhler
2013-03-29 18:10 ` superword-mode Ted Zlatanov
2013-03-29 18:50 ` superword-mode Andreas Röhler
2013-03-29 19:04 ` superword-mode Ted Zlatanov
2013-03-29 20:16 ` superword-mode Davis Herring
2013-03-29 21:18 ` superword-mode Stefan Monnier
2013-03-30 1:34 ` superword-mode Ted Zlatanov
2013-03-30 1:36 ` superword-mode Ted Zlatanov
2013-03-30 6:28 ` superword-mode Andreas Röhler
2013-03-22 14:13 ` [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fvzgswen.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.