Function: url-port-if-non-default

url-port-if-non-default is a byte-compiled function defined in url-parse.el.gz.

Signature

(url-port-if-non-default URLOBJ)

Documentation

Return the port number specified by URLOBJ, if it is not the default.

If the specified port number is the default, return nil.

Source Code

;; Defined in /usr/src/emacs/lisp/url/url-parse.el.gz
(defun url-port-if-non-default (urlobj)
  "Return the port number specified by URLOBJ, if it is not the default.
If the specified port number is the default, return nil."
  (let ((port (url-portspec urlobj))
	type)
    (and port
	 (or (null (setq type (url-type urlobj)))
	     (not (equal port (url-scheme-get-property type 'default-port))))
	 port)))