diff options
| author | Stefan Monnier | 2022-01-10 22:37:16 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2022-01-10 22:37:16 -0500 |
| commit | f4e0562a2c3474d7d5acaa474367ad9fdc02073f (patch) | |
| tree | faad5eceb6b022f311a0e8c400682edc5ba6d707 | |
| parent | 73b15f45f9369f511985b7b424c1a6cc54b323c2 (diff) | |
| download | emacs-f4e0562a2c3474d7d5acaa474367ad9fdc02073f.tar.gz emacs-f4e0562a2c3474d7d5acaa474367ad9fdc02073f.zip | |
(hack-one-local-variable-constantp): Mark as obsolete
* lisp/files.el (hack-one-local-variable-constantp): Mark as obsolete.
(hack-one-local-variable-eval-safep): Use `macroexp-const-p` instead.
| -rw-r--r-- | lisp/files.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/files.el b/lisp/files.el index cd43b94622e..48e0252e060 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4083,11 +4083,8 @@ It is dangerous if either of these conditions are met: | |||
| 4083 | (defun hack-one-local-variable-quotep (exp) | 4083 | (defun hack-one-local-variable-quotep (exp) |
| 4084 | (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) | 4084 | (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) |
| 4085 | 4085 | ||
| 4086 | (defun hack-one-local-variable-constantp (exp) | 4086 | (define-obsolete-function-alias 'hack-one-local-variable-constantp |
| 4087 | (or (and (not (symbolp exp)) (not (consp exp))) | 4087 | #'macroexp-const-p "29.1") |
| 4088 | (memq exp '(t nil)) | ||
| 4089 | (keywordp exp) | ||
| 4090 | (hack-one-local-variable-quotep exp))) | ||
| 4091 | 4088 | ||
| 4092 | (defun hack-one-local-variable-eval-safep (exp) | 4089 | (defun hack-one-local-variable-eval-safep (exp) |
| 4093 | "Return non-nil if it is safe to eval EXP when it is found in a file." | 4090 | "Return non-nil if it is safe to eval EXP when it is found in a file." |
| @@ -4125,7 +4122,7 @@ It is dangerous if either of these conditions are met: | |||
| 4125 | (cond ((eq prop t) | 4122 | (cond ((eq prop t) |
| 4126 | (let ((ok t)) | 4123 | (let ((ok t)) |
| 4127 | (dolist (arg (cdr exp)) | 4124 | (dolist (arg (cdr exp)) |
| 4128 | (unless (hack-one-local-variable-constantp arg) | 4125 | (unless (macroexp-const-p arg) |
| 4129 | (setq ok nil))) | 4126 | (setq ok nil))) |
| 4130 | ok)) | 4127 | ok)) |
| 4131 | ((functionp prop) | 4128 | ((functionp prop) |