help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to open a file in sh-mode


From: Francis Moreau
Subject: Re: How to open a file in sh-mode
Date: Thu, 14 Aug 2008 15:01:02 +0200

On Thu, Aug 14, 2008 at 2:24 PM, Giorgos Keramidas
<address@hidden> wrote:
>
> You can probably write a short wrapper script that is used as $FCEDIT to
> run the equivalent of:
>
>    emacs --eval "(setq-default default-major-mode 'sh-mode)" file1 file2 ...
>

Hmm I don't why I need a wrapper script in that case, do you have an idea ?

If I try without the wrapper I get:

$ export FCEDIT="emacs -nw --eval \"(setq-default default-major-mode
'sh-mode)\""
$ fc

<emacs is started but I get an error in the Messages window>

("emacs" "--eval" "\"(setq-default" "default-major-mode" "'sh-mode)\""
"/tmp/bash-fc-247955888988243")
Loading encoded-kb...done
Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/igrep-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el
(source)...done
Loading easy-mmode...done
Loading easymenu...done
Loading cl-macs...done
Loading paren...done
....
command-line-1: End of file during parsing
Loading cl-seq...done


> That's a bit like "cheating", but it does work.

yes.

-- 
Francis




reply via email to

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