%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/net/ |
Current File : //usr/local/share/emacs/27.2/lisp/net/browse-url.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'browse-url nil "Use a web browser to look at a URL." :prefix "browse-url-" :link '(emacs-commentary-link "browse-url") :group 'external :group 'comm) (defvar browse-url--browser-defcustom-type '(choice (function-item :tag "Emacs W3" :value browse-url-w3) (function-item :tag "eww" :value eww-browse-url) (function-item :tag "Mozilla" :value browse-url-mozilla) (function-item :tag "Firefox" :value browse-url-firefox) (function-item :tag "Google Chrome" :value browse-url-chrome) (function-item :tag "Chromium" :value browse-url-chromium) (function-item :tag "Epiphany" :value browse-url-epiphany) (function-item :tag "Conkeror" :value browse-url-conkeror) (function-item :tag "Text browser in an xterm window" :value browse-url-text-xterm) (function-item :tag "Text browser in an Emacs window" :value browse-url-text-emacs) (function-item :tag "KDE" :value browse-url-kde) (function-item :tag "Elinks" :value browse-url-elinks) (function-item :tag "Specified by `Browse Url Generic Program'" :value browse-url-generic) (function-item :tag "Default Windows browser" :value browse-url-default-windows-browser) (function-item :tag "Default macOS browser" :value browse-url-default-macosx-browser) (function-item :tag "Default browser" :value browse-url-default-browser) (function :tag "Your own function") (alist :tag "Regexp/function association list" :key-type regexp :value-type function))) (byte-code "\301\302\303\304\305\306\307&\210\301\310\311\312\306\313\305&\210\301\314\315\316\305\317\306\307&\210\301\320\321\322\305\323\306\324&\210\301\325\326\327\306\313\305\330&\210\301\331\332\333\305\334%\210\335\331\336\337#\210\301\340\336\341\305\342%\210\335\340\336\337#\210\301\343\340\344\305\345%\210\335\343\336\337#\210\301\346\336\347\305\350%\210\301\351\352\353\305\334%\210\301\354\336\355\305\356%\210\301\357\354\360\305\361%\210\301\362\363\364\305\334%\210\301\365\336\366\305\367%\210\301\370\365\371\305\372%\210\335\370\373\374#\210\301\375\376\377\305\334\306\337&\210\301\201@ \336\201A \305\201B \306\337&\210\301\201C \201D \201E \305\334\306\307&\210\301\201F \336\201G \305\201H \306\307&\210\301\201I \201J \201K \305\334%\210\335\201I \336\337#\210\301\201L \336\201M \305\201N %\210\335\201L \336\337#\210\301\201O \201L \201P \305\201Q %\210\335\201O \336\337#\210\301\201R \201S \201T \305\334%\210\301\201U \336\201V \305\201W %\210\301\201X \201U \201Y \305\201Z %\207" [browse-url--browser-defcustom-type custom-declare-variable browse-url-browser-function 'browse-url-default-browser "Function to display the current buffer in a WWW browser.\nThis is used by the `browse-url-at-point', `browse-url-at-mouse', and\n`browse-url-of-file' commands.\n\nIf the value is not a function it should be a list of pairs\n(REGEXP . FUNCTION). In this case the function called will be the one\nassociated with the first REGEXP which matches the current URL. The\nfunction is passed the URL and any other args of `browse-url'. The last\nregexp should probably be \".\" to specify a default browser.\n\nAlso see `browse-url-secondary-browser-function'." :type :version "24.1" browse-url-secondary-browser-function 'browse-url-default-browser "Function used to launch an alternative browser.\nThis is usually an external browser (that is, not eww or w3m),\nused as the secondary browser choice, typically when a prefix\nargument is given to a URL-opening command in those modes that\nsupport this (for instance, eww/shr).\n\nAlso see `browse-url-browser-function'." "27.1" browse-url-mailto-function 'browse-url-mail "Function to display mailto: links.\nThis variable uses the same syntax as the\n`browse-url-browser-function' variable. If the\n`browse-url-mailto-function' variable is nil, that variable will\nbe used instead." (choice (function-item :tag "Emacs Mail" :value browse-url-mail) (function-item :tag "None" nil)) browse-url-man-function 'browse-url-man "Function to display man: links." (radio (function-item :tag "Emacs Man" :value browse-url-man) (const :tag "None" nil) (function :tag "Other function")) "26.1" browse-url-button-regexp (concat "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|" "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)" "\\(//[-a-z0-9_.]+:[0-9]*\\)?" (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]") (punct "!?:;.,")) (concat "\\(?:" "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?" "\\|" "[" chars punct "]+" "[" chars "]" "\\)")) "\\)") "Regular expression that matches URLs." regexp browse-url-netscape-program "netscape" "The name by which to invoke Netscape.\n\nThe free program `netscape-remote' from\n<URL:http://home.netscape.com/newsref/std/remote.c> is said to start\nup very much quicker than `netscape'. Reported to compile on a GNU\nsystem, given vroot.h from the same directory, with cc flags\n -DSTANDALONE -L/usr/X11R6/lib -lXmu -lX11." string make-obsolete-variable nil "25.1" browse-url-netscape-arguments "A list of strings to pass to Netscape as arguments." (repeat (string :tag "Argument")) browse-url-netscape-startup-arguments "A list of strings to pass to Netscape when it starts up.\nDefaults to the value of `browse-url-netscape-arguments' at the time\n`browse-url' is loaded." (repeat (string :tag "Argument")) browse-url-browser-display "The X display for running the browser, if not same as Emacs's." (choice string (const :tag "Default" nil)) browse-url-mozilla-program "mozilla" "The name by which to invoke Mozilla." browse-url-mozilla-arguments "A list of strings to pass to Mozilla as arguments." (repeat (string :tag "Argument")) browse-url-mozilla-startup-arguments "A list of strings to pass to Mozilla when it starts up.\nDefaults to the value of `browse-url-mozilla-arguments' at the time\n`browse-url' is loaded." (repeat (string :tag "Argument")) browse-url-firefox-program (let ((candidates '("icecat" "iceweasel" "firefox"))) (while (and candidates (not (executable-find (car candidates)))) (setq candidates (cdr candidates))) (or (car candidates) "firefox")) "The name by which to invoke Firefox or a variant of it." browse-url-firefox-arguments "A list of strings to pass to Firefox (or variant) as arguments." (repeat (string :tag "Argument")) browse-url-firefox-startup-arguments "A list of strings to pass to Firefox (or variant) when it starts up.\nDefaults to the value of `browse-url-firefox-arguments' at the time\n`browse-url' is loaded." (repeat (string :tag "Argument")) "it no longer has any effect." "24.5" browse-url-chrome-program (let ((candidates '("google-chrome-stable" "google-chrome"))) (while (and candidates (not (executable-find (car candidates)))) (setq candidates (cdr candidates))) (or (car candidates) "chromium")) "The name by which to invoke the Chrome browser." browse-url-chrome-arguments "A list of strings to pass to Google Chrome as arguments." (repeat (string :tag "Argument")) browse-url-chromium-program (let ((candidates '("chromium" "chromium-browser"))) (while (and candidates (not (executable-find (car candidates)))) (setq candidates (cdr candidates))) (or (car candidates) "chromium")) "The name by which to invoke Chromium." browse-url-chromium-arguments "A list of strings to pass to Chromium as arguments." (repeat (string :tag "Argument")) browse-url-galeon-program "galeon" "The name by which to invoke Galeon." browse-url-galeon-arguments "A list of strings to pass to Galeon as arguments." (repeat (string :tag "Argument")) browse-url-galeon-startup-arguments "A list of strings to pass to Galeon when it starts up.\nDefaults to the value of `browse-url-galeon-arguments' at the time\n`browse-url' is loaded." (repeat (string :tag "Argument")) browse-url-epiphany-program "epiphany" "The name by which to invoke Epiphany." browse-url-epiphany-arguments "A list of strings to pass to Epiphany as arguments." (repeat (string :tag "Argument")) browse-url-epiphany-startup-arguments "A list of strings to pass to Epiphany when it starts up.\nDefaults to the value of `browse-url-epiphany-arguments' at the time\n`browse-url' is loaded." (repeat (string :tag "Argument"))] 8) (defvar browse-url-gnome-moz-program "gnome-moz-remote") (byte-code "\300\301\302\303#\210\304\305\306\307\310\311\312\313&\210\300\305\302\303#\210\304\314\302\315\312\316%\210\304\317\302\320\312\316%\210\304\321\302\322\310\303\312\316&\210\304\323\302\324\312\316%\210\300\323\302\303#\210\304\325\302\326\312\316%\210\304\327\302\330\312\316%\210\300\327\302\303#\210\304\331\302\332\312\316%\210\304\333\334\335\312\336\310\337&\210\300\333\302\303#\210\304\340\302\341\312\342%\210\300\340\302\303#\210\304\343\344\345\312\336%\210\300\343\302\303#\210\304\346\347\350\312\336\310\303&\210\304\351\302\352\310\303\312\353&\210\304\354\355\356\312\357\310\303&\210\304\360\302\361\312\316%\210\304\362\302\363\312\364%\210\304\365\366\367\312\370%\210\300\365\302\303#\210\304\371\372\373\312\336%\210\300\371\302\303#\207" [make-obsolete-variable browse-url-gnome-moz-program nil "25.1" custom-declare-variable browse-url-gnome-moz-arguments 'nil "A list of strings passed to the GNOME mozilla viewer as arguments." :version "21.1" :type (repeat (string :tag "Argument")) browse-url-mozilla-new-window-is-tab "Whether to open up new windows in a tab or a new window.\nIf non-nil, then open the URL in a new tab rather than a new window if\n`browse-url-mozilla' is asked to open it in a new window." boolean browse-url-firefox-new-window-is-tab "Whether to open up new windows in a tab or a new window.\nIf non-nil, then open the URL in a new tab rather than a new window if\n`browse-url-firefox' is asked to open it in a new window." browse-url-conkeror-new-window-is-buffer "Whether to open up new windows in a buffer or a new window.\nIf non-nil, then open the URL in a new buffer rather than a new window if\n`browse-url-conkeror' is asked to open it in a new window." browse-url-galeon-new-window-is-tab "Whether to open up new windows in a tab or a new window.\nIf non-nil, then open the URL in a new tab rather than a new window if\n`browse-url-galeon' is asked to open it in a new window." browse-url-epiphany-new-window-is-tab "Whether to open up new windows in a tab or a new window.\nIf non-nil, then open the URL in a new tab rather than a new window if\n`browse-url-epiphany' is asked to open it in a new window." browse-url-netscape-new-window-is-tab "Whether to open up new windows in a tab or a new window.\nIf non-nil, then open the URL in a new tab rather than a new\nwindow if `browse-url-netscape' is asked to open it in a new\nwindow." browse-url-new-window-flag "Non-nil means always open a new browser window with appropriate browsers.\nPassing an interactive argument to \\[browse-url], or specific browser\ncommands reverses the effect of this variable." browse-url-mosaic-program "xmosaic" "The name by which to invoke Mosaic (or mMosaic)." string "20.3" browse-url-mosaic-arguments "A list of strings to pass to Mosaic as arguments." (repeat (string :tag "Argument")) browse-url-mosaic-pidfile "~/.mosaicpid" "The name of the pidfile created by Mosaic." browse-url-conkeror-program "conkeror" "The name by which to invoke Conkeror." browse-url-conkeror-arguments "A list of strings to pass to Conkeror as arguments." (repeat (string :tag "Argument")) browse-url-filename-alist `(("^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*" . "ftp://\\2/") ("^/\\([^:@/]+@\\)?\\([^:/]+\\):/*" . "ftp://\\1\\2/") ,@(if (memq system-type '(windows-nt ms-dos)) '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/") ("^[\\/][\\/]+" . "file://"))) ("^/+" . "file:///")) "An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'.\nAny substring of a filename matching one of the REGEXPs is replaced by\nthe corresponding STRING using `replace-match', not treating STRING\nliterally. All pairs are applied in the order given. The default\nvalue converts ange-ftp/EFS-style file names into ftp URLs and prepends\n`file:' to any file name beginning with `/'.\n\nFor example, adding to the default a specific translation of an ange-ftp\naddress to an HTTP URL:\n\n (setq browse-url-filename-alist\n \\='((\"/webmaster@webserver:/home/www/html/\" .\n \"http://www.acme.co.uk/\")\n (\"^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*\" . \"ftp://\\2/\")\n (\"^/\\([^:@/]+@\\)?\\([^:/]+\\):/*\" . \"ftp://\\1\\2/\")\n (\"^/+\" . \"file:/\")))" (repeat (cons :format "%v" (regexp :tag "Regexp") (string :tag "Replacement"))) browse-url-save-file "If non-nil, save the buffer before displaying its file.\nUsed by the `browse-url-of-file' command." browse-url-of-file-hook "Hook run after `browse-url-of-file' has asked a browser to load a file." hook browse-url-CCI-port 3003 "Port to access XMosaic via CCI.\nThis can be any number between 1024 and 65535 but must correspond to\nthe value set in the browser." integer browse-url-CCI-host "localhost" "Host to access XMosaic via CCI.\nThis should be the host name of the machine running XMosaic with CCI\nenabled. The port number should be set in `browse-url-CCI-port'."] 8) (defvar browse-url-temp-file-name nil) (byte-code "\300\301!\210\302\303\304\305\306\307%\210\302\310\311\312\306\313%\210\302\314\315\316\306\307%\210\302\317\320\321\306\322%\210\302\323\311\324\306\325%\210\302\326\311\327\306\330%\210\302\331\332\333\306\307%\210\302\334\335\336\306\337%\210\340\334\311\341#\210\302\342\343\344\306\307\345\346&\210\302\347\350\351\306\352\345\346&\210\302\353\354\355\306\356\345\346&\210\302\357\360\361\306\362\345\346&\210\302\363\364\365\306\337\345\346&\210\302\366\367\370\306\307\345\371&\210\302\372\373\374\306\375%\210\302\376\377\201@ \306\201A %\207" [make-variable-buffer-local browse-url-temp-file-name custom-declare-variable browse-url-xterm-program "xterm" "The name of the terminal emulator used by `browse-url-text-xterm'.\nThis might, for instance, be a separate color version of xterm." :type string browse-url-xterm-args nil "A list of strings defining options for `browse-url-xterm-program'.\nThese might set its size, for instance." (repeat (string :tag "Argument")) browse-url-gnudoit-program "gnudoit" "The name of the `gnudoit' program used by `browse-url-w3-gnudoit'." browse-url-gnudoit-args '("-q") "A list of strings defining options for `browse-url-gnudoit-program'.\nThese might set the port, for instance." (repeat (string :tag "Argument")) browse-url-generic-program "The name of the browser program used by `browse-url-generic'." (choice string (const :tag "None" nil)) browse-url-generic-args "A list of strings defining options for `browse-url-generic-program'." (repeat (string :tag "Argument")) browse-url-temp-dir temporary-file-directory "The name of a directory for browse-url's temporary files.\nSuch files are generated by functions like `browse-url-of-region'.\nYou might want to set this to somewhere with restricted read permissions\nfor privacy's sake." browse-url-netscape-version 3 "The version of Netscape you are using.\nThis affects how URL reloading is done; the mechanism changed\nincompatibly at version 4." number make-obsolete-variable "25.1" browse-url-text-browser "lynx" "The name of the text browser to invoke." :version "23.1" browse-url-text-emacs-args (and (not window-system) '("-show_cursor")) "A list of strings defining options for a text browser in an Emacs buffer.\n\nThe default is none in a window system, otherwise `-show_cursor' to\nindicate the position of the current link in the absence of\nhighlighting, assuming the normal default for showing the cursor." (repeat (string :tag "Argument")) browse-url-text-input-field 'avoid "Action on selecting an existing text browser buffer at an input field.\nWhat to do when sending a new URL to an existing text browser buffer in Emacs\nif the browser cursor is on an input field (in which case the `g' command\nwould be entered as data). Such fields are recognized by the\nunderlines ____. Allowed values: nil: disregard it, `warn': warn the\nuser and don't emit the URL, `avoid': try to avoid the field by moving\ndown (this *won't* always work)." (choice (const :tag "Move to try to avoid field" :value avoid) (const :tag "Disregard" :value nil) (const :tag "Warn, don't emit URL" :value warn)) browse-url-text-input-attempts 10 "How many times to try to move down from a series of text browser input fields." integer browse-url-text-input-delay 0.2 "Seconds to wait for a text browser between moves down from an input field." browse-url-kde-program "kfmclient" "The name by which to invoke the KDE web browser." "21.1" browse-url-kde-args '("openURL") "A list of strings defining options for `browse-url-kde-program'." (repeat (string :tag "Argument")) browse-url-elinks-wrapper '("xterm" "-e") "Wrapper command prepended to the Elinks command-line." (repeat (string :tag "Wrapper"))] 8) #@109 URL-encode the chars in TEXT that match CHARS. CHARS is a regexp-like character alternative (e.g., "[)$]"). (defalias 'browse-url-url-encode-chars #[(text chars) "\304!\305\306\n #\211\203% \307\310\311\312\313\305\n\"!\"\314\211\n$ T\202 \n*\207" [text s encoded-text chars copy-sequence 0 string-match replace-match format "%%%X" string-to-char match-string t] 7 (#$ . 17269)]) #@136 Escape annoying characters in URL. The annoying characters are those that can mislead a web browser regarding its parameter treatment. (defalias 'browse-url-encode-url #[(url) "\301\302\"\207" [url browse-url-url-encode-chars "[\")$] "] 3 (#$ . 17664)]) (defalias 'browse-url-url-at-point #[nil "\301\302\303\"\206 \301\304\303\"\211\205 \305P)\207" [f thing-at-point url t filename "http://"] 4]) #@352 Read a URL from the minibuffer, prompting with PROMPT. If `transient-mark-mode' is non-nil and the mark is active, it defaults to the current region, else to the URL at or before point. If invoked with a mouse button, it moves point to the position clicked before acting. This function returns a list (URL NEW-WINDOW-FLAG) for use in `interactive'. (defalias 'browse-url-interactive-arg #[(prompt) "\306 \307\234\211<\203 \310!\210)\311 \n\203&