emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d113142 1/4: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master d113142 1/4: Merge from origin/emacs-26
Date: Tue, 14 Aug 2018 12:08:17 -0400 (EDT)

branch: master
commit d113142a8b8c815ecd6ff1418694cb878db5f45c
Merge: 396a33a 614cc65
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    614cc65 ; * lisp/simple.el (line-move-visual): Fix typo.
    d2ad4ba Do not consider external packages to be removable (Bug#27822)
    ec0995c * src/alloc.c: Remove obsolete comments.
    ec6f588 Better support utf-8-with-signature and utf-8-hfs in HTML
    eb026a8 Don't use -Wabi compiler option
---
 configure.ac               |  1 +
 lisp/emacs-lisp/package.el | 13 ++++++++++++-
 lisp/international/mule.el | 12 +++++++++++-
 lisp/simple.el             |  2 +-
 src/alloc.c                |  4 ----
 5 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0b8849e..7b9448e 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 3623352..cacc8b0 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 a5e7477..0267b15 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 8d77047..6040d48 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 337668f..fb8a8c9 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;
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]