diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 13 | ||||
-rw-r--r-- | lisp/international/mule.el | 12 | ||||
-rw-r--r-- | lisp/simple.el | 2 | ||||
-rw-r--r-- | src/alloc.c | 4 |
5 files changed, 25 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 0b8849eea23..7b9448e13b0 100644 --- a/configure.ac +++ b/configure.ac @@ -966,6 +966,7 @@ AS_IF([test $gl_gcc_warnings = no], nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations nw="$nw -Wbad-function-cast" # These casts are no worse than others. + nw="$nw -Wabi" # Not useful, perceived as noise # Emacs doesn't care about shadowing; see # <https://lists.gnu.org/r/emacs-diffs/2011-11/msg00265.html>. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 362335220f0..cacc8b0c18c 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1754,6 +1754,15 @@ if it is still empty." (indirect indirect-deps) (t (delete-dups (append direct-deps indirect-deps)))))) +(defun package--user-installed-p (package) + "Return non-nil if PACKAGE is a user-installed package. +PACKAGE is the package name, a symbol. Check whether the package +was installed into `package-user-dir' where we assume to have +control over." + (let* ((pkg-desc (cadr (assq package package-alist))) + (dir (package-desc-dir pkg-desc))) + (file-in-directory-p dir package-user-dir))) + (defun package--removable-packages () "Return a list of names of packages no longer needed. These are packages which are neither contained in @@ -1763,7 +1772,9 @@ These are packages which are neither contained in ;; `p' and its dependencies are needed. append (cons p (package--get-deps p))))) (cl-loop for p in (mapcar #'car package-alist) - unless (memq p needed) + unless (or (memq p needed) + ;; Do not auto-remove external packages. + (not (package--user-installed-p p))) collect p))) (defun package--used-elsewhere-p (pkg-desc &optional pkg-list all) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index a5e7477e758..0267b154409 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2545,7 +2545,17 @@ This function is intended to be added to `auto-coding-functions'." (let* ((match (match-string 2)) (sym (intern (downcase match)))) (if (coding-system-p sym) - sym + ;; If the encoding tag is UTF-8 and the buffer's + ;; encoding is one of the variants of UTF-8, use the + ;; buffer's encoding. This allows, e.g., saving an + ;; HTML file as UTF-8 with BOM when the tag says UTF-8. + (let ((sym-type (coding-system-type sym)) + (bfcs-type + (coding-system-type buffer-file-coding-system))) + (if (and (coding-system-equal 'utf-8 sym-type) + (coding-system-equal 'utf-8 bfcs-type)) + buffer-file-coding-system + sym)) (message "Warning: unknown coding system \"%s\"" match) nil))))) diff --git a/lisp/simple.el b/lisp/simple.el index 8d770478aa9..6040d48a991 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6019,7 +6019,7 @@ into account variable-width characters and line continuation. If nil, `line-move' moves point by logical lines. A non-nil setting of `goal-column' overrides the value of this variable and forces movement by logical lines. -A window that is horizontally scrolled also forces movement by logical +A window that is horizontally scrolled also forces movement by logical lines." :type 'boolean :group 'editing-basics diff --git a/src/alloc.c b/src/alloc.c index 337668f9c31..fb8a8c98b08 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2655,8 +2655,6 @@ make_float (double float_value) if (float_free_list) { - /* We use the data field for chaining the free list - so that we won't use the same field that has the mark bit. */ XSETFLOAT (val, float_free_list); float_free_list = float_free_list->u.chain; } @@ -2760,8 +2758,6 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, if (cons_free_list) { - /* We use the cdr for chaining the free list - so that we won't use the same field that has the mark bit. */ XSETCONS (val, cons_free_list); cons_free_list = cons_free_list->u.s.u.chain; } |