From: Stefan Kangas <stefan@marxist.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 13780@debbugs.gnu.org, Reuben Thomas <rrt@sc3d.org>
Subject: bug#13780: 24.2; Making find-file-hook customizable seems to cause troublle
Date: Wed, 28 Oct 2020 01:52:42 -0700 [thread overview]
Message-ID: <CADwFkmk0r5-MmQnWZ2MEFz+bHEAv2LM7dekrJ3i=8YkeXr6XJw@mail.gmail.com> (raw)
In-Reply-To: <jwv7gm0vzfn.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 22 Feb 2013 15:58:13 -0500")
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> So until Custom ...blabla... I think it's better to use defcustom for
>>> hooks very sparingly, i.e. only for those hook we can reasonably
>>> expect will only be modified by the user's customization.
>> So do you think the existing customization ability for find-file-hook
>> should be removed? Or at least some kind of warning attached?
>
> Yes,
So how about the attached?
[-- Attachment #2: 0001-Don-t-allow-customizing-find-file-hook.patch --]
[-- Type: text/x-diff, Size: 1300 bytes --]
From d504f7a02ff1adcee60b9569e6a161d50e7e37c7 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Wed, 28 Oct 2020 09:51:05 +0100
Subject: [PATCH] Don't allow customizing find-file-hook
* lisp/files.el (find-file-hook): Make into defvar. (Bug#13780)
---
lisp/files.el | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index fdf758ad92..3d3dece691 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -498,15 +498,11 @@ find-file-not-found-functions
;;;(put 'find-file-hook 'permanent-local t)
;; I found some external files still using the obsolete form in 2018.
(define-obsolete-variable-alias 'find-file-hooks 'find-file-hook "22.1")
-(defcustom find-file-hook nil
+(defvar find-file-hook nil
"List of functions to be called after a buffer is loaded from a file.
The buffer's local variables (if any) will have been processed before the
functions are called. This includes directory-local variables, if any,
-for the file's directory."
- :group 'find-file
- :type 'hook
- :options '(auto-insert)
- :version "22.1")
+for the file's directory.")
;; I found some external files still using the obsolete form in 2018.
(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1")
--
2.28.0
next prev parent reply other threads:[~2020-10-28 8:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 0:33 bug#13780: 24.2; Making find-file-hook customizable seems to cause troublle Reuben Thomas
2013-02-22 2:14 ` Stefan Monnier
2013-02-22 11:43 ` Reuben Thomas
2013-02-22 14:22 ` Stefan Monnier
2013-02-22 19:38 ` Reuben Thomas
2013-02-22 20:58 ` Stefan Monnier
2020-10-28 8:52 ` Stefan Kangas [this message]
2020-10-28 15:15 ` Eli Zaretskii
2020-11-25 2:18 ` Stefan Kangas
2020-11-25 15:19 ` Eli Zaretskii
2020-11-25 21:07 ` Stefan Kangas
2020-12-04 11:05 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmk0r5-MmQnWZ2MEFz+bHEAv2LM7dekrJ3i=8YkeXr6XJw@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=13780@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rrt@sc3d.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.