Function: directory-abbrev-make-regexp
directory-abbrev-make-regexp is a byte-compiled function defined in
files.el.gz.
Signature
(directory-abbrev-make-regexp DIRECTORY)
Documentation
Create a regexp to match DIRECTORY for directory-abbrev-alist.
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun directory-abbrev-make-regexp (directory)
"Create a regexp to match DIRECTORY for `directory-abbrev-alist'."
(let ((regexp
;; We include a slash at the end, to avoid spurious
;; matches such as `/usr/foobar' when the home dir is
;; `/usr/foo'.
(concat "\\`" (regexp-quote directory) "\\(/\\|\\'\\)")))
;; The value of regexp could be multibyte or unibyte. In the
;; latter case, we need to decode it.
(if (multibyte-string-p regexp)
regexp
(decode-coding-string regexp
(if (eq system-type 'windows-nt)
'utf-8
locale-coding-system)))))