From 13cb7299d144902361611f2599c58e953bcc44f0 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Mon, 18 Apr 2022 16:37:47 +0200 Subject: [PATCH] update ggtags Signed-off-by: Andreas Gerler --- bba.org | 2 +- elpa/ggtags-20190320.2208/ggtags-autoloads.el | 51 --------------- elpa/ggtags-20190320.2208/ggtags-pkg.el | 2 - elpa/ggtags-20211020.354/ggtags-autoloads.el | 64 +++++++++++++++++++ elpa/ggtags-20211020.354/ggtags-pkg.el | 2 + .../ggtags.el | 34 ++++++---- 6 files changed, 90 insertions(+), 65 deletions(-) delete mode 100644 elpa/ggtags-20190320.2208/ggtags-autoloads.el delete mode 100644 elpa/ggtags-20190320.2208/ggtags-pkg.el create mode 100644 elpa/ggtags-20211020.354/ggtags-autoloads.el create mode 100644 elpa/ggtags-20211020.354/ggtags-pkg.el rename elpa/{ggtags-20190320.2208 => ggtags-20211020.354}/ggtags.el (99%) diff --git a/bba.org b/bba.org index 99ef5ecb..b39fd904 100644 --- a/bba.org +++ b/bba.org @@ -4060,7 +4060,7 @@ If you are new to tags check [[http://tuhdo.github.io/c-ide.html][this]]. #+BEGIN_SRC emacs-lisp (if (>= emacs-major-version 24) (progn - (add-to-list 'load-path "~/.emacs.d/elpa/ggtags-20190320.2208" t) + (add-to-list 'load-path "~/.emacs.d/elpa/ggtags-20211020.354" t) (require 'ggtags) (add-to-list 'load-path "~/.emacs.d/elpa/helm-gtags-20170116.529" t) (require 'helm-gtags) diff --git a/elpa/ggtags-20190320.2208/ggtags-autoloads.el b/elpa/ggtags-20190320.2208/ggtags-autoloads.el deleted file mode 100644 index 4781b8c7..00000000 --- a/elpa/ggtags-20190320.2208/ggtags-autoloads.el +++ /dev/null @@ -1,51 +0,0 @@ -;;; ggtags-autoloads.el --- automatically extracted autoloads -;; -;;; Code: -(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) - -;;;### (autoloads nil "ggtags" "ggtags.el" (23994 42601 852819 813000)) -;;; Generated autoloads from ggtags.el - -(autoload 'ggtags-find-project "ggtags" "\ - - -\(fn)" nil nil) - -(autoload 'ggtags-find-tag-dwim "ggtags" "\ -Find NAME by context. -If point is at a definition tag, find references, and vice versa. -If point is at a line that matches `ggtags-include-pattern', find -the include file instead. - -When called interactively with a prefix arg, always find -definition tags. - -\(fn NAME &optional WHAT)" t nil) - -(autoload 'ggtags-mode "ggtags" "\ -Toggle Ggtags mode on or off. -With a prefix argument ARG, enable Ggtags mode if ARG is -positive, and disable it otherwise. If called from Lisp, enable -the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. -\\{ggtags-mode-map} - -\(fn &optional ARG)" t nil) - -(autoload 'ggtags-build-imenu-index "ggtags" "\ -A function suitable for `imenu-create-index-function'. - -\(fn)" nil nil) - -(autoload 'ggtags-try-complete-tag "ggtags" "\ -A function suitable for `hippie-expand-try-functions-list'. - -\(fn OLD)" nil nil) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; End: -;;; ggtags-autoloads.el ends here diff --git a/elpa/ggtags-20190320.2208/ggtags-pkg.el b/elpa/ggtags-20190320.2208/ggtags-pkg.el deleted file mode 100644 index 43e632ab..00000000 --- a/elpa/ggtags-20190320.2208/ggtags-pkg.el +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- no-byte-compile: t -*- -(define-package "ggtags" "20190320.2208" "emacs frontend to GNU Global source code tagging system" '((emacs "25")) :commit "4d9000034d352cd983ae6626f560e434d0b3e9ca" :keywords '("tools" "convenience") :authors '(("Leo Liu" . "sdl.web@gmail.com")) :maintainer '("Leo Liu" . "sdl.web@gmail.com") :url "https://github.com/leoliu/ggtags") diff --git a/elpa/ggtags-20211020.354/ggtags-autoloads.el b/elpa/ggtags-20211020.354/ggtags-autoloads.el new file mode 100644 index 00000000..63cb4c9c --- /dev/null +++ b/elpa/ggtags-20211020.354/ggtags-autoloads.el @@ -0,0 +1,64 @@ +;;; ggtags-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "ggtags" "ggtags.el" (0 0 0 0)) +;;; Generated autoloads from ggtags.el + +(autoload 'ggtags-find-project "ggtags" nil nil nil) + +(autoload 'ggtags-find-tag-dwim "ggtags" "\ +Find NAME by context. +If point is at a definition tag, find references, and vice versa. +If point is at a line that matches `ggtags-include-pattern', find +the include file instead. + +When called interactively with a prefix arg, always find +definition tags. + +\(fn NAME &optional WHAT)" t nil) + +(autoload 'ggtags-mode "ggtags" "\ +Toggle Ggtags mode on or off. + +This is a minor mode. If called interactively, toggle the +`Ggtags mode' mode. If the prefix argument is positive, enable +the mode, and if it is zero or negative, disable the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `ggtags-mode'. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + +\\{ggtags-mode-map} + +\(fn &optional ARG)" t nil) + +(autoload 'ggtags-build-imenu-index "ggtags" "\ +A function suitable for `imenu-create-index-function'." nil nil) + +(autoload 'ggtags-try-complete-tag "ggtags" "\ +A function suitable for `hippie-expand-try-functions-list'. + +\(fn OLD)" nil nil) + +(register-definition-prefixes "ggtags" '("ggtags-")) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; ggtags-autoloads.el ends here diff --git a/elpa/ggtags-20211020.354/ggtags-pkg.el b/elpa/ggtags-20211020.354/ggtags-pkg.el new file mode 100644 index 00000000..61c4f00f --- /dev/null +++ b/elpa/ggtags-20211020.354/ggtags-pkg.el @@ -0,0 +1,2 @@ +;;; Generated package description from ggtags.el -*- no-byte-compile: t -*- +(define-package "ggtags" "20211020.354" "emacs frontend to GNU Global source code tagging system" '((emacs "25")) :commit "8e16861392d7499bf3a212db1f5e9e0ef2e4fba9" :authors '(("Leo Liu" . "sdl.web@gmail.com")) :maintainer '("Leo Liu" . "sdl.web@gmail.com") :keywords '("tools" "convenience") :url "https://github.com/leoliu/ggtags") diff --git a/elpa/ggtags-20190320.2208/ggtags.el b/elpa/ggtags-20211020.354/ggtags.el similarity index 99% rename from elpa/ggtags-20190320.2208/ggtags.el rename to elpa/ggtags-20211020.354/ggtags.el index bc476af1..4027785b 100644 --- a/elpa/ggtags-20190320.2208/ggtags.el +++ b/elpa/ggtags-20211020.354/ggtags.el @@ -4,7 +4,8 @@ ;; Author: Leo Liu ;; Version: 0.9.0 -;; Package-Version: 20190320.2208 +;; Package-Version: 20211020.354 +;; Package-Commit: 8e16861392d7499bf3a212db1f5e9e0ef2e4fba9 ;; Keywords: tools, convenience ;; Created: 2013-01-29 ;; URL: https://github.com/leoliu/ggtags @@ -2370,12 +2371,24 @@ Function `ggtags-eldoc-function' disabled for eldoc in current buffer: %S" err)) (defconst ggtags--xref-limit 1000) -(defclass ggtags-xref-location (xref-file-location) - ((project-root :type string :initarg :project-root))) +(cl-defstruct (ggtags-xref-location + (:constructor ggtags-make-xref-location (file line column project-root))) + file line column project-root) (cl-defmethod xref-location-group ((l ggtags-xref-location)) - (with-slots (file project-root) l - (file-relative-name file project-root))) + (file-relative-name (ggtags-xref-location-file l) (ggtags-xref-location-project-root l))) + +(cl-defmethod xref-location-marker ((l ggtags-xref-location)) + (let ((buffer (find-file-noselect (ggtags-xref-location-file l)))) + (with-current-buffer buffer + (save-excursion + (goto-char (point-min)) + (forward-line (1- (ggtags-xref-location-line l))) + (move-to-column (1- (ggtags-xref-location-column l))) + (point-marker))))) + +(cl-defmethod xref-location-line ((l ggtags-xref-location)) + (ggtags-xref-location-line l)) (defun ggtags--xref-backend () (and (ggtags-find-project) @@ -2416,12 +2429,11 @@ properties in the summary text of each xref." and when column collect (xref-make summary - (make-instance - 'ggtags-xref-location - :file file - :line line - :column column - :project-root root)))) + (ggtags-make-xref-location + file + line + column + root)))) (defun ggtags--xref-find-tags (tag cmd) "Find xrefs of TAG using Global CMD. -- 2.47.3