Function: nneething-encode-file-name

nneething-encode-file-name is a byte-compiled function defined in nneething.el.gz.

Signature

(nneething-encode-file-name FILE &optional CODING-SYSTEM)

Documentation

Encode the name of the FILE in CODING-SYSTEM.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nneething.el.gz
(defun nneething-encode-file-name (file &optional coding-system)
  "Encode the name of the FILE in CODING-SYSTEM."
  (let ((pos 0) buf)
    (setq file (encode-coding-string
		file (or coding-system nnmail-pathname-coding-system)))
    (while (string-match "[^-0-9a-zA-Z_:/.]" file pos)
      (setq buf (cons (format "%%%02x" (aref file (match-beginning 0)))
		      (cons (substring file pos (match-beginning 0)) buf))
	    pos (match-end 0)))
    (apply (function concat)
	   (nreverse (cons (substring file pos) buf)))))