unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: Dave Abrahams <dave@boostpro.com>,
	ahyatt@gmail.com, 5358@debbugs.gnu.org
Subject: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 27 Sep 2019 16:09:40 +0200	[thread overview]
Message-ID: <87r241omor.fsf@gnus.org> (raw)
In-Reply-To: <CABczVwf4fxezMOPPmsiTQwxwWN615=uvON+Vuz_=EeKjboekiQ@mail.gmail.com> (Mauro Aranda's message of "Fri, 27 Sep 2019 09:31:31 -0300")

Mauro Aranda <maurooaranda@gmail.com> writes:

> Subject: [PATCH] Don't discard customizations in progress when adding comments
>  (Bug#5358)

Looks good to me.  Just one tiny comment:

> +  (condition-case nil
> +      (let* ((symbol (widget-get widget :value))
> +             (get (or (get symbol 'custom-get) 'default-value))
> +             (value (if (default-boundp symbol)
> +                        (funcall get symbol)
> +                      (symbol-value symbol))))
> +        (not (equal value (widget-value (car (widget-get widget :children))))))
> +    (error t)))

If it's just the funcall you expect that might fail, then moving the
condition-case down there might be a better choice.  Having a
condition-case around code that shouldn't fail can hide errors you don't
want to hide.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-09-27 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 19:41 bug#5358: 23.1; Adding comment loses customizations in progress David Abrahams
2016-02-17  3:48 ` Andrew Hyatt
2016-02-18 15:29   ` Dave Abrahams
2016-02-18 16:47     ` Glenn Morris
2016-02-19 16:18       ` Andrew Hyatt
2019-09-06 14:47 ` Mauro Aranda
2019-09-27 12:31   ` Mauro Aranda
2019-09-27 14:09     ` Lars Ingebrigtsen [this message]
2019-09-27 15:04       ` Mauro Aranda
2019-09-27 16:07         ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r241omor.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=5358@debbugs.gnu.org \
    --cc=ahyatt@gmail.com \
    --cc=dave@boostpro.com \
    --cc=maurooaranda@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).