unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Klaus Straubinger <KSNetz@Arcor.DE>
Subject: Re: url-history.el: variable url-history-track defined but not used
Date: Wed, 30 Nov 2005 17:59:05 +0100 (CET)	[thread overview]
Message-ID: <m3d5ki9ina.fsf@P131831.SAP.Corp> (raw)
In-Reply-To: <E1Egvtm-0004mM-N9@fencepost.gnu.org>

>    +	   (and (featurep 'url)
>    +		(fboundp #'url-history-setup-save-timer)
>
> Those tests are rather undesirable; it would be better for
> this to work regardless of what else is loaded.

Now that I come to think about it, in my opinion the whole of the
:set function could be reduced to

  :set #'(lambda (var val)
	   (set-default var val)
           (if (bound-and-true-p url-setup-done)
	       (url-history-setup-save-timer)))

because the test

			(fboundp 'url-history-setup-save-timer)
                        (let ((def (symbol-function
                                    'url-history-setup-save-timer)))
                          (not (and (listp def) (eq 'autoload (car def)))))

seems to only test if url-history-setup-save-timer is really available.

> What is the reason for those tests?

I suspect the variable url-history-save-interval previously had been
defined somewhere else, probably in url-vars.el.

> What problem do they solve?

That function to be called is not available and that the URL library is
not loaded when the customize :set function gets called. You don't want
to save periodically the URL history if the URL library is not even
initialized.

The function url-do-setup calls (url-history-setup-save-timer)
anyway.

> Let's look for another solution.

The test for (featurep 'url) could be replaced by a test for the
variable url-setup-done as I suggested above.

All changes should be made to the :set function in the defcustom for
url-history-save-interval as well because I copied it from there in
the first place.

-- 
Klaus Straubinger

  reply	other threads:[~2005-11-30 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-25 10:09 url-history.el: variable url-history-track defined but not used Klaus Straubinger
2005-11-28 15:31 ` Klaus Straubinger
2005-11-29  3:11   ` Richard M. Stallman
2005-11-30 16:59     ` Klaus Straubinger [this message]
2005-12-02  2:07       ` Richard M. Stallman
2005-12-02 15:41         ` Klaus Straubinger
2005-12-04 21:19           ` Richard M. Stallman
2005-12-07 15:41             ` Klaus Straubinger
2005-12-08  4:55               ` Richard M. Stallman

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=m3d5ki9ina.fsf@P131831.SAP.Corp \
    --to=ksnetz@arcor.de \
    /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).