all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ryan C. Thompson" <rct@thompsonclan.org>
To: bug-gnu-emacs@gnu.org
Subject: bug#5056: Minor fix for a defcustom in savehist mode (patch included)
Date: Thu, 26 Nov 2009 22:39:00 -0800	[thread overview]
Message-ID: <4B0F7404.2080106@thompsonclan.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

While customizing savehist mode through the emacs Custom interface, I
discovered that I could not set `savehist-autosave-interval' to nil
because the custom buffer only had an integer entry field for that
variable, although the docstring said that nil was a valid value. So I
edited the custom definition to allow choosing either nil or an integer,
instead of just an integer. I also added labels to the two choices to
make things clearer for the user. Here is the one-line diff (assuming
that it doesn't get too badly mangled in transit):

BEGIN DIFF
*** old/savehist.el    2009-11-26 21:47:52.378311830 -0800
--- new/savehist.el    2009-11-26 21:19:12.118518476 -0800
***************
*** 120,126 ****
  (defcustom savehist-autosave-interval (* 5 60)
    "The interval between autosaves of minibuffer history.
  If set to nil, disables timer-based autosaving."
!   :type 'integer
    :group 'savehist)

  (defcustom savehist-mode-hook nil
--- 120,127 ----
  (defcustom savehist-autosave-interval (* 5 60)
    "The interval between autosaves of minibuffer history.
  If set to nil, disables timer-based autosaving."
!   :type '(choice (const :tag "Disabled" nil)
!                  (integer :tag "Seconds" 300))
    :group 'savehist)

  (defcustom savehist-mode-hook nil
END DIFF

Here is my attempt at manually writing a changelog entry:

BEGIN CHANGELOG
     2009-11-62  Ryan C. Thompson  <rct@thompsonclan.org>

             * savehist.el: Allow setting `savehist-autosave-interval'
               to nil in Custom.
END CHANGELOG

If it matters, you have my blessing to license this code however you please.

- Ryan Thompson

[-- Attachment #2: Re: minor bugfix for savehist mode.eml --]
[-- Type: message/rfc822, Size: 2599 bytes --]

From: Hrvoje Niksic <hniksic@xemacs.org>
To: "Ryan C. Thompson" <rct@thompsonclan.org>
Subject: Re: minor bugfix for savehist mode
Date: Mon, 31 Aug 2009 13:37:23 +0200
Message-ID: <87pracgqoc.fsf@busola.homelinux.net>

"Ryan C. Thompson" <rct@thompsonclan.org> writes:

> I would like to submit a minor improvement for savehist mode. I
> noticed that the variable savehist-autosave-interval could be either
> an integer or nil, but its definition allowed it to be customized only
> as an integer. I changed the definition to allow it to also be set to
> nil in Custom.

Please post your bugfix to Emacs maintainers so it gets incorporated
into the next release.  I no longer actively maintain savehist-mode.

Thank you.

             reply	other threads:[~2009-11-27  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f7ccd24b0911301539iba50be9l3c0973167a06b190@mail.gmail.com>
2009-11-27  6:39 ` Ryan C. Thompson [this message]
2009-11-30 23:45   ` bug#5056: marked as done (Minor fix for a defcustom in savehist mode (patch included)) Emacs bug Tracking System

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=4B0F7404.2080106@thompsonclan.org \
    --to=rct@thompsonclan.org \
    --cc=5056@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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.