diff options
| author | Stefan Kangas | 2022-07-08 13:07:39 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-07-08 13:08:21 +0200 |
| commit | ca7b5dbfcac36be79e2e1d3a7fb3d14c5404d7ca (patch) | |
| tree | 2ff5202a016a7f1122bdd2a4cb3c7c8ef275d5d3 | |
| parent | 9abf841429257a3e1008bedc4d857ea7a25ab9a6 (diff) | |
| download | emacs-ca7b5dbfcac36be79e2e1d3a7fb3d14c5404d7ca.tar.gz emacs-ca7b5dbfcac36be79e2e1d3a7fb3d14c5404d7ca.zip | |
Put safe-local-variable property on auto-insert
* lisp/autoinsert.el (auto-insert): Put safe-local-variable
property to allow disabling auto-inserting without a warning.
| -rw-r--r-- | lisp/autoinsert.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index c12c554498b..29d10bc6295 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el | |||
| @@ -67,7 +67,7 @@ Possible values: | |||
| 67 | other insert if possible, but mark as unmodified. | 67 | other insert if possible, but mark as unmodified. |
| 68 | Insertion is possible when something appropriate is found in | 68 | Insertion is possible when something appropriate is found in |
| 69 | `auto-insert-alist'. When the insertion is marked as unmodified, you can | 69 | `auto-insert-alist'. When the insertion is marked as unmodified, you can |
| 70 | save it with \\[write-file] RET. | 70 | save it with \\[write-file] \\`RET'. |
| 71 | This variable is used when the function `auto-insert' is called, e.g. | 71 | This variable is used when the function `auto-insert' is called, e.g. |
| 72 | when you do (add-hook \\='find-file-hook \\='auto-insert). | 72 | when you do (add-hook \\='find-file-hook \\='auto-insert). |
| 73 | With \\[auto-insert], this is always treated as if it were t." | 73 | With \\[auto-insert], this is always treated as if it were t." |
| @@ -76,6 +76,9 @@ With \\[auto-insert], this is always treated as if it were t." | |||
| 76 | (other :tag "insert if possible, mark as unmodified." | 76 | (other :tag "insert if possible, mark as unmodified." |
| 77 | not-modified))) | 77 | not-modified))) |
| 78 | 78 | ||
| 79 | ;;;###autoload | ||
| 80 | (put 'auto-insert 'safe-local-variable #'null) | ||
| 81 | |||
| 79 | (defcustom auto-insert-query 'function | 82 | (defcustom auto-insert-query 'function |
| 80 | "Non-nil means ask user before auto-inserting. | 83 | "Non-nil means ask user before auto-inserting. |
| 81 | When this is `function', only ask when called non-interactively." | 84 | When this is `function', only ask when called non-interactively." |