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

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

bug#24848: [sh-script] How to save "Local rules set" result from sh-lear


From: npostavs
Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent?
Date: Mon, 11 Sep 2017 14:48:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

<richard.wiseman@bt.com> writes:

> I've added the code to an unzipped version of smie.el and to
> sh-script.el and byte-compiled both.

Actually, sh-script.el isn't strictly needed because it's just a
documentation patch.

> Emacs loads without errors now,
> but to be honest, I'm unsure how to check that it now loads
> smie-config properly!  I load a script file and check the value of
> smie-config and it says it's set for the current session only but its
> value is nil.

Do you have something like this in your .emacs?

    (custom-set-variables
     ;; custom-set-variables was added by Custom.
     ;; If you edit it by hand, you could mess it up, so be careful.
     ;; Your init file should contain only one such instance.
     ;; If there is more than one, they won't work right.
     '(sh-basic-offset 2)
     '(smie-config (quote ((sh-mode (-2 :before "then" 0))))))

If not, note that `smie-config-save' doesn't save the rules in a
persistent way, you have to save the `smie-config' variable via the
customize interface for that (this is another thing that should probably
be clarified in the docstring).

> From: Wiseman,R,Richard,TUK2 R
> Sent: 11 September 2017 08:44
> To: npostavs@users.sourceforge.net; 24848@debbugs.gnu.org
> =, 24848@debbugs.gnu.org
> Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result from 
> sh-learn-buffer-indent?
>
> You're quite right: my smie library is gzipped.  I had no idea that might be 
> the case!
>
> I tried your suggestion of putting the code into my .emacs file but it didn't 
> seem to like that...
>
>
> Warning (initialization): An error occurred while loading 
> `/home/richard/.emacs':
>
> Symbol's value as variable is void: smie-config--modefuns

Oh right, I forgot about all the dependencies.  Well, I guess patching
directly like you've tried above is the most straightforward way.





reply via email to

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