;;; semantic/db-file.el --- Save a semanticdb to a cache file.
-;;; Copyright (C) 2000-2005, 2007-2012 Free Software Foundation, Inc.
+;;; Copyright (C) 2000-2005, 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
;; A set of semanticdb classes for persistently saving caches on disk.
;;
-(require 'semantic)
(require 'semantic/db)
(require 'cedet-files)
-
-(eval-when-compile
- (require 'data-debug))
+(require 'data-debug)
(defvar semanticdb-file-version semantic-version
"Version of semanticdb we are writing files to disk with.")
(defcustom semanticdb-default-save-directory
(locate-user-emacs-file "semanticdb" ".semanticdb")
"Directory name where semantic cache files are stored.
+By default, it is either ~/.emacs.d/semanticdb, or ~/.semanticdb depending
+on which exists.
If this value is nil, files are saved in the current directory. If the value
is a valid directory, then it overrides `semanticdb-default-file-name' and
stores caches in a coded file name in this directory."
:group 'semanticdb
:type nil)
-(defcustom semanticdb-save-database-hooks nil
+(define-obsolete-variable-alias 'semanticdb-save-database-hooks
+ 'semanticdb-save-database-functions "24.3")
+(defcustom semanticdb-save-database-functions nil
"Abnormal hook run after a database is saved.
Each function is called with one argument, the object representing
the database recently written."
(message "Save Error: %S: %s" (car (cdr foo))
objname)
(error "%S" (car (cdr foo))))))))
- (run-hook-with-args 'semanticdb-save-database-hooks
+ (run-hook-with-args 'semanticdb-save-database-functions
(or DB semanticdb-current-database))
;;(message "Saving tag summary for %s...done" objname)
)
(data-debug-new-buffer (concat "*SEMANTICDB ERROR*"))
(data-debug-insert-thing obj "*" "")
(setq semanticdb-data-debug-on-write-error nil))
- (message "Error Writing Table: %s" (object-name obj))
+ (message "Error Writing Table: %s" (eieio-object-name obj))
(error "%S" (car (cdr tableerror)))))
;; Clear the dirty bit.