aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/cedet/semantic/analyze.el1
-rw-r--r--lisp/cedet/semantic/ctxt.el1
-rw-r--r--lisp/cedet/semantic/db-find.el1
-rw-r--r--lisp/cedet/semantic/db-mode.el7
-rw-r--r--lisp/cedet/semantic/db-typecache.el1
-rw-r--r--lisp/cedet/semantic/db.el1
-rw-r--r--lisp/cedet/semantic/doc.el1
-rw-r--r--lisp/cedet/semantic/find.el1
-rw-r--r--lisp/cedet/semantic/format.el5
-rw-r--r--lisp/cedet/semantic/ia.el1
-rw-r--r--lisp/cedet/semantic/idle.el10
-rw-r--r--lisp/cedet/semantic/lex.el1
-rw-r--r--lisp/cedet/semantic/sb.el6
-rw-r--r--lisp/cedet/semantic/sort.el1
-rw-r--r--lisp/cedet/semantic/tag-file.el1
-rw-r--r--lisp/cedet/semantic/tag-ls.el1
-rw-r--r--lisp/cedet/semantic/tag.el5
-rw-r--r--lisp/cedet/semantic/texi.el238
-rw-r--r--lisp/cedet/semantic/util.el27
-rw-r--r--lisp/emacs-lisp/autoload.el17
-rw-r--r--lisp/emacs-lisp/lisp-mode.el1
22 files changed, 191 insertions, 146 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 52aeab38dd8..5fdf4deb8af 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12009-09-05 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacs-lisp/autoload.el (generated-autoload-load-name): New var.
4 (autoload-generate-file-autoloads): Use it.
5 (make-autoload): Handle define-overloadable-function.
6
7 * emacs-lisp/lisp-mode.el (define-overloadable-function): Add
8 doc-string-elt property for define-overloadable-function.
9
12009-09-02 Chong Yidong <cyd@stupidchicken.com> 102009-09-02 Chong Yidong <cyd@stupidchicken.com>
2 11
3 * emacs-lisp/autoload.el (generated-autoload-feature): New var. 12 * emacs-lisp/autoload.el (generated-autoload-feature): New var.
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el
index 933e0b2996e..63c196af487 100644
--- a/lisp/cedet/semantic/analyze.el
+++ b/lisp/cedet/semantic/analyze.el
@@ -769,6 +769,7 @@ CONTEXT's content is described in `semantic-analyze-current-context'."
769;; Local variables: 769;; Local variables:
770;; generated-autoload-file: "loaddefs.el" 770;; generated-autoload-file: "loaddefs.el"
771;; generated-autoload-feature: semantic/loaddefs 771;; generated-autoload-feature: semantic/loaddefs
772;; generated-autoload-load-name: "semantic/analyze"
772;; End: 773;; End:
773 774
774;;; semantic/analyze.el ends here 775;;; semantic/analyze.el ends here
diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el
index 3aac514488b..ab72f4d4e7f 100644
--- a/lisp/cedet/semantic/ctxt.el
+++ b/lisp/cedet/semantic/ctxt.el
@@ -615,6 +615,7 @@ overriden."
615;; Local variables: 615;; Local variables:
616;; generated-autoload-file: "loaddefs.el" 616;; generated-autoload-file: "loaddefs.el"
617;; generated-autoload-feature: semantic/loaddefs 617;; generated-autoload-feature: semantic/loaddefs
618;; generated-autoload-load-name: "semantic/ctxt"
618;; End: 619;; End:
619 620
620;;; semantic/ctxt.el ends here 621;;; semantic/ctxt.el ends here
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 6d4fdc1fcc5..9cfd45397f5 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -1374,6 +1374,7 @@ Return a table of all matching tags."
1374;; Local variables: 1374;; Local variables:
1375;; generated-autoload-file: "loaddefs.el" 1375;; generated-autoload-file: "loaddefs.el"
1376;; generated-autoload-feature: semantic/loaddefs 1376;; generated-autoload-feature: semantic/loaddefs
1377;; generated-autoload-load-name: "semantic/db-find"
1377;; End: 1378;; End:
1378 1379
1379;;; semantic/db-find.el ends here 1380;;; semantic/db-find.el ends here
diff --git a/lisp/cedet/semantic/db-mode.el b/lisp/cedet/semantic/db-mode.el
index b34fd0b99a5..cc7feb7a88d 100644
--- a/lisp/cedet/semantic/db-mode.el
+++ b/lisp/cedet/semantic/db-mode.el
@@ -70,6 +70,7 @@ on or off."
70 70
71;;; SEMANTICDB-MODE 71;;; SEMANTICDB-MODE
72;; 72;;
73;;;###autoload
73(defun semanticdb-minor-mode-p () 74(defun semanticdb-minor-mode-p ()
74 "Return non-nil if `semanticdb-minor-mode' is active." 75 "Return non-nil if `semanticdb-minor-mode' is active."
75 (member (car (car semanticdb-hooks)) 76 (member (car (car semanticdb-hooks))
@@ -240,4 +241,10 @@ Argument NEW-TABLE is the new table of tags."
240 241
241(provide 'semantic/db-mode) 242(provide 'semantic/db-mode)
242 243
244;; Local variables:
245;; generated-autoload-file: "loaddefs.el"
246;; generated-autoload-feature: semantic/loaddefs
247;; generated-autoload-load-name: "semantic/db-mode"
248;; End:
249
243;;; semantic/db-mode.el ends here 250;;; semantic/db-mode.el ends here
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el
index db2f260d5d0..20d8851d90c 100644
--- a/lisp/cedet/semantic/db-typecache.el
+++ b/lisp/cedet/semantic/db-typecache.el
@@ -601,6 +601,7 @@ If there isn't one, create it.
601;; Local variables: 601;; Local variables:
602;; generated-autoload-file: "loaddefs.el" 602;; generated-autoload-file: "loaddefs.el"
603;; generated-autoload-feature: semantic/loaddefs 603;; generated-autoload-feature: semantic/loaddefs
604;; generated-autoload-load-name: "semantic/db-typecache"
604;; End: 605;; End:
605 606
606;;; semanticdb-typecache.el ends here 607;;; semanticdb-typecache.el ends here
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 352d3d0cf1a..6fe79516b20 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -1016,6 +1016,7 @@ If file does not have tags available, then load the file, and create them."
1016;; Local variables: 1016;; Local variables:
1017;; generated-autoload-file: "loaddefs.el" 1017;; generated-autoload-file: "loaddefs.el"
1018;; generated-autoload-feature: semantic/loaddefs 1018;; generated-autoload-feature: semantic/loaddefs
1019;; generated-autoload-load-name: "semantic/db"
1019;; End: 1020;; End:
1020 1021
1021;;; semantic/db.el ends here 1022;;; semantic/db.el ends here
diff --git a/lisp/cedet/semantic/doc.el b/lisp/cedet/semantic/doc.el
index c9037ba83e8..0eaf41c06e9 100644
--- a/lisp/cedet/semantic/doc.el
+++ b/lisp/cedet/semantic/doc.el
@@ -129,6 +129,7 @@ If NOSNARF is 'lex, then return the lex token."
129;; Local variables: 129;; Local variables:
130;; generated-autoload-file: "loaddefs.el" 130;; generated-autoload-file: "loaddefs.el"
131;; generated-autoload-feature: semantic/loaddefs 131;; generated-autoload-feature: semantic/loaddefs
132;; generated-autoload-load-name: "semantic/doc"
132;; End: 133;; End:
133 134
134;;; semantic/doc.el ends here 135;;; semantic/doc.el ends here
diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el
index 3d14303061c..4ab6a8d8a62 100644
--- a/lisp/cedet/semantic/find.el
+++ b/lisp/cedet/semantic/find.el
@@ -810,6 +810,7 @@ Optional argument ARG is the number of iterations to run."
810;; Local variables: 810;; Local variables:
811;; generated-autoload-file: "loaddefs.el" 811;; generated-autoload-file: "loaddefs.el"
812;; generated-autoload-feature: semantic/loaddefs 812;; generated-autoload-feature: semantic/loaddefs
813;; generated-autoload-load-name: "semantic/find"
813;; End: 814;; End:
814 815
815;;; semantic/find.el ends here 816;;; semantic/find.el ends here
diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el
index d6d66259946..9f5256134a4 100644
--- a/lisp/cedet/semantic/format.el
+++ b/lisp/cedet/semantic/format.el
@@ -45,7 +45,6 @@
45;;; Tag to text overload functions 45;;; Tag to text overload functions
46;; 46;;
47;; abbreviations, prototypes, and coloring support. 47;; abbreviations, prototypes, and coloring support.
48;;;###autoload
49(defvar semantic-format-tag-functions 48(defvar semantic-format-tag-functions
50 '(semantic-format-tag-name 49 '(semantic-format-tag-name
51 semantic-format-tag-canonical-name 50 semantic-format-tag-canonical-name
@@ -71,7 +70,7 @@ COLOR indicates that the generated text should be colored using
71 70
72(semantic-varalias-obsolete 'semantic-token->text-functions 71(semantic-varalias-obsolete 'semantic-token->text-functions
73 'semantic-format-tag-functions) 72 'semantic-format-tag-functions)
74;;;###autoload 73
75(defvar semantic-format-tag-custom-list 74(defvar semantic-format-tag-custom-list
76 (append '(radio) 75 (append '(radio)
77 (mapcar (lambda (f) (list 'const f)) 76 (mapcar (lambda (f) (list 'const f))
@@ -559,6 +558,7 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
559 (or args "") 558 (or args "")
560 (or array "")))) 559 (or array ""))))
561 560
561;;;###autoload
562(define-overloadable-function semantic-format-tag-concise-prototype (tag &optional parent color) 562(define-overloadable-function semantic-format-tag-concise-prototype (tag &optional parent color)
563 "Return a concise prototype for TAG. 563 "Return a concise prototype for TAG.
564Optional argument PARENT is the parent type if TAG is a detail. 564Optional argument PARENT is the parent type if TAG is a detail.
@@ -793,6 +793,7 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
793;; Local variables: 793;; Local variables:
794;; generated-autoload-file: "loaddefs.el" 794;; generated-autoload-file: "loaddefs.el"
795;; generated-autoload-feature: semantic/loaddefs 795;; generated-autoload-feature: semantic/loaddefs
796;; generated-autoload-load-name: "semantic/format"
796;; End: 797;; End:
797 798
798;;; semantic/format.el ends here 799;;; semantic/format.el ends here
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index d060f478424..b2446e75029 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -37,6 +37,7 @@
37 37
38;; (require 'senator) 38;; (require 'senator)
39(require 'semantic/analyze) 39(require 'semantic/analyze)
40(require 'semantic/format)
40(require 'pulse) 41(require 'pulse)
41(eval-when-compile 42(eval-when-compile
42 (require 'semantic/analyze) 43 (require 'semantic/analyze)
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 49cd38c6d85..6451a32a858 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -39,6 +39,7 @@
39 39
40(require 'semantic) 40(require 'semantic)
41(require 'semantic/ctxt) 41(require 'semantic/ctxt)
42(require 'semantic/format)
42(require 'semantic/tag) 43(require 'semantic/tag)
43;(require 'semantic/util-modes) 44;(require 'semantic/util-modes)
44(require 'timer) 45(require 'timer)
@@ -50,7 +51,6 @@
50(declare-function semantic-analyze-interesting-tag "semantic/analyze") 51(declare-function semantic-analyze-interesting-tag "semantic/analyze")
51(declare-function semantic-complete-analyze-inline-idle "semantic/complete") 52(declare-function semantic-complete-analyze-inline-idle "semantic/complete")
52(declare-function semanticdb-deep-find-tags-by-name "semantic/db-find") 53(declare-function semanticdb-deep-find-tags-by-name "semantic/db-find")
53(declare-function semanticdb-minor-mode-p "semantic/db-mode")
54(declare-function semanticdb-save-all-db-idle "semantic/db") 54(declare-function semanticdb-save-all-db-idle "semantic/db")
55(declare-function semanticdb-typecache-refresh-for-buffer "semantic/db-typecache") 55(declare-function semanticdb-typecache-refresh-for-buffer "semantic/db-typecache")
56(declare-function semantic-decorate-flush-pending-decorations 56(declare-function semantic-decorate-flush-pending-decorations
@@ -366,9 +366,7 @@ Returns t of all processing succeeded."
366 ;; summary information 366 ;; summary information
367 (semantic-safe "Idle Work Including Error: %S" 367 (semantic-safe "Idle Work Including Error: %S"
368 ;; Get the include related path. 368 ;; Get the include related path.
369 (when (and (featurep 'semantic/db) 369 (when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
370 (require 'semantic/db-mode)
371 (semanticdb-minor-mode-p))
372 (require 'semantic/db-find) 370 (require 'semantic/db-find)
373 (semanticdb-find-translate-path buffer nil) 371 (semanticdb-find-translate-path buffer nil)
374 ) 372 )
@@ -418,9 +416,7 @@ Uses `semantic-idle-work-for-on-buffer' to do the work."
418 )) 416 ))
419 ) 417 )
420 418
421 (when (and (featurep 'semantic/db) 419 (when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
422 (require 'semantic/db-mode)
423 (semanticdb-minor-mode-p))
424 ;; Save everything. 420 ;; Save everything.
425 (semanticdb-save-all-db-idle) 421 (semanticdb-save-all-db-idle)
426 422
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index 09b31b7ff2d..c4335d9e197 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -2102,6 +2102,7 @@ return LENGTH tokens."
2102;; Local variables: 2102;; Local variables:
2103;; generated-autoload-file: "loaddefs.el" 2103;; generated-autoload-file: "loaddefs.el"
2104;; generated-autoload-feature: semantic/loaddefs 2104;; generated-autoload-feature: semantic/loaddefs
2105;; generated-autoload-load-name: "semantic/lex"
2105;; End: 2106;; End:
2106 2107
2107;;; semantic-lex.el ends here 2108;;; semantic-lex.el ends here
diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el
index 3bbe9f94d9a..aaee9f905bc 100644
--- a/lisp/cedet/semantic/sb.el
+++ b/lisp/cedet/semantic/sb.el
@@ -32,11 +32,10 @@
32;; children with the new `with-mode-local' instead. 32;; children with the new `with-mode-local' instead.
33 33
34(require 'semantic) 34(require 'semantic)
35(require 'semantic/format)
36(require 'semantic/sort)
35(require 'semantic/util) 37(require 'semantic/util)
36(require 'speedbar) 38(require 'speedbar)
37(require 'semantic/sort)
38
39(declare-function semanticdb-minor-mode-p "semantic/db-mode")
40 39
41(defcustom semantic-sb-autoexpand-length 1 40(defcustom semantic-sb-autoexpand-length 1
42 "*Length of a semantic bucket to autoexpand in place. 41 "*Length of a semantic bucket to autoexpand in place.
@@ -383,7 +382,6 @@ to create much wiser decisions about how to sort and group these items."
383Returns the tag list, or t for an error." 382Returns the tag list, or t for an error."
384 (let ((out nil)) 383 (let ((out nil))
385 (if (and (featurep 'semantic/db) 384 (if (and (featurep 'semantic/db)
386 (require 'semantic/db-mode)
387 (semanticdb-minor-mode-p) 385 (semanticdb-minor-mode-p)
388 (not speedbar-power-click) 386 (not speedbar-power-click)
389 ;; If the database is loaded and running, try to get 387 ;; If the database is loaded and running, try to get
diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el
index df4374c46ea..a4448a8415b 100644
--- a/lisp/cedet/semantic/sort.el
+++ b/lisp/cedet/semantic/sort.el
@@ -597,6 +597,7 @@ See `semantic-tag-external-class' for details."
597;; Local variables: 597;; Local variables:
598;; generated-autoload-file: "loaddefs.el" 598;; generated-autoload-file: "loaddefs.el"
599;; generated-autoload-feature: semantic/loaddefs 599;; generated-autoload-feature: semantic/loaddefs
600;; generated-autoload-load-name: "semantic/sort"
600;; End: 601;; End:
601 602
602;;; semantic-sort.el ends here 603;;; semantic-sort.el ends here
diff --git a/lisp/cedet/semantic/tag-file.el b/lisp/cedet/semantic/tag-file.el
index 5dd3c0f5db1..58c0aaeec63 100644
--- a/lisp/cedet/semantic/tag-file.el
+++ b/lisp/cedet/semantic/tag-file.el
@@ -210,6 +210,7 @@ file prototypes belong in."
210;; Local variables: 210;; Local variables:
211;; generated-autoload-file: "loaddefs.el" 211;; generated-autoload-file: "loaddefs.el"
212;; generated-autoload-feature: semantic/loaddefs 212;; generated-autoload-feature: semantic/loaddefs
213;; generated-autoload-load-name: "semantic/tag-file"
213;; End: 214;; End:
214 215
215;;; semantic/tag-file.el ends here 216;;; semantic/tag-file.el ends here
diff --git a/lisp/cedet/semantic/tag-ls.el b/lisp/cedet/semantic/tag-ls.el
index 272c64f30af..9e430aca800 100644
--- a/lisp/cedet/semantic/tag-ls.el
+++ b/lisp/cedet/semantic/tag-ls.el
@@ -276,6 +276,7 @@ Return the name of TAG found in the toplevel STREAM."
276;; Local variables: 276;; Local variables:
277;; generated-autoload-file: "loaddefs.el" 277;; generated-autoload-file: "loaddefs.el"
278;; generated-autoload-feature: semantic/loaddefs 278;; generated-autoload-feature: semantic/loaddefs
279;; generated-autoload-load-name: "semantic/tag-ls"
279;; End: 280;; End:
280 281
281;;; semantic/tag-ls.el ends here 282;;; semantic/tag-ls.el ends here
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index fa920df42c3..cf4967d3ffc 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -1,4 +1,4 @@
1;;; tag.el --- tag creation and access 1;;; semantic/tag.el --- tag creation and access
2 2
3;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 3;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
4;;; 2008, 2009 Free Software Foundation, Inc. 4;;; 2008, 2009 Free Software Foundation, Inc.
@@ -1568,6 +1568,7 @@ and `semantic-tag-type-interfaces' instead")
1568;; Local variables: 1568;; Local variables:
1569;; generated-autoload-file: "loaddefs.el" 1569;; generated-autoload-file: "loaddefs.el"
1570;; generated-autoload-feature: semantic/loaddefs 1570;; generated-autoload-feature: semantic/loaddefs
1571;; generated-autoload-load-name: "semantic/tag"
1571;; End: 1572;; End:
1572 1573
1573;;; semantic-tag.el ends here 1574;;; semantic/tag.el ends here
diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el
index 2248e4ee9fa..3190bf1d5ec 100644
--- a/lisp/cedet/semantic/texi.el
+++ b/lisp/cedet/semantic/texi.el
@@ -469,7 +469,7 @@ that start with that symbol."
469 senator-step-at-start-end-tag-classes '(section) 469 senator-step-at-start-end-tag-classes '(section)
470 semantic-stickyfunc-sticky-classes '(section) 470 semantic-stickyfunc-sticky-classes '(section)
471 ) 471 )
472 (local-set-key [(f9)] 'semantic-texi-update-doc-from-texi) 472 ;; (local-set-key [(f9)] 'semantic-texi-update-doc-from-texi)
473 ) 473 )
474 474
475(add-hook 'texinfo-mode-hook 'semantic-default-texi-setup) 475(add-hook 'texinfo-mode-hook 'semantic-default-texi-setup)
@@ -526,123 +526,125 @@ Note: TYPE not yet implemented."
526 (goto-char (semantic-tag-start match))) 526 (goto-char (semantic-tag-start match)))
527 (setq f (cdr f))))) 527 (setq f (cdr f)))))
528 528
529(defun semantic-texi-update-doc-from-texi (&optional tag) 529;; (defun semantic-texi-update-doc-from-texi (&optional tag)
530 "Update the documentation in the texinfo deffn class tag TAG. 530;; "Update the documentation in the texinfo deffn class tag TAG.
531The current buffer must be a texinfo file containing TAG. 531;; The current buffer must be a texinfo file containing TAG.
532If TAG is nil, determine a tag based on the current position." 532;; If TAG is nil, determine a tag based on the current position."
533 (interactive) 533;; (interactive)
534 (unless (or (featurep 'semantic/db) (semanticdb-minor-mode-p)) 534;; (unless (or (featurep 'semantic/db)
535 (error "Texinfo updating only works when `semanticdb' is being used")) 535;; (require 'semantic/db-mode)
536 (semantic-fetch-tags) 536;; (semanticdb-minor-mode-p))
537 (unless tag 537;; (error "Texinfo updating only works when `semanticdb' is being used"))
538 (beginning-of-line) 538;; (semantic-fetch-tags)
539 (setq tag (semantic-current-tag))) 539;; (unless tag
540 (unless (semantic-tag-of-class-p tag 'def) 540;; (beginning-of-line)
541 (error "Only deffns (or defun or defvar) can be updated")) 541;; (setq tag (semantic-current-tag)))
542 (let* ((name (semantic-tag-name tag)) 542;; (unless (semantic-tag-of-class-p tag 'def)
543 (tags (semanticdb-strip-find-results 543;; (error "Only deffns (or defun or defvar) can be updated"))
544 (semanticdb-with-match-any-mode 544;; (let* ((name (semantic-tag-name tag))
545 (semanticdb-brute-deep-find-tags-by-name name)) 545;; (tags (semanticdb-strip-find-results
546 'name)) 546;; (semanticdb-with-match-any-mode
547 (docstring nil) 547;; (semanticdb-brute-deep-find-tags-by-name name))
548 (docstringproto nil) 548;; 'name))
549 (docstringvar nil) 549;; (docstring nil)
550 (doctag nil) 550;; (docstringproto nil)
551 (doctagproto nil) 551;; (docstringvar nil)
552 (doctagvar nil) 552;; (doctag nil)
553 ) 553;; (doctagproto nil)
554 (save-excursion 554;; (doctagvar nil)
555 (while (and tags (not docstring)) 555;; )
556 (let ((sourcetag (car tags))) 556;; (save-excursion
557 ;; There could be more than one! Come up with a better 557;; (while (and tags (not docstring))
558 ;; solution someday. 558;; (let ((sourcetag (car tags)))
559 (when (semantic-tag-buffer sourcetag) 559;; ;; There could be more than one! Come up with a better
560 (set-buffer (semantic-tag-buffer sourcetag)) 560;; ;; solution someday.
561 (unless (eq major-mode 'texinfo-mode) 561;; (when (semantic-tag-buffer sourcetag)
562 (cond ((semantic-tag-get-attribute sourcetag :prototype-flag) 562;; (set-buffer (semantic-tag-buffer sourcetag))
563 ;; If we found a match with doc that is a prototype, then store 563;; (unless (eq major-mode 'texinfo-mode)
564 ;; that, but don't exit till we find the real deal. 564;; (cond ((semantic-tag-get-attribute sourcetag :prototype-flag)
565 (setq docstringproto (semantic-documentation-for-tag sourcetag) 565;; ;; If we found a match with doc that is a prototype, then store
566 doctagproto sourcetag)) 566;; ;; that, but don't exit till we find the real deal.
567 ((eq (semantic-tag-class sourcetag) 'variable) 567;; (setq docstringproto (semantic-documentation-for-tag sourcetag)
568 (setq docstringvar (semantic-documentation-for-tag sourcetag) 568;; doctagproto sourcetag))
569 doctagvar sourcetag)) 569;; ((eq (semantic-tag-class sourcetag) 'variable)
570 ((semantic-tag-get-attribute sourcetag :override-function-flag) 570;; (setq docstringvar (semantic-documentation-for-tag sourcetag)
571 nil) 571;; doctagvar sourcetag))
572 (t 572;; ((semantic-tag-get-attribute sourcetag :override-function-flag)
573 (setq docstring (semantic-documentation-for-tag sourcetag)))) 573;; nil)
574 (setq doctag (if docstring sourcetag nil)))) 574;; (t
575 (setq tags (cdr tags))))) 575;; (setq docstring (semantic-documentation-for-tag sourcetag))))
576 ;; If we found a prototype of the function that has some doc, but not the 576;; (setq doctag (if docstring sourcetag nil))))
577 ;; actual function, lets make due with that. 577;; (setq tags (cdr tags)))))
578 (if (not docstring) 578;; ;; If we found a prototype of the function that has some doc, but not the
579 (cond ((stringp docstringvar) 579;; ;; actual function, lets make due with that.
580 (setq docstring docstringvar 580;; (if (not docstring)
581 doctag doctagvar)) 581;; (cond ((stringp docstringvar)
582 ((stringp docstringproto) 582;; (setq docstring docstringvar
583 (setq docstring docstringproto 583;; doctag doctagvar))
584 doctag doctagproto)))) 584;; ((stringp docstringproto)
585 ;; Test for doc string 585;; (setq docstring docstringproto
586 (unless docstring 586;; doctag doctagproto))))
587 (error "Could not find documentation for %s" (semantic-tag-name tag))) 587;; ;; Test for doc string
588 ;; If we have a string, do the replacement. 588;; (unless docstring
589 (delete-region (semantic-tag-start tag) 589;; (error "Could not find documentation for %s" (semantic-tag-name tag)))
590 (semantic-tag-end tag)) 590;; ;; If we have a string, do the replacement.
591 ;; Use useful functions from the docaument library. 591;; (delete-region (semantic-tag-start tag)
592 (require 'document) 592;; (semantic-tag-end tag))
593 (document-insert-texinfo doctag (semantic-tag-buffer doctag)) 593;; ;; Use useful functions from the docaument library.
594 )) 594;; (require 'document)
595 595;; (document-insert-texinfo doctag (semantic-tag-buffer doctag))
596(defun semantic-texi-update-doc-from-source (&optional tag) 596;; ))
597 "Update the documentation for the source TAG. 597
598The current buffer must be a non-texinfo source file containing TAG. 598;; (defun semantic-texi-update-doc-from-source (&optional tag)
599If TAG is nil, determine the tag based on the current position. 599;; "Update the documentation for the source TAG.
600The current buffer must include TAG." 600;; The current buffer must be a non-texinfo source file containing TAG.
601 (interactive) 601;; If TAG is nil, determine the tag based on the current position.
602 (when (eq major-mode 'texinfo-mode) 602;; The current buffer must include TAG."
603 (error "Not a source file")) 603;; (interactive)
604 (semantic-fetch-tags) 604;; (when (eq major-mode 'texinfo-mode)
605 (unless tag 605;; (error "Not a source file"))
606 (setq tag (semantic-current-tag))) 606;; (semantic-fetch-tags)
607 (unless (semantic-documentation-for-tag tag) 607;; (unless tag
608 (error "Cannot find interesting documentation to use for %s" 608;; (setq tag (semantic-current-tag)))
609 (semantic-tag-name tag))) 609;; (unless (semantic-documentation-for-tag tag)
610 (let* ((name (semantic-tag-name tag)) 610;; (error "Cannot find interesting documentation to use for %s"
611 (texi (semantic-texi-associated-files)) 611;; (semantic-tag-name tag)))
612 (doctag nil) 612;; (let* ((name (semantic-tag-name tag))
613 (docbuff nil)) 613;; (texi (semantic-texi-associated-files))
614 (while (and texi (not doctag)) 614;; (doctag nil)
615 (set-buffer (find-file-noselect (car texi))) 615;; (docbuff nil))
616 (setq doctag (car (semantic-deep-find-tags-by-name 616;; (while (and texi (not doctag))
617 name (semantic-fetch-tags))) 617;; (set-buffer (find-file-noselect (car texi)))
618 docbuff (if doctag (current-buffer) nil)) 618;; (setq doctag (car (semantic-deep-find-tags-by-name
619 (setq texi (cdr texi))) 619;; name (semantic-fetch-tags)))
620 (unless doctag 620;; docbuff (if doctag (current-buffer) nil))
621 (error "Tag %s is not yet documented. Use the `document' command" 621;; (setq texi (cdr texi)))
622 name)) 622;; (unless doctag
623 ;; Ok, we should have everything we need. Do the deed. 623;; (error "Tag %s is not yet documented. Use the `document' command"
624 (if (get-buffer-window docbuff) 624;; name))
625 (set-buffer docbuff) 625;; ;; Ok, we should have everything we need. Do the deed.
626 (switch-to-buffer docbuff)) 626;; (if (get-buffer-window docbuff)
627 (goto-char (semantic-tag-start doctag)) 627;; (set-buffer docbuff)
628 (delete-region (semantic-tag-start doctag) 628;; (switch-to-buffer docbuff))
629 (semantic-tag-end doctag)) 629;; (goto-char (semantic-tag-start doctag))
630 ;; Use useful functions from the document library. 630;; (delete-region (semantic-tag-start doctag)
631 (require 'document) 631;; (semantic-tag-end doctag))
632 (document-insert-texinfo tag (semantic-tag-buffer tag)) 632;; ;; Use useful functions from the document library.
633 )) 633;; (require 'document)
634 634;; (document-insert-texinfo tag (semantic-tag-buffer tag))
635(defun semantic-texi-update-doc (&optional tag) 635;; ))
636 "Update the documentation for TAG. 636
637If the current buffer is a texinfo file, then find the source doc, and 637;; (defun semantic-texi-update-doc (&optional tag)
638update it. If the current buffer is a source file, then get the 638;; "Update the documentation for TAG.
639documentation for this item, find the existing doc in the associated 639;; If the current buffer is a texinfo file, then find the source doc, and
640manual, and update that." 640;; update it. If the current buffer is a source file, then get the
641 (interactive) 641;; documentation for this item, find the existing doc in the associated
642 (cond ((eq major-mode 'texinfo-mode) 642;; manual, and update that."
643 (semantic-texi-update-doc-from-texi tag)) 643;; (interactive)
644 (t 644;; (cond ;;((eq major-mode 'texinfo-mode)
645 (semantic-texi-update-doc-from-source tag)))) 645;; ;; (semantic-texi-update-doc-from-texi tag))
646;; (t
647;; (semantic-texi-update-doc-from-source tag))))
646 648
647(defun semantic-texi-goto-source (&optional tag) 649(defun semantic-texi-goto-source (&optional tag)
648 "Jump to the source for the definition in the texinfo file TAG. 650 "Jump to the source for the definition in the texinfo file TAG.
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el
index 37bb5629335..dfb899e5941 100644
--- a/lisp/cedet/semantic/util.el
+++ b/lisp/cedet/semantic/util.el
@@ -28,14 +28,18 @@
28 28
29(require 'assoc) 29(require 'assoc)
30(require 'semantic) 30(require 'semantic)
31(eval-when-compile 31
32 ;; Emacs 21 32(declare-function data-debug-insert-stuff-list "data-debug")
33 (condition-case nil 33(declare-function data-debug-insert-thing "data-debug")
34 (require 'newcomment) 34(declare-function semanticdb-file-stream "semantic/db")
35 (error nil)) 35(declare-function semanticdb-abstract-table-child-p "semantic/db")
36 ;; Semanticdb calls 36(declare-function semanticdb-refresh-table "semantic/db")
37 (require 'semantic/db) 37(declare-function semanticdb-get-tags "semantic/db")
38 ) 38(declare-function semanticdb-find-results-p "semantic/db-find")
39
40;; For semantic-find-tags-by-class, semantic--find-tags-by-function,
41;; and semantic-brute-find-tag-standard:
42(eval-when-compile (require 'semantic/find))
39 43
40;;; Code: 44;;; Code:
41 45
@@ -112,14 +116,15 @@ buffer, or a filename. If SOMETHING is nil return nil."
112 (file-exists-p something)) 116 (file-exists-p something))
113 (semantic-file-tag-table something)) 117 (semantic-file-tag-table something))
114 ;; A Semanticdb table 118 ;; A Semanticdb table
115 ((and (featurep 'semanticdb) 119 ((and (featurep 'semantic/db)
116 (semanticdb-minor-mode-p) 120 (semanticdb-minor-mode-p)
117 (semanticdb-abstract-table-child-p something)) 121 (semanticdb-abstract-table-child-p something))
118 (semanticdb-refresh-table something) 122 (semanticdb-refresh-table something)
119 (semanticdb-get-tags something)) 123 (semanticdb-get-tags something))
120 ;; Semanticdb find-results 124 ;; Semanticdb find-results
121 ((and (featurep 'semanticdb) 125 ((and (featurep 'semantic/db)
122 (semanticdb-minor-mode-p) 126 (semanticdb-minor-mode-p)
127 (require 'semantic/db-find)
123 (semanticdb-find-results-p something)) 128 (semanticdb-find-results-p something))
124 (semanticdb-strip-find-results something)) 129 (semanticdb-strip-find-results something))
125 ;; NOTE: This commented out since if a search result returns 130 ;; NOTE: This commented out since if a search result returns
@@ -350,6 +355,7 @@ If TAG is not specified, use the tag at point."
350 "Display the current token. 355 "Display the current token.
351Argument P is the point to search from in the current buffer." 356Argument P is the point to search from in the current buffer."
352 (interactive "d") 357 (interactive "d")
358 (require 'semantic/find)
353 (let ((tok (semantic-brute-find-innermost-tag-by-position 359 (let ((tok (semantic-brute-find-innermost-tag-by-position
354 p (current-buffer)))) 360 p (current-buffer))))
355 (message (mapconcat 'semantic-abbreviate-nonterminal tok ",")) 361 (message (mapconcat 'semantic-abbreviate-nonterminal tok ","))
@@ -359,6 +365,7 @@ Argument P is the point to search from in the current buffer."
359(defun semantic-hack-search () 365(defun semantic-hack-search ()
360 "Display info about something under the cursor using generic methods." 366 "Display info about something under the cursor using generic methods."
361 (interactive) 367 (interactive)
368 (require 'semantic/find)
362 (let ( 369 (let (
363 ;(name (thing-at-point 'symbol)) 370 ;(name (thing-at-point 'symbol))
364 (strm (cdr (semantic-fetch-tags))) 371 (strm (cdr (semantic-fetch-tags)))
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 39070b20d6b..8b2a8985229 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -48,6 +48,12 @@ If nil, this defaults to `generated-autoload-file', sans extension.")
48;;;###autoload 48;;;###autoload
49(put 'generated-autoload-feature 'safe-local-variable 'symbolp) 49(put 'generated-autoload-feature 'safe-local-variable 'symbolp)
50 50
51(defvar generated-autoload-load-name nil
52 "Load name for `autoload' statements generated from autoload cookies.
53If nil, this defaults to the file name, sans extension.")
54;;;###autoload
55(put 'generated-autoload-load-name 'safe-local-variable 'stringp)
56
51;; This feels like it should be a defconst, but MH-E sets it to 57;; This feels like it should be a defconst, but MH-E sets it to
52;; ";;;###mh-autoload" for the autoloads that are to go into mh-loaddefs.el. 58;; ";;;###mh-autoload" for the autoloads that are to go into mh-loaddefs.el.
53(defvar generate-autoload-cookie ";;;###autoload" 59(defvar generate-autoload-cookie ";;;###autoload"
@@ -101,11 +107,12 @@ or macro definition or a defcustom)."
101 easy-mmode-define-global-mode define-global-minor-mode 107 easy-mmode-define-global-mode define-global-minor-mode
102 define-globalized-minor-mode 108 define-globalized-minor-mode
103 easy-mmode-define-minor-mode define-minor-mode 109 easy-mmode-define-minor-mode define-minor-mode
104 defun* defmacro*)) 110 defun* defmacro* define-overloadable-function))
105 (let* ((macrop (memq car '(defmacro defmacro*))) 111 (let* ((macrop (memq car '(defmacro defmacro*)))
106 (name (nth 1 form)) 112 (name (nth 1 form))
107 (args (case car 113 (args (case car
108 ((defun defmacro defun* defmacro*) (nth 2 form)) 114 ((defun defmacro defun* defmacro*
115 define-overloadable-function) (nth 2 form))
109 ((define-skeleton) '(&optional str arg)) 116 ((define-skeleton) '(&optional str arg))
110 ((define-generic-mode define-derived-mode 117 ((define-generic-mode define-derived-mode
111 define-compilation-mode) nil) 118 define-compilation-mode) nil)
@@ -347,7 +354,7 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
347\(or OUTBUF if OUTFILE is nil)." 354\(or OUTBUF if OUTFILE is nil)."
348 (catch 'done 355 (catch 'done
349 (let ((autoloads-done '()) 356 (let ((autoloads-done '())
350 (load-name (autoload-file-load-name file)) 357 load-name
351 (print-length nil) 358 (print-length nil)
352 (print-level nil) 359 (print-level nil)
353 (print-readably t) ; This does something in Lucid Emacs. 360 (print-readably t) ; This does something in Lucid Emacs.
@@ -365,6 +372,10 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
365 ;; Obey the no-update-autoloads file local variable. 372 ;; Obey the no-update-autoloads file local variable.
366 (unless no-update-autoloads 373 (unless no-update-autoloads
367 (message "Generating autoloads for %s..." file) 374 (message "Generating autoloads for %s..." file)
375 (setq load-name
376 (if (stringp generated-autoload-load-name)
377 generated-autoload-load-name
378 (autoload-file-load-name file)))
368 (save-excursion 379 (save-excursion
369 (save-restriction 380 (save-restriction
370 (widen) 381 (widen)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 3360600fbff..1ea0881f3d9 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -154,6 +154,7 @@
154(put 'defalias 'doc-string-elt 3) 154(put 'defalias 'doc-string-elt 3)
155(put 'defvaralias 'doc-string-elt 3) 155(put 'defvaralias 'doc-string-elt 3)
156(put 'define-category 'doc-string-elt 2) 156(put 'define-category 'doc-string-elt 2)
157(put 'define-overloadable-function 'doc-string-elt 3)
157 158
158(defvar lisp-doc-string-elt-property 'doc-string-elt 159(defvar lisp-doc-string-elt-property 'doc-string-elt
159 "The symbol property that holds the docstring position info.") 160 "The symbol property that holds the docstring position info.")