Mercurial > hg > xemacs-beta
comparison lisp/w3/mm.el @ 165:5a88923fcbfe r20-3b9
Import from CVS: tag r20-3b9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:44:42 +0200 |
parents | 6608ceec7cf8 |
children | 9ad43877534d |
comparison
equal
deleted
inserted
replaced
164:4e0740e5aab2 | 165:5a88923fcbfe |
---|---|
718 ;; Return non-nil iff the viewer specified by VIEWER-INFO passes its | 718 ;; Return non-nil iff the viewer specified by VIEWER-INFO passes its |
719 ;; test clause (if any). | 719 ;; test clause (if any). |
720 (let* ((test-info (assoc "test" viewer-info)) | 720 (let* ((test-info (assoc "test" viewer-info)) |
721 (test (cdr test-info)) | 721 (test (cdr test-info)) |
722 (viewer (cdr (assoc "viewer" viewer-info))) | 722 (viewer (cdr (assoc "viewer" viewer-info))) |
723 (default-directory (expand-file-name "~/")) | |
723 status | 724 status |
724 parsed-test | 725 parsed-test |
725 ) | 726 ) |
726 (cond | 727 (cond |
727 ((not test-info) t) ; No test clause | 728 ((not test-info) t) ; No test clause |
1175 "cat"))) | 1176 "cat"))) |
1176 (if (string= cmd "") (setq cmd "cat")) | 1177 (if (string= cmd "") (setq cmd "cat")) |
1177 (if (stringp cmd) | 1178 (if (stringp cmd) |
1178 (shell-command-on-region st nd cmd t) | 1179 (shell-command-on-region st nd cmd t) |
1179 (funcall cmd st nd)) | 1180 (funcall cmd st nd)) |
1180 (set-marker nd (point)))) | 1181 (or (eq cmd 'ignore) (set-marker nd (point))))) |
1181 (write-region st nd fname nil 5) | 1182 (write-region st nd fname nil 5) |
1182 (delete-region st nd) | 1183 (delete-region st nd) |
1183 (setq results (cons | 1184 (setq results (cons |
1184 (cons | 1185 (cons |
1185 (cons "mm-filename" fname) headers) results))))) | 1186 (cons "mm-filename" fname) headers) results))))) |
1245 (char-to-string | 1246 (char-to-string |
1246 (+ | 1247 (+ |
1247 (* 16 (mm-hex-char-to-integer | 1248 (* 16 (mm-hex-char-to-integer |
1248 (char-after (1+ (match-beginning 0))))) | 1249 (char-after (1+ (match-beginning 0))))) |
1249 (mm-hex-char-to-integer | 1250 (mm-hex-char-to-integer |
1250 (char-after (1- (match-end 0)))))))))))) | 1251 (char-after (1- (match-end 0)))))))))) |
1252 (goto-char (point-max)))) | |
1251 | 1253 |
1252 ;; Taken from hexl.el. | 1254 ;; Taken from hexl.el. |
1253 (defun mm-hex-char-to-integer (character) | 1255 (defun mm-hex-char-to-integer (character) |
1254 "Take a char and return its value as if it was a hex digit." | 1256 "Take a char and return its value as if it was a hex digit." |
1255 (if (and (>= character ?0) (<= character ?9)) | 1257 (if (and (>= character ?0) (<= character ?9)) |