From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master f515d658e5 1/2: Don't quote numbers in byte-run--set-* Date: Fri, 17 Jun 2022 13:58:17 -0400 Message-ID: References: <165548588979.10920.4402229762078749924@vcs2.savannah.gnu.org> <20220617171130.8EDECC01685@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19184"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 19:59:13 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2GFV-0004jN-Dc for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 19:59:13 +0200 Original-Received: from localhost ([::1]:49908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2GFU-0004gG-62 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 13:59:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2GEi-0003xN-0D for emacs-devel@gnu.org; Fri, 17 Jun 2022 13:58:24 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2GEf-0005Cl-Fx for emacs-devel@gnu.org; Fri, 17 Jun 2022 13:58:22 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D564344175A; Fri, 17 Jun 2022 13:58:19 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6671F44172B; Fri, 17 Jun 2022 13:58:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1655488698; bh=Ye53rhSQwNGsxJ4+ZdT6fxo/kE835A+aaGMA+VaNcoE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=pYmF76XrbfmfoBbDsEmi4NEmi8kmojmAO1MJBwP7idyobyFhOYMAhVpI4vONptHCG nGC2ccz8Co+4hLIxN4Pu94qaM1jQqG/EfxLFf0LnELakYsvBSDbOh6SaR8/LQ47YIy Om1n9euG6zELYcJ82QsQ6S8+BEfoR2xHpS/6Ndv4fiwONWg0YcOh7yFY66APy6BGUO PmQwGKl1dw//UzvXSlyVbzlyMiokmgorfpbOgvGdFxTbgcOp3iNQc40Gg0wF3T7L1r ToCaIPh6oZ5Rpdm1OhxOGTzYL53RQ2CURz0Rw4DytRbhIN+4qyPPm+EZRejWcK3UOe InO9Af2eSbp7g== Original-Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3A6891201CA; Fri, 17 Jun 2022 13:58:18 -0400 (EDT) In-Reply-To: <20220617171130.8EDECC01685@vcs2.savannah.gnu.org> (Lars Ingebrigtsen's message of "Fri, 17 Jun 2022 13:11:30 -0400 (EDT)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291308 Archived-At: > (defalias 'byte-run--set-doc-string > #'(lambda (f _args pos) > (list 'function-put (list 'quote f) > - ''doc-string-elt (list 'quote pos)))) > + ''doc-string-elt (if (numberp pos) > + pos > + (list 'quote pos))))) Should we push this one a step further, as below? > (defalias 'byte-run--set-indent > #'(lambda (f _args val) > (list 'function-put (list 'quote f) > - ''lisp-indent-function (list 'quote val)))) > + ''lisp-indent-function (if (numberp val) > + val > + (list 'quote val))))) Doing the same here would sadly break too much existing code. Stefan diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index dd90bcf4d82..140a1d765d5 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -217,9 +217,7 @@ 'byte-run--set-doc-string (defalias 'byte-run--set-indent #'(lambda (f _args val) (list 'function-put (list 'quote f) - ''lisp-indent-function (if (numberp val) - val - (list 'quote val))))) + ''lisp-indent-function val)))) (defalias 'byte-run--set-speed #'(lambda (f _args val) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 200af057cd7..b1579a61fe5 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -545,7 +545,7 @@ cl-defmethod \(and can be extended) by the various methods of `cl-generic-generalizers'. \(fn NAME [EXTRA] [QUALIFIER] ARGS &rest [DOCSTRING] BODY)" - (declare (doc-string cl--defmethod-doc-pos) (indent defun) + (declare (doc-string #'cl--defmethod-doc-pos) (indent defun) (debug (&define ; this means we are defining something [&name [sexp ;Allow (setf ...) additionally to symbols.