update my/create-TAGS to check if process already running...

This commit is contained in:
Jason Tian 2023-08-29 23:03:34 +08:00
parent a8ab9dbdec
commit 844fe445fe
2 changed files with 9 additions and 3 deletions

View file

@ -47,7 +47,7 @@
(cond
((member "Apple Color Emoji" (font-family-list)) "Apple Color Emoji")
((member "Noto Color Emoji" (font-family-list)) "Noto Color Emoji")
;;<2022-10-31 NotoColorEmoji uses the CBDT/CBLC color font format, which is
;; 2022-10-31 NotoColorEmoji uses the CBDT/CBLC color font format, which is
;; supported by Android and Chrome/Chromium OS. Windows supports it starting
;; with Windows 10 Anniversary Update in Chrome and Edge.
;; Via https://github.com/googlefonts/noto-emoji/blob/f826707b28355f6cd1593f504427ca2b1f6c4c19/README.md#using-notocoloremoji

View file

@ -464,6 +464,8 @@ Updated: 2023-08-17"
(tags-path (expand-file-name tags-filename target-dir))
(command-process-name (or process-name "create TAGS"))
(ctags-cmd (format "cd %s && ctags --options=%s -e -R --tag-relative=%s %s -f %s *"
(if (eq system-type 'windows-nt)
;; fix changing dir across different drives issue on Windows
@ -485,8 +487,12 @@ Updated: 2023-08-17"
"'")
ctags-cmd)))
(start-process-shell-command (or process-name "create TAGS") nil command)
(message "Creating TAGS...")))
(if (get-process command-process-name)
(message "Process (%s) already running..." command-process-name)
(progn
(start-process-shell-command command-process-name nil command)
(message "Creating TAGS...")))
))
(defvar my/default-tags-file-name "TAGS"
"The default name of the tags file to search for.")