diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/erc/erc-dcc.el | 11 | ||||
| -rw-r--r-- | 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 8a40b1454b4..2849e25bf77 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." | |||
| 979 | (let ((inhibit-read-only t) | 979 | (let ((inhibit-read-only t) |
| 980 | received-bytes) | 980 | received-bytes) |
| 981 | (goto-char (point-max)) | 981 | (goto-char (point-max)) |
| 982 | (insert (string-make-unibyte str)) | 982 | (if str |
| 983 | (insert (string-make-unibyte str))) | ||
| 983 | 984 | ||
| 984 | (when (> (point-max) erc-dcc-receive-cache) | 985 | (when (> (point-max) erc-dcc-receive-cache) |
| 985 | (erc-dcc-append-contents (current-buffer) erc-dcc-file-name)) | 986 | (erc-dcc-append-contents (current-buffer) erc-dcc-file-name)) |
| 986 | (setq received-bytes (+ (buffer-size) erc-dcc-byte-count)) | 987 | (setq received-bytes (buffer-size)) |
| 988 | (if erc-dcc-byte-count | ||
| 989 | (setq received-bytes (+ received-bytes erc-dcc-byte-count))) | ||
| 987 | 990 | ||
| 988 | (and erc-dcc-verbose | 991 | (and erc-dcc-verbose |
| 989 | (erc-display-message | 992 | (erc-display-message |
| 990 | nil 'notice erc-server-process | 993 | nil 'notice erc-server-process |
| 991 | 'dcc-get-bytes-received | 994 | 'dcc-get-bytes-received |
| 992 | ?f (file-name-nondirectory buffer-file-name) | 995 | ?f (file-name-nondirectory (buffer-name)) |
| 993 | ?b (number-to-string received-bytes))) | 996 | ?b (number-to-string received-bytes))) |
| 994 | (cond | 997 | (cond |
| 995 | ((and (> (plist-get erc-dcc-entry-data :size) 0) | 998 | ((and (> (plist-get erc-dcc-entry-data :size) 0) |
| @@ -997,7 +1000,7 @@ rather than every 1024 byte block, but nobody seems to care." | |||
| 997 | (erc-display-message | 1000 | (erc-display-message |
| 998 | nil '(notice error) 'active | 1001 | nil '(notice error) 'active |
| 999 | 'dcc-get-file-too-long | 1002 | 'dcc-get-file-too-long |
| 1000 | ?f (file-name-nondirectory buffer-file-name)) | 1003 | ?f (file-name-nondirectory (buffer-name))) |
| 1001 | (delete-process proc)) | 1004 | (delete-process proc)) |
| 1002 | (t | 1005 | (t |
| 1003 | (process-send-string | 1006 | (process-send-string |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 9fbe3614fd1..c3ff57633a3 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1401,17 +1401,17 @@ to `compilation-error-regexp-alist' if RULES is nil." | |||
| 1401 | file line end-line col end-col (or type 2) fmt)) | 1401 | file line end-line col end-col (or type 2) fmt)) |
| 1402 | 1402 | ||
| 1403 | (when (integerp file) | 1403 | (when (integerp file) |
| 1404 | (setq type (if (consp type) | 1404 | (let ((this-type (if (consp type) |
| 1405 | (compilation-type type) | 1405 | (compilation-type type) |
| 1406 | (or type 2))) | 1406 | (or type 2)))) |
| 1407 | (compilation--note-type type) | 1407 | (compilation--note-type type) |
| 1408 | 1408 | ||
| 1409 | (compilation--put-prop | 1409 | (compilation--put-prop |
| 1410 | file 'font-lock-face | 1410 | file 'font-lock-face |
| 1411 | (symbol-value (aref [compilation-info-face | 1411 | (symbol-value (aref [compilation-info-face |
| 1412 | compilation-warning-face | 1412 | compilation-warning-face |
| 1413 | compilation-error-face] | 1413 | compilation-error-face] |
| 1414 | type)))) | 1414 | this-type))))) |
| 1415 | 1415 | ||
| 1416 | (compilation--put-prop | 1416 | (compilation--put-prop |
| 1417 | line 'font-lock-face compilation-line-face) | 1417 | line 'font-lock-face compilation-line-face) |