bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch to make better use of `browse-url-new-window-p'


From: Matt Swift
Subject: patch to make better use of `browse-url-new-window-p'
Date: Fri, 6 Apr 2001 11:45:56 -0400

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.2 (i386-debian-linux-gnu, X toolkit)
 of Tue Jul 25 2000 on raven
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --with-pop=yes --with-x=yes --with-x-toolkit=yes'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

The following patch makes `browse-url-of-dired-file' sensitive to the value of
the variable `browse-url-new-window-p'.

cd /usr/share/emacs/current/lisp/
diff -c /usr/share/emacs/current/lisp/browse-url.el.orig 
/usr/share/emacs/current/lisp/browse-url.el
*** /usr/share/emacs/current/lisp/browse-url.el.orig    Fri Apr  6 11:38:58 2001
--- /usr/share/emacs/current/lisp/browse-url.el Fri Apr  6 11:39:54 2001
***************
*** 502,508 ****
  ;; Browse current buffer
  
  ;;;###autoload
! (defun browse-url-of-file (&optional file)
    "Ask a WWW browser to display FILE.
  Display the current buffer's file if FILE is nil or if called
  interactively.  Turn the filename into a URL with function
--- 502,508 ----
  ;; Browse current buffer
  
  ;;;###autoload
! (defun browse-url-of-file (&optional file &optional new-window)
    "Ask a WWW browser to display FILE.
  Display the current buffer's file if FILE is nil or if called
  interactively.  Turn the filename into a URL with function
***************
*** 519,525 ****
          (cond ((not (buffer-modified-p)))
                (browse-url-save-file (save-buffer))
                (t (message "%s modified since last save" file))))))
!   (browse-url (browse-url-file-url file))
    (run-hooks 'browse-url-of-file-hook))
  
  (defun browse-url-file-url (file)
--- 519,525 ----
          (cond ((not (buffer-modified-p)))
                (browse-url-save-file (save-buffer))
                (t (message "%s modified since last save" file))))))
!   (browse-url (browse-url-file-url file) new-window)
    (run-hooks 'browse-url-of-file-hook))
  
  (defun browse-url-file-url (file)
***************
*** 598,607 ****
  (add-hook 'kill-emacs-hook 'browse-url-delete-temp-file-list)
  
  ;;;###autoload
! (defun browse-url-of-dired-file ()
!   "In Dired, ask a WWW browser to display the file named on this line."
!   (interactive)
!   (browse-url-of-file (dired-get-filename)))
  
  ;;;###autoload
  (defun browse-url-of-region (min max)
--- 598,610 ----
  (add-hook 'kill-emacs-hook 'browse-url-delete-temp-file-list)
  
  ;;;###autoload
! (defun browse-url-of-dired-file (&optional arg)
!   "In Dired, ask a WWW browser to display the file named on this line.
! Prefix argument means reverse the sense of `browse-url-new-window-p'."
!   (interactive "P")
!   (browse-url-of-file (dired-get-filename)
!                     (if arg (not browse-url-new-window-p)
!                       browse-url-new-window-p)))
  
  ;;;###autoload
  (defun browse-url-of-region (min max)

Diff finished at Fri Apr  6 11:40:51



Recent input:
M-C-v M-C-v C-x b h t tab return M-1 b M-x r e p o 
r t - e m tab return

Recent messages:
Desktop loaded.
Loading fixes-20.7-3...
Loading /var/tmp/autosave.el (source)...
Loading /var/tmp/autosave.el (source)...done
Loading fixes-20.7-3...done
For information about the GNU Project and its goals, type C-h C-p.
Loading browse-url...
Loading browse-url...done
Loading emacsbug...
Loading emacsbug...done
None



reply via email to

[Prev in Thread] Current Thread [Next in Thread]