emacs-devel
[Top][All Lists]
Advanced

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

Re: sh-script beg-end of function


From: Andreas Röhler
Subject: Re: sh-script beg-end of function
Date: Thu, 22 Nov 2007 08:26:57 +0100
User-agent: KMail/1.9.5

Am Mittwoch, 21. November 2007 21:19 schrieb Stefan Monnier:
> > This is a good change to make.
> > Would others please check the code and send Andreas suggestions?
>
> I've installed a simpler change which should provide
> comparable functionality.
>
>
>         Stefan
>
>
> --- lisp/progmodes/sh-script.el       26 Sep 2007 00:27:18 -0000      1.203
> +++ lisp/progmodes/sh-script.el       21 Nov 2007 20:19:32 -0000
> @@ -1524,6 +1524,8 @@
>       skeleton-filter-function 'sh-feature
>       skeleton-newline-indent-rigidly t
>       sh-indent-supported-here nil)
> +  (set (make-local-variable 'defun-prompt-regexp)
> +       (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)"))
>    (set (make-local-variable 'parse-sexp-ignore-comments) t)
>    ;; Parse or insert magic number for exec, and set all variables
> depending ;; on the shell thus determined.
>
>

Hi Stefan,

I'm always pleased to see an alternative variant, a
shorter one altogether. :)

However, in this case, making `defun-prompt-regexp' a
lokal variable away from customization seems not the
appropriate way. I suggest to let the user decide about
this regexp and make this decision available for all
sh-scripts. For this we need a different name from
defun-prompt-regexp. 

Functions don't play the role in sh-scripts as in other
languages code. So it's probably not useful to require
a "()" in that regexp. 

Can't figure out your solution
for `end-of-defun-function'.

Andreas Röhler




reply via email to

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