summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <acorallo@gnu.org>2024-05-03 22:21:20 +0200
committerAndrea Corallo <acorallo@gnu.org>2024-05-13 23:01:08 +0200
commit13ddfc201108bfc71c7fa9040ee9970e929070cf (patch)
tree29798a91facfff4daf7d88c69f95ad6d62a66018 /lisp/emacs-lisp
parent595799edd3188a8992bbd08d0b29feaf184a092e (diff)
downloademacs-13ddfc201108bfc71c7fa9040ee9970e929070cf.tar.gz
emacs-13ddfc201108bfc71c7fa9040ee9970e929070cf.tar.bz2
emacs-13ddfc201108bfc71c7fa9040ee9970e929070cf.zip
Introduce 'compilation-safety' variable
* lisp/emacs-lisp/bytecomp.el (compilation-safety): New customize. * src/comp.c (comp_t): Add func_safety. (emit_call_with_type_hint, emit_call2_with_type_hint): Make use of. (compile_function): Set 'comp.func_safety'.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index d9890b5c37a..e0bcdce502b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -137,6 +137,12 @@
"Emacs Lisp byte-compiler."
:group 'lisp)
+(defcustom compilation-safety 1
+ "Safety level."
+ :type 'integer
+ :safe #'integerp
+ :version "30.1")
+
(defcustom emacs-lisp-file-regexp "\\.el\\'"
"Regexp which matches Emacs Lisp source files.
If you change this, you might want to set `byte-compile-dest-file-function'.