[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax of "-" in shell-mode

From: Dima Kogan
Subject: Re: Syntax of "-" in shell-mode
Date: Sat, 25 Jun 2016 00:12:54 -0700
User-agent: mu4e 0.9.17; emacs

Eli Zaretskii <address@hidden> writes:

> If the problem is with transpose-words, then a possible solution might
> be a new shell-transpose-words command, which is smart enough to DTRT
> in these cases, at least as a user option? Would you like to propose
> such an addition to sh-script.el?

Now that I lived with this setting for a day, I don't think it's just
(transpose-words): "-" being a word character feels like the right thing
for shell commands. With that setting, the behavior of (forward-word)
and (backward-word) is much more pleasing as well. Arguments like a
standalone -- or - are treated like separate words, which is "right". If
you use shell-mode, try it:

  (modify-syntax-entry ?- "w")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]