 
 Otherwise, if `ctags-update' is called non-interactively (example, via the
 `after-save-hook'), if the TAGS file is present, return that file's path; else
-do nothing and return nil."
+do nothing and return nil.
+
+This function also prevents the user-error \"Another ctags-update process is
+already running\" caused in `ctags-update' function if value returned by this
+function is non-nil and the tag generation process is already running."
         (let (tags)
           (cond
            ((> (prefix-numeric-value current-prefix-arg) 1)  ;C-u or C-uC-u ,generate new tags in selected directory

;; Time-stamp: <2017-02-02 15:20:47 kmodi>

;; Setup for different tags


              (setq tags (expand-file-name "TAGS"
                                           (read-directory-name "Generate TAGS in dir:")))))
           (t
            ;; If the TAGS file does not exist in this case, `tags' is set to nil.
            (setq tags (ctags-update-find-tags-file))
            (when tags
              (let ((process-already-running (get-process tags)))
                (when process-already-running
                  ;; Prevent the user-error "Another ctags-update process is
                  ;; already running" caused in `ctags-update' function if tags
                  ;; is non-nil and the tag generation process is already running.
                  (setq tags nil))))))
          tags))
      (advice-add 'ctags-update-how-to-update :override #'modi/ctags-update-how-to-update)

