browse-url-firefox #2
id:ha-tan:20050524ã®è£è¶³ãã®ã«ãid:ha-tan:20050525ã®è¨å®ã¨ãã¼ã¸ãã¦ã¿ãã
ããã§ããhttp:ttp://example.comãã¿ããã«ttp:ãéãªããªããªãã
(setq thing-at-point-url-path-regexp "[^]\t\n \"'()<>[^`{}]*[^]\t\n \"'()<>[^`{}.,;]+") (setq thing-at-point-url-regexp (concat "\\<\\(h?t?tps?://\\|ftp://\\|gopher://\\|" "telnet://\\|wais://\\|file:/\\|s?news:\\|mailto:\\)" thing-at-point-url-path-regexp)) (setq browse-url-browser-function '(("." . browse-url-firefox))) (setq browse-url-firefox-program "firefox-linux") (defun browse-url-firefox (url &optional new-window) (interactive (browse-url-interactive-arg "URL: ")) (if (string-match "^t?tp://" url) (setq url (concat "http://" (substring url (match-end 0))))) (if (string-match "^t?tps://" url) (setq url (concat "https://" (substring url (match-end 0))))) (start-process (concat browse-url-firefox-program url) nil browse-url-firefox-program "-remote" (concat "openurl(" url ", new-tab)")))