Deprecate w3m in preference for eww in emacs
- setup a default external browser add a function for accessing the last - url before point (this is useful all over the place but namely in rcirc) Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
This commit is contained in:
parent
da01420da0
commit
187a6b1509
@ -1,27 +0,0 @@
|
||||
;; (C) Copyright Collin J. Doering 2014
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; File: w3m.el
|
||||
;; Author: Collin J. Doering <collin.doering@rekahsoft.ca>
|
||||
;; Date: Oct 22, 2014
|
||||
|
||||
;; This is going to be retired/replaced upon the release of emacs 24.4 (due to the introduction of eww)
|
||||
|
||||
;; setup html renderer w3m and external browser conkeror
|
||||
(require 'w3m-load) ;; AUR: emacs-w3m-cvs
|
||||
(setq browse-url-browser-function 'w3m-browse-url
|
||||
browse-url-generic-program "conkeror"
|
||||
w3m-use-cookies t)
|
||||
(autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t)
|
@ -17,6 +17,20 @@
|
||||
;; Author: Collin J. Doering <collin.doering@rekahsoft.ca>
|
||||
;; Date: Oct 22, 2014
|
||||
|
||||
;; Setup web browsing
|
||||
(setq browse-url-browser-function 'browse-url-generic
|
||||
browse-url-generic-program "conkeror")
|
||||
|
||||
(defun browse-url-before-point ()
|
||||
"Find the first url before point and open it in a browser using browse-url"
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(search-backward-regexp "\(file\|ftp\\|http\\|https\)://.*\.")
|
||||
(browse-url-at-point)))
|
||||
|
||||
(global-set-key (kbd "C-c g") 'browse-url-at-point)
|
||||
(global-set-key (kbd "C-c G") 'browse-url-before-point)
|
||||
|
||||
;; setup php-mode
|
||||
(autoload 'php-mode "php-mode.el" "Php mode." t) ;; ELPA
|
||||
(setq auto-mode-alist (append '(("/*.\.php[345]?$" . php-mode)) auto-mode-alist))
|
||||
|
Reference in New Issue
Block a user