From: "Matej Košík" <mail@matej-kosik.net>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 29414@debbugs.gnu.org
Subject: bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE)
Date: Thu, 23 Nov 2017 22:52:08 +0100 [thread overview]
Message-ID: <b3c2375e-97d7-abe7-ef19-3c722786c3dc@matej-kosik.net> (raw)
In-Reply-To: <jwv60a0kdqs.fsf-monnier+bug#29414@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 2619 bytes --]
I've compiled Emacs 26.0.90 and made the same experiment.
I can confirm that it is fixed.
(I.e., the values I tried to either via "smie-config-set-indent" command or by editing ~/.emacs file are no longer ignored.)
Thank you very much.
On 11/23/17 20:26, Stefan Monnier wrote:
> forcemerge 24848 29414
> thanks
>
>> - I run the following command:
>>
>> M-: (print smie-config)
>>
>> I see
>>
>> ((tuareg-mode (4 :before "|-or" nil)))
>> ((tuareg-mode (4 :before "|-or" nil)))
>>
>> I have no idea whether this an expected or unexpected value. :-/
>
> Yes, it's expected because M-: already prints the result of the
> evaluation, and `print` returns its argument. IOW better just use
> M-: smie-config RET
>
>> - Now my ~/.emacs file looks like this:
> [...]
>> '(smie-config (quote ((tuareg-mode (4 :before "|-or" nil))))))
>
> Looks good.
>
>> - I press TAB.
>> What I see is that the whole line is shifted to the right by 2 columns.
>
> Which is what happens by default, so it shows that the setting didn't
> take effect. I tracked this down and this happens to be a known bug
> which was recently fixed in smie.el. More specifically, it
> should be fixed in the current Emacs-26 pretest.
>
> I reproduced the corresponding patch below,
>
>
> Stefan
>
>
> commit a58d0c590a777be98e58cd8c92ee1381e07e9b2d
> Author: Noam Postavsky <npostavs@gmail.com>
> Date: Wed Aug 30 19:31:48 2017 -0400
>
> Fix loading of smie-config rules (Bug#24848)
>
> * lisp/emacs-lisp/smie.el (smie-config--setter): Use `set-default'
> instead of `setq-default'.
> (smie-config): Use `custom-initialize-set' instead of
> `custom-initialize-default' as the :initialize argument.
>
> diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
> index 87c4782e21..da1e12b140 100644
> --- a/lisp/emacs-lisp/smie.el
> +++ b/lisp/emacs-lisp/smie.el
> @@ -1956,7 +1956,7 @@ smie-config--mode-hook
> (defvar smie-config--modefuns nil)
>
> (defun smie-config--setter (var value)
> - (setq-default var value)
> + (set-default var value)
> (let ((old-modefuns smie-config--modefuns))
> (setq smie-config--modefuns nil)
> (pcase-dolist (`(,mode . ,rules) value)
> @@ -1982,7 +1982,7 @@ smie-config
> ;; FIXME improve value-type.
> :type '(choice (const nil)
> (alist :key-type symbol))
> - :initialize 'custom-initialize-default
> + :initialize 'custom-initialize-set
> :set #'smie-config--setter)
>
> (defun smie-config-local (rules)
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-11-23 21:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 15:59 bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) Matej Košík
2017-11-23 19:26 ` Stefan Monnier
2017-11-23 21:52 ` Matej Košík [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3c2375e-97d7-abe7-ef19-3c722786c3dc@matej-kosik.net \
--to=mail@matej-kosik.net \
--cc=29414@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.