comparison lisp/browse-url.el @ 13224:e19603a14c3f

Repair line wrapping damage.
author Erik Naggum <erik@naggum.no>
date Sun, 15 Oct 1995 03:09:16 +0000
parents 7a20f2bb5ac9
children efd6ce432dc5
comparison
equal deleted inserted replaced
13223:b0717b54e8b6 13224:e19603a14c3f
101 ;; (autoload 'browse-url-of-buffer "browse-url" 101 ;; (autoload 'browse-url-of-buffer "browse-url"
102 ;; "Ask a WWW browser to display BUFFER." t) 102 ;; "Ask a WWW browser to display BUFFER." t)
103 ;; (autoload 'browse-url-of-file "browse-url" 103 ;; (autoload 'browse-url-of-file "browse-url"
104 ;; "Ask a WWW browser to display FILE." t) 104 ;; "Ask a WWW browser to display FILE." t)
105 ;; (autoload 'browse-url-of-dired-file "browse-url" 105 ;; (autoload 'browse-url-of-dired-file "browse-url"
106 ;; "In Dired, ask a WWW browser to display the file named on this line." 106 ;; "In Dired, ask a WWW browser to display the file named on this line." t)
107 t)
108 107
109 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 108 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
110 ;; Usage 109 ;; Usage
111 110
112 ;; To display the URL at or before point: 111 ;; To display the URL at or before point:
131 ;; To bind the browse-url commands to keys with the `C-c u' prefix: 130 ;; To bind the browse-url commands to keys with the `C-c u' prefix:
132 ;; (global-set-key "\C-cu." 'browse-url-at-point) 131 ;; (global-set-key "\C-cu." 'browse-url-at-point)
133 ;; (global-set-key "\C-cub" 'browse-url-of-buffer) 132 ;; (global-set-key "\C-cub" 'browse-url-of-buffer)
134 ;; (global-set-key "\C-cuf" 'browse-url-of-file) 133 ;; (global-set-key "\C-cuf" 'browse-url-of-file)
135 ;; (add-hook 'dired-mode-hook 134 ;; (add-hook 'dired-mode-hook
136 ;; (function (lambda () 135 ;; (lambda ()
137 ;; (local-set-key "\C-cuf" 136 ;; (local-set-key "\C-cuf" 'browse-url-of-dired-file))))
138 'browse-url-of-dired-file))))
139 ;; (if (boundp 'browse-url-browser-function) 137 ;; (if (boundp 'browse-url-browser-function)
140 ;; (global-set-key "\C-cuu" browse-url-browser-function) 138 ;; (global-set-key "\C-cuu" browse-url-browser-function)
141 ;; (eval-after-load 139 ;; (eval-after-load
142 ;; "browse-url" 140 ;; "browse-url"
143 ;; '(global-set-key "\C-cuu" browse-url-browser-function))) 141 ;; '(global-set-key "\C-cuu" browse-url-browser-function)))
160 ;; (add-hook 'local-write-file-hooks 158 ;; (add-hook 'local-write-file-hooks
161 ;; (function (lambda () 159 ;; (function (lambda ()
162 ;; (let ((local-write-file-hooks)) 160 ;; (let ((local-write-file-hooks))
163 ;; (save-buffer)) 161 ;; (save-buffer))
164 ;; (browse-url-netscape-reload) 162 ;; (browse-url-netscape-reload)
165 ;; t)) ; => file written 163 ;; t)) ; => file written by hook
166 by hook 164 ;; t)))) ; append to l-w-f-hooks
167 ;; t)))) ; append to
168 l-w-f-hooks
169 ;; 165 ;;
170 ;; [Does this work for html-mode too?] 166 ;; [Does this work for html-mode too?]
171 ;; 167 ;;
172 ;; OR browse-url-of-file ask Netscape to load and then reload the 168 ;; OR browse-url-of-file ask Netscape to load and then reload the
173 ;; file: 169 ;; file:
272 268
273 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 269 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
274 ;;; Code: 270 ;;; Code:
275 271
276 (defvar browse-url-regexp 272 (defvar browse-url-regexp
277 "\\(https?://\\|ftp://\\|gopher://\\|telnet://\\|wais://\\|file:/\\|s?news:\\|mai 273 "\\(https?://\\|ftp://\\|gopher://\\|telnet://\\|wais://\\|file:/\\|s?news:\\|mailto:\\)[^]\t\n \"'()<>[^`{}]*[^]\t\n \"'()<>[^`{}.,;]+"
278 lto:\\)[^]\t\n \"'()<>[^`{}]*[^]\t\n \"'()<>[^`{}.,;]+"
279 "A regular expression probably matching a URL.") 274 "A regular expression probably matching a URL.")
280 275
281 (defvar browse-url-browser-function 276 (defvar browse-url-browser-function
282 'browse-url-netscape 277 'browse-url-netscape
283 "*Function to display the current buffer in a WWW browser. 278 "*Function to display the current buffer in a WWW browser.