[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b15e6e4 5/5: Merge from origin/emacs-26
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master b15e6e4 5/5: Merge from origin/emacs-26 |
Date: |
Fri, 15 Feb 2019 16:25:41 -0500 (EST) |
branch: master
commit b15e6e456da915e7f398be63dfaaee64bdb6dc2d
Merge: 613f974 f721084
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Merge from origin/emacs-26
f721084 (origin/emacs-26) Avoid errors in erc-dcc.el when erc-dcc-ver...
3cba92d Fix faces in compilation messages
---
lisp/erc/erc-dcc.el | 11 +++++++----
lisp/progmodes/compile.el | 22 +++++++++++-----------
2 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index 8a40b14..2849e25 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -979,17 +979,20 @@ rather than every 1024 byte block, but nobody seems to
care."
(let ((inhibit-read-only t)
received-bytes)
(goto-char (point-max))
- (insert (string-make-unibyte str))
+ (if str
+ (insert (string-make-unibyte str)))
(when (> (point-max) erc-dcc-receive-cache)
(erc-dcc-append-contents (current-buffer) erc-dcc-file-name))
- (setq received-bytes (+ (buffer-size) erc-dcc-byte-count))
+ (setq received-bytes (buffer-size))
+ (if erc-dcc-byte-count
+ (setq received-bytes (+ received-bytes erc-dcc-byte-count)))
(and erc-dcc-verbose
(erc-display-message
nil 'notice erc-server-process
'dcc-get-bytes-received
- ?f (file-name-nondirectory buffer-file-name)
+ ?f (file-name-nondirectory (buffer-name))
?b (number-to-string received-bytes)))
(cond
((and (> (plist-get erc-dcc-entry-data :size) 0)
@@ -997,7 +1000,7 @@ rather than every 1024 byte block, but nobody seems to
care."
(erc-display-message
nil '(notice error) 'active
'dcc-get-file-too-long
- ?f (file-name-nondirectory buffer-file-name))
+ ?f (file-name-nondirectory (buffer-name)))
(delete-process proc))
(t
(process-send-string
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 9fbe361..c3ff576 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1401,17 +1401,17 @@ to `compilation-error-regexp-alist' if RULES is nil."
file line end-line col end-col (or type 2) fmt))
(when (integerp file)
- (setq type (if (consp type)
- (compilation-type type)
- (or type 2)))
- (compilation--note-type type)
-
- (compilation--put-prop
- file 'font-lock-face
- (symbol-value (aref [compilation-info-face
- compilation-warning-face
- compilation-error-face]
- type))))
+ (let ((this-type (if (consp type)
+ (compilation-type type)
+ (or type 2))))
+ (compilation--note-type type)
+
+ (compilation--put-prop
+ file 'font-lock-face
+ (symbol-value (aref [compilation-info-face
+ compilation-warning-face
+ compilation-error-face]
+ this-type)))))
(compilation--put-prop
line 'font-lock-face compilation-line-face)