From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: Calling (package-initialize) sooner during initialization Date: Tue, 28 Apr 2015 16:54:52 +0200 Message-ID: <85tww0w9nm.fsf@iznogoud.viz> References: <87383xk4ia.fsf@taylan.uni.cx> <87d22zi69k.fsf@taylan.uni.cx> <87a8xtoq3a.fsf@gmail.com> <87sibkemtw.fsf@gmail.com> <87618gem24.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430236387 18066 80.91.229.3 (28 Apr 2015 15:53:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2015 15:53:07 +0000 (UTC) Cc: Artur Malabarba , emacs-devel To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 28 17:53:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yn7of-0007db-77 for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2015 17:52:57 +0200 Original-Received: from localhost ([::1]:34625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn7oe-000214-Mg for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2015 11:52:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn7VJ-00051K-3e for emacs-devel@gnu.org; Tue, 28 Apr 2015 11:32:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn7VD-0005gv-CP for emacs-devel@gnu.org; Tue, 28 Apr 2015 11:32:57 -0400 Original-Received: from b2bfep13.mx.upcmail.net ([62.179.121.58]:34056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn7VD-0005fj-1d for emacs-devel@gnu.org; Tue, 28 Apr 2015 11:32:51 -0400 Original-Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep13.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150428153247.MDKM20529.b2bfep13-int.chello.at@edge11.upcmail.net> for ; Tue, 28 Apr 2015 17:32:47 +0200 Original-Received: from iznogoud.viz ([91.119.213.112]) by edge11.upcmail.net with edge id MTYm1q0142S43rv0BTYmVf; Tue, 28 Apr 2015 17:32:47 +0200 X-SourceIP: 91.119.213.112 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Yn7V8-0000e4-2P; Tue, 28 Apr 2015 17:32:46 +0200 Mail-Followup-To: Oleh Krehel , Artur Malabarba , emacs-devel User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 62.179.121.58 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185971 Archived-At: On Tue, Apr 28 2015, Oleh Krehel wrote: >>> (defmacro csetq (variable value) >>> `(funcall (or (get ',variable 'custom-set) 'set-default) ',variable , >> value)) [...] > A plain setq doesn't get in the way, but it also doesn't call the :set > property of defcustom. For instance, this works fine: > > (csetq ediff-diff-options "-w") > > but this doesn't work: > > (setq ediff-diff-options "-w") This example also shows that the variable's docstring doesn't always mention that a custom setter is used :-( So, I wonder if `describe-variable' shouldn't add this automatically, like in the following (barely tested) patch: -- >8 -- Subject: [PATCH] * lisp/help-fns.el (describe-variable): Mention a custom setter. --- lisp/help-fns.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 7ecd271..3eb9271 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -910,6 +910,16 @@ file-local variable.\n") ;; Make a link to customize if this variable can be customized. (when (custom-variable-p variable) + (let ((misfeature (get variable 'custom-set))) + (when misfeature + (terpri) + (terpri) + (princ "This variable's `custom-set' property has the value") + (if (symbolp misfeature) + (with-current-buffer standard-output + (insert (format " `%s'." misfeature))) + (terpri) + (pp misfeature)))) (let ((customize-label "customize")) (terpri) (terpri) -- 2.3.6