From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#40671: [DOC] modify literal objects Date: Sun, 10 May 2020 23:28:23 -0700 Organization: UCLA Computer Science Department Message-ID: References: <7fe0574a-62ae-94fb-2e55-1a69de6ce828@cs.ucla.edu> <91857438-f44a-90f4-dfe2-a32224ba3994@yandex.ru> <880dc34b-46a9-0149-3c6e-0a951a70125d@cs.ucla.edu> <9c46b93e-a855-0be0-7ab0-50cb8c5cd74d@yandex.ru> <48e90f87-1519-9101-d54b-4bfd81a0c936@yandex.ru> <252d6368-ddea-2f41-b53f-cd927ebc3d1d@cs.ucla.edu> <43d93102-d361-f64b-971b-909418b89fca@yandex.ru> <2ca64f28-1255-4135-6e45-0f0e12b9e72d@cs.ucla.edu> <0c7570cb-bf52-a617-bf54-27a47c54e04a@cs.ucla.edu> <04298f7d-f2c0-5186-57d3-522e3d886166@cs.ucla.edu> <88af48c6-bc39-6ab0-59ec-7d537f2d375d@yandex.ru> <41d69e2e-561f-743a-e1f0-282b2e22b66c@cs.ucla.edu> <87mu6ftk6o.fsf@web.de> <873687xjqn.fsf@web.de> <9982fae9-cc93-439e-8fe5-a68bdb21c637@default> <87tv0nvztm.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8CF7A8AC6C890FA54032201E" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="105526"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: ke.vigouroux@laposte.net, Dmitry Gutov , 40671@debbugs.gnu.org, Richard Stallman , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= To: Michael Heerdegen , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 11 08:29:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jY1w5-000RHN-7l for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 May 2020 08:29:09 +0200 Original-Received: from localhost ([::1]:44264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY1w3-0004AE-O3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 May 2020 02:29:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY1vy-0004A7-0V for bug-gnu-emacs@gnu.org; Mon, 11 May 2020 02:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jY1vx-0005pg-Nq for bug-gnu-emacs@gnu.org; Mon, 11 May 2020 02:29:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jY1vx-0003f5-Km for bug-gnu-emacs@gnu.org; Mon, 11 May 2020 02:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 May 2020 06:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40671 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 40671-submit@debbugs.gnu.org id=B40671.158917851314019 (code B ref 40671); Mon, 11 May 2020 06:29:01 +0000 Original-Received: (at 40671) by debbugs.gnu.org; 11 May 2020 06:28:33 +0000 Original-Received: from localhost ([127.0.0.1]:51030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jY1vU-0003e2-Lu for submit@debbugs.gnu.org; Mon, 11 May 2020 02:28:33 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jY1vS-0003dj-Te for 40671@debbugs.gnu.org; Mon, 11 May 2020 02:28:31 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 446C71600AF; Sun, 10 May 2020 23:28:25 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id NuzvxrqnwKDF; Sun, 10 May 2020 23:28:24 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 262C21600C7; Sun, 10 May 2020 23:28:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hNkPJq4N89Ia; Sun, 10 May 2020 23:28:24 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D13231600AF; Sun, 10 May 2020 23:28:23 -0700 (PDT) Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoU In-Reply-To: <87tv0nvztm.fsf@web.de> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180056 Archived-At: This is a multi-part message in MIME format. --------------8CF7A8AC6C890FA54032201E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 5/10/20 9:51 PM, Michael Heerdegen wrote: > BTW (also @Paul) there are some places (five or so) in Elisp source > files that look like > > (nconc '(x y z) (get-some-list)) > > Should they be rewritten? Yes, of course. Does the attached diff (against master) match what you found? --------------8CF7A8AC6C890FA54032201E Content-Type: text/x-patch; charset=UTF-8; name="nconc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="nconc.diff" diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 4f72251aed..fd6c6fe1ad 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1509,14 +1509,13 @@ byte-compile-side-effect-and-error-free-ops byte-current-buffer byte-stack-ref)) (defconst byte-compile-side-effect-free-ops - (nconc - '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref - byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1 - byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate - byte-plus byte-max byte-min byte-mult byte-char-after byte-char-syntax - byte-buffer-substring byte-string= byte-string< byte-nthcdr byte-elt - byte-member byte-assq byte-quo byte-rem byte-substring) - byte-compile-side-effect-and-error-free-ops)) + `(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref + byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1 + byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate + byte-plus byte-max byte-min byte-mult byte-char-after byte-char-syntax + byte-buffer-substring byte-string= byte-string< byte-nthcdr byte-elt + byte-member byte-assq byte-quo byte-rem byte-substring + ,@byte-compile-side-effect-and-error-free-ops)) ;; This crock is because of the way DEFVAR_BOOL variables work. ;; Consider the code diff --git a/lisp/frameset.el b/lisp/frameset.el index 10c6914f52..5850561928 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el @@ -396,17 +396,17 @@ frameset-prop ;; or, if you're only changing a few items, ;; ;; (defvar my-filter-alist -;; (nconc '((my-param1 . :never) -;; (my-param2 . my-filtering-function)) -;; frameset-filter-alist) +;; `((my-param1 . :never) +;; (my-param2 . my-filtering-function) +;; ,@frameset-filter-alist) ;; "My brief customized parameter filter alist.") ;; ;; and pass it to the FILTER arg of the save/restore functions, ;; ALWAYS taking care of not modifying the original lists; if you're ;; going to do any modifying of my-filter-alist, please use ;; -;; (nconc '((my-param1 . :never) ...) -;; (copy-sequence frameset-filter-alist)) +;; `(((my-param1 . :never) ...) +;; ,@(copy-sequence frameset-filter-alist)) ;; ;; One thing you shouldn't forget is that they are alists, so searching ;; in them is sequential. If you just want to change the default of @@ -445,39 +445,38 @@ frameset-session-filter-alist ;;;###autoload (defvar frameset-persistent-filter-alist - (nconc - '((background-color . frameset-filter-sanitize-color) - (buffer-list . :never) - (buffer-predicate . :never) - (buried-buffer-list . :never) - ;; Don't save the 'client' parameter to avoid that a subsequent - ;; `save-buffers-kill-terminal' in a non-client session barks at - ;; the user (Bug#29067). - (client . :never) - (delete-before . :never) - (font . frameset-filter-font-param) - ;; Don't save font-backend because we cannot guarantee the new - ;; session will support the saved backend anyway. (Bug#38442) - (font-backend . :never) - (foreground-color . frameset-filter-sanitize-color) - (frameset--text-pixel-height . :save) - (frameset--text-pixel-width . :save) - (fullscreen . frameset-filter-shelve-param) - (GUI:font . frameset-filter-unshelve-param) - (GUI:fullscreen . frameset-filter-unshelve-param) - (GUI:height . frameset-filter-unshelve-param) - (GUI:width . frameset-filter-unshelve-param) - (height . frameset-filter-shelve-param) - (outer-window-id . :never) - (parent-frame . :never) - (parent-id . :never) - (mouse-wheel-frame . :never) - (tty . frameset-filter-tty-to-GUI) - (tty-type . frameset-filter-tty-to-GUI) - (width . frameset-filter-shelve-param) - (window-id . :never) - (window-system . :never)) - frameset-session-filter-alist) + `((background-color . frameset-filter-sanitize-color) + (buffer-list . :never) + (buffer-predicate . :never) + (buried-buffer-list . :never) + ;; Don't save the 'client' parameter to avoid that a subsequent + ;; `save-buffers-kill-terminal' in a non-client session barks at + ;; the user (Bug#29067). + (client . :never) + (delete-before . :never) + (font . frameset-filter-font-param) + ;; Don't save font-backend because we cannot guarantee the new + ;; session will support the saved backend anyway. (Bug#38442) + (font-backend . :never) + (foreground-color . frameset-filter-sanitize-color) + (frameset--text-pixel-height . :save) + (frameset--text-pixel-width . :save) + (fullscreen . frameset-filter-shelve-param) + (GUI:font . frameset-filter-unshelve-param) + (GUI:fullscreen . frameset-filter-unshelve-param) + (GUI:height . frameset-filter-unshelve-param) + (GUI:width . frameset-filter-unshelve-param) + (height . frameset-filter-shelve-param) + (outer-window-id . :never) + (parent-frame . :never) + (parent-id . :never) + (mouse-wheel-frame . :never) + (tty . frameset-filter-tty-to-GUI) + (tty-type . frameset-filter-tty-to-GUI) + (width . frameset-filter-shelve-param) + (window-id . :never) + (window-system . :never) + ,@frameset-session-filter-alist) "Parameters to filter for persistent framesets. DO NOT MODIFY. See `frameset-filter-alist' for a full description.") diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 6f367692dd..595df607f5 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1501,9 +1501,9 @@ gnus-summary-mode-line-format-alist ;; This is here rather than in gnus-art for compilation reasons. (defvar gnus-article-mode-line-format-alist - (nconc '((?w (gnus-article-wash-status) ?s) - (?m (gnus-article-mime-part-status) ?s)) - gnus-summary-mode-line-format-alist)) + (nconc `((?w (gnus-article-wash-status) ?s) + (?m (gnus-article-mime-part-status) ?s) + ,@gnus-summary-mode-line-format-alist))) (defvar gnus-last-search-regexp nil "Default regexp for article search command.") --------------8CF7A8AC6C890FA54032201E--