From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#40573: 27.0.90; flymake-mode broken in scratch buffer Date: Sat, 18 Apr 2020 09:26:59 +0100 Message-ID: References: <835ze4lsr1.fsf@gnu.org> <831roslq62.fsf@gnu.org> <87sgh89r78.fsf@mail.linkov.net> <83lfn0j92e.fsf@gnu.org> <87imi39e8w.fsf@mail.linkov.net> <83h7xmipi7.fsf@gnu.org> <878sivdsjn.fsf@mail.linkov.net> <83r1wmd2u0.fsf@gnu.org> <83a73acted.fsf@gnu.org> <837dyecoyb.fsf@gnu.org> <835zdyclfa.fsf@gnu.org> <83zhbab07u.fsf@gnu.org> <83v9lyazdo.fsf@gnu.org> <83r1wmav3h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ab9cdb05a38c6eb3" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="65695"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40573@debbugs.gnu.org, Juri Linkov , Stefan Monnier , Dmitry Gutov To: Eli Zaretskii , "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 18 10:28:27 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 1jPipv-000Gvd-5K for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Apr 2020 10:28:27 +0200 Original-Received: from localhost ([::1]:55906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPipt-0001bj-R7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Apr 2020 04:28:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41107) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPipb-0001bY-Ia for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2020 04:28:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPipW-0006xu-Oy for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2020 04:28:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58661) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPipW-0006ur-1x for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2020 04:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jPipV-0001gI-UB for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2020 04:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Apr 2020 08:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40573 X-GNU-PR-Package: emacs Original-Received: via spool by 40573-submit@debbugs.gnu.org id=B40573.15871984416411 (code B ref 40573); Sat, 18 Apr 2020 08:28:01 +0000 Original-Received: (at 40573) by debbugs.gnu.org; 18 Apr 2020 08:27:21 +0000 Original-Received: from localhost ([127.0.0.1]:41974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPiop-0001fJ-Ug for submit@debbugs.gnu.org; Sat, 18 Apr 2020 04:27:21 -0400 Original-Received: from mail-io1-f45.google.com ([209.85.166.45]:34609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPion-0001f5-0q for 40573@debbugs.gnu.org; Sat, 18 Apr 2020 04:27:18 -0400 Original-Received: by mail-io1-f45.google.com with SMTP id f3so5123620ioj.1 for <40573@debbugs.gnu.org>; Sat, 18 Apr 2020 01:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hk9ctEQGGhgB/yZ0b1+aIkuSHqYisA/5d+XMmNgw1F0=; b=B1S85dX1JmfW8MxV43+1F/Sv8QKob1hlEFmPVvZ3wm0uwQZEGl+DF0vyb675JZZ266 fcvbwpaS8KJuhPTydExNhmorgIUDAMarH1Z7TKdJxll6ip+33a8sHDb0bnssev4ooKmf 4SDdvwCmMFc6VbgsrJfjae01HHn2tq+ksvA/BWdjLGs78s1KQ+e4Kf8M5/2f+5gb9L5l o7H0qXZKWeODAJUh5uMJ3zVGKqulRkQo3r4IkSljVz8c3KoNgNbm72YsBPoDUGEVPtox RoJYMTDisdoQc9g0WHuDD7ouHFWshP2vZBUx199LbO7v/Is3Mx6eFfuKMnL717L0UyYn 6CoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Hk9ctEQGGhgB/yZ0b1+aIkuSHqYisA/5d+XMmNgw1F0=; b=PNL9u+NFt0xY2Bo/7p3tuDAXLkgjCMz/I8XCtSArT56D6QrcguTdgaK/EyPUctkDs0 d64kU9ZHrl3logYaak60o8KCFHYxS+segdsVnN8c3s4a5JXTFtImQ0d4TsiFiwa2Gtkq rNLAotMam7I7IA6zhDH1svRf5zUkFZXx10MRTuCT0lpD+B69FL6lF+6xFPeNtp12TsPJ yi2+whlJWNj9o/AVFs3BtQXVjGMWgsZSqeEBj1RcG6F6lE+oJeqPnpgUt8L94PLQ/cEp LQzxzMC7hxPRTIa0TI2yIM9xZuXHnl4YEyk7grT9htn0ml5xlF2dCD5bHTze0dwPwFMh OAmA== X-Gm-Message-State: AGi0PubNROpMrcsGVNjC0zErIMn384hhllIjIR7mX5fVvdhMhKABjc/f 2Oac94SkdajIExi2DQdFK66k9DF/eRMvGAzXAXU= X-Google-Smtp-Source: APiQypLGzBJYUFKPvYWwL7If/a+6B70M6WpXIDUzcmcNrrYVBbKezLqixol6K//PZVWdwvQgU6OTamAhsiB0G0e5GX4= X-Received: by 2002:a5d:8d89:: with SMTP id b9mr7117502ioj.156.1587198431041; Sat, 18 Apr 2020 01:27:11 -0700 (PDT) In-Reply-To: <83r1wmav3h.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:178550 Archived-At: --000000000000ab9cdb05a38c6eb3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've put "the code" in a branch in our repo, called 'scratch/add-lisp-data'= . It's also after my sig. It's two commits. The first adds the mode, refactors some code around it and sets it for dir-locals. The seconds sets it for 5 or 6 files. Thanks Juri and Basil, pointing directly to the function made it trivial easy to do! The first commit is an evolution of Stefan's which makes a "lisp-data-mode" instead of "emacs-lisp-data-mode". There's probably details I'm more than willing to change if anyone wants, like not using the dir-locals-file constant in a place there, or not doing that setcar or those setf nth. Anyway, I hope we can now talk about concrete stuff. Jo=C3=A3o commit 035137bc92ec4b3ceab43409d4b8ea0deb975459 Author: Jo=C3=A3o T=C3=A1vora Date: Sat Apr 18 09:04:13 2020 +0100 Use lisp-data-mode in 5 more places Thanks to Juri Linkov and Basil L. Contovounesios for the list and the indication of the function that needed to be changed. * lisp/bookmark.el (bookmark-insert-file-format-version-stamp): Use lisp-data-mode. * lisp/saveplace.el (save-place-alist-to-file): Use lisp-data-mode. * lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode. * lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode. * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use lisp-data-mode. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 720ad18c16..f2384973e9 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -734,8 +734,10 @@ bookmark-insert-file-format-version-stamp (if (memq (coding-system-base coding) '(undecided prefer-utf-8)) (setq coding 'utf-8-emacs)) (insert - (format ";;;; Emacs Bookmark Format Version %d ;;;; -*- coding: %S -*-\n" - bookmark-file-format-version (coding-system-base coding))) + (format + ";;;; Emacs Bookmark Format Version %d\ +;;;; -*- coding: %S mode: lisp-data -*-\n" + bookmark-file-format-version (coding-system-base coding))) (insert ";;; This format is meant to be slightly human-readable;\n" ";;; nevertheless, you probably don't want to edit it.\n" ";;; " diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c83884fd25..a4544023f6 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1733,7 +1733,7 @@ eww-add-bookmark (defun eww-write-bookmarks () (with-temp-file (expand-file-name "eww-bookmarks" eww-bookmarks-directory) - (insert ";; Auto-generated file; don't edit\n") + (insert ";; Auto-generated file; don't edit -*- mode: lisp-data -*-\n"= ) (pp eww-bookmarks (current-buffer)))) (defun eww-read-bookmarks () diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index 2d36c5e257..cc22427e6d 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -964,6 +964,7 @@ nsm-save-host (defun nsm-write-settings () (with-temp-file nsm-settings-file + (insert ";;;; -*- mode: lisp-data -*-\n") (insert "(\n") (dolist (setting nsm-permanent-host-settings) (insert " ") diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 09e30f000f..6d87ce297b 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -472,7 +472,7 @@ tramp-dump-connection-properties ;; Dump it. (with-temp-file tramp-persistency-file-name (insert - ";; -*- emacs-lisp -*-" + ";; -*- lisp-data -*-" ;; `time-stamp-string' might not exist in all Emacs flavors. (condition-case nil (progn diff --git a/lisp/saveplace.el b/lisp/saveplace.el index fa0e181bb1..f78639db24 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -248,7 +248,7 @@ save-place-alist-to-file (delete-region (point-min) (point-max)) (when save-place-forget-unreadable-files (save-place-forget-unreadable-files)) - (insert (format ";;; -*- coding: %s -*-\n" + (insert (format ";;; -*- coding: %s mode: lisp-data -*-\n" (symbol-name coding-system-for-write))) (let ((print-length nil) (print-level nil)) commit b4af4a3578303741364dc91acdd5908d9b11e3a4 Author: Jo=C3=A3o T=C3=A1vora Date: Sat Apr 18 02:46:04 2020 +0100 Add a lisp-data-mode for editing non-code lisp data To provide a cleaner implementation remove arguments from the auxiliary routine lisp-mode-variables. The modes/functions that need to do some something special adjustment do them in their own bodies. * lisp/chistory.el (command-history-mode): Don't pass nil to lisp-mode-variables. * lisp/files.el (auto-mode-alist): Add entry for ".dir-locals". * lisp/help-fns.el (describe-variable): Don't pass useless args to lisp-mode-variables. * lisp/emacs-lisp/pp.el (pp-to-string): Don't pass useless args to lisp-mode-variables. * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Simplify. Always set same variables. (lisp-data-mode): New major mode. (lisp-mode): Inherit from lisp-data-mode. Set special lisp-mode stuff here. * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from lisp-data-mode. (emacs-lisp-mode): Simplify. * lisp/progmodes/inf-lisp.el (inferior-lisp-mode): Set the needed syntax table here, not through other function. diff --git a/lisp/chistory.el b/lisp/chistory.el index c9aa927b94..485515d07b 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -139,7 +139,7 @@ command-history-mode Keybindings: \\{command-history-mode-map}" - (lisp-mode-variables nil) + (lisp-mode-variables) (set (make-local-variable 'revert-buffer-function) 'command-history-revert) (set-syntax-table emacs-lisp-mode-syntax-table)) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 3b0f5493ee..8f7e6c0431 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -611,15 +611,8 @@ lisp-adaptive-fill ;; a single docstring. Let's fix it here. (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")) -(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitiv= e - elisp) - "Common initialization routine for lisp modes. -The LISP-SYNTAX argument is used by code in inf-lisp.el and is -\(uselessly) passed from pp.el, chistory.el, gnus-kill.el and -score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for -font-lock keywords will not be case sensitive." - (when lisp-syntax - (set-syntax-table lisp-mode-syntax-table)) +(defun lisp-mode-variables () + "Common initialization routine for lisp modes." (setq-local paragraph-ignore-fill-prefix t) (setq-local fill-paragraph-function 'lisp-fill-paragraph) (setq-local adaptive-fill-function #'lisp-adaptive-fill) @@ -643,21 +636,24 @@ lisp-mode-variables (setq-local multibyte-syntax-as-symbol t) ;; (setq-local syntax-begin-function 'beginning-of-defun) ;;Bug#16247. (setq font-lock-defaults - `(,(if elisp '(lisp-el-font-lock-keywords - lisp-el-font-lock-keywords-1 - lisp-el-font-lock-keywords-2) - '(lisp-cl-font-lock-keywords - lisp-cl-font-lock-keywords-1 - lisp-cl-font-lock-keywords-2)) - nil ,keywords-case-insensitive nil nil - (font-lock-mark-block-function . mark-defun) - (font-lock-extra-managed-props help-echo) - (font-lock-syntactic-face-function - . lisp-font-lock-syntactic-face-function))) + (list nil nil nil nil nil + '(font-lock-mark-block-function . mark-defun) + '(font-lock-extra-managed-props help-echo) + '(font-lock-syntactic-face-function + . lisp-font-lock-syntactic-face-function))) (setq-local prettify-symbols-alist lisp-prettify-symbols-alist) (setq-local electric-pair-skip-whitespace 'chomp) (setq-local electric-pair-open-newline-between-pairs nil)) +;;;###autoload +(define-derived-mode lisp-data-mode prog-mode "Lisp-Data" + "Major mode for buffers holding data written in Lisp syntax." + :group 'lisp + (lisp-mode-variables) + (set-syntax-table lisp-mode-syntax-table) + (setq-local electric-quote-string t) + (setq imenu-case-fold-search nil)) + (defun lisp-outline-level () "Lisp mode `outline-level' function." (let ((len (- (match-end 0) (match-beginning 0)))) @@ -737,7 +733,7 @@ lisp-mode-map "Keymap for ordinary Lisp mode. All commands in `lisp-mode-shared-map' are inherited by this map.") -(define-derived-mode lisp-mode prog-mode "Lisp" +(define-derived-mode lisp-mode lisp-data-mode "Lisp" "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. Commands: Delete converts tabs to spaces as it moves back. @@ -746,7 +742,11 @@ lisp-mode \\{lisp-mode-map} Note that `run-lisp' may be used either to start an inferior Lisp job or to switch back to an existing one." - (lisp-mode-variables nil t) + (setf + (nth 0 font-lock-defaults) '(lisp-cl-font-lock-keywords + lisp-cl-font-lock-keywords-1 + lisp-cl-font-lock-keywords-2) + (nth 2 font-lock-defaults) t) (setq-local lisp-indent-function 'common-lisp-indent-function) (setq-local find-tag-default-function 'lisp-find-tag-default) (setq-local comment-start-skip diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 3df7b0e368..4d8bf52934 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -42,7 +42,7 @@ pp-to-string OBJECT can be any Lisp object. Quoting characters are used as needed to make output that `read' can handle, whenever this is possible." (with-temp-buffer - (lisp-mode-variables nil) + (lisp-mode-variables) (set-syntax-table emacs-lisp-mode-syntax-table) (let ((print-escape-newlines pp-escape-newlines) (print-quoted t)) diff --git a/lisp/files.el b/lisp/files.el index fa72e51c49..a769d061f9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2657,6 +2657,9 @@ auto-mode-alist ("\\.ltx\\'" . latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) + ;; .dir-locals.el is not really elisp. Can't use the + ;; `dir-locals-file' constant since that is defined below. + (".dir-locals.el" . lisp-data-mode) ("\\.el\\'" . emacs-lisp-mode) ("Project\\.ede\\'" . emacs-lisp-mode) ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 0a99b8d6a3..dbf2cb807b 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1000,7 +1000,7 @@ describe-variable (terpri) (let ((buf (current-buffer))) (with-temp-buffer - (lisp-mode-variables nil) + (lisp-mode-variables) (set-syntax-table emacs-lisp-mode-syntax-table) (insert print-rep) (pp-buffer) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index f85fd771ca..2f231781ba 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -250,7 +250,7 @@ elisp--dynlex-modeline-map map)) ;;;###autoload -(define-derived-mode emacs-lisp-mode prog-mode +(define-derived-mode emacs-lisp-mode lisp-data-mode `("ELisp" (lexical-binding (:propertize "/l" help-echo "Using lexical-binding mode") @@ -268,35 +268,26 @@ emacs-lisp-mode \\{emacs-lisp-mode-map}" :group 'lisp (defvar project-vc-external-roots-function) - (lisp-mode-variables nil nil 'elisp) + (setcar font-lock-defaults + '(lisp-el-font-lock-keywords + lisp-el-font-lock-keywords-1 + lisp-el-font-lock-keywords-2)) + (set-syntax-table emacs-lisp-mode-syntax-table) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) (if (boundp 'electric-pair-text-pairs) (setq-local electric-pair-text-pairs (append '((?\` . ?\') (?\=E2=80=98 . ?\=E2=80=99)) electric-pair-text-pairs)) (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs)) - (setq-local electric-quote-string t) - (setq imenu-case-fold-search nil) (add-hook 'eldoc-documentation-functions #'elisp-eldoc-documentation-function nil t) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) (setq-local project-vc-external-roots-function #'elisp-load-path-roots) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil 'local) - ;; .dir-locals.el and lock files will cause the byte-compiler and - ;; checkdoc emit spurious warnings, because they don't follow the - ;; conventions of Emacs Lisp sources. Until we have a better fix, - ;; like teaching elisp-mode about files that only hold data - ;; structures, we disable the ELisp Flymake backend for these files. - (unless - (let* ((bfname (buffer-file-name)) - (fname (and (stringp bfname) (file-name-nondirectory bfname)))) - (and (stringp fname) - (or (string-match "\\`\\.#" fname) - (string-equal dir-locals-file fname)))) - (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t= ) - (add-hook 'flymake-diagnostic-functions - #'elisp-flymake-byte-compile nil t))) + (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t) + (add-hook 'flymake-diagnostic-functions + #'elisp-flymake-byte-compile nil t)) ;; Font-locking support. diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 9f34a377f4..aa6c718041 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -274,7 +274,8 @@ inferior-lisp-mode to continue it." (setq comint-prompt-regexp inferior-lisp-prompt) (setq mode-line-process '(":%s")) - (lisp-mode-variables t) + (set-syntax-table lisp-mode-syntax-table) + (lisp-mode-variables) (setq comint-get-old-input (function lisp-get-old-input)) (setq comint-input-filter (function lisp-input-filter))) On Fri, Apr 17, 2020 at 6:19 PM Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Date: Fri, 17 Apr 2020 16:55:07 +0100 > > Cc: Stefan Monnier , Juri Linkov < > juri@linkov.net>, 40573@debbugs.gnu.org, > > Dmitry Gutov > > > > Can you explain what is dirty about having that mode for a subset > > of files that _could_ make use of it and having the user select > > it via M-x lisp-data-mode when he thinks it's useful? > > I already did, many times. I have nothing new to say about this. > > > Can you give > > evidence of any benefit to your all-or-nothing stance here? > > I don't have to give any evidence. We both have our opinions, and > they are different. Please respect mine. > > > I've explained, many times, that turning it on automatically for > > non-generated files, is impossible to achieve. Do you disagree > > with this statement? > > Yes, I do. Also mentioned more than once. > > Can we please stop this futile going in circles? > --=20 Jo=C3=A3o T=C3=A1vora --000000000000ab9cdb05a38c6eb3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've put "the code" in a branch in our = repo, called 'scratch/add-lisp-data'.
It's also after= my sig.

