Function: directory-abbrev-make-regexp
directory-abbrev-make-regexp is a byte-compiled function defined in
compat-29.el.
Signature
(directory-abbrev-make-regexp DIRECTORY)
Documentation
[Compatibility function for directory-abbrev-make-regexp, defined in Emacs
29.1. See (compat) Emacs 29.1' for more details.]
Create a regexp to match DIRECTORY for directory-abbrev-alist.
Source Code
;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-29.el
;;;; Defined in files.el
(compat-defun directory-abbrev-make-regexp (directory) ;; <compat-tests:directory-abbrev-make-regexp>
"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)))))