From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael@cadilhac.name (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.devel Subject: Re: defcustom and the stars. Date: Wed, 03 Jan 2007 22:21:28 +0100 Organization: Epita/LRDE Message-ID: <87mz4zu7qf.fsf@lrde.org> References: <87d55xozrn.fsf@lrde.org> <877iw4pdyo.fsf@lrde.org> <873b6sp96d.fsf@lrde.org> <87vejont95.fsf@lrde.org> <87r6ucns3x.fsf@lrde.org> <87mz50nows.fsf@lrde.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2042558013==" X-Trace: sea.gmane.org 1167859322 1265 80.91.229.12 (3 Jan 2007 21:22:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Jan 2007 21:22:02 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 03 22:21:59 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2DYa-0000Fl-6w for ged-emacs-devel@m.gmane.org; Wed, 03 Jan 2007 22:21:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2DYZ-00045p-3O for ged-emacs-devel@m.gmane.org; Wed, 03 Jan 2007 16:21:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2DYI-00043l-Qo for emacs-devel@gnu.org; Wed, 03 Jan 2007 16:21:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2DYH-00043I-1D for emacs-devel@gnu.org; Wed, 03 Jan 2007 16:21:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2DYG-00043D-VV for emacs-devel@gnu.org; Wed, 03 Jan 2007 16:21:37 -0500 Original-Received: from [213.251.189.42] (helo=42.mail-out.ovh.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1H2DYG-0003ll-7G for emacs-devel@gnu.org; Wed, 03 Jan 2007 16:21:36 -0500 Original-Received: (qmail 27671 invoked by uid 503); 3 Jan 2007 21:21:40 -0000 Original-Received: from b6.ovh.net (HELO mail186.ha.ovh.net) (213.186.33.56) by 42.mail-out.ovh.net with SMTP; 3 Jan 2007 21:21:40 -0000 Original-Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 3 Jan 2007 21:21:33 -0000 Original-Received: from ivr94-6-82-230-255-91.fbx.proxad.net (HELO localhost) (82.230.255.91) by ns0.ovh.net with SMTP; 3 Jan 2007 21:21:32 -0000 Original-To: "Juanma Barranquero" Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEU/JREXDATg1LV8UCao i1fQpmoP3Nd6AAACa0lEQVQ4jWWUQW7jMAxFqZEPICJzAjXeM6W8dyNqX9ji/a8yn04xnWIEJLD9 LJH85DcJFyJV3erqPty8ExHfBikXSdn0WVezC0hOAQiA2nCsAHOqEnPe4k+puU8zw/t+xquqjRKA 4lHsmQBT8C5pDtBwfwH8VdcHI5+FHtjRxrQRwZsf3hNjZRKAPEzHEdH9mFNSYb5dQK3r8KM6ftNy KikAirDZFWdVkDqbxjGFbAcwbQCxxc8mPRHUGOcCIMgMACV23RfJTch3gC6ofT3qCdG0NyUUPfYF yQrKCIAnuYsgX2qPzW2i9sNrfSOSPPZQiygtCNlCjlpXJV38lIKshF/AZzsAMoArdCKNHfXukPuJ ImbLh+9J2gXwap0QpZ7NjZ7ekdkFcDiqPiLGcHmuvaG/AHgy62s52Lae1ABoA7D6d2kDoAvgbnyD ZutEd6lTHOXfYPHVJDH1K8a1+oyrjoZpAGn1x5pfwPr2E9yjxSpk50/gEyKgD/+BD/KzN3tQ13b8 Cx5loF0AgnZf5IUny9hRHQOYBllHDM+6s3oviZBu77mFjDm621Np3hkjR90wE1BkTYvhdDgDgCmR xWChFfcYAOqMm5NZkVWMur8AL5+oeMQOob2FmY76FiM+PrDDZypwGdqokSlAaQOmGH6mW8KpsOwl 0YOLedjSITr6scNRF8D4PesH33QmLrx8AzjpV/3kkg025w2gfAFYKCLluJAc4Ap+h18oo4S8wzaY klDsBUTiY8EZFkg5Iass75FubC9wd8qa0u9+gRxAsAKEaRAo6iB+vwCMGmdBjvgidQGA1ntMX4CS ZYGV/wADyL80LIX/UAAAAABJRU5ErkJggg== In-Reply-To: (Juanma Barranquero's message of "Wed\, 3 Jan 2007 21\:57\:21 +0100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux) X-Ovh-Remote: 82.230.255.91 (ivr94-6-82-230-255-91.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.5/N X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64714 Archived-At: --===============2042558013== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable "Juanma Barranquero" writes: > On 1/3/07, Micha=EBl Cadilhac wrote: > >> So let's give it a try (writing doc is always funny for me as my >> English is far from good). > > While you're at it Oh, you know, when a student has to study for a crucial exam, he founds plenty of time to not work :-) > lispref/customize.texi contains an example of a defcustom with > docstring "*The command to use to run diff.". Good grep :-) Let's recap the three patches as attachments! --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: attachment; filename=help.patch Content-Transfer-Encoding: quoted-printable Index: lisp/help-mode.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lisp/help-mode.el,v retrieving revision 1.50 diff -c -r1.50 help-mode.el *** lisp/help-mode.el 21 Jul 2006 22:54:40 -0000 1.50 =2D-- lisp/help-mode.el 3 Jan 2007 11:00:09 -0000 *************** *** 139,144 **** =2D-- 139,154 ---- (customize-variable v)) 'help-echo (purecopy "mouse-2, RET: customize variable")) =20=20 + (define-button-type 'help-change-variable + :supertype 'help-xref + 'help-function (lambda (v) + (let ((read-variable (symbol-function 'read-variable))) + (fset 'read-variable (lambda (prompt &optional d-v) + (fset 'read-variable read-variable) + v)) + (call-interactively 'set-variable))) + 'help-echo (purecopy "mouse-2, RET: change user variable")) +=20 (define-button-type 'help-customize-face :supertype 'help-xref 'help-function (lambda (v) Index: lisp/help-fns.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lisp/help-fns.el,v retrieving revision 1.94 diff -c -r1.94 help-fns.el *** lisp/help-fns.el 17 Dec 2006 22:14:11 -0000 1.94 =2D-- lisp/help-fns.el 3 Jan 2007 11:00:09 -0000 *************** *** 573,578 **** =2D-- 573,581 ---- (safe-var (get variable 'safe-local-variable)) (doc (or (documentation-property variable 'variable-do= cumentation) (documentation-property alias 'variable-docum= entation)))) + ;; If DOC starts with a `*' remove it. + (when (eq (aref doc 0) ?*) + (setq doc (substring doc 1))) (unless (eq alias variable) (princ (format "\nThis variable is an alias for `%s'.\n" = alias))) (if (or obsolete safe-var) *************** *** 603,609 **** (save-excursion (re-search-backward (concat "\\(" customize-label "\\)") nil t) ! (help-xref-button 1 'help-customize-variable variable))))) (print-help-return-message) (save-excursion (set-buffer standard-output) =2D-- 606,623 ---- (save-excursion (re-search-backward (concat "\\(" customize-label "\\)") nil t) ! (help-xref-button 1 'help-customize-variable variable)))) ! (if (user-variable-p variable) ! (let ((change-label "change")) ! (terpri) ! (terpri) ! (princ (concat "You can " change-label ! " at user level this variable.")) ! (with-current-buffer standard-output ! (save-excursion ! (re-search-backward ! (concat "\\(" change-label "\\)") nil t) ! (help-xref-button 1 'help-change-variable variable)))))) (print-help-return-message) (save-excursion (set-buffer standard-output) Index: lisp/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.10518 diff -C0 -r1.10518 ChangeLog *** lisp/ChangeLog 2 Jan 2007 10:16:04 -0000 1.10518 =2D-- lisp/ChangeLog 3 Jan 2007 11:00:33 -0000 *************** *** 0 **** =2D-- 1,9 ---- + 2007-01-03 Micha=EBl Cadilhac +=20 + * help-mode.el (help-change-variable): New. Call `set-variable' with + the variable name (first argument) fixed. +=20 + * help-fns.el (describe-variable): If the docstring starts with a star, + then remove it. + Propose the user to change (with `set-variable') user variables. +=20 --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: attachment; filename=custom.patch Content-Transfer-Encoding: quoted-printable Index: man/custom.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/man/custom.texi,v retrieving revision 1.124 diff -c -r1.124 custom.texi *** man/custom.texi 1 Jan 2007 01:57:16 -0000 1.124 =2D-- man/custom.texi 3 Jan 2007 14:36:31 -0000 *************** *** 807,813 **** Display the value and documentation of variable @var{var} (@code{describe-variable}). @item M-x set-variable @key{RET} @var{var} @key{RET} @var{value} @key{RET} ! Change the value of variable @var{var} to @var{value}. @end table =20=20 To examine the value of a single variable, use @kbd{C-h v} =2D-- 807,813 ---- Display the value and documentation of variable @var{var} (@code{describe-variable}). @item M-x set-variable @key{RET} @var{var} @key{RET} @var{value} @key{RET} ! Change the value of the user option variable @var{var} to @var{value}. @end table =20=20 To examine the value of a single variable, use @kbd{C-h v} *************** *** 832,838 **** satisfies the predicate `integerp'. =20=20 Documentation: ! *Column beyond which automatic line-wrapping should happen. Interactively, you can set the buffer local value using C-x f. =20=20 You can customize this variable. =2D-- 832,838 ---- satisfies the predicate `integerp'. =20=20 Documentation: ! Column beyond which automatic line-wrapping should happen. Interactively, you can set the buffer local value using C-x f. =20=20 You can customize this variable. *************** *** 840,848 **** =20=20 @noindent The line that says you can customize the variable indicates that this ! variable is a user option. (The star also indicates this, but it is ! an obsolete indicator that may eventually disappear.) @kbd{C-h v} is ! not restricted to user options; it allows any variable name. =20=20 @findex set-variable The most convenient way to set a specific user option variable is with =2D-- 840,848 ---- =20=20 @noindent The line that says you can customize the variable indicates that this ! variable is a user option, as would have indicated a line saying that ! you can change at user level the variable. @kbd{C-h v} is not ! restricted to user options; it allows any variable name. =20=20 @findex set-variable The most convenient way to set a specific user option variable is with Index: man/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/man/ChangeLog,v retrieving revision 1.1177 diff -C0 -r1.1177 ChangeLog *** man/ChangeLog 1 Jan 2007 22:20:46 -0000 1.1177 =2D-- man/ChangeLog 3 Jan 2007 14:36:47 -0000 *************** *** 0 **** =2D-- 1,9 ---- + 2007-01-03 Micha=EBl Cadilhac +=20 + * custom.texi (Examining): Say sooner that set-variable takes only + user option variables. + Remove the leading `*' in the documentation of `fill-column' used as an + example. Remove the mention on the obsolescence of this star. + Indicate that the line `you can change at user level the variable' + means that the variable is a user option. +=20 --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: attachment; filename=customize.patch Content-Transfer-Encoding: quoted-printable Index: lispref/customize.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lispref/customize.texi,v retrieving revision 1.64 diff -c -r1.64 customize.texi *** lispref/customize.texi 24 Dec 2006 16:36:22 -0000 1.64 =2D-- lispref/customize.texi 3 Jan 2007 21:15:56 -0000 *************** *** 409,415 **** =20=20 @example (defcustom save-place nil ! "*Non-nil means automatically save place in each file..." :type 'boolean :require 'saveplace :group 'save-place) =2D-- 409,415 ---- =20=20 @example (defcustom save-place nil ! "Non-nil means automatically save place in each file..." :type 'boolean :require 'saveplace :group 'save-place) *************** *** 461,467 **** =20=20 @example (defcustom diff-command "diff" ! "*The command to use to run diff." :type '(string) :group 'diff) @end example =2D-- 461,467 ---- =20=20 @example (defcustom diff-command "diff" ! "The command to use to run diff." :type '(string) :group 'diff) @end example Index: lispref/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lispref/ChangeLog,v retrieving revision 1.802 diff -C0 -r1.802 ChangeLog *** lispref/ChangeLog 2 Jan 2007 20:58:32 -0000 1.802 =2D-- lispref/ChangeLog 3 Jan 2007 21:16:24 -0000 *************** *** 0 **** =2D-- 1,6 ---- + 2007-01-03 Micha=EBl Cadilhac +=20 + * customize.texi (Customization Types): Remove the star + leading the docstring. + (Variable Definitions): Ditto. +=20 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =2D-=20 | Micha=EBl `Micha' Cadilhac | =ABTu aimeras ton prochain.=BB = | | Epita/LRDE Promo 2007 | D'abord, Dieu ou pas, = | | http://michael.cadilhac.name | j'ai horreur qu'on me tutoie. = | `--JID: michael.cadilhac@gmail.com--' -- P. Desproges - = --' --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFnB5YUJhDmOfFA3URAhrZAKCzmIyQd5K62RfjWDmcuMSHltv4EwCfVIsY lRpnWaBfxYhXfU49CPeo7A4= =sHTb -----END PGP SIGNATURE----- --==-=-=-- --===============2042558013== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============2042558013==--