Function: vc--subject-to-file-name
vc--subject-to-file-name is a byte-compiled function defined in
vc.el.gz.
Signature
(vc--subject-to-file-name SUBJECT)
Documentation
Generate a file name for a patch with subject line SUBJECT.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defun vc--subject-to-file-name (subject)
"Generate a file name for a patch with subject line SUBJECT."
(let* ((stripped
(replace-regexp-in-string "\\`\\[.*PATCH.*\\]\\s-*" ""
subject))
(truncated (if (length> stripped 50)
(substring stripped 0 50)
stripped)))
(concat
(string-trim (replace-regexp-in-string "\\W" "-" truncated)
"-+" "-+")
".patch")))