It's two commits.=C2=A0 The first= adds the mode, refactors some code around it
and sets it for dir= -locals. The seconds sets it for 5 or 6=C2=A0 files. Thanks Juri
=
and=C2=A0 Basil, pointing directly to the function made it trivial eas= y to do!

The first commit is an evolution of Stefa= n's which makes a "lisp-data-mode"
instead of = "emacs-lisp-data-mode". There's probably details I'm more= than
willing to change if anyone wants, like not using the dir-l= ocals-file constant
in a place there, or not doing that setc= ar or those setf nth.

Anyway, I hope we can no= w talk about concrete stuff.
Jo=C3=A3o

c= ommit 035137bc92ec4b3ceab43409d4b8ea0deb975459
Author: Jo=C3=A3o T=C3=A1= vora <joaotavora@gmail.com&g= t;
Date: =C2=A0 Sat Apr 18 09:04:13 2020 +0100

=C2=A0 =C2=A0 Use = lisp-data-mode in 5 more places
=C2=A0 =C2=A0
=C2=A0 =C2=A0 Thanks t= o Juri Linkov and Basil L. Contovounesios for the list and the
=C2=A0 = =C2=A0 indication of the function that needed to be changed.
=C2=A0 =C2= =A0
=C2=A0 =C2=A0 * lisp/bookmark.el (bookmark-insert-file-format-versi= on-stamp):
=C2=A0 =C2=A0 Use lisp-data-mode.
=C2=A0 =C2=A0
=C2=A0= =C2=A0 * lisp/saveplace.el (save-place-alist-to-file): Use
=C2=A0 =C2= =A0 lisp-data-mode.
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp/net/eww.el (e= ww-write-bookmarks): Use lisp-data-mode.
=C2=A0 =C2=A0
=C2=A0 =C2=A0= * lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode.
=C2=A0 =C2= =A0
=C2=A0 =C2=A0 * lisp/net/tramp-cache.el (tramp-dump-connection-prop= erties): Use
=C2=A0 =C2=A0 lisp-data-mode.

