2021-03-12 16:32:42 +00:00
|
|
|
;;; cedet-idutils.el --- ID Utils support for CEDET. -*- lexical-binding: t; -*-
|
2009-09-28 01:28:41 +00:00
|
|
|
|
2022-01-01 07:45:51 +00:00
|
|
|
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
|
2009-09-28 01:28:41 +00:00
|
|
|
|
2019-05-26 07:58:28 +00:00
|
|
|
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
* lisp/emacs-lisp/package.el: Include obsolete packages from archives.
Use lexical-binding.
(package-archive-contents): Change format; include obsolete packages.
(package-desc): Use `dir' to mark builtin packages.
(package--from-builtin): Set the `dir' field to `builtin'.
(generated-autoload-file, version-control): Declare.
(package-compute-transaction): Change first arg and return value to be
lists of package-descs. Adjust to new package-archive-contents format.
(package--add-to-archive-contents): Adjust to new
package-archive-contents format.
(package-download-transaction): Arg is now a list of package-descs.
(package-install): If `pkg' is a package name, pass it as
a requirement, so it is subject to the usual (e.g. disabled) checks.
(describe-package): Accept package-desc as well.
(describe-package-1): Describe a specific package-desc. Add links to
other package-descs for the same package name.
(package-menu-describe-package): Pass the actual package-desc.
(package-menu-mode): Add to tabulated-list-revert-hook so revert-buffer
works correctly.
(package-desc-status): New function.
(package-menu--refresh): New function, extracted
from package-menu--generate.
(package-menu--generate): Use it.
(package-delete): Update package-alist.
(package-menu-execute): Don't call package-initialize.
* lisp/progmodes/idlw-toolbar.el, lisp/progmodes/idlw-shell.el,
lisp/progmodes/idlw-help.el, lisp/progmodes/idlw-complete-structtag.el,
lisp/progmodes/ebnf-yac.el, lisp/progmodes/ebnf-otz.el,
lisp/progmodes/ebnf-iso.el, lisp/progmodes/ebnf-ebx.el,
lisp/progmodes/ebnf-dtd.el, lisp/progmodes/ebnf-bnf.el,
lisp/progmodes/ebnf-abn.el, lisp/emacs-lisp/package-x.el,
lisp/emacs-lisp/cl-seq.el, lisp/emacs-lisp/cl-macs.el
lisp/cedet/data-debug.el, lisp/cedet/cedet-idutils.el:
Neuter the "Version:" header.
2013-06-25 16:13:49 +00:00
|
|
|
;; Old-Version: 0.2
|
2009-09-28 01:28:41 +00:00
|
|
|
;; Keywords: OO, lisp
|
2010-08-29 16:17:13 +00:00
|
|
|
;; Package: cedet
|
2009-09-28 01:28:41 +00:00
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 22:52:52 +00:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2009-09-28 01:28:41 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;
|
|
|
|
;; Basic support calling ID Utils functions, and checking version
|
|
|
|
;; numbers.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(defvar cedet-idutils-min-version "4.0"
|
|
|
|
"Minimum version of ID Utils required.")
|
|
|
|
|
|
|
|
(defcustom cedet-idutils-file-command "fnid"
|
|
|
|
"Command name for the ID Utils executable for searching file names."
|
|
|
|
:type 'string
|
|
|
|
:group 'cedet)
|
|
|
|
|
|
|
|
(defcustom cedet-idutils-token-command "lid"
|
|
|
|
"Command name for the ID Utils executable for searching for tokens."
|
|
|
|
:type 'string
|
|
|
|
:group 'cedet)
|
|
|
|
|
Synch EDE to CEDET 1.0.
* cedet-idutils.el (cedet-idutils-make-command): New option.
(cedet-idutils-mkid-call):
(cedet-idutils-create/update-database): New functions.
* cedet-cscope.el (cedet-cscope-create):
(cedet-cscope-create/update-database): New functions.
(cedet-cscope-support-for-directory): Make interactive.
* cedet-global.el (cedet-global-gtags-command): New option.
(cedet-gnu-global-gtags-call)
(cedet-gnu-global-create/update-database): New functions.
* ede.el (ede-save-cache): Fix recentf-exclude expression.
(ede-make-dist): Always use toplevel project.
(ede-buffer-object): If we fail to find an object in the current
project, loop upward looking for a match. If no target is found,
use most local project.
(ede-buffer-belongs-to-target-p)
(ede-buffer-belongs-to-project-p): New functions.
(ede-initialize-state-current-buffer): New function.
(ede-target-forms-menu, ede-project-buffers): Use them.
(ede-minor-mode, ede-reset-all-buffers): Use it.
(project-interactive-select-target, project-add-file): Don't use
ede-project-force-load.
(ede-buffer-object): New arg PROJSYM.
(ede-minor-mode): Remove ede-directory-project-p test.
(ede-initialize-state-current-buffer): Don't test for
ede-directory-project-p if there is a matching open project.
(ede-customize-forms-menu): Prevent error if there is no project.
(ede-load-project-file): Set ede-constructing to the thing being
constructed, instead of t.
(ede-project-force-load): Deleted.
* ede/base.el:
* ede/auto.el:
* ede/custom.el: New files.
* ede/autoconf-edit.el (autoconf-find-last-macro)
(autoconf-parameters-for-macro): Parse multiline parameters of
macros. Optionally ignore case and at bol for macro.
(autoconf-parameter-strip): Use greedy match for newlines.
(autoconf-new-automake-string): Deleted.
(autoconf-new-program): Use SRecode to fill an empty file.
* ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New
function.
* ede/files.el (ede-flush-project-hash): New command.
(ede-convert-path): Add optional PROJECT arg.
(ede-directory-project-p): Obey ".ede-ignore".
(ede-expand-filename-local)
(ede-expand-filename-impl-via-subproj): New methods.
(ede-expand-filename-impl): Use them.
(ede-project-root, ede-project-root-directory): Move to
ede/auto.el.
* ede/locate.el (ede-locate-flush-hash):
(ede-locate-create/update-root-database): New methods.
(initialize-instance): Use ede-locate-flush-hash.
* ede/pmake.el (ede-proj-makefile-insert-variables): If this is
the top project and not a metasubproject, set TOP to CURDIR.
(ede-proj-makefile-insert-variables): Output a target's object
list whether or not the vars are already in the Makefile.
(ede-pmake-insert-variable-once): New macro.
* ede/project-am.el (project-am-with-makefile-current): Add
recentf-exclude.
(project-am-load-makefile): Obey an optional suggested name.
(project-am-expand-subdirlist): New function.
(project-am-makefile::project-rescan): Use it. Combine SUBDIRS
and DIST_SUBDIRS.
(project-am-meta-type-alist): A list to scan better Makefile.am
(project-am-scan-for-targets): Scan also over
project-am-meta-type-alist.
(ede-system-include-path): Simple implementation.
(ede-find-target): Deleted. EDE core takes care of this.
(ede-buffer-mine): Create the searched filename as relative.
(project-am-load): Simplify, using autoconf-edit.
(project-am-extract-package-info): Fix separators.
* ede/proj.el (project-run-target): New method.
(project-make-dist, project-compile-project): Use
ede-proj-automake-p to determine which kind of compile to use.
(project-rescan): Call ede-load-project-file.
(ede-buffer-mine): Add more file names that belong to the project.
(ede-proj-compilers): Improve error message.
* ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable.
(ede-source-c++): Add more C++ extensions.
(ede-proj-target-makefile-objectcode): Quote initforms. Support
lex and yacc.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
(ede-proj-makefile-insert-variables): New, add LDDEPS.
(ede-proj-makefile-insert-automake-post-variables): Add LDADD
variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
(ede-proj-target-makefile-program): Swap order of two slots so
they show up in the same order as in the command line.
(ede-proj-target-makefile-program): Add ldlibs-local slot.
* ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix
inference rule to use cpp files.
(ede-proj-target-makefile-shared-object): Quote initforms.
* ede/proj-misc.el (ede-proj-target-makefile-miscelaneous):
* ede/proj-info.el (ede-proj-target-makefile-info):
* ede/proj-aux.el (ede-proj-target-aux):
* ede/proj-archive.el (ede-proj-target-makefile-archive):
* ede/proj-elisp.el (ede-proj-target-elisp)
(ede-proj-target-elisp-autoloads): Quote initforms.
* ede/srecode.el (ede-srecode-setup): Load autoconf templates.
* ede/shell.el (ede-shell-buffer): Fix buffer name.
* ede/pconf.el (ede-proj-configure-synchronize): If user events
occur while waiting for the compile process to finish, pull them
in and discard those events.
2010-09-21 02:42:53 +00:00
|
|
|
(defcustom cedet-idutils-make-command "mkid"
|
|
|
|
"Command name for the ID Utils executable for creating token databases."
|
|
|
|
:type 'string
|
|
|
|
:group 'cedet)
|
|
|
|
|
2021-03-12 16:32:42 +00:00
|
|
|
(defun cedet-idutils-search (searchtext texttype type _scope)
|
2009-10-01 02:39:07 +00:00
|
|
|
"Perform a search with ID Utils, return the created buffer.
|
2009-09-28 01:28:41 +00:00
|
|
|
SEARCHTEXT is text to find.
|
2019-11-11 18:30:13 +00:00
|
|
|
TEXTTYPE is the type of text, such as `regexp', `string', `tagname',
|
|
|
|
`tagregexp', or `tagcompletions'.
|
2009-09-28 01:28:41 +00:00
|
|
|
TYPE is the type of search, meaning that SEARCHTEXT is compared to
|
|
|
|
filename, tagname (tags table), references (uses of a tag) , or
|
|
|
|
symbol (uses of something not in the tag table.)
|
2019-11-11 18:30:13 +00:00
|
|
|
SCOPE is the scope of the search, such as `project' or `subdirs'.
|
2009-09-28 01:28:41 +00:00
|
|
|
Note: Scope is not yet supported."
|
|
|
|
(if (eq type 'file)
|
|
|
|
;; Calls for file stuff is very simple.
|
|
|
|
(cedet-idutils-fnid-call (list searchtext))
|
|
|
|
;; Calls for text searches is more complex.
|
|
|
|
(let* ((resultflg (if (eq texttype 'tagcompletions)
|
|
|
|
(list "--key=token")
|
|
|
|
(list "--result=grep")))
|
2021-03-12 16:32:42 +00:00
|
|
|
;; (scopeflgs (cond ((eq scope 'project) "" ) ((eq scope 'target) "l")))
|
2009-09-28 01:28:41 +00:00
|
|
|
(stflag (cond ((or (eq texttype 'tagname)
|
|
|
|
(eq texttype 'tagregexp))
|
|
|
|
(list "-r" "-w"))
|
|
|
|
((eq texttype 'tagcompletions)
|
|
|
|
;; Add regex to search text for beginning of char.
|
|
|
|
(setq searchtext (concat "^" searchtext))
|
|
|
|
(list "-r" "-s" ))
|
|
|
|
((eq texttype 'regexp)
|
|
|
|
(list "-r"))
|
|
|
|
;; t means 'symbol
|
|
|
|
(t (list "-l" "-w"))))
|
|
|
|
)
|
2021-03-12 16:32:42 +00:00
|
|
|
(cedet-idutils-lid-call (append resultflg nil stflag ;; scopeflgs
|
2009-09-28 01:28:41 +00:00
|
|
|
(list searchtext))))))
|
|
|
|
|
|
|
|
(defun cedet-idutils-fnid-call (flags)
|
|
|
|
"Call ID Utils fnid with the list of FLAGS.
|
2011-11-20 03:48:53 +00:00
|
|
|
Return the created buffer with program output."
|
2009-09-28 01:28:41 +00:00
|
|
|
(let ((b (get-buffer-create "*CEDET fnid*"))
|
|
|
|
(cd default-directory)
|
|
|
|
)
|
* cedet/srecode/srt-mode.el (semantic-analyze-possible-completions):
* cedet/semantic/symref/list.el (semantic-symref-rb-toggle-expand-tag):
* cedet/semantic/symref/grep.el (semantic-symref-perform-search):
* cedet/semantic/bovine/gcc.el (semantic-gcc-query):
* cedet/semantic/bovine/c.el (semantic-c-parse-lexical-token):
* cedet/semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons)
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype)
(semantic-analyzer-debug-insert-include-summary):
* cedet/semantic/util.el (semantic-file-tag-table):
(semantic-describe-buffer-var-helper, semantic-something-to-tag-table)
(semantic-recursive-find-nonterminal-by-name):
* cedet/semantic/tag-ls.el (semantic-tag-calculate-parent-default):
* cedet/semantic/tag-file.el (semantic-prototype-file):
* cedet/semantic/symref.el (semantic-symref-parse-tool-output):
* cedet/semantic/sb.el (semantic-sb-fetch-tag-table):
* cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
* cedet/semantic/idle.el (semantic-idle-work-for-one-buffer):
(semantic-idle-summary-maybe-highlight):
* cedet/semantic/ia-sb.el (semantic-ia-speedbar)
(semantic-ia-sb-tag-info):
* cedet/semantic/grammar.el (semantic-analyze-possible-completions):
* cedet/semantic/find.el (semantic-brute-find-tag-by-position):
* cedet/semantic/ede-grammar.el (project-compile-target):
(ede-proj-makefile-insert-variables):
* cedet/semantic/debug.el (semantic-debug-set-parser-location):
(semantic-debug-set-source-location, semantic-debug-interface-layout)
(semantic-debug-mode, semantic-debug):
* cedet/semantic/db.el (semanticdb-needs-refresh-p):
* cedet/semantic/db-typecache.el (semanticdb-typecache-refresh-for-buffer):
* cedet/semantic/db-javascript.el (semanticdb-equivalent-mode):
* cedet/semantic/db-find.el (semanticdb-find-log-new-search)
(semanticdb-find-translate-path-includes--internal)
(semanticdb-reset-log, semanticdb-find-log-activity):
* cedet/semantic/db-file.el (object-write):
* cedet/semantic/db-el.el (semanticdb-equivalent-mode):
* cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-C-file-p)
(semanticdb-create-ebrowse-database):
* cedet/semantic/db-debug.el (semanticdb-table-sanity-check):
* cedet/semantic/complete.el (semantic-displayor-focus-request)
(semantic-collector-calculate-completions-raw)
(semantic-complete-read-tag-analyzer):
* cedet/semantic/analyze.el (semantic-analyze-pulse):
* cedet/ede/util.el (ede-update-version-in-source):
* cedet/ede/proj.el (project-delete-target):
* cedet/ede/proj-elisp.el (ede-update-version-in-source)
(ede-proj-flush-autoconf):
* cedet/ede/pconf.el (ede-proj-configure-synchronize)
(ede-proj-configure-synchronize):
* cedet/ede/locate.el (ede-locate-file-in-project-impl):
* cedet/ede/linux.el (ede-linux-version):
* cedet/ede/emacs.el (ede-emacs-version):
* cedet/ede/dired.el (ede-dired-add-to-target):
* cedet/ede.el (ede-buffer-header-file, ede-find-target)
(ede-buffer-documentation-files, ede-project-buffers, ede-set)
(ede-target-buffers, ede-buffers, ede-make-project-local-variable):
* cedet/cedet-idutils.el (cedet-idutils-fnid-call):
(cedet-idutils-lid-call, cedet-idutils-expand-filename)
(cedet-idutils-version-check):
* cedet/cedet-global.el (cedet-gnu-global-call):
(cedet-gnu-global-expand-filename, cedet-gnu-global-root)
(cedet-gnu-global-version-check, cedet-gnu-global-scan-hits):
* cedet/cedet-cscope.el (cedet-cscope-call)
(cedet-cscope-expand-filename, cedet-cscope-version-check):
Use with-current-buffer.
* cedet/ede.el (ede-make-project-local-variable)
(ede-set-project-variables, ede-set): Use dolist.
2009-10-30 02:16:41 +00:00
|
|
|
(with-current-buffer b
|
2009-09-28 01:28:41 +00:00
|
|
|
(setq default-directory cd)
|
|
|
|
(erase-buffer))
|
2021-03-12 16:32:42 +00:00
|
|
|
(apply #'call-process cedet-idutils-file-command
|
2009-09-28 01:28:41 +00:00
|
|
|
nil b nil
|
|
|
|
flags)
|
|
|
|
b))
|
|
|
|
|
|
|
|
(defun cedet-idutils-lid-call (flags)
|
|
|
|
"Call ID Utils lid with the list of FLAGS.
|
2017-10-10 05:53:19 +00:00
|
|
|
Return the created buffer with program output."
|
2009-09-28 01:28:41 +00:00
|
|
|
(let ((b (get-buffer-create "*CEDET lid*"))
|
|
|
|
(cd default-directory)
|
|
|
|
)
|
* cedet/srecode/srt-mode.el (semantic-analyze-possible-completions):
* cedet/semantic/symref/list.el (semantic-symref-rb-toggle-expand-tag):
* cedet/semantic/symref/grep.el (semantic-symref-perform-search):
* cedet/semantic/bovine/gcc.el (semantic-gcc-query):
* cedet/semantic/bovine/c.el (semantic-c-parse-lexical-token):
* cedet/semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons)
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype)
(semantic-analyzer-debug-insert-include-summary):
* cedet/semantic/util.el (semantic-file-tag-table):
(semantic-describe-buffer-var-helper, semantic-something-to-tag-table)
(semantic-recursive-find-nonterminal-by-name):
* cedet/semantic/tag-ls.el (semantic-tag-calculate-parent-default):
* cedet/semantic/tag-file.el (semantic-prototype-file):
* cedet/semantic/symref.el (semantic-symref-parse-tool-output):
* cedet/semantic/sb.el (semantic-sb-fetch-tag-table):
* cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
* cedet/semantic/idle.el (semantic-idle-work-for-one-buffer):
(semantic-idle-summary-maybe-highlight):
* cedet/semantic/ia-sb.el (semantic-ia-speedbar)
(semantic-ia-sb-tag-info):
* cedet/semantic/grammar.el (semantic-analyze-possible-completions):
* cedet/semantic/find.el (semantic-brute-find-tag-by-position):
* cedet/semantic/ede-grammar.el (project-compile-target):
(ede-proj-makefile-insert-variables):
* cedet/semantic/debug.el (semantic-debug-set-parser-location):
(semantic-debug-set-source-location, semantic-debug-interface-layout)
(semantic-debug-mode, semantic-debug):
* cedet/semantic/db.el (semanticdb-needs-refresh-p):
* cedet/semantic/db-typecache.el (semanticdb-typecache-refresh-for-buffer):
* cedet/semantic/db-javascript.el (semanticdb-equivalent-mode):
* cedet/semantic/db-find.el (semanticdb-find-log-new-search)
(semanticdb-find-translate-path-includes--internal)
(semanticdb-reset-log, semanticdb-find-log-activity):
* cedet/semantic/db-file.el (object-write):
* cedet/semantic/db-el.el (semanticdb-equivalent-mode):
* cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-C-file-p)
(semanticdb-create-ebrowse-database):
* cedet/semantic/db-debug.el (semanticdb-table-sanity-check):
* cedet/semantic/complete.el (semantic-displayor-focus-request)
(semantic-collector-calculate-completions-raw)
(semantic-complete-read-tag-analyzer):
* cedet/semantic/analyze.el (semantic-analyze-pulse):
* cedet/ede/util.el (ede-update-version-in-source):
* cedet/ede/proj.el (project-delete-target):
* cedet/ede/proj-elisp.el (ede-update-version-in-source)
(ede-proj-flush-autoconf):
* cedet/ede/pconf.el (ede-proj-configure-synchronize)
(ede-proj-configure-synchronize):
* cedet/ede/locate.el (ede-locate-file-in-project-impl):
* cedet/ede/linux.el (ede-linux-version):
* cedet/ede/emacs.el (ede-emacs-version):
* cedet/ede/dired.el (ede-dired-add-to-target):
* cedet/ede.el (ede-buffer-header-file, ede-find-target)
(ede-buffer-documentation-files, ede-project-buffers, ede-set)
(ede-target-buffers, ede-buffers, ede-make-project-local-variable):
* cedet/cedet-idutils.el (cedet-idutils-fnid-call):
(cedet-idutils-lid-call, cedet-idutils-expand-filename)
(cedet-idutils-version-check):
* cedet/cedet-global.el (cedet-gnu-global-call):
(cedet-gnu-global-expand-filename, cedet-gnu-global-root)
(cedet-gnu-global-version-check, cedet-gnu-global-scan-hits):
* cedet/cedet-cscope.el (cedet-cscope-call)
(cedet-cscope-expand-filename, cedet-cscope-version-check):
Use with-current-buffer.
* cedet/ede.el (ede-make-project-local-variable)
(ede-set-project-variables, ede-set): Use dolist.
2009-10-30 02:16:41 +00:00
|
|
|
(with-current-buffer b
|
2009-09-28 01:28:41 +00:00
|
|
|
(setq default-directory cd)
|
|
|
|
(erase-buffer))
|
2021-03-12 16:32:42 +00:00
|
|
|
(apply #'call-process cedet-idutils-token-command
|
2009-09-28 01:28:41 +00:00
|
|
|
nil b nil
|
|
|
|
flags)
|
|
|
|
b))
|
|
|
|
|
Synch EDE to CEDET 1.0.
* cedet-idutils.el (cedet-idutils-make-command): New option.
(cedet-idutils-mkid-call):
(cedet-idutils-create/update-database): New functions.
* cedet-cscope.el (cedet-cscope-create):
(cedet-cscope-create/update-database): New functions.
(cedet-cscope-support-for-directory): Make interactive.
* cedet-global.el (cedet-global-gtags-command): New option.
(cedet-gnu-global-gtags-call)
(cedet-gnu-global-create/update-database): New functions.
* ede.el (ede-save-cache): Fix recentf-exclude expression.
(ede-make-dist): Always use toplevel project.
(ede-buffer-object): If we fail to find an object in the current
project, loop upward looking for a match. If no target is found,
use most local project.
(ede-buffer-belongs-to-target-p)
(ede-buffer-belongs-to-project-p): New functions.
(ede-initialize-state-current-buffer): New function.
(ede-target-forms-menu, ede-project-buffers): Use them.
(ede-minor-mode, ede-reset-all-buffers): Use it.
(project-interactive-select-target, project-add-file): Don't use
ede-project-force-load.
(ede-buffer-object): New arg PROJSYM.
(ede-minor-mode): Remove ede-directory-project-p test.
(ede-initialize-state-current-buffer): Don't test for
ede-directory-project-p if there is a matching open project.
(ede-customize-forms-menu): Prevent error if there is no project.
(ede-load-project-file): Set ede-constructing to the thing being
constructed, instead of t.
(ede-project-force-load): Deleted.
* ede/base.el:
* ede/auto.el:
* ede/custom.el: New files.
* ede/autoconf-edit.el (autoconf-find-last-macro)
(autoconf-parameters-for-macro): Parse multiline parameters of
macros. Optionally ignore case and at bol for macro.
(autoconf-parameter-strip): Use greedy match for newlines.
(autoconf-new-automake-string): Deleted.
(autoconf-new-program): Use SRecode to fill an empty file.
* ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New
function.
* ede/files.el (ede-flush-project-hash): New command.
(ede-convert-path): Add optional PROJECT arg.
(ede-directory-project-p): Obey ".ede-ignore".
(ede-expand-filename-local)
(ede-expand-filename-impl-via-subproj): New methods.
(ede-expand-filename-impl): Use them.
(ede-project-root, ede-project-root-directory): Move to
ede/auto.el.
* ede/locate.el (ede-locate-flush-hash):
(ede-locate-create/update-root-database): New methods.
(initialize-instance): Use ede-locate-flush-hash.
* ede/pmake.el (ede-proj-makefile-insert-variables): If this is
the top project and not a metasubproject, set TOP to CURDIR.
(ede-proj-makefile-insert-variables): Output a target's object
list whether or not the vars are already in the Makefile.
(ede-pmake-insert-variable-once): New macro.
* ede/project-am.el (project-am-with-makefile-current): Add
recentf-exclude.
(project-am-load-makefile): Obey an optional suggested name.
(project-am-expand-subdirlist): New function.
(project-am-makefile::project-rescan): Use it. Combine SUBDIRS
and DIST_SUBDIRS.
(project-am-meta-type-alist): A list to scan better Makefile.am
(project-am-scan-for-targets): Scan also over
project-am-meta-type-alist.
(ede-system-include-path): Simple implementation.
(ede-find-target): Deleted. EDE core takes care of this.
(ede-buffer-mine): Create the searched filename as relative.
(project-am-load): Simplify, using autoconf-edit.
(project-am-extract-package-info): Fix separators.
* ede/proj.el (project-run-target): New method.
(project-make-dist, project-compile-project): Use
ede-proj-automake-p to determine which kind of compile to use.
(project-rescan): Call ede-load-project-file.
(ede-buffer-mine): Add more file names that belong to the project.
(ede-proj-compilers): Improve error message.
* ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable.
(ede-source-c++): Add more C++ extensions.
(ede-proj-target-makefile-objectcode): Quote initforms. Support
lex and yacc.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
(ede-proj-makefile-insert-variables): New, add LDDEPS.
(ede-proj-makefile-insert-automake-post-variables): Add LDADD
variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
(ede-proj-target-makefile-program): Swap order of two slots so
they show up in the same order as in the command line.
(ede-proj-target-makefile-program): Add ldlibs-local slot.
* ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix
inference rule to use cpp files.
(ede-proj-target-makefile-shared-object): Quote initforms.
* ede/proj-misc.el (ede-proj-target-makefile-miscelaneous):
* ede/proj-info.el (ede-proj-target-makefile-info):
* ede/proj-aux.el (ede-proj-target-aux):
* ede/proj-archive.el (ede-proj-target-makefile-archive):
* ede/proj-elisp.el (ede-proj-target-elisp)
(ede-proj-target-elisp-autoloads): Quote initforms.
* ede/srecode.el (ede-srecode-setup): Load autoconf templates.
* ede/shell.el (ede-shell-buffer): Fix buffer name.
* ede/pconf.el (ede-proj-configure-synchronize): If user events
occur while waiting for the compile process to finish, pull them
in and discard those events.
2010-09-21 02:42:53 +00:00
|
|
|
(defun cedet-idutils-mkid-call (flags)
|
|
|
|
"Call ID Utils mkid with the list of FLAGS.
|
2011-11-20 03:48:53 +00:00
|
|
|
Return the created buffer with program output."
|
Synch EDE to CEDET 1.0.
* cedet-idutils.el (cedet-idutils-make-command): New option.
(cedet-idutils-mkid-call):
(cedet-idutils-create/update-database): New functions.
* cedet-cscope.el (cedet-cscope-create):
(cedet-cscope-create/update-database): New functions.
(cedet-cscope-support-for-directory): Make interactive.
* cedet-global.el (cedet-global-gtags-command): New option.
(cedet-gnu-global-gtags-call)
(cedet-gnu-global-create/update-database): New functions.
* ede.el (ede-save-cache): Fix recentf-exclude expression.
(ede-make-dist): Always use toplevel project.
(ede-buffer-object): If we fail to find an object in the current
project, loop upward looking for a match. If no target is found,
use most local project.
(ede-buffer-belongs-to-target-p)
(ede-buffer-belongs-to-project-p): New functions.
(ede-initialize-state-current-buffer): New function.
(ede-target-forms-menu, ede-project-buffers): Use them.
(ede-minor-mode, ede-reset-all-buffers): Use it.
(project-interactive-select-target, project-add-file): Don't use
ede-project-force-load.
(ede-buffer-object): New arg PROJSYM.
(ede-minor-mode): Remove ede-directory-project-p test.
(ede-initialize-state-current-buffer): Don't test for
ede-directory-project-p if there is a matching open project.
(ede-customize-forms-menu): Prevent error if there is no project.
(ede-load-project-file): Set ede-constructing to the thing being
constructed, instead of t.
(ede-project-force-load): Deleted.
* ede/base.el:
* ede/auto.el:
* ede/custom.el: New files.
* ede/autoconf-edit.el (autoconf-find-last-macro)
(autoconf-parameters-for-macro): Parse multiline parameters of
macros. Optionally ignore case and at bol for macro.
(autoconf-parameter-strip): Use greedy match for newlines.
(autoconf-new-automake-string): Deleted.
(autoconf-new-program): Use SRecode to fill an empty file.
* ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New
function.
* ede/files.el (ede-flush-project-hash): New command.
(ede-convert-path): Add optional PROJECT arg.
(ede-directory-project-p): Obey ".ede-ignore".
(ede-expand-filename-local)
(ede-expand-filename-impl-via-subproj): New methods.
(ede-expand-filename-impl): Use them.
(ede-project-root, ede-project-root-directory): Move to
ede/auto.el.
* ede/locate.el (ede-locate-flush-hash):
(ede-locate-create/update-root-database): New methods.
(initialize-instance): Use ede-locate-flush-hash.
* ede/pmake.el (ede-proj-makefile-insert-variables): If this is
the top project and not a metasubproject, set TOP to CURDIR.
(ede-proj-makefile-insert-variables): Output a target's object
list whether or not the vars are already in the Makefile.
(ede-pmake-insert-variable-once): New macro.
* ede/project-am.el (project-am-with-makefile-current): Add
recentf-exclude.
(project-am-load-makefile): Obey an optional suggested name.
(project-am-expand-subdirlist): New function.
(project-am-makefile::project-rescan): Use it. Combine SUBDIRS
and DIST_SUBDIRS.
(project-am-meta-type-alist): A list to scan better Makefile.am
(project-am-scan-for-targets): Scan also over
project-am-meta-type-alist.
(ede-system-include-path): Simple implementation.
(ede-find-target): Deleted. EDE core takes care of this.
(ede-buffer-mine): Create the searched filename as relative.
(project-am-load): Simplify, using autoconf-edit.
(project-am-extract-package-info): Fix separators.
* ede/proj.el (project-run-target): New method.
(project-make-dist, project-compile-project): Use
ede-proj-automake-p to determine which kind of compile to use.
(project-rescan): Call ede-load-project-file.
(ede-buffer-mine): Add more file names that belong to the project.
(ede-proj-compilers): Improve error message.
* ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable.
(ede-source-c++): Add more C++ extensions.
(ede-proj-target-makefile-objectcode): Quote initforms. Support
lex and yacc.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
(ede-proj-makefile-insert-variables): New, add LDDEPS.
(ede-proj-makefile-insert-automake-post-variables): Add LDADD
variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
(ede-proj-target-makefile-program): Swap order of two slots so
they show up in the same order as in the command line.
(ede-proj-target-makefile-program): Add ldlibs-local slot.
* ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix
inference rule to use cpp files.
(ede-proj-target-makefile-shared-object): Quote initforms.
* ede/proj-misc.el (ede-proj-target-makefile-miscelaneous):
* ede/proj-info.el (ede-proj-target-makefile-info):
* ede/proj-aux.el (ede-proj-target-aux):
* ede/proj-archive.el (ede-proj-target-makefile-archive):
* ede/proj-elisp.el (ede-proj-target-elisp)
(ede-proj-target-elisp-autoloads): Quote initforms.
* ede/srecode.el (ede-srecode-setup): Load autoconf templates.
* ede/shell.el (ede-shell-buffer): Fix buffer name.
* ede/pconf.el (ede-proj-configure-synchronize): If user events
occur while waiting for the compile process to finish, pull them
in and discard those events.
2010-09-21 02:42:53 +00:00
|
|
|
(let ((b (get-buffer-create "*CEDET mkid*"))
|
|
|
|
(cd default-directory)
|
|
|
|
)
|
|
|
|
(with-current-buffer b
|
|
|
|
(setq default-directory cd)
|
|
|
|
(erase-buffer))
|
2021-03-12 16:32:42 +00:00
|
|
|
(apply #'call-process cedet-idutils-make-command
|
Synch EDE to CEDET 1.0.
* cedet-idutils.el (cedet-idutils-make-command): New option.
(cedet-idutils-mkid-call):
(cedet-idutils-create/update-database): New functions.
* cedet-cscope.el (cedet-cscope-create):
(cedet-cscope-create/update-database): New functions.
(cedet-cscope-support-for-directory): Make interactive.
* cedet-global.el (cedet-global-gtags-command): New option.
(cedet-gnu-global-gtags-call)
(cedet-gnu-global-create/update-database): New functions.
* ede.el (ede-save-cache): Fix recentf-exclude expression.
(ede-make-dist): Always use toplevel project.
(ede-buffer-object): If we fail to find an object in the current
project, loop upward looking for a match. If no target is found,
use most local project.
(ede-buffer-belongs-to-target-p)
(ede-buffer-belongs-to-project-p): New functions.
(ede-initialize-state-current-buffer): New function.
(ede-target-forms-menu, ede-project-buffers): Use them.
(ede-minor-mode, ede-reset-all-buffers): Use it.
(project-interactive-select-target, project-add-file): Don't use
ede-project-force-load.
(ede-buffer-object): New arg PROJSYM.
(ede-minor-mode): Remove ede-directory-project-p test.
(ede-initialize-state-current-buffer): Don't test for
ede-directory-project-p if there is a matching open project.
(ede-customize-forms-menu): Prevent error if there is no project.
(ede-load-project-file): Set ede-constructing to the thing being
constructed, instead of t.
(ede-project-force-load): Deleted.
* ede/base.el:
* ede/auto.el:
* ede/custom.el: New files.
* ede/autoconf-edit.el (autoconf-find-last-macro)
(autoconf-parameters-for-macro): Parse multiline parameters of
macros. Optionally ignore case and at bol for macro.
(autoconf-parameter-strip): Use greedy match for newlines.
(autoconf-new-automake-string): Deleted.
(autoconf-new-program): Use SRecode to fill an empty file.
* ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New
function.
* ede/files.el (ede-flush-project-hash): New command.
(ede-convert-path): Add optional PROJECT arg.
(ede-directory-project-p): Obey ".ede-ignore".
(ede-expand-filename-local)
(ede-expand-filename-impl-via-subproj): New methods.
(ede-expand-filename-impl): Use them.
(ede-project-root, ede-project-root-directory): Move to
ede/auto.el.
* ede/locate.el (ede-locate-flush-hash):
(ede-locate-create/update-root-database): New methods.
(initialize-instance): Use ede-locate-flush-hash.
* ede/pmake.el (ede-proj-makefile-insert-variables): If this is
the top project and not a metasubproject, set TOP to CURDIR.
(ede-proj-makefile-insert-variables): Output a target's object
list whether or not the vars are already in the Makefile.
(ede-pmake-insert-variable-once): New macro.
* ede/project-am.el (project-am-with-makefile-current): Add
recentf-exclude.
(project-am-load-makefile): Obey an optional suggested name.
(project-am-expand-subdirlist): New function.
(project-am-makefile::project-rescan): Use it. Combine SUBDIRS
and DIST_SUBDIRS.
(project-am-meta-type-alist): A list to scan better Makefile.am
(project-am-scan-for-targets): Scan also over
project-am-meta-type-alist.
(ede-system-include-path): Simple implementation.
(ede-find-target): Deleted. EDE core takes care of this.
(ede-buffer-mine): Create the searched filename as relative.
(project-am-load): Simplify, using autoconf-edit.
(project-am-extract-package-info): Fix separators.
* ede/proj.el (project-run-target): New method.
(project-make-dist, project-compile-project): Use
ede-proj-automake-p to determine which kind of compile to use.
(project-rescan): Call ede-load-project-file.
(ede-buffer-mine): Add more file names that belong to the project.
(ede-proj-compilers): Improve error message.
* ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable.
(ede-source-c++): Add more C++ extensions.
(ede-proj-target-makefile-objectcode): Quote initforms. Support
lex and yacc.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
(ede-proj-makefile-insert-variables): New, add LDDEPS.
(ede-proj-makefile-insert-automake-post-variables): Add LDADD
variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
(ede-proj-target-makefile-program): Swap order of two slots so
they show up in the same order as in the command line.
(ede-proj-target-makefile-program): Add ldlibs-local slot.
* ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix
inference rule to use cpp files.
(ede-proj-target-makefile-shared-object): Quote initforms.
* ede/proj-misc.el (ede-proj-target-makefile-miscelaneous):
* ede/proj-info.el (ede-proj-target-makefile-info):
* ede/proj-aux.el (ede-proj-target-aux):
* ede/proj-archive.el (ede-proj-target-makefile-archive):
* ede/proj-elisp.el (ede-proj-target-elisp)
(ede-proj-target-elisp-autoloads): Quote initforms.
* ede/srecode.el (ede-srecode-setup): Load autoconf templates.
* ede/shell.el (ede-shell-buffer): Fix buffer name.
* ede/pconf.el (ede-proj-configure-synchronize): If user events
occur while waiting for the compile process to finish, pull them
in and discard those events.
2010-09-21 02:42:53 +00:00
|
|
|
nil b nil
|
|
|
|
flags)
|
|
|
|
b))
|
|
|
|
|
2009-09-28 01:28:41 +00:00
|
|
|
;;; UTIL CALLS
|
|
|
|
;;
|
|
|
|
(defun cedet-idutils-expand-filename (filename)
|
2009-10-01 02:39:07 +00:00
|
|
|
"Expand the FILENAME with ID Utils.
|
2009-09-28 01:28:41 +00:00
|
|
|
Return a filename relative to the default directory."
|
|
|
|
(interactive "sFile: ")
|
* cedet/srecode/srt-mode.el (semantic-analyze-possible-completions):
* cedet/semantic/symref/list.el (semantic-symref-rb-toggle-expand-tag):
* cedet/semantic/symref/grep.el (semantic-symref-perform-search):
* cedet/semantic/bovine/gcc.el (semantic-gcc-query):
* cedet/semantic/bovine/c.el (semantic-c-parse-lexical-token):
* cedet/semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons)
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype)
(semantic-analyzer-debug-insert-include-summary):
* cedet/semantic/util.el (semantic-file-tag-table):
(semantic-describe-buffer-var-helper, semantic-something-to-tag-table)
(semantic-recursive-find-nonterminal-by-name):
* cedet/semantic/tag-ls.el (semantic-tag-calculate-parent-default):
* cedet/semantic/tag-file.el (semantic-prototype-file):
* cedet/semantic/symref.el (semantic-symref-parse-tool-output):
* cedet/semantic/sb.el (semantic-sb-fetch-tag-table):
* cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
* cedet/semantic/idle.el (semantic-idle-work-for-one-buffer):
(semantic-idle-summary-maybe-highlight):
* cedet/semantic/ia-sb.el (semantic-ia-speedbar)
(semantic-ia-sb-tag-info):
* cedet/semantic/grammar.el (semantic-analyze-possible-completions):
* cedet/semantic/find.el (semantic-brute-find-tag-by-position):
* cedet/semantic/ede-grammar.el (project-compile-target):
(ede-proj-makefile-insert-variables):
* cedet/semantic/debug.el (semantic-debug-set-parser-location):
(semantic-debug-set-source-location, semantic-debug-interface-layout)
(semantic-debug-mode, semantic-debug):
* cedet/semantic/db.el (semanticdb-needs-refresh-p):
* cedet/semantic/db-typecache.el (semanticdb-typecache-refresh-for-buffer):
* cedet/semantic/db-javascript.el (semanticdb-equivalent-mode):
* cedet/semantic/db-find.el (semanticdb-find-log-new-search)
(semanticdb-find-translate-path-includes--internal)
(semanticdb-reset-log, semanticdb-find-log-activity):
* cedet/semantic/db-file.el (object-write):
* cedet/semantic/db-el.el (semanticdb-equivalent-mode):
* cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-C-file-p)
(semanticdb-create-ebrowse-database):
* cedet/semantic/db-debug.el (semanticdb-table-sanity-check):
* cedet/semantic/complete.el (semantic-displayor-focus-request)
(semantic-collector-calculate-completions-raw)
(semantic-complete-read-tag-analyzer):
* cedet/semantic/analyze.el (semantic-analyze-pulse):
* cedet/ede/util.el (ede-update-version-in-source):
* cedet/ede/proj.el (project-delete-target):
* cedet/ede/proj-elisp.el (ede-update-version-in-source)
(ede-proj-flush-autoconf):
* cedet/ede/pconf.el (ede-proj-configure-synchronize)
(ede-proj-configure-synchronize):
* cedet/ede/locate.el (ede-locate-file-in-project-impl):
* cedet/ede/linux.el (ede-linux-version):
* cedet/ede/emacs.el (ede-emacs-version):
* cedet/ede/dired.el (ede-dired-add-to-target):
* cedet/ede.el (ede-buffer-header-file, ede-find-target)
(ede-buffer-documentation-files, ede-project-buffers, ede-set)
(ede-target-buffers, ede-buffers, ede-make-project-local-variable):
* cedet/cedet-idutils.el (cedet-idutils-fnid-call):
(cedet-idutils-lid-call, cedet-idutils-expand-filename)
(cedet-idutils-version-check):
* cedet/cedet-global.el (cedet-gnu-global-call):
(cedet-gnu-global-expand-filename, cedet-gnu-global-root)
(cedet-gnu-global-version-check, cedet-gnu-global-scan-hits):
* cedet/cedet-cscope.el (cedet-cscope-call)
(cedet-cscope-expand-filename, cedet-cscope-version-check):
Use with-current-buffer.
* cedet/ede.el (ede-make-project-local-variable)
(ede-set-project-variables, ede-set): Use dolist.
2009-10-30 02:16:41 +00:00
|
|
|
(let ((ans (with-current-buffer (cedet-idutils-fnid-call (list filename))
|
2009-09-28 01:28:41 +00:00
|
|
|
(goto-char (point-min))
|
|
|
|
(if (looking-at "[^ \n]*fnid: ")
|
|
|
|
(error "ID Utils not available")
|
|
|
|
(split-string (buffer-string) "\n" t)))))
|
2021-03-12 16:32:42 +00:00
|
|
|
(setq ans (mapcar #'expand-file-name ans))
|
2009-11-22 23:49:13 +00:00
|
|
|
(when (called-interactively-p 'interactive)
|
2009-09-28 01:28:41 +00:00
|
|
|
(if ans
|
|
|
|
(if (= (length ans) 1)
|
|
|
|
(message "%s" (car ans))
|
|
|
|
(message "%s + %d others" (car ans)
|
|
|
|
(length (cdr ans))))
|
|
|
|
(error "No file found")))
|
|
|
|
ans))
|
|
|
|
|
|
|
|
(defun cedet-idutils-support-for-directory (&optional dir)
|
2009-10-01 02:39:07 +00:00
|
|
|
"Return non-nil if ID Utils has a support file for DIR.
|
2009-09-28 01:28:41 +00:00
|
|
|
If DIR is not supplied, use the current default directory.
|
|
|
|
This works by running lid on a bogus symbol, and looking for
|
|
|
|
the error code."
|
|
|
|
(save-excursion
|
|
|
|
(let ((default-directory (or dir default-directory)))
|
|
|
|
(condition-case nil
|
|
|
|
(progn
|
|
|
|
(set-buffer (cedet-idutils-fnid-call '("moose")))
|
|
|
|
(goto-char (point-min))
|
|
|
|
(if (looking-at "[^ \n]*fnid: ")
|
|
|
|
nil
|
|
|
|
t))
|
|
|
|
(error nil)))))
|
|
|
|
|
|
|
|
(defun cedet-idutils-version-check (&optional noerror)
|
|
|
|
"Check the version of the installed ID Utils command.
|
2011-11-20 03:48:53 +00:00
|
|
|
If optional programmatic argument NOERROR is non-nil,
|
|
|
|
then instead of throwing an error if Global isn't available,
|
2009-09-28 01:28:41 +00:00
|
|
|
return nil."
|
|
|
|
(interactive)
|
|
|
|
(let ((b (condition-case nil
|
|
|
|
(cedet-idutils-fnid-call (list "--version"))
|
|
|
|
(error nil)))
|
|
|
|
(rev nil))
|
|
|
|
(if (not b)
|
|
|
|
(progn
|
2009-11-22 23:49:13 +00:00
|
|
|
(when (called-interactively-p 'interactive)
|
2009-09-28 01:28:41 +00:00
|
|
|
(message "ID Utils not found."))
|
|
|
|
nil)
|
* cedet/srecode/srt-mode.el (semantic-analyze-possible-completions):
* cedet/semantic/symref/list.el (semantic-symref-rb-toggle-expand-tag):
* cedet/semantic/symref/grep.el (semantic-symref-perform-search):
* cedet/semantic/bovine/gcc.el (semantic-gcc-query):
* cedet/semantic/bovine/c.el (semantic-c-parse-lexical-token):
* cedet/semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons)
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype)
(semantic-analyzer-debug-insert-include-summary):
* cedet/semantic/util.el (semantic-file-tag-table):
(semantic-describe-buffer-var-helper, semantic-something-to-tag-table)
(semantic-recursive-find-nonterminal-by-name):
* cedet/semantic/tag-ls.el (semantic-tag-calculate-parent-default):
* cedet/semantic/tag-file.el (semantic-prototype-file):
* cedet/semantic/symref.el (semantic-symref-parse-tool-output):
* cedet/semantic/sb.el (semantic-sb-fetch-tag-table):
* cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
* cedet/semantic/idle.el (semantic-idle-work-for-one-buffer):
(semantic-idle-summary-maybe-highlight):
* cedet/semantic/ia-sb.el (semantic-ia-speedbar)
(semantic-ia-sb-tag-info):
* cedet/semantic/grammar.el (semantic-analyze-possible-completions):
* cedet/semantic/find.el (semantic-brute-find-tag-by-position):
* cedet/semantic/ede-grammar.el (project-compile-target):
(ede-proj-makefile-insert-variables):
* cedet/semantic/debug.el (semantic-debug-set-parser-location):
(semantic-debug-set-source-location, semantic-debug-interface-layout)
(semantic-debug-mode, semantic-debug):
* cedet/semantic/db.el (semanticdb-needs-refresh-p):
* cedet/semantic/db-typecache.el (semanticdb-typecache-refresh-for-buffer):
* cedet/semantic/db-javascript.el (semanticdb-equivalent-mode):
* cedet/semantic/db-find.el (semanticdb-find-log-new-search)
(semanticdb-find-translate-path-includes--internal)
(semanticdb-reset-log, semanticdb-find-log-activity):
* cedet/semantic/db-file.el (object-write):
* cedet/semantic/db-el.el (semanticdb-equivalent-mode):
* cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-C-file-p)
(semanticdb-create-ebrowse-database):
* cedet/semantic/db-debug.el (semanticdb-table-sanity-check):
* cedet/semantic/complete.el (semantic-displayor-focus-request)
(semantic-collector-calculate-completions-raw)
(semantic-complete-read-tag-analyzer):
* cedet/semantic/analyze.el (semantic-analyze-pulse):
* cedet/ede/util.el (ede-update-version-in-source):
* cedet/ede/proj.el (project-delete-target):
* cedet/ede/proj-elisp.el (ede-update-version-in-source)
(ede-proj-flush-autoconf):
* cedet/ede/pconf.el (ede-proj-configure-synchronize)
(ede-proj-configure-synchronize):
* cedet/ede/locate.el (ede-locate-file-in-project-impl):
* cedet/ede/linux.el (ede-linux-version):
* cedet/ede/emacs.el (ede-emacs-version):
* cedet/ede/dired.el (ede-dired-add-to-target):
* cedet/ede.el (ede-buffer-header-file, ede-find-target)
(ede-buffer-documentation-files, ede-project-buffers, ede-set)
(ede-target-buffers, ede-buffers, ede-make-project-local-variable):
* cedet/cedet-idutils.el (cedet-idutils-fnid-call):
(cedet-idutils-lid-call, cedet-idutils-expand-filename)
(cedet-idutils-version-check):
* cedet/cedet-global.el (cedet-gnu-global-call):
(cedet-gnu-global-expand-filename, cedet-gnu-global-root)
(cedet-gnu-global-version-check, cedet-gnu-global-scan-hits):
* cedet/cedet-cscope.el (cedet-cscope-call)
(cedet-cscope-expand-filename, cedet-cscope-version-check):
Use with-current-buffer.
* cedet/ede.el (ede-make-project-local-variable)
(ede-set-project-variables, ede-set): Use dolist.
2009-10-30 02:16:41 +00:00
|
|
|
(with-current-buffer b
|
2009-09-28 01:28:41 +00:00
|
|
|
(goto-char (point-min))
|
2012-10-01 18:10:29 +00:00
|
|
|
(if (re-search-forward "fnid - \\([0-9.]+\\)" nil t)
|
|
|
|
(setq rev (match-string 1))
|
|
|
|
(setq rev "0"))
|
2021-03-03 18:54:37 +00:00
|
|
|
(if (version< rev cedet-idutils-min-version)
|
2009-09-28 01:28:41 +00:00
|
|
|
(if noerror
|
|
|
|
nil
|
2009-10-01 02:39:07 +00:00
|
|
|
(error "Version of ID Utils is %s. Need at least %s"
|
2009-09-28 01:28:41 +00:00
|
|
|
rev cedet-idutils-min-version))
|
|
|
|
;; Else, return TRUE, as in good enough.
|
2009-11-22 23:49:13 +00:00
|
|
|
(when (called-interactively-p 'interactive)
|
2009-09-28 01:28:41 +00:00
|
|
|
(message "ID Utils %s - Good enough for CEDET." rev))
|
|
|
|
t)))))
|
|
|
|
|
Synch EDE to CEDET 1.0.
* cedet-idutils.el (cedet-idutils-make-command): New option.
(cedet-idutils-mkid-call):
(cedet-idutils-create/update-database): New functions.
* cedet-cscope.el (cedet-cscope-create):
(cedet-cscope-create/update-database): New functions.
(cedet-cscope-support-for-directory): Make interactive.
* cedet-global.el (cedet-global-gtags-command): New option.
(cedet-gnu-global-gtags-call)
(cedet-gnu-global-create/update-database): New functions.
* ede.el (ede-save-cache): Fix recentf-exclude expression.
(ede-make-dist): Always use toplevel project.
(ede-buffer-object): If we fail to find an object in the current
project, loop upward looking for a match. If no target is found,
use most local project.
(ede-buffer-belongs-to-target-p)
(ede-buffer-belongs-to-project-p): New functions.
(ede-initialize-state-current-buffer): New function.
(ede-target-forms-menu, ede-project-buffers): Use them.
(ede-minor-mode, ede-reset-all-buffers): Use it.
(project-interactive-select-target, project-add-file): Don't use
ede-project-force-load.
(ede-buffer-object): New arg PROJSYM.
(ede-minor-mode): Remove ede-directory-project-p test.
(ede-initialize-state-current-buffer): Don't test for
ede-directory-project-p if there is a matching open project.
(ede-customize-forms-menu): Prevent error if there is no project.
(ede-load-project-file): Set ede-constructing to the thing being
constructed, instead of t.
(ede-project-force-load): Deleted.
* ede/base.el:
* ede/auto.el:
* ede/custom.el: New files.
* ede/autoconf-edit.el (autoconf-find-last-macro)
(autoconf-parameters-for-macro): Parse multiline parameters of
macros. Optionally ignore case and at bol for macro.
(autoconf-parameter-strip): Use greedy match for newlines.
(autoconf-new-automake-string): Deleted.
(autoconf-new-program): Use SRecode to fill an empty file.
* ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New
function.
* ede/files.el (ede-flush-project-hash): New command.
(ede-convert-path): Add optional PROJECT arg.
(ede-directory-project-p): Obey ".ede-ignore".
(ede-expand-filename-local)
(ede-expand-filename-impl-via-subproj): New methods.
(ede-expand-filename-impl): Use them.
(ede-project-root, ede-project-root-directory): Move to
ede/auto.el.
* ede/locate.el (ede-locate-flush-hash):
(ede-locate-create/update-root-database): New methods.
(initialize-instance): Use ede-locate-flush-hash.
* ede/pmake.el (ede-proj-makefile-insert-variables): If this is
the top project and not a metasubproject, set TOP to CURDIR.
(ede-proj-makefile-insert-variables): Output a target's object
list whether or not the vars are already in the Makefile.
(ede-pmake-insert-variable-once): New macro.
* ede/project-am.el (project-am-with-makefile-current): Add
recentf-exclude.
(project-am-load-makefile): Obey an optional suggested name.
(project-am-expand-subdirlist): New function.
(project-am-makefile::project-rescan): Use it. Combine SUBDIRS
and DIST_SUBDIRS.
(project-am-meta-type-alist): A list to scan better Makefile.am
(project-am-scan-for-targets): Scan also over
project-am-meta-type-alist.
(ede-system-include-path): Simple implementation.
(ede-find-target): Deleted. EDE core takes care of this.
(ede-buffer-mine): Create the searched filename as relative.
(project-am-load): Simplify, using autoconf-edit.
(project-am-extract-package-info): Fix separators.
* ede/proj.el (project-run-target): New method.
(project-make-dist, project-compile-project): Use
ede-proj-automake-p to determine which kind of compile to use.
(project-rescan): Call ede-load-project-file.
(ede-buffer-mine): Add more file names that belong to the project.
(ede-proj-compilers): Improve error message.
* ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable.
(ede-source-c++): Add more C++ extensions.
(ede-proj-target-makefile-objectcode): Quote initforms. Support
lex and yacc.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
(ede-proj-makefile-insert-variables): New, add LDDEPS.
(ede-proj-makefile-insert-automake-post-variables): Add LDADD
variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
(ede-proj-target-makefile-program): Swap order of two slots so
they show up in the same order as in the command line.
(ede-proj-target-makefile-program): Add ldlibs-local slot.
* ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix
inference rule to use cpp files.
(ede-proj-target-makefile-shared-object): Quote initforms.
* ede/proj-misc.el (ede-proj-target-makefile-miscelaneous):
* ede/proj-info.el (ede-proj-target-makefile-info):
* ede/proj-aux.el (ede-proj-target-aux):
* ede/proj-archive.el (ede-proj-target-makefile-archive):
* ede/proj-elisp.el (ede-proj-target-elisp)
(ede-proj-target-elisp-autoloads): Quote initforms.
* ede/srecode.el (ede-srecode-setup): Load autoconf templates.
* ede/shell.el (ede-shell-buffer): Fix buffer name.
* ede/pconf.el (ede-proj-configure-synchronize): If user events
occur while waiting for the compile process to finish, pull them
in and discard those events.
2010-09-21 02:42:53 +00:00
|
|
|
(defun cedet-idutils-create/update-database (&optional dir)
|
|
|
|
"Create an IDUtils database in DIR.
|
|
|
|
IDUtils must start from scratch when updating a database."
|
|
|
|
(interactive "DDirectory: ")
|
|
|
|
(let ((default-directory dir))
|
|
|
|
(cedet-idutils-mkid-call nil)))
|
2009-09-28 01:28:41 +00:00
|
|
|
|
|
|
|
(provide 'cedet-idutils)
|
|
|
|
|
|
|
|
;;; cedet-idutils.el ends here
|