Function: ffap-search-forward-file-end

ffap-search-forward-file-end is a byte-compiled function defined in ffap.el.gz.

Signature

(ffap-search-forward-file-end &optional DIR-SEPARATOR)

Documentation

Search DIR-SEPARATOR and position point at file's maximum ending.

This includes spaces. Optional DIR-SEPARATOR defaults to "/". Call ffap-search-backward-file-end to refine the ending point.

Source Code

;; Defined in /usr/src/emacs/lisp/ffap.el.gz
(defun ffap-search-forward-file-end (&optional dir-separator)
  "Search DIR-SEPARATOR and position point at file's maximum ending.
This includes spaces.
Optional DIR-SEPARATOR defaults to \"/\".
Call `ffap-search-backward-file-end' to refine the ending point."
  (unless dir-separator
    (setq dir-separator "/"))
  (let* ((chars                         ;expected chars in file name
	  (concat "[^][^<>()\"'`;,#*|"
		  ;; exclude the opposite as we know the separator
		  (if (string-equal dir-separator "/")
		      "\\\\"
		    "/")
		  "\t\r\n]"))
	 (re (concat
	      chars "*"
	      (if dir-separator
		  (regexp-quote dir-separator)
		"/")
	      chars "*")))
    (when (looking-at re)
      (goto-char (match-end 0)))))