diff --git a/lisp/book= mark.el b/lisp/bookmark.el
index 720ad18c16..f2384973e9 100644
--- a/= lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -734,8 +734,10 @@ bookmark= -insert-file-format-version-stamp
=C2=A0 =C2=A0(if (memq (coding-system-= base coding) '(undecided prefer-utf-8))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(= setq coding 'utf-8-emacs))
=C2=A0 =C2=A0(insert
- =C2=A0 (format = ";;;; Emacs Bookmark Format Version %d ;;;; -*- coding: %S -*-\n"=
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bookmark-file-format-version (codi= ng-system-base coding)))
+ =C2=A0 (format
+ =C2=A0 =C2=A0";;;; E= macs Bookmark Format Version %d\
+;;;; -*- coding: %S mode: lisp-data -*= -\n"
+ =C2=A0 =C2=A0bookmark-file-format-version (coding-system-bas= e coding)))
=C2=A0 =C2=A0(insert ";;; This format is meant to be sl= ightly human-readable;\n"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= ";;; nevertheless, you probably don't want to edit it.\n"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0";;; "
diff --git a/l= isp/net/eww.el b/lisp/net/eww.el
index c83884fd25..a4544023f6 100644
= --- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1733,7 +1733,7 @@ eww= -add-bookmark
=C2=A0
=C2=A0(defun eww-write-bookmarks ()
=C2=A0 = =C2=A0(with-temp-file (expand-file-name "eww-bookmarks" eww-bookm= arks-directory)
- =C2=A0 =C2=A0(insert ";; Auto-generated file; don= 't edit\n")
+ =C2=A0 =C2=A0(insert ";; Auto-generated file= ; don't edit -*- mode: lisp-data -*-\n")
=C2=A0 =C2=A0 =C2=A0(p= p eww-bookmarks (current-buffer))))
=C2=A0
=C2=A0(defun eww-read-book= marks ()
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 2d36c5e= 257..cc22427e6d 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el@@ -964,6 +964,7 @@ nsm-save-host
=C2=A0
=C2=A0(defun nsm-write-sett= ings ()
=C2=A0 =C2=A0(with-temp-file nsm-settings-file
+ =C2=A0 =C2= =A0(insert ";;;; -*- mode: lisp-data -*-\n")
=C2=A0 =C2=A0 =C2= =A0(insert "(\n")
=C2=A0 =C2=A0 =C2=A0(dolist (setting nsm-per= manent-host-settings)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert " ")<= br>diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index = 09e30f000f..6d87ce297b 100644
--- a/lisp/net/tramp-cache.el
+++ b/lis= p/net/tramp-cache.el
@@ -472,7 +472,7 @@ tramp-dump-connection-propertie= s
=C2=A0 ;; Dump it.
=C2=A0 (with-temp-file tramp-persistency-file-na= me
=C2=A0 =C2=A0(insert
- =C2=A0 ";; -*- emacs-lisp -*-"<= br>+ =C2=A0 ";; -*- lisp-data -*-"
=C2=A0 =C2=A0 ;; `time-st= amp-string' might not exist in all Emacs flavors.
=C2=A0 =C2=A0 (co= ndition-case nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (progn
diff --git a/lis= p/saveplace.el b/lisp/saveplace.el
index fa0e181bb1..f78639db24 100644--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -248,7 +248,7 @@= save-place-alist-to-file
=C2=A0 =C2=A0 =C2=A0 =C2=A0(delete-region (poi= nt-min) (point-max))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(when save-place-forget-= unreadable-files
=C2=A0 (save-place-forget-unreadable-files))
- =C2= =A0 =C2=A0 =C2=A0(insert (format ";;; -*- coding: %s -*-\n"
+ = =C2=A0 =C2=A0 =C2=A0(insert (format ";;; -*- coding: %s mode: lisp-dat= a -*-\n"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(symbol-name coding-system-for-write)))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0(let ((print-length nil)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(print-level nil))

commit b4af4a357830374= 1364dc91acdd5908d9b11e3a4
Author: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
Date: =C2=A0 Sa= t Apr 18 02:46:04 2020 +0100

=C2=A0 =C2=A0 Add a lisp-data-mode for = editing non-code lisp data
=C2=A0 =C2=A0
=C2=A0 =C2=A0 To provide a = cleaner implementation remove arguments from the
=C2=A0 =C2=A0 auxiliary= routine lisp-mode-variables.=C2=A0 The modes/functions that need
=C2=A0= =C2=A0 to do some something special adjustment do them in their own bodies= .
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp/chistory.el (command-history-mo= de): Don't pass nil to
=C2=A0 =C2=A0 lisp-mode-variables.
=C2=A0 = =C2=A0
=C2=A0 =C2=A0 * lisp/files.el (auto-mode-alist): Add entry for &= quot;.dir-locals".
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp/help-fns.= el (describe-variable): Don't pass useless args to
=C2=A0 =C2=A0 lis= p-mode-variables.
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp/emacs-lisp/pp.e= l (pp-to-string): Don't pass useless args to
=C2=A0 =C2=A0 lisp-mode= -variables.
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp/emacs-lisp/lisp-mode.= el (lisp-mode-variables):
=C2=A0 =C2=A0 Simplify.=C2=A0 Always set same = variables.
=C2=A0 =C2=A0 (lisp-data-mode): New major mode.
=C2=A0 =C2= =A0 (lisp-mode): Inherit from lisp-data-mode.=C2=A0 Set special lisp-mode=C2=A0 =C2=A0 stuff here.
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp/progm= odes/elisp-mode.el (emacs-lisp-mode): Inherit from
=C2=A0 =C2=A0 lisp-da= ta-mode.
=C2=A0 =C2=A0 (emacs-lisp-mode): Simplify.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 * lisp/progmodes/inf-lisp.el (inferior-lisp-mode): Set the n= eeded
=C2=A0 =C2=A0 syntax table here, not through other function.
diff --git a/lisp/chistory.el b/lisp/chistory.el
index c9aa927b94..485= 515d07b 100644
--- a/lisp/chistory.el
+++ b/lisp/chistory.el
@@ -1= 39,7 +139,7 @@ command-history-mode
=C2=A0
=C2=A0Keybindings:
=C2= =A0\\{command-history-mode-map}"
- =C2=A0(lisp-mode-variables nil)<= br>+ =C2=A0(lisp-mode-variables)
=C2=A0 =C2=A0(set (make-local-variable = 'revert-buffer-function) 'command-history-revert)
=C2=A0 =C2=A0(= set-syntax-table emacs-lisp-mode-syntax-table))
=C2=A0
diff --git a/l= isp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 3b0f549= 3ee..8f7e6c0431 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/= emacs-lisp/lisp-mode.el
@@ -611,15 +611,8 @@ lisp-adaptive-fill
=C2= =A0 =C2=A0;; a single docstring.=C2=A0 Let's fix it here.
=C2=A0 =C2= =A0(if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") &quo= t;"))
=C2=A0
-(defun lisp-mode-variables (&optional lisp-syn= tax keywords-case-insensitive
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0elisp)
- =C2=A0"Common initialization routine f= or lisp modes.
-The LISP-SYNTAX argument is used by code in inf-lisp.el = and is
-\(uselessly) passed from pp.el, chistory.el, gnus-kill.el and-score-mode.el.=C2=A0 KEYWORDS-CASE-INSENSITIVE non-nil means that for
= -font-lock keywords will not be case sensitive."
- =C2=A0(when lisp= -syntax
- =C2=A0 =C2=A0(set-syntax-table lisp-mode-syntax-table))
+(d= efun lisp-mode-variables ()
+ =C2=A0"Common initialization routine = for lisp modes."
=C2=A0 =C2=A0(setq-local paragraph-ignore-fill-pre= fix t)
=C2=A0 =C2=A0(setq-local fill-paragraph-function 'lisp-fill-p= aragraph)
=C2=A0 =C2=A0(setq-local adaptive-fill-function #'lisp-ada= ptive-fill)
@@ -643,21 +636,24 @@ lisp-mode-variables
=C2=A0 =C2=A0(s= etq-local multibyte-syntax-as-symbol t)
=C2=A0 =C2=A0;; (setq-local synt= ax-begin-function 'beginning-of-defun) =C2=A0;;Bug#16247.
=C2=A0 =C2= =A0(setq font-lock-defaults
- `(,(if elisp '(lisp-el-font-lock-keywo= rds
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 lisp-el-font-lock-keywords-1
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 lisp-el-font-lock-keywords= -2)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(lisp-cl-font-lock-= keywords
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 lisp-cl-font= -lock-keywords-1
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 lisp= -cl-font-lock-keywords-2))
- =C2=A0nil ,keywords-case-insensitive nil n= il
- =C2=A0(font-lock-mark-block-function . mark-defun)
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(font-lock-extra-managed-props help-echo)
- =C2= =A0(font-lock-syntactic-face-function
- =C2=A0 . lisp-font-lock-syntact= ic-face-function)))
+ (list nil nil nil nil nil
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'(font-lock-mark-block-function . mark-d= efun)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'(font-lock-= extra-managed-props help-echo)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0'(font-lock-syntactic-face-function
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0. lisp-font-lock-syntactic-face-function= )))
=C2=A0 =C2=A0(setq-local prettify-symbols-alist lisp-prettify-symbol= s-alist)
=C2=A0 =C2=A0(setq-local electric-pair-skip-whitespace 'cho= mp)
=C2=A0 =C2=A0(setq-local electric-pair-open-newline-between-pairs ni= l))
=C2=A0
+;;;###autoload
+(define-derived-mode lisp-data-mode pr= og-mode "Lisp-Data"
+ =C2=A0"Major mode for buffers holdi= ng data written in Lisp syntax."
+ =C2=A0:group 'lisp
+ =C2= =A0(lisp-mode-variables)
+ =C2=A0(set-syntax-table lisp-mode-syntax-tabl= e)
+ =C2=A0(setq-local electric-quote-string t)
+ =C2=A0(setq imenu-c= ase-fold-search nil))
+
=C2=A0(defun lisp-outline-level ()
=C2=A0 = =C2=A0"Lisp mode `outline-level' function."
=C2=A0 =C2=A0(= let ((len (- (match-end 0) (match-beginning 0))))
@@ -737,7 +733,7 @@ li= sp-mode-map
=C2=A0 =C2=A0"Keymap for ordinary Lisp mode.
=C2=A0A= ll commands in `lisp-mode-shared-map' are inherited by this map.")=
=C2=A0
-(define-derived-mode lisp-mode prog-mode "Lisp"+(define-derived-mode lisp-mode lisp-data-mode "Lisp"
=C2=A0 = =C2=A0"Major mode for editing Lisp code for Lisps other than GNU Emacs= Lisp.
=C2=A0Commands:
=C2=A0Delete converts tabs to spaces as it mov= es back.
@@ -746,7 +742,11 @@ lisp-mode
=C2=A0\\{lisp-mode-map}
= =C2=A0Note that `run-lisp' may be used either to start an inferior Lisp= job
=C2=A0or to switch back to an existing one."
- =C2=A0(lisp-= mode-variables nil t)
+ =C2=A0(setf
+ =C2=A0 (nth 0 font-lock-default= s) '(lisp-cl-font-lock-keywords
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0lisp-cl-font-lock-keywords-1
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0li= sp-cl-font-lock-keywords-2)
+ =C2=A0 (nth 2 font-lock-defaults) t)
= =C2=A0 =C2=A0(setq-local lisp-indent-function 'common-lisp-indent-funct= ion)
=C2=A0 =C2=A0(setq-local find-tag-default-function 'lisp-find-t= ag-default)
=C2=A0 =C2=A0(setq-local comment-start-skip
diff --git a/= lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 3df7b0e368..4d8bf529= 34 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
= @@ -42,7 +42,7 @@ pp-to-string
=C2=A0OBJECT can be any Lisp object.=C2= =A0 Quoting characters are used as needed
=C2=A0to make output that `rea= d' can handle, whenever this is possible."
=C2=A0 =C2=A0(with-t= emp-buffer
- =C2=A0 =C2=A0(lisp-mode-variables nil)
+ =C2=A0 =C2=A0(l= isp-mode-variables)
=C2=A0 =C2=A0 =C2=A0(set-syntax-table emacs-lisp-mod= e-syntax-table)
=C2=A0 =C2=A0 =C2=A0(let ((print-escape-newlines pp-esca= pe-newlines)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(print-quoted t))<= br>diff --git a/lisp/files.el b/lisp/files.el
index fa72e51c49..a769d061= f9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2657,6 +2657= ,9 @@ auto-mode-alist
=C2=A0 =C2=A0 =C2=A0 ("\\.ltx\\'" . = latex-mode)
=C2=A0 =C2=A0 =C2=A0 ("\\.dtx\\'" . doctex-mod= e)
=C2=A0 =C2=A0 =C2=A0 ("\\.org\\'" . org-mode)
+ =C2= =A0 =C2=A0 ;; .dir-locals.el is not really elisp.=C2=A0 Can't use the+ =C2=A0 =C2=A0 ;; `dir-locals-file' constant since that is defined b= elow.
+ =C2=A0 =C2=A0 (".dir-locals.el" . lisp-data-mode)
= =C2=A0 =C2=A0 =C2=A0 ("\\.el\\'" . emacs-lisp-mode)
=C2=A0= =C2=A0 =C2=A0 ("Project\\.ede\\'" . emacs-lisp-mode)
=C2= =A0 =C2=A0 =C2=A0 ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . schem= e-mode)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 0a99b8= d6a3..dbf2cb807b 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el=
@@ -1000,7 +1000,7 @@ describe-variable
=C2=A0 =C2=A0 =C2=A0(terpr= i)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0(let ((buf (current-buffer)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-temp-buffer
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(lisp-mode-variables nil)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lisp-mode-variables)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(set-syntax-table emacs-lisp-mode-syntax-table)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(insert print-rep)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(pp-buffer)
diff --git a/li= sp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index f85fd771= ca..2f231781ba 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/p= rogmodes/elisp-mode.el
@@ -250,7 +250,7 @@ elisp--dynlex-modeline-map=C2=A0 =C2=A0 =C2=A0map))
=C2=A0
=C2=A0;;;###autoload
-(define-de= rived-mode emacs-lisp-mode prog-mode
+(define-derived-mode emacs-lisp-mo= de lisp-data-mode
=C2=A0 =C2=A0`("ELisp"
=C2=A0 =C2=A0 =C2= =A0(lexical-binding (:propertize "/l"
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0help-echo "= Using lexical-binding mode")
@@ -268,35 +268,26 @@ emacs-lisp-mode<= br>=C2=A0\\{emacs-lisp-mode-map}"
=C2=A0 =C2=A0:group 'lisp
= =C2=A0 =C2=A0(defvar project-vc-external-roots-function)
- =C2=A0(lisp-m= ode-variables nil nil 'elisp)
+ =C2=A0(setcar font-lock-defaults
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'(lisp-el-font-lock-keywords
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lisp-el-font-lock-keywords-1
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lisp-el-font-lock-keywords-2))
= + =C2=A0(set-syntax-table emacs-lisp-mode-syntax-table)
=C2=A0 =C2=A0(ad= d-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers= )
=C2=A0 =C2=A0(if (boundp 'electric-pair-text-pairs)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0(setq-local electric-pair-text-pairs
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(append '((?\` . ?\= ') (?\=E2=80=98 . ?\=E2=80=99))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0electric-pair= -text-pairs))
=C2=A0 =C2=A0 =C2=A0(add-hook 'electric-pair-mode-hook= #'emacs-lisp-set-electric-text-pairs))
- =C2=A0(setq-local electric= -quote-string t)
- =C2=A0(setq imenu-case-fold-search nil)
=C2=A0 =C2= =A0(add-hook 'eldoc-documentation-functions
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0#'elisp-eldoc-documentation-function nil t)
= =C2=A0 =C2=A0(add-hook 'xref-backend-functions #'elisp--xref-backen= d nil t)
=C2=A0 =C2=A0(setq-local project-vc-external-roots-function #&#= 39;elisp-load-path-roots)
=C2=A0 =C2=A0(add-hook 'completion-at-poin= t-functions
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#'elisp-= completion-at-point nil 'local)
- =C2=A0;; .dir-locals.el and lock f= iles will cause the byte-compiler and
- =C2=A0;; checkdoc emit spurious = warnings, because they don't follow the
- =C2=A0;; conventions of Em= acs Lisp sources.=C2=A0 Until we have a better fix,
- =C2=A0;; like teac= hing elisp-mode about files that only hold data
- =C2=A0;; structures, w= e disable the ELisp Flymake backend for these files.
- =C2=A0(unless
= - =C2=A0 =C2=A0 =C2=A0(let* ((bfname (buffer-file-name))
- =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 (fname (and (stringp bfname) (file-name-nondir= ectory bfname))))
- =C2=A0 =C2=A0 =C2=A0 =C2=A0(and (stringp fname)
-= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (or (string-match "\\`\\.#&= quot; fname)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (= string-equal dir-locals-file fname))))
- =C2=A0 =C2=A0(add-hook 'fly= make-diagnostic-functions #'elisp-flymake-checkdoc nil t)
- =C2=A0 = =C2=A0(add-hook 'flymake-diagnostic-functions
- =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0#'elisp-flymake-byte-compile nil t)))
+ = =C2=A0(add-hook 'flymake-diagnostic-functions #'elisp-flymake-check= doc nil t)
+ =C2=A0(add-hook 'flymake-diagnostic-functions
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#'elisp-flymake-byte-compi= le nil t))
=C2=A0
=C2=A0;; Font-locking support.
=C2=A0
diff --= git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index 9f34= a377f4..aa6c718041 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp= /progmodes/inf-lisp.el
@@ -274,7 +274,8 @@ inferior-lisp-mode
=C2=A0t= o continue it."
=C2=A0 =C2=A0(setq comint-prompt-regexp inferior-li= sp-prompt)
=C2=A0 =C2=A0(setq mode-line-process '(":%s"))<= br>- =C2=A0(lisp-mode-variables t)
+ =C2=A0(set-syntax-table lisp-mode-s= yntax-table)
+ =C2=A0(lisp-mode-variables)
=C2=A0 =C2=A0(setq comint-= get-old-input (function lisp-get-old-input))
=C2=A0 =C2=A0(setq comint-i= nput-filter (function lisp-input-filter)))



On Fri, Apr 17, 2020 at 6:19 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
> Date: Fri, 17 Apr 2020 16:55:07 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Juri Linkov <juri@linkov.net>, 40573@debbugs.gnu.org,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Dmitry Gutov <
dgutov@yandex.ru>
>
> Can you explain what is dirty about having that mode for a subset
> of files that _could_ make use of it and having the user select
> it via M-x lisp-data-mode when he thinks it's useful?

I already did, many times.=C2=A0 I have nothing new to say about this.

> Can you give
> evidence of any benefit to your all-or-nothing stance here?

I don't have to give any evidence.=C2=A0 We both have our opinions, and=
they are different.=C2=A0 Please respect mine.

> I've explained, many times, that turning it on automatically for <= br> > non-generated files, is impossible to achieve.=C2=A0 Do you disagree <= br> > with this statement?

Yes, I do.=C2=A0 Also mentioned more than once.

Can we please stop this futile going in circles?


--
Jo=C3=A3o T=C3=A1vora
--000000000000ab9cdb05a38c6eb3--