/[emacs]/emacs/lisp/international/mule.el
ViewVC logotype

Diff of /emacs/lisp/international/mule.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.136 by fx, Thu Nov 29 12:38:39 2001 UTC revision 1.137 by rms, Wed Dec 12 00:12:09 2001 UTC
# Line 1386  function by default." Line 1386  function by default."
1386          ;; At first check the head.          ;; At first check the head.
1387          (when head-found          (when head-found
1388            (goto-char head-start)            (goto-char head-start)
1389            (setq pos (re-search-forward "[\n\r]" head-end t))            (setq head-end (set-auto-mode-1))
1390            (if (and pos            (setq head-start (point))
                    (= (char-after head-start) ?#)  
                    (= (char-after (1+ head-start)) ?!))  
               ;; If the file begins with "#!" (exec interpreter magic),  
               ;; look for coding frobs in the first two lines.  You cannot  
               ;; necessarily put them in the first line of such a file  
               ;; without screwing up the interpreter invocation.  
               (setq pos (search-forward "\n" head-end t)))  
           (if pos (setq head-end pos))  
1391            (when (< head-found head-end)            (when (< head-found head-end)
1392              (goto-char head-start)              (goto-char head-start)
1393              (when (and set-auto-coding-for-load              (when (and set-auto-coding-for-load
1394                         (re-search-forward                         (re-search-forward
1395                          "-\\*-\\(.*;\\)?[ \t]*unibyte:[ \t]*\\([^ ;]+\\)"                          "\\(.*;\\)?[ \t]*unibyte:[ \t]*\\([^ ;]+\\)"
1396                          head-end t))                          head-end t))
1397                (setq coding-system 'raw-text))                (setq coding-system 'raw-text))
1398              (when (and (not coding-system)              (when (and (not coding-system)
1399                         (re-search-forward                         (re-search-forward
1400                          "-\\*-\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)"                          "\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)"
1401                          head-end t))                          head-end t))
1402                (setq coding-system (intern (match-string 2)))                (setq coding-system (intern (match-string 2)))
1403                (or (coding-system-p coding-system)                (or (coding-system-p coding-system)

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.137

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26