comparison lisp/w3/w3.el @ 120:cca96a509cfe r20-1b12

Import from CVS: tag r20-1b12
author cvs
date Mon, 13 Aug 2007 09:25:29 +0200
parents 7d55a9ba150c
children 34a5b81f86ba
comparison
equal deleted inserted replaced
119:d101af7320b8 120:cca96a509cfe
1 ;;; w3.el --- Main functions for emacs-w3 on all platforms/versions 1 ;;; w3.el --- Main functions for emacs-w3 on all platforms/versions
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/04/03 02:06:01 3 ;; Created: 1997/04/07 15:59:56
4 ;; Version: 1.105 4 ;; Version: 1.108
5 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia 5 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia
6 6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) 8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu)
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
161 (funcall url-confirmation-func 161 (funcall url-confirmation-func
162 (format "Viewer for %s failed... save to disk? " fname)) 162 (format "Viewer for %s failed... save to disk? " fname))
163 (copy-file fname (read-file-name "Save as: ") t)) 163 (copy-file fname (read-file-name "Save as: ") t))
164 (if (and (file-exists-p fname) 164 (if (and (file-exists-p fname)
165 (file-writable-p fname)) 165 (file-writable-p fname))
166 (delete-file fname)))) 166 (delete-file fname)))
167 ;; FSF Emacs doesn't do this after calling a process-sentinel
168 (set-buffer (window-buffer (selected-window))))
167 169
168 (defun w3-notify-when-ready (buff) 170 (defun w3-notify-when-ready (buff)
169 "Notify the user when BUFF is ready. 171 "Notify the user when BUFF is ready.
170 See the variable `w3-notify' for the different notification behaviors." 172 See the variable `w3-notify' for the different notification behaviors."
171 (if (stringp buff) (setq buff (get-buffer buff))) 173 (if (stringp buff) (setq buff (get-buffer buff)))
1127 (if (or (stringp proc) 1129 (if (or (stringp proc)
1128 (bufferp proc)) (setq w3-current-last-buffer proc)) 1130 (bufferp proc)) (setq w3-current-last-buffer proc))
1129 (remove-hook 'after-change-functions 'url-after-change-function) 1131 (remove-hook 'after-change-functions 'url-after-change-function)
1130 (if url-be-asynchronous 1132 (if url-be-asynchronous
1131 (progn 1133 (progn
1132 (url-clean-text)
1133 (cond 1134 (cond
1134 ((not (get-buffer url-working-buffer)) nil) 1135 ((not (get-buffer url-working-buffer)) nil)
1135 ((url-mime-response-p) (url-parse-mime-headers))) 1136 ((url-mime-response-p) (url-parse-mime-headers)))
1136 (if (not url-current-mime-type) 1137 (if (not url-current-mime-type)
1137 (setq url-current-mime-type (or (mm-extension-to-mime 1138 (setq url-current-mime-type (or (mm-extension-to-mime
2155 link-at-point 2156 link-at-point
2156 (widget-get link-at-point 'href) 2157 (widget-get link-at-point 'href)
2157 (widget-get link-at-point :from) 2158 (widget-get link-at-point :from)
2158 (widget-get link-at-point :to) 2159 (widget-get link-at-point :to)
2159 (w3-fix-spaces 2160 (w3-fix-spaces
2160 (buffer-substring 2161 (buffer-substring-no-properties
2161 (widget-get link-at-point :from) 2162 (widget-get link-at-point :from)
2162 (widget-get link-at-point :to))))) 2163 (widget-get link-at-point :to)))))
2163 (w3-map-links (function 2164 (w3-map-links (function
2164 (lambda (widget arg) 2165 (lambda (widget arg)
2165 (if (and (widget-get widget :from) 2166 (if (and (widget-get widget :from)