all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* sh-script-mode
@ 2006-05-29 15:41 Cai Qian
  2006-05-29 18:06 ` sh-script-mode David Hansen
  0 siblings, 1 reply; 5+ messages in thread
From: Cai Qian @ 2006-05-29 15:41 UTC (permalink / raw)


Hi,

I would like to change the behaviour of default sh-script-mode through
.emacs about the following,

1) Here document,
When input <<, it should not automatically add EOF here document for
me, as I may want to use <<< instead. Therefore, I want to disable
this feature.

2) Case statement,
At the moment the default indention style is,

case $1 in
       -h)
       usage
       ;;

I want to change to

case $1 in
-h)
     usage
     ;;

3) Highlight for quota string
I want to disable syntax highlight for quota string, as it is a mess
when embed double or single quota inside quota, such as,

echo "$(echo "hello 'world'")"

Thanks,
Qian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* sh-script-mode
@ 2006-05-29 15:44 Cai Qian
  2006-05-30 16:32 ` sh-script-mode Kevin Rodgers
       [not found] ` <E1FkpID-0004Pz-On@fencepost.gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Cai Qian @ 2006-05-29 15:44 UTC (permalink / raw)


Hi,

There are two bugs regards sh-script-mode

1) Here document,
When input <<, it should not automatically add EOF here document for
me, as I may want to use <<< instead.

3) Highlight for quota string
Highlight for quota string is a mess, when embed double or single
quota inside quota, such as,

echo "$(echo "hello 'world'")"

Qian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sh-script-mode
  2006-05-29 15:41 sh-script-mode Cai Qian
@ 2006-05-29 18:06 ` David Hansen
  0 siblings, 0 replies; 5+ messages in thread
From: David Hansen @ 2006-05-29 18:06 UTC (permalink / raw)


On Mon, 29 May 2006 16:41:47 +0100 Cai Qian wrote:

> Hi,
>
> I would like to change the behaviour of default sh-script-mode through
> .emacs about the following,
>
> 1) Here document,
> When input <<, it should not automatically add EOF here document for
> me, as I may want to use <<< instead. Therefore, I want to disable
> this feature.

Not tested:

(add-hook 'sh-mode-hook
          (lambda () (local-set-key ?< 'self-insert-command)))

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sh-script-mode
  2006-05-29 15:44 sh-script-mode Cai Qian
@ 2006-05-30 16:32 ` Kevin Rodgers
       [not found] ` <E1FkpID-0004Pz-On@fencepost.gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2006-05-30 16:32 UTC (permalink / raw)


Cai Qian wrote:
> 1) Here document,
> When input <<, it should not automatically add EOF here document for
> me, as I may want to use <<< instead.

Try (a) `C-u <' instead of just `<', (b) setting sh-here-document-word
to "", or (c) unbinding "<" in Shell-script mode's local map
(sh-mode-map).

-- 
Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sh-script-mode
       [not found] ` <E1FkpID-0004Pz-On@fencepost.gnu.org>
@ 2006-05-31 23:46   ` Cai Qian
  0 siblings, 0 replies; 5+ messages in thread
From: Cai Qian @ 2006-05-31 23:46 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Hi,

On 5/29/06, Richard Stallman <rms@gnu.org> wrote:
>     3) Highlight for quote string
>     Highlight for quota string is a mess, when embed double or single
>     quota inside quota, such as,
>
>     echo "$(echo "hello 'world'")"
>
> I think the syntax mechanism is not powerful enough to understand that.
> Sorry.
>

I think it is necessary here to change the behaviour of syntax
highlight of quote string. For example,

echo "$(ls "Hello World"*)"

Two quote strings are valid and necessary here to protect spaces as
well as newlines. In addition, I don't think it is too hard to support
it. When the first " char looking for the end of " char, it needs to
skip " char inside $(...)

Qian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-05-31 23:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-29 15:41 sh-script-mode Cai Qian
2006-05-29 18:06 ` sh-script-mode David Hansen
  -- strict thread matches above, loose matches on Subject: below --
2006-05-29 15:44 sh-script-mode Cai Qian
2006-05-30 16:32 ` sh-script-mode Kevin Rodgers
     [not found] ` <E1FkpID-0004Pz-On@fencepost.gnu.org>
2006-05-31 23:46   ` sh-script-mode Cai Qian

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.