mirror of
https://github.com/correl/melpa.git
synced 2024-11-14 19:19:32 +00:00
Restrict local variables when opening package source files
This commit is contained in:
parent
2f0274300c
commit
3e2e2e059e
1 changed files with 12 additions and 11 deletions
|
@ -715,17 +715,18 @@ FILES is a list of (SOURCE . DEST) relative filepath pairs."
|
|||
(when (file-exists-p pkg-target)
|
||||
(delete-file pkg-target t))
|
||||
(copy-file pkg-source pkg-target)
|
||||
(with-current-buffer (find-file pkg-target)
|
||||
(pb/update-or-insert-version version)
|
||||
(write-file pkg-target nil)
|
||||
(let ((valid-package))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(package-buffer-info)
|
||||
(setq valid-package t))
|
||||
(kill-buffer)
|
||||
(unless valid-package
|
||||
(delete-file pkg-target)))))
|
||||
(let ((enable-local-variables :safe))
|
||||
(with-current-buffer (find-file pkg-target)
|
||||
(pb/update-or-insert-version version)
|
||||
(write-file pkg-target nil)
|
||||
(let ((valid-package))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(package-buffer-info)
|
||||
(setq valid-package t))
|
||||
(kill-buffer)
|
||||
(unless valid-package
|
||||
(delete-file pkg-target))))))
|
||||
|
||||
(pb/write-pkg-readme (and (> (length pkg-info) 4) (aref pkg-info 4))
|
||||
file-name)
|
||||
|
|
Loading…
Reference in a new issue