unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: obsolete comment in tool-bar.el
Date: Wed, 13 Jul 2005 21:08:55 -0500 (CDT)	[thread overview]
Message-ID: <200507140208.j6E28tr08794@raven.dms.auburn.edu> (raw)
In-Reply-To: <E1DskT9-0007d1-FV@fencepost.gnu.org> (rms@gnu.org)

I reinstalled my original changes, deleted the autoload for tooltip
mode and committed my changes to define-minor-mode.  The two last
steps should enable Emacs to be built on Mac OS 9, even with my
changes, although I can not test that.

       Unfortunately, I can not reinstate the use of
       `custom-reevaluate-setting' for tooltip-mode in startup.el.  Unless we
       would be willing to load tooltip.el even on systems where it makes no
       sense, we just have to live with the code duplication here.

   How do you reach this conclusion?  I do not understand.

To allow Emacs to be built on certain operating systems with my
reinstalled changes, I had to remove the autoload for tooltip-mode.
But that means that `custom-reevaluate-settings' in certain situations
(when tooltip is not preloaded, that is, when x-show-tip is not
fboundp) "reevaluates" the defcustom before the defcustom has been
executed.  In the case of tooltip-mode, that actually turns out to be
OK, because if the defcustom has not yet been executed,
`custom-reevaluate-settings' sets the variable to nil, which in the
case of tooltip mode happens to be the correct value in all situations
where tooltip is not preloaded.

So I readded the `custom-reevaluate-settings' for tooltip-mode.  It
kind of works by accident rather than by design however, and may not
work in other similar cases.

       Here is the required patch to easy-mmode.el.  Stefan opposed a similar
       patch earlier, but the objections he then stated (that loading a file
       would have side effects) do not apply to custom-initialize-safe-default.

   It seems ok to me, but the doc string should mention :initialize
   and explain that the only legitimate value to use with it is
   custom-initialize-safe-default, and when that should be used.

I committed the non-doc changes to easy-mmode.el.  Here are the
proposed doc changes which I could install if desired:

===File ~/easy-mmode-diff===================================
*** easy-mmode.el	12 Jul 2005 21:14:49 -0500	1.68
--- easy-mmode.el	13 Jul 2005 20:53:55 -0500	
***************
*** 105,112 ****
    It will be executed after any toggling but before running the hook variable
    `mode-HOOK'.
    Before the actual body code, you can write keyword arguments (alternating
!   keywords and values).  These following keyword arguments are supported (other
!   keywords will be passed to `defcustom' if the minor mode is global):
  :group GROUP	Custom group name to use in all generated `defcustom' forms.
  		Defaults to MODE without the possible trailing \"-mode\".
  		Don't use this default group name unless you have written a
--- 105,111 ----
    It will be executed after any toggling but before running the hook variable
    `mode-HOOK'.
    Before the actual body code, you can write keyword arguments (alternating
!   keywords and values).  The following keyword arguments are supported:
  :group GROUP	Custom group name to use in all generated `defcustom' forms.
  		Defaults to MODE without the possible trailing \"-mode\".
  		Don't use this default group name unless you have written a
***************
*** 122,128 ****
  For example, you could write
    (define-minor-mode foo-mode \"If enabled, foo on you!\"
      :lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
!     ...BODY CODE...)"
    (declare (debug (&define name stringp
  			   [&optional [&not keywordp] sexp
  			    &optional [&not keywordp] sexp
--- 121,136 ----
  For example, you could write
    (define-minor-mode foo-mode \"If enabled, foo on you!\"
      :lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
!     ...BODY CODE...)
! 
! If the minor mode is global other keywords are passed to `defcustom'.
! However, the value of the :set keyword is hard coded to
! `custom-set-minor-mode' and the value of the :type keyword is hard coded
! to `boolean'.  The value of the :initialize keyword defaults to
! `custom-initialize-default'.  This default can be overridden using
! an explicit :initialize keyword.  However, the only known situation
! in which such an override is acceptable is for some preloaded global
! minor modes which need to use `custom-initialize-safe-default'."
    (declare (debug (&define name stringp
  			   [&optional [&not keywordp] sexp
  			    &optional [&not keywordp] sexp
============================================================

  reply	other threads:[~2005-07-14  2:08 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 12:40 obsolete comment in tool-bar.el Mathias Dahl
2005-07-07 19:15 ` Luc Teirlinck
2005-07-08  6:40   ` Mathias Dahl
2005-07-08 15:29     ` Luc Teirlinck
2005-07-08 17:40   ` Richard M. Stallman
2005-07-08 18:53     ` Drew Adams
2005-07-09  1:53       ` Luc Teirlinck
2005-07-09  4:20       ` Richard M. Stallman
2005-07-09  2:35     ` Luc Teirlinck
2005-07-10  5:19       ` Richard M. Stallman
2005-07-11  3:21         ` Luc Teirlinck
2005-07-11 16:53           ` Richard M. Stallman
2005-07-11 17:56             ` David Kastrup
2005-07-11 20:28               ` Luc Teirlinck
2005-07-12  3:20               ` Richard M. Stallman
2005-07-13  3:02                 ` Luc Teirlinck
2005-07-13 16:52                   ` Richard M. Stallman
2005-07-14  2:08                     ` Luc Teirlinck [this message]
2005-07-14  8:14                       ` YAMAMOTO Mitsuharu
2005-07-14 16:50                         ` Luc Teirlinck
2005-07-14 18:30                         ` Luc Teirlinck
2005-07-15  4:35                           ` Stefan Monnier
2005-07-15 13:53                             ` Luc Teirlinck
2005-07-15 20:44                               ` Stefan Monnier
2005-07-15 22:05                                 ` Luc Teirlinck
2005-07-15 22:46                                 ` Luc Teirlinck
2005-07-16  1:47                                 ` Luc Teirlinck
2005-07-16  2:04                                 ` Luc Teirlinck
2005-07-19  2:59                                   ` Luc Teirlinck
2005-07-19 14:41                                     ` Stefan Monnier
2005-07-20  4:05                                       ` Luc Teirlinck
2005-07-21  5:40                                         ` Stefan Monnier
2005-07-20  8:34                                     ` Richard M. Stallman
     [not found]                       ` <E1Dt8bd-0001fH-Eu@fencepost.gnu.org>
2005-07-14 22:05                         ` Luc Teirlinck
2005-07-15  3:24                           ` Luc Teirlinck
2005-07-15 18:10                             ` Richard M. Stallman
2005-07-16  2:32                               ` Luc Teirlinck
2005-07-13  3:20                 ` Luc Teirlinck
2005-07-09  3:57     ` Luc Teirlinck
2005-07-09  7:55       ` Eli Zaretskii
2005-07-09 13:57         ` Luc Teirlinck
2005-07-12  4:13           ` YAMAMOTO Mitsuharu
2005-07-12 12:20             ` YAMAMOTO Mitsuharu
2005-07-12 18:25               ` Luc Teirlinck
2005-07-12 23:58                 ` Luc Teirlinck
2005-07-13 16:52                   ` Richard M. Stallman
2005-07-12 20:19               ` Luc Teirlinck
2005-07-13  1:53               ` Luc Teirlinck

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=200507140208.j6E28tr08794@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@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 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).