Last active
November 3, 2020 11:29
-
-
Save ikazuhiro/5351b170b095cab07cdc784372411ced to your computer and use it in GitHub Desktop.
Fix elmo-set-auto-coding fails without optional argument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el | |
index 4f2e5cfd..ed9247be 100644 | |
--- a/elmo/elmo-util.el | |
+++ b/elmo/elmo-util.el | |
@@ -103,10 +103,11 @@ with FILENAME which defaults to `buffer-file-name'." | |
(car (find-operation-coding-system 'insert-file-contents | |
filename))) | |
(let (auto-coding-alist) | |
- (condition-case nil | |
+ (condition-case error | |
(funcall (symbol-value 'set-auto-coding-function) | |
- nil (- (point-max) (point-min))) | |
- (error nil))))) | |
+ "" (- (point-max) (point-min))) | |
+ (error (message "Error in %s, %s" | |
+ set-auto-coding-function (cdr error))))))) | |
(defun elmo-object-load (filename &optional mime-charset no-err) | |
"Load OBJECT from the file specified by FILENAME. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment