From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Byte-compilation of custom themes Date: Fri, 11 May 2018 20:32:56 +0300 Message-ID: <83a7t6nlmf.fsf@gnu.org> References: <87efmk2qk0.fsf@tcd.ie> <87vafjhu04.fsf@tcd.ie> <87po5po7ul.fsf@tcd.ie> <87o9hoxm0w.fsf@tcd.ie> <83fu2ynvda.fsf@gnu.org> <87zi169q9y.fsf@tcd.ie> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1526059919 1410 195.159.176.226 (11 May 2018 17:31:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 May 2018 17:31:59 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: "Basil L. Contovounesios" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 11 19:31:54 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHBta-0000Ga-Hr for ged-emacs-devel@m.gmane.org; Fri, 11 May 2018 19:31:54 +0200 Original-Received: from localhost ([::1]:59808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHBvh-0006nS-No for ged-emacs-devel@m.gmane.org; Fri, 11 May 2018 13:34:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHBuh-0006mw-EC for emacs-devel@gnu.org; Fri, 11 May 2018 13:33:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHBue-0000wM-5W for emacs-devel@gnu.org; Fri, 11 May 2018 13:33:03 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHBue-0000wG-2G; Fri, 11 May 2018 13:33:00 -0400 Original-Received: from [176.228.60.248] (port=1064 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fHBud-0001eb-IU; Fri, 11 May 2018 13:32:59 -0400 In-reply-to: <87zi169q9y.fsf@tcd.ie> (contovob@tcd.ie) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:225245 Archived-At: > From: "Basil L. Contovounesios" > Cc: , > Date: Fri, 11 May 2018 16:16:09 +0100 > > > The original code carefully verified that the members in > > custom-theme--load-path are directories, whereas your proposal calls > > directory-files on each member unconditionally, which will barf if a > > file is not a directory. > > The function custom-theme--load-path already incorporates the > file-directory-p check, so it is technically redundant here. > Would you rather it be kept regardless? We should at least have a comment there that we are relying on custom-theme--load-path to do the test, and perhaps also an assertion. > >> - (define-key map "\C-x\C-s" 'custom-theme-write) > >> - (define-key map "q" 'Custom-buffer-done) > >> - (define-key map "n" 'widget-forward) > >> - (define-key map "p" 'widget-backward) > >> + (define-key map "\C-x\C-s" #'custom-theme-write) > >> + (define-key map "q" #'Custom-buffer-done) > >> + (define-key map "n" #'widget-forward) > >> + (define-key map "p" #'widget-backward) > > > > Really? Are we going to switch to #'foo even in key bindings? > > Though I personally prefer to consistently #'-quote function symbols in > my own code, both for the extra byte-compiler check and narrower > in-buffer completion, I have no strong opinion here; I was simply making > the change in a sweeping fashion, in line with what I had perceived as a > welcome style. Out of curiosity, though, what makes key bindings > special w.r.t. quoting? Stefan gave one reason (with which I agree). From POV, it's another stab into my heart of a veteran reader of Emacs Lisp code. I recently find the code harder and harder to read due to all the new syntax and unfamiliar functions. You can ignore me on that, though. Thanks.