Mercurial > emacs
comparison lisp/net/browse-url.el @ 105372:bd2966850aac
Use `called-interactively-p' instead of `interactive-p'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 02 Oct 2009 03:48:36 +0000 |
parents | 0769a73f1d18 |
children | 1e211a362b04 |
comparison
equal
deleted
inserted
replaced
105371:0769a73f1d18 | 105372:bd2966850aac |
---|---|
768 (defun browse-url (url &rest args) | 768 (defun browse-url (url &rest args) |
769 "Ask a WWW browser to load URL. | 769 "Ask a WWW browser to load URL. |
770 Prompts for a URL, defaulting to the URL at or before point. Variable | 770 Prompts for a URL, defaulting to the URL at or before point. Variable |
771 `browse-url-browser-function' says which browser to use." | 771 `browse-url-browser-function' says which browser to use." |
772 (interactive (browse-url-interactive-arg "URL: ")) | 772 (interactive (browse-url-interactive-arg "URL: ")) |
773 (unless (interactive-p) | 773 (unless (called-interactively-p 'interactive) |
774 (setq args (or args (list browse-url-new-window-flag)))) | 774 (setq args (or args (list browse-url-new-window-flag)))) |
775 (let ((process-environment (copy-sequence process-environment))) | 775 (let ((process-environment (copy-sequence process-environment))) |
776 ;; When connected to various displays, be careful to use the display of | 776 ;; When connected to various displays, be careful to use the display of |
777 ;; the currently selected frame, rather than the original start display, | 777 ;; the currently selected frame, rather than the original start display, |
778 ;; which may not even exist any more. | 778 ;; which may not even exist any more. |