summaryrefslogtreecommitdiff
path: root/lisp/net/rcirc.el
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2011-05-30 20:23:56 +0800
committerLeo Liu <sdl.web@gmail.com>2011-05-30 20:23:56 +0800
commit5ab33f2b8a7184d062c33bc43b1bfd3fe990e3b5 (patch)
tree82b60a74e73a38c5548eafe278d50e90314eb77f /lisp/net/rcirc.el
parent3767e706d7c9914c3451a64d04eac0f1f4059260 (diff)
downloademacs-5ab33f2b8a7184d062c33bc43b1bfd3fe990e3b5.tar.gz
emacs-5ab33f2b8a7184d062c33bc43b1bfd3fe990e3b5.tar.bz2
emacs-5ab33f2b8a7184d062c33bc43b1bfd3fe990e3b5.zip
Decode all incoming messages in rcirc.el
Also allow automatic coding system detection if rcirc-decode-coding-system is nil. See discussion in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8744
Diffstat (limited to 'lisp/net/rcirc.el')
-rw-r--r--lisp/net/rcirc.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 7b1f85769dc..b1ee4c45373 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -314,9 +314,11 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
:type 'boolean
:group 'rcirc)
-(defcustom rcirc-decode-coding-system 'utf-8
- "Coding system used to decode incoming irc messages."
+(defcustom rcirc-decode-coding-system nil
+ "Coding system used to decode incoming irc messages.
+If nil automatically detect the coding system."
:type 'coding-system
+ :version "24.1"
:group 'rcirc)
(defcustom rcirc-encode-coding-system 'utf-8
@@ -1480,9 +1482,9 @@ record activity."
(old-point (point-marker))
(fill-start (marker-position rcirc-prompt-start-marker)))
+ (setq text (decode-coding-string text (or rcirc-decode-coding-system
+ (detect-coding-string text t))))
(unless (string= sender (rcirc-nick process))
- ;; only decode text from other senders, not ours
- (setq text (decode-coding-string text rcirc-decode-coding-system))
;; mark the line with overlay arrow
(unless (or (marker-position overlay-arrow-position)
(get-buffer-window (current-buffer))