/[emacs]/emacs/lisp/net/browse-url.el
ViewVC logotype

Diff of /emacs/lisp/net/browse-url.el

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

revision 1.21.2.6 by miles, Thu Apr 29 10:59:10 2004 UTC revision 1.21.2.7 by miles, Tue Jul 6 09:31:52 2004 UTC
# Line 577  down (this *won't* always work)." Line 577  down (this *won't* always work)."
577    
578  (defun browse-url-interactive-arg (prompt)  (defun browse-url-interactive-arg (prompt)
579    "Read a URL from the minibuffer, prompting with PROMPT.    "Read a URL from the minibuffer, prompting with PROMPT.
580  Default to the URL at or before point.  If invoked with a mouse button,  If `transient-mark-mode' is non-nil and the mark is active,
581  set point to the position clicked first.  Return a list for use in  it defaults to the current region, else to the URL at or before
582  `interactive' containing the URL and `browse-url-new-window-flag' or its  point.  If invoked with a mouse button, it moves point to the
583  negation if a prefix argument was given."  position clicked before acting.
584    
585    This function returns a list (URL NEW-WINDOW-FLAG)
586    for use in `interactive'."
587    (let ((event (elt (this-command-keys) 0)))    (let ((event (elt (this-command-keys) 0)))
588      (and (listp event) (mouse-set-point event)))      (and (listp event) (mouse-set-point event)))
589    (list (read-string prompt (browse-url-url-at-point))    (list (read-string prompt (or (and transient-mark-mode mark-active
590                                         ;; rfc2396 Appendix E.
591                                         (replace-regexp-in-string
592                                          "[\t\r\f\n ]+" ""
593                                          (buffer-substring-no-properties
594                                           (region-beginning) (region-end))))
595                                    (browse-url-url-at-point)))
596          (not (eq (null browse-url-new-window-flag)          (not (eq (null browse-url-new-window-flag)
597                   (null current-prefix-arg)))))                   (null current-prefix-arg)))))
598    

Legend:
Removed from v.1.21.2.6  
changed lines
  Added in v.1.21.2.7

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