[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select 3ff0a07 182/218: Try and fix the more
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select 3ff0a07 182/218: Try and fix the more obvious sources of bug#30635 |
Date: |
Fri, 14 Dec 2018 03:35:38 -0500 (EST) |
branch: feature/gnus-select
commit 3ff0a07b6ea752961ee0c6c266c3150be89fa6c7
Author: Stefan Monnier <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Try and fix the more obvious sources of bug#30635
* lisp/files.el (dir-locals-read-from-dir): Handle the easy cases
without loading `map`.
* lisp/emacs-lisp/bytecomp.el: Don't require cl-lib at run-time.
(byte-compile-and-folded): Avoid cl-every.
---
lisp/emacs-lisp/bytecomp.el | 18 ++++++------------
lisp/files.el | 16 +++++++++++-----
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b3ea930..07476f1 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -124,17 +124,10 @@
(require 'backquote)
(require 'macroexp)
(require 'cconv)
-(require 'cl-lib)
-
-;; During bootstrap, cl-loaddefs.el is not created yet, so loading cl-lib
-;; doesn't setup autoloads for things like cl-every, which is why we have to
-;; require cl-extra as well (bug#18804).
-(or (fboundp 'cl-every)
- (require 'cl-extra))
-
-(or (fboundp 'defsubst)
- ;; This really ought to be loaded already!
- (load "byte-run"))
+;; Refrain from using cl-lib at run-time here, since it otherwise prevents
+;; us from emitting warnings when compiling files which use cl-lib without
+;; requiring it! (bug#30635)
+(eval-when-compile (require 'cl-lib))
;; The feature of compiling in a specific target Emacs version
;; has been turned off because compile time options are a bad idea.
@@ -3582,7 +3575,8 @@ These implicitly `and' together a bunch of two-arg
bytecodes."
(cond
((< l 3) (byte-compile-form `(progn ,(nth 1 form) t)))
((= l 3) (byte-compile-two-args form))
- ((cl-every #'macroexp-copyable-p (nthcdr 2 form))
+ ;; Don't use `cl-every' here (see comment where we require cl-lib).
+ ((not (memq nil (mapcar #'macroexp-copyable-p (nthcdr 2 form))))
(byte-compile-form `(and (,(car form) ,(nth 1 form) ,(nth 2 form))
(,(car form) ,@(nthcdr 2 form)))))
(t (byte-compile-normal-call form)))))
diff --git a/lisp/files.el b/lisp/files.el
index 8ec2bde..46a105a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4018,7 +4018,6 @@ DIR is the absolute name of a directory which must
contain at
least one dir-local file (which is a file holding variables to
apply).
Return the new class name, which is a symbol named DIR."
- (require 'map)
(let* ((class-name (intern dir))
(files (dir-locals--all-files dir))
(read-circle nil)
@@ -4033,12 +4032,19 @@ Return the new class name, which is a symbol named DIR."
(setq latest file-time)))
(with-temp-buffer
(insert-file-contents file)
- (condition-case-unless-debug nil
- (setq variables
+ (let ((newvars
+ (condition-case-unless-debug nil
+ (read (current-buffer))
+ (end-of-file nil))))
+ (setq variables
+ ;; Try and avoid loading `map' since that also loads cl-lib
+ ;; which then might hamper bytecomp warnings (bug#30635).
+ (if (not (and newvars variables))
+ (or newvars variables)
+ (require 'map)
(map-merge-with 'list (lambda (a b) (map-merge 'list a b))
variables
- (read (current-buffer))))
- (end-of-file nil))))
+ newvars))))))
(setq success latest))
(dir-locals-set-class-variables class-name variables)
(dir-locals-set-directory-class dir class-name success)
- [Emacs-diffs] feature/gnus-select d219c99 143/218: Autoupdate from Gnulib, (continued)
- [Emacs-diffs] feature/gnus-select d219c99 143/218: Autoupdate from Gnulib, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b6d216c 169/218: Tag tramp-test39-utf8* as :unstable, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b74e19e 159/218: * lisp/play/fortune.el (fortune-in-buffer): Revert previous nonsense., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e3bcd11 160/218: Port data-tests-popcnt to 32-bit Emacs, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 19ed176 149/218: Improvements in dired.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 5f36db7 167/218: Improve warning and error messages, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 0bf81e2 174/218: ; Fix last commit in tramp.el, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 219d6cf 180/218: * doc/lispref/anti.texi (Antinews): Fix grammar., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 7f60bfe 175/218: Port emacs-module-tests to 32-bit Emacs, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 9fabadf 179/218: Add new command vc-git-stash-delete, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 3ff0a07 182/218: Try and fix the more obvious sources of bug#30635,
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 4a80595 192/218: Fix too-large integer in Hg backend, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 992a8ec 187/218: * src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 17a41a9 191/218: Avoid Fortran-style floating-point optimization, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 6eddea6 193/218: * src/process.c (Fsignal_process): Simplify., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 80ab319 204/218: Remove some unused gnus-registry variables, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 905bb9c 206/218: * lisp/emulation/viper.el (viper-set-hooks): Replace obsolete func., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 2f67ad3 208/218: Optimize certain memq forms during byte-compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select bc2d36a 197/218: Remove some declare-function stub definitions, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 39699c8 212/218: Remove architecture dependent source downloads, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select c5595a1 200/218: * lisp/progmodes/cc-langs.el: Silence compiler., Andrew G Cohen, 2018/12/14