emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master a914009 3/6: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master a914009 3/6: Merge from origin/emacs-26
Date: Sun, 4 Nov 2018 12:46:12 -0500 (EST)

branch: master
commit a9140091dd0df7e89ddbaabec17608a20f06f7b0
Merge: 5ad0d80 bd1d617
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    bd1d617 Avoid race in rcirc process filter (bug#33145)
    88ef31a Avoid file-name errors when viewing PDF from Gnus
    c939042 Avoid crashes with remapped default face in Org mode
    97660fa Doc fix for checkdoc-continue
    96f055b Fix a typo in autoload.el
---
 lisp/doc-view.el            | 43 ++++++++++++++++++++++---------------------
 lisp/emacs-lisp/autoload.el |  2 +-
 lisp/emacs-lisp/checkdoc.el |  5 ++---
 lisp/net/rcirc.el           | 12 ++++++------
 src/xfaces.c                |  9 ++++++++-
 5 files changed, 39 insertions(+), 32 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 2b2c687..31e266f 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1764,27 +1764,28 @@ toggle between displaying the document or editing it as 
text.
     (doc-view-make-safe-dir doc-view-cache-directory)
     ;; Handle compressed files, remote files, files inside archives
     (setq-local doc-view--buffer-file-name
-                (cond
-                 (jka-compr-really-do-compress
-                  ;; FIXME: there's a risk of name conflicts here.
-                  (expand-file-name
-                   (file-name-nondirectory
-                    (file-name-sans-extension buffer-file-name))
-                   doc-view-cache-directory))
-                 ;; Is the file readable by local processes?
-                 ;; We used to use `file-remote-p' but it's unclear what it's
-                 ;; supposed to return nil for things like local files accessed
-                 ;; via `su' or via file://...
-                 ((let ((file-name-handler-alist nil))
-                    (not (and buffer-file-name
-                              (file-readable-p buffer-file-name))))
-                  ;; FIXME: there's a risk of name conflicts here.
-                  (expand-file-name
-                   (if buffer-file-name
-                       (file-name-nondirectory buffer-file-name)
-                     (buffer-name))
-                   doc-view-cache-directory))
-                 (t buffer-file-name)))
+               (convert-standard-filename
+                 (cond
+                  (jka-compr-really-do-compress
+                   ;; FIXME: there's a risk of name conflicts here.
+                   (expand-file-name
+                    (file-name-nondirectory
+                     (file-name-sans-extension buffer-file-name))
+                    doc-view-cache-directory))
+                  ;; Is the file readable by local processes?
+                  ;; We used to use `file-remote-p' but it's unclear what it's
+                  ;; supposed to return nil for things like local files 
accessed
+                  ;; via `su' or via file://...
+                  ((let ((file-name-handler-alist nil))
+                     (not (and buffer-file-name
+                               (file-readable-p buffer-file-name))))
+                   ;; FIXME: there's a risk of name conflicts here.
+                   (expand-file-name
+                    (if buffer-file-name
+                       (file-name-nondirectory buffer-file-name)
+                      (buffer-name))
+                    doc-view-cache-directory))
+                  (t buffer-file-name))))
     (when (not (string= doc-view--buffer-file-name buffer-file-name))
       (write-region nil nil doc-view--buffer-file-name))
 
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index c9ee532..22aac95 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -1047,7 +1047,7 @@ write its autoloads into the specified file instead."
                        ;; we don't want to depend on whether Emacs was
                        ;; built with or without modules support, nor
                        ;; what is the suffix for the underlying OS.
-                      (unless (string-match "\\.\\(elc\\|\\so\\|dll\\)" suf)
+                      (unless (string-match "\\.\\(elc\\|so\\|dll\\)" suf)
                          (push suf tmp)))
                      (concat "^[^=.].*" (regexp-opt tmp t) "\\'")))
         (files (apply #'nconc
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 83929be..86d211c 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -884,9 +884,8 @@ a separate buffer."
 ;;;###autoload
 (defun checkdoc-continue (&optional take-notes)
   "Find the next doc string in the current buffer which has a style error.
-Prefix argument TAKE-NOTES means to continue through the whole buffer and
-save warnings in a separate buffer.  Second optional argument START-POINT
-is the starting location.  If this is nil, `point-min' is used instead."
+Prefix argument TAKE-NOTES means to continue through the whole
+buffer and save warnings in a separate buffer."
   (interactive "P")
   (let ((wrong nil) (msg nil)
        ;; Assign a flag to spellcheck flag
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index ca70734..0c72e47 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -759,12 +759,12 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS 
and LINE.")
   (with-rcirc-process-buffer process
     (setq rcirc-last-server-message-time (current-time))
     (setq rcirc-process-output (concat rcirc-process-output output))
-    (when (= (aref rcirc-process-output
-                   (1- (length rcirc-process-output))) ?\n)
-      (mapc (lambda (line)
-              (rcirc-process-server-response process line))
-            (split-string rcirc-process-output "[\n\r]" t))
-      (setq rcirc-process-output nil))))
+    (when (= ?\n (aref rcirc-process-output
+                       (1- (length rcirc-process-output))))
+      (let ((lines (split-string rcirc-process-output "[\n\r]" t)))
+        (setq rcirc-process-output nil)
+        (dolist (line lines)
+          (rcirc-process-server-response process line))))))
 
 (defun rcirc-reschedule-timeout (process)
   (with-rcirc-process-buffer process
diff --git a/src/xfaces.c b/src/xfaces.c
index 6e06d56..94397cd 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6093,7 +6093,14 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
     int face_id;
 
     if (base_face_id >= 0)
-      face_id = base_face_id;
+      {
+       face_id = base_face_id;
+       /* Make sure the base face ID is usable: if someone freed the
+          cached faces since we've looked up the base face, we need
+          to look it up again.  */
+       if (!FACE_FROM_ID_OR_NULL (f, face_id))
+         face_id = lookup_basic_face (f, DEFAULT_FACE_ID);
+      }
     else if (NILP (Vface_remapping_alist))
       face_id = DEFAULT_FACE_ID;
     else



reply via email to

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