Comment 5 for bug 1922146

Revision history for this message
Ergus (ergus) wrote :

Hi Felipe:

I will try the new mode in the next days. Could you please add the ;;;###autoload decorators to the modes at least?

I think that the commands that may need them are: `global-tags-exclusive-backend-mode`, `global-tags-shared-backend-mode` and `global-tags-imenu-mode` and for more complex configurations like mine: `global-tags-xref-backend`, `global-tags-try-project-root`, `global-tags-create-database` and `global-tags-update-database`.

BTW:

(thread-last b-fname
        (global-tags--get-lines 'file)
        (seq-map #'global-tags--file-tag-to-imenu-index))

is the same than:

(seq-map #'global-tags--file-tag-to-imenu-index (global-tags--get-lines 'file b-fname))

Which is simpler to read and for the compiler.

in te same way you can write:

(defun global-tags--get-locations (symbol &optional kind)
  "Get locations according to SYMBOL and KIND.

If KIND is omitted, global will do a \"tag\" search."
  (cl-mapcar #'global-tags--get-location
   (global-tags--get-lines kind 'result "grep" symbol)))

Just a suggestion.