aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international
diff options
context:
space:
mode:
authorJuri Linkov <[email protected]>2006-06-02 18:17:02 +0000
committerJuri Linkov <[email protected]>2006-06-02 18:17:02 +0000
commit21b28a27fc3d38901cc50feb1ce904712a3a2597 (patch)
tree565271f6e1c78bf1c1c69d125a5ece35b78b7271 /lisp/international
parent06c7827a7344344ea22c875189478b6d658edcd4 (diff)
(sgml-html-meta-auto-coding-function):
Remove the condition `(search-forward "<html" size t)'. Replace `\"' with `[\"']?' in `re-search-forward'.
Diffstat (limited to 'lisp/international')
-rw-r--r--lisp/international/mule.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index d9242f7cb5..e808f4f5d0 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2284,21 +2284,19 @@ This function is intended to be added to `auto-coding-functions'."
"If the buffer has an HTML meta tag, use it to determine encoding.
This function is intended to be added to `auto-coding-functions'."
(setq size (min (+ (point) size)
- ;; Only search forward 10 lines
(save-excursion
;; Limit the search by the end of the HTML header.
(or (search-forward "</head>" size t)
;; In case of no header, search only 10 lines.
(forward-line 10))
(point))))
- (when (and (search-forward "<html" size t)
- (re-search-forward "<meta\\s-+http-equiv=\"content-type\"\\s-+content=\"text/\\sw+;\\s-*charset=\\(.+?\\)\"" size t))
- (let* ((match (match-string 1))
- (sym (intern (downcase match))))
- (if (coding-system-p sym)
- sym
- (message "Warning: unknown coding system \"%s\"" match)
- nil))))
+ (when (re-search-forward "<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*charset=\\(.+?\\)[\"']" size t)
+ (let* ((match (match-string 1))
+ (sym (intern (downcase match))))
+ (if (coding-system-p sym)
+ sym
+ (message "Warning: unknown coding system \"%s\"" match)
+ nil))))
;;;
(provide 'mule)