GNU bug report logs -
#24848
[sh-script] How to save "Local rules set" result from sh-learn-buffer-indent?
Previous Next
Reported by: <richard.wiseman <at> bt.com>
Date: Tue, 1 Nov 2016 15:37:01 UTC
Severity: minor
Tags: fixed, patch
Merged with 29414
Found in version 24.5
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
<richard.wiseman <at> 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 <at> users.sourceforge.net; 24848 <at> debbugs.gnu.org
> =, 24848 <at> 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.
This bug report was last modified 7 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.