bug#5277: 23.1.90; cus-load.el path for cedet/semantic/bovine/c.el

Kevin Ryde <[email protected]> Thu, 31 Dec 2009 07:43:51 +1100
Newsgroups gmane.emacs.bugs,gmane.emacs.pretest.bugs
Message-ID <[email protected]>
--=-=-=

In the current cvs cus-load.el has

    (put 'c 'custom-loads '("cc-vars" cmacexp cpp hideif "c"))

I think the "c" there is cedet/semantic/bovine/c.el.  I believe it won't
load under that name as the cedet subdirs aren't in the load-path.

That c.el file has

    generated-autoload-load-name: "semantic/bovine/c"

which I presume is designed for its autoloads.  I wonder if it should be
used for the custom loads too.  Seems a bit like hard work to remember
it in every sub-file, but building a load-path relative name might go
wrong in worse ways if making deps from files not yet in a loadable tree
or whatnot.

cus-load.el.subfiles.diff below is the what's changed by using
`generated-autoload-load-name'.  Notice for instance the "ede/locate"
one was previously loading "locate", which would mean the wrong
locate.el -- a danger of duplicate names among .el files I suppose.


2009-12-30  Kevin Ryde  <[email protected]>

	* cus-dep.el (custom-make-dependencies): Add hack-local-variables
	to pick up generated-autoload-load-name from
	cedet/semantic/bovine/c.el and similar.  This ensures
	"semantic/bovine/c" gets into custom-loads, instead of bare "c"
	which is no good as the bovine subdir is not in load-path.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment; filename=cus-dep.el.local-vars.diff

--- cus-dep.el.~1.47.~	2009-11-09 09:08:51.000000000 +1100
+++ cus-dep.el	2009-12-31 07:26:35.000000000 +1100
@@ -26,6 +26,7 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
+(require 'autoload) ;; for defvar generated-autoload-load-name
 (require 'widget)
 (require 'cus-face)
 
@@ -60,10 +61,13 @@
                         (string-match preloaded file)
                         (not (file-exists-p file)))
               (erase-buffer)
+              (kill-all-local-variables)
               (insert-file-contents file)
+              (hack-local-variables)
               (goto-char (point-min))
               (string-match "\\`\\(.*\\)\\.el\\'" file)
-              (let ((name (file-name-nondirectory (match-string 1 file)))
+              (let ((name (or generated-autoload-load-name
+			      (file-name-nondirectory (match-string 1 file))))
                     (load-file-name file))
                 (if (save-excursion
                       (re-search-forward

--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment; filename=cus-load.el.subfiles.diff

--- cus-load.el.old	2009-12-31 07:26:09.000000000 +1100
+++ cus-load.el	2009-12-31 07:27:57.000000000 +1100
@@ -61,7 +61,7 @@
 (put 'cua 'custom-loads '(cua-base))
 (put 'desktop 'custom-loads '(desktop))
 (put 'eshell-cmpl 'custom-loads '(em-cmpl))
-(put 'ede 'custom-loads '(ede "locate" "make" "project-am"))
+(put 'ede 'custom-loads '(ede ede/locate ede/make "project-am"))
 (put 'cperl-help-system 'custom-loads '(cperl-mode))
 (put 'ps-print-miscellany 'custom-loads '(ps-bdf ps-print))
 (put 'erc-hooks 'custom-loads '(erc erc-netsplit))
@@ -176,7 +176,7 @@
 (put 'gnus-summary-pick 'custom-loads '(gnus-salt))
 (put 'gnus-thread 'custom-loads '(gnus-sum gnus-group))
 (put 'org-progress 'custom-loads '(org-clock org org-habit))
-(put 'document 'custom-loads '("document"))
+(put 'document 'custom-loads '(srecode/document))
 (put 'pop3 'custom-loads '(pop3))
 (put 'languages 'custom-loads '(ps-mode ada-mode antlr-mode asm-mode cus-edit cfengine cperl-mode css-mode dcl-mode delphi f90 fortran hideshow icon idlwave info-look js ld-script m4-mode meta-mode modula2 nxml-mode octave-mod pascal perl-mode prolog python rng-valid sgml-mode sh-script sieve simula tcl vera-mode verilog-mode vhdl-mode))
 (put 'reftex-miscellaneous-configurations 'custom-loads '(reftex-vars))
@@ -266,7 +266,7 @@
 (put 'org-indent 'custom-loads '(org-indent))
 (put 'message-buffers 'custom-loads '(message))
 (put '5x5 'custom-loads '(5x5))
-(put 'semanticdb 'custom-loads '("db-file" "db-ebrowse" "db"))
+(put 'semanticdb 'custom-loads '(semantic/db-file "db-ebrowse" semantic/db))
 (put 'docs 'custom-loads '(info makeinfo texinfo))
 (put 'enriched 'custom-loads '(enriched))
 (put 'eshell-alias 'custom-loads '(em-alias))
@@ -310,7 +310,7 @@
 (put 'auto-save 'custom-loads '("files.my-disk-space"))
 (put 'lazy-highlight 'custom-loads '(ispell))
 (put 'tpu 'custom-loads '("tpu-extras" tpu-edt))
-(put 'semantic-faces 'custom-loads '("complete" "include" "mode" "util-modes" "senator" "fields"))
+(put 'semantic-faces 'custom-loads '(semantic/complete semantic/decorate/include semantic/decorate/mode semantic/util-modes semantic/senator "fields"))
 (put 'w32 'custom-loads '(w32-vars))
 (put 'viper-hooks 'custom-loads '(viper-init))
 (put 'gnus-cite 'custom-loads '(gnus-cite gnus-msg))
@@ -498,7 +498,7 @@
 (put 'vhdl-port 'custom-loads '(vhdl-mode))
 (put 'gnus-charset 'custom-loads '(gnus gnus-group gnus-sum))
 (put 'calculator 'custom-loads '(calculator))
-(put 'semantic-modes 'custom-loads '("mode" "util-modes" "idle" "mru-bookmark"))
+(put 'semantic-modes 'custom-loads '(semantic/decorate/mode semantic/util-modes semantic/idle semantic/mru-bookmark))
 (put 'conf 'custom-loads '(conf-mode))
 (put 'custom-menu 'custom-loads '(cus-edit))
 (put 'type-break 'custom-loads '(type-break))
@@ -548,12 +548,12 @@
 (put 'follow 'custom-loads '(follow))
 (put 'info 'custom-loads '(info))
 (put 'battery 'custom-loads '(battery))
-(put 'texinfo 'custom-loads '(informat "document" texinfo))
+(put 'texinfo 'custom-loads '(informat srecode/document texinfo))
 (put 'dired-mark 'custom-loads '(dired))
 (put 'makeinfo 'custom-loads '(makeinfo))
 (put 'supercite-cite 'custom-loads '(supercite))
 (put 'speedbar-vc 'custom-loads '(speedbar))
-(put 'senator 'custom-loads '("senator"))
+(put 'senator 'custom-loads '(semantic/senator))
 (put 'eieio 'custom-loads '(chart eieio-custom))
 (put 'msb 'custom-loads '(msb))
 (put 'save-place 'custom-loads '(saveplace))
@@ -568,7 +568,7 @@
 (put 'bs-appearance 'custom-loads '(bs))
 (put 'pcmpl-cvs 'custom-loads '(pcmpl-cvs))
 (put 'org-export-htmlize 'custom-loads '(org-html))
-(put 'semantic 'custom-loads '("mode" "util-modes" "idle" "mru-bookmark" "c" semantic "edit" "grammar" "lex" "lex-spp" "list" "db" "senator" "wisent"))
+(put 'semantic 'custom-loads '(semantic/decorate/mode semantic/util-modes semantic/idle semantic/mru-bookmark semantic/bovine/c semantic semantic/edit "grammar" semantic/lex semantic/lex-spp semantic/symref/list semantic/db semantic/senator "wisent"))
 (put 'eshell-mode 'custom-loads '(esh-mode))
 (put 'files 'custom-loads '("files.my-disk-space" ange-ftp autoinsert autorevert cus-edit dired filecache latexenc recentf shadowfile tramp))
 (put 'mm-url 'custom-loads '(mm-url))
@@ -625,7 +625,7 @@
 (put 'org-mac-flagged-mail 'custom-loads '(org-mac-message))
 (put 'octave 'custom-loads '(octave-mod octave-inf))
 (put 'editing-basics 'custom-loads '("files.my-disk-space" cua-base pc-select))
-(put 'srecode 'custom-loads '("document" "mode" "expandproto" "insert" "map" "srt-mode"))
+(put 'srecode 'custom-loads '(srecode/document srecode/mode srecode/expandproto srecode/insert srecode/map srecode/srt-mode))
 (put 'kmacro 'custom-loads '(kmacro))
 (put 'fortune-signature 'custom-loads '(fortune))
 (put 'spam-bsfilter 'custom-loads '(spam))
@@ -782,7 +782,7 @@
 (put 'emerge 'custom-loads '(emerge))
 (put 'org-properties 'custom-loads '(org))
 (put 'scheme 'custom-loads '(cmuscheme scheme))
-(put 'semantic-symref 'custom-loads '("list"))
+(put 'semantic-symref 'custom-loads '(semantic/symref/list))
 (put 'spam-report 'custom-loads '(spam-report))
 (put 'org-cycle 'custom-loads '(org))
 (put 'gametree 'custom-loads '(gametree))
@@ -820,7 +820,7 @@
 (put 'vhdl-style 'custom-loads '(vhdl-mode))
 (put 'tempo 'custom-loads '(tempo))
 (put 'erc-quit-and-part 'custom-loads '(erc))
-(put 'c 'custom-loads '("cc-vars" cmacexp cpp hideif "c"))
+(put 'c 'custom-loads '("cc-vars" cmacexp cpp hideif semantic/bovine/c))
 (put 'nnmail-prepare 'custom-loads '(nnmail))
 (put 'processes 'custom-loads '(sql ansi-color comint compile executable cus-edit flyspell grep gud metamail pcomplete proced rcompile rlogin shell socks term))
 (put 'ebnf2ps 'custom-loads '(ebnf2ps))

--=-=-=



In GNU Emacs 23.1.90.2 (i586-pc-linux-gnu, GTK+ Version 2.18.5)
 of 2009-12-27 on blah.blah
configured using `configure  'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t

--=-=-=--