1 ;;; dgnushack.el --- a hack to set the load path for byte-compiling
2 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
3 ;; Free Software Foundation, Inc.
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
6 ;; Katsumi Yamaoka <yamaoka@jpl.org>
8 ;; Keywords: news, path
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
31 ;; Set coding priority of Shift-JIS to the bottom.
32 (if (featurep 'xemacs)
33 (defalias 'set-coding-priority 'ignore)
34 (defalias 'coding-priority-list 'ignore)
35 (defalias 'set-coding-priority-list 'ignore))
36 (cond ((and (featurep 'xemacs) (featurep 'mule))
37 (if (memq 'shift-jis (coding-priority-list))
38 (set-coding-priority-list
39 (append (delq 'shift-jis (coding-priority-list)) '(shift-jis)))))
41 (put '*coding-category-sjis* 'priority (length *predefined-category*)))
43 (if (memq 'coding-category-sjis coding-category-list)
45 (append (delq 'coding-category-sjis
46 (copy-sequence coding-category-list))
47 '(coding-category-sjis))))))
49 (defalias 'facep 'ignore)
52 (unless (dolist (var nil t))
53 ;; Override the macro `dolist' which may have been defined in egg.el.
54 (load "cl-macs" nil t))
56 (defvar srcdir (or (getenv "srcdir") "."))
58 (let ((urldir (getenv "URLDIR")))
59 (unless (zerop (length urldir))
60 (push (file-name-as-directory urldir) load-path)))
62 (defvar dgnushack-w3-directory (let ((w3dir (getenv "W3DIR")))
63 (unless (zerop (length w3dir))
64 (file-name-as-directory w3dir))))
65 (when dgnushack-w3-directory
66 (push dgnushack-w3-directory load-path))
68 ;; If we are building w3 in a different directory than the source
69 ;; directory, we must read *.el from source directory and write *.elc
70 ;; into the building directory. For that, we define this function
71 ;; before loading bytecomp. Bytecomp doesn't overwrite this function.
72 (defun byte-compile-dest-file (filename)
73 "Convert an Emacs Lisp source file name to a compiled file name.
74 In addition, remove directory name part from FILENAME."
75 (setq filename (byte-compiler-base-file-name filename))
76 (setq filename (file-name-sans-versions filename))
77 (setq filename (file-name-nondirectory filename))
78 (if (memq system-type '(win32 w32 mswindows windows-nt))
79 (setq filename (downcase filename)))
80 (cond ((eq system-type 'vax-vms)
81 (concat (substring filename 0 (string-match ";" filename)) "c"))
82 ((string-match emacs-lisp-file-regexp filename)
83 (concat (substring filename 0 (match-beginning 0)) ".elc"))
84 (t (concat filename ".elc"))))
89 (let (current-load-list)
90 ;; Make the function to be silent at compile-time.
91 (defun locate-library (library &optional nosuffix)
92 "Show the full path name of Emacs library LIBRARY.
93 This command searches the directories in `load-path' like `M-x load-library'
94 to find the file that `M-x load-library RET LIBRARY RET' would load.
95 Optional second arg NOSUFFIX non-nil means don't add suffixes `.elc' or `.el'
96 to the specified name LIBRARY (a la calling `load' instead of `load-library')."
97 (interactive "sLocate library: ")
103 (let ((try (expand-file-name (concat library suf) dir)))
104 (and (file-readable-p try)
105 (null (file-directory-p try))
108 (message "Library is file %s" try))
109 (throw 'answer try)))))
110 (if nosuffix '("") '(".elc" ".el" ""))))
113 (message "No library %s in search path" library))
115 (byte-compile 'locate-library)))
117 (unless (fboundp 'si:byte-optimize-form-code-walker)
118 (byte-optimize-form nil);; Load `byte-opt' or `byte-optimize'.
119 (setq max-specpdl-size 3000)
120 (defalias 'si:byte-optimize-form-code-walker
121 (symbol-function 'byte-optimize-form-code-walker))
122 (defun byte-optimize-form-code-walker (form for-effect)
123 (if (and for-effect (memq (car-safe form) '(and or)))
124 ;; Fix bug in and/or forms.
125 (let ((fn (car form))
126 (backwards (reverse (cdr form))))
127 (while (and backwards
128 (null (setcar backwards
129 (byte-optimize-form (car backwards) t))))
130 (setq backwards (cdr backwards)))
131 (if (and (cdr form) (null backwards))
133 " all subforms of %s called for effect; deleted" form))
135 (let ((head backwards))
136 (while (setq backwards (cdr backwards))
137 (setcar backwards (byte-optimize-form (car backwards)
139 (cons fn (nreverse head)))))
140 (si:byte-optimize-form-code-walker form for-effect)))
141 (byte-compile 'byte-optimize-form-code-walker))
145 (wrong-number-of-arguments
146 ;; Optimize byte code for `char-after'.
147 (put 'char-after 'byte-optimizer 'byte-optimize-char-after)
148 (defun byte-optimize-char-after (form)
149 (if (null (cdr form))
150 '(char-after (point))
155 (wrong-number-of-arguments
156 ;; Optimize byte code for `char-before'.
157 (put 'char-before 'byte-optimizer 'byte-optimize-char-before)
158 (defun byte-optimize-char-before (form)
159 (if (null (cdr form))
160 '(char-before (point))
163 (load (expand-file-name "dgnuspath.el" srcdir) nil nil t)
166 (load "~/.lpath.el" t nil t)
167 (error (message "Error in \"~/.lpath.el\" file: %s" err)))
169 ;; Don't load path-util until `char-after' and `char-before' have been
170 ;; optimized because it requires `poe' and then modify the functions.
172 ;; If the APEL modules have been installed under the directory
173 ;; "/usr/local/share/mule/site-lisp/apel/", the parent directory
174 ;; "/usr/local/share/mule/site-lisp/" should be included in the
175 ;; standard `load-path' or added by the configure option
176 ;; "--with-addpath=". And also the directory where the EMU modules
177 ;; have been installed (e.g. "/usr/local/share/mule/19.34/site-lisp/")
178 ;; should be included in the standard `load-path' or added by the
179 ;; configure option "--with-addpath=".
180 (unless (featurep 'path-util)
181 (let ((path (locate-library "apel/path-util")))
184 (when (string-match "/$" (setq path (file-name-directory path)))
185 (setq path (substring path 0 (match-beginning 0))))
186 (unless (or (member path load-path)
187 (member (file-name-as-directory path) load-path))
188 (push path load-path))
189 (require 'path-util))
191 APEL modules does not found in %s.
192 Try to re-configure with --with-addpath=APEL_PATH and run make again.
195 (unless (locate-library "mel")
197 (unless (module-installed-p 'mel)
198 ;; FLIM 1.14 may have installed in two "flim" subdirectories.
199 (push (expand-file-name "flim"
200 (file-name-directory (get-latest-path "^apel$" t)))
202 (unless (module-installed-p 'mel)
204 FLIM modules does not found in %s.
205 Try to re-configure with --with-addpath=FLIM_PATH and run make again.
210 (push srcdir load-path)
211 (load (expand-file-name "lpath.el" srcdir) nil t t)
213 (load (expand-file-name "gnus-clfns.el" srcdir) nil t t)
217 ;; Bind functions defined by `defun-maybe'.
218 (put 'defun-maybe 'byte-hunk-handler 'byte-compile-file-form-defun-maybe)
219 (defun byte-compile-file-form-defun-maybe (form)
220 (if (and (not (fboundp (nth 1 form)))
221 (memq 'unresolved byte-compile-warnings))
222 (setq byte-compile-function-environment
223 (cons (cons (nth 1 form)
224 (cons 'lambda (cdr (cdr form))))
225 byte-compile-function-environment)))
229 :symbol-for-testing-whether-colon-keyword-is-available-or-not
231 (defun dgnushack-bind-colon-keywords ()
232 "Bind all the colon keywords for old Emacsen."
233 (let ((cache (expand-file-name "dgnuskwds.el" srcdir))
234 (makefile (expand-file-name "Makefile" srcdir))
235 (buffer (get-buffer-create " *colon keywords*"))
236 keywords ignores files file dirs dir form elem make-backup-files)
239 (let (buffer-file-format
241 insert-file-contents-post-hook
242 insert-file-contents-pre-hook
243 jam-zcat-filename-list
244 jka-compr-compression-info-list)
245 (if (and (file-exists-p cache)
246 (file-exists-p makefile)
247 (file-newer-than-file-p cache makefile))
249 (insert-file-contents cache nil nil nil t)
250 (setq keywords (read buffer)))
253 '(:symbol-for-testing-whether-colon-keyword-is-available-or-not
254 ;; The following keywords will be bound by CUSTOM.
255 :get :group :initialize :link :load :options :prefix
256 :require :set :tag :type)
257 files (list (locate-library "semi-def")
258 (locate-library "mailcap")
259 (locate-library "mime-def")
260 (locate-library "path-util")
261 (locate-library "poem"))
262 dirs (list (file-name-as-directory (expand-file-name srcdir))))
264 (when (setq file (pop files))
265 (setq dir (file-name-directory file))
266 (unless (member dir dirs)
268 (message "Searching for all the colon keywords in:")
270 (setq dir (pop dirs))
271 (message " %s..." dir)
272 (setq files (directory-files dir t
273 "\\.el\\(\\.gz\\|\\.bz2\\)?$"))
275 (setq file (pop files))
276 (if (string-match "\\(\\.gz$\\)\\|\\.bz2$" file)
277 (let ((temp (expand-file-name "dgnustemp.el" srcdir)))
279 (let* ((binary (if (boundp 'MULE)
282 (coding-system-for-read binary)
283 (coding-system-for-write binary)
284 (input-coding-system binary)
285 (output-coding-system binary)
286 (default-process-coding-system
287 (cons binary binary))
289 (insert-file-contents file nil nil nil t)
293 (if (match-beginning 1)
295 (point-min) (point-max)
296 "gzip" t buffer nil "-cd")
298 (point-min) (point-max)
299 "bzip2" t buffer nil "-d"))
303 (message "In file %s: %s" file code)
305 (write-region (point-min) (point-max) temp
309 (insert-file-contents temp nil nil nil t)
310 (delete-file temp))))
311 (insert-file-contents file nil nil nil t))
312 (while (setq form (condition-case nil
316 (setq elem (pop form))
317 (unless (memq (car-safe elem)
319 defcustom defface defgroup
320 define-widget quote))
322 (push (car elem) form)
323 (setq elem (cdr elem)))
327 (eq ?: (aref (symbol-name elem) 0))
328 (not (memq elem ignores))
329 (not (memq elem keywords)))
330 (push elem keywords)))))))
331 (setq keywords (sort keywords
333 (string-lessp (symbol-name a)
336 (insert (format "%s" keywords))
337 (write-region (point-min) (point) cache nil 'silent)
339 "The following colon keywords will be bound at run-time:\n %s"
342 (defconst dgnushack-colon-keywords keywords)
344 (set (car keywords) (car keywords))
345 (setq keywords (cdr keywords)))))
346 (byte-compile 'dgnushack-bind-colon-keywords)
347 (dgnushack-bind-colon-keywords)))
351 (setq :version ':version
352 :set-after ':set-after)
354 (defadvice custom-handle-keyword
355 (around dont-signal-an-error-even-if-unsupported-keyword-is-given
357 "Don't signal an error even if unsupported keyword is given."
358 (if (not (memq (ad-get-arg 1) '(:version :set-after)))
362 (put 'custom-declare-face 'byte-optimizer
363 'byte-optimize-ignore-unsupported-custom-keywords)
364 (put 'custom-declare-group 'byte-optimizer
365 'byte-optimize-ignore-unsupported-custom-keywords)
366 (defun byte-optimize-ignore-unsupported-custom-keywords (form)
367 (if (or (memq ':version (nthcdr 4 form))
368 (memq ':set-after (nthcdr 4 form)))
369 (let ((newform (list (car form) (nth 1 form)
370 (nth 2 form) (nth 3 form)))
371 (args (nthcdr 4 form)))
373 (or (memq (car args) '(:version :set-after))
374 (setq newform (nconc newform (list (car args)
376 (setq args (cdr (cdr args))))
380 (put 'custom-declare-variable 'byte-hunk-handler
381 'byte-compile-file-form-custom-declare-variable)
382 (defun byte-compile-file-form-custom-declare-variable (form)
383 ;; Bind defcustom'ed variables.
384 (if (memq 'free-vars byte-compile-warnings)
385 (setq byte-compile-bound-variables
386 (cons (nth 1 (nth 1 form)) byte-compile-bound-variables)))
387 (if (memq ':version (nthcdr 4 form))
388 ;; Make the variable uncustomizable.
389 `(defvar ,(nth 1 (nth 1 form)) ,(nth 1 (nth 2 form))
390 ,(substring (nth 3 form) (if (string-match "^[\t *]+" (nth 3 form))
393 ;; Ignore unsupported keyword(s).
394 (if (memq ':set-after (nthcdr 4 form))
395 (let ((newform (list (car form) (nth 1 form)
396 (nth 2 form) (nth 3 form)))
397 (args (nthcdr 4 form)))
399 (or (eq (car args) ':set-after)
400 (setq newform (nconc newform (list (car args)
402 (setq args (cdr (cdr args))))
406 ;; Unknown variables and functions.
407 (unless (boundp 'buffer-file-coding-system)
408 (defvar buffer-file-coding-system (symbol-value 'file-coding-system)))
409 (unless (featurep 'xemacs)
410 (defalias 'Custom-make-dependencies 'ignore)
411 (defalias 'update-autoloads-from-directory 'ignore))
413 (defalias 'device-sound-enabled-p 'ignore)
414 (defalias 'play-sound-file 'ignore)
415 (defalias 'nndb-request-article 'ignore)
416 (defalias 'efs-re-read-dir 'ignore)
417 (defalias 'ange-ftp-re-read-dir 'ignore)
418 (defalias 'define-mail-user-agent 'ignore)
420 (defconst dgnushack-unexporting-files
421 (append '("dgnushack.el" "dgnuspath.el" "dgnuskwds.el" "lpath.el")
423 (progn (require 'shimbun) nil)
424 (error '("nnshimbun.el")))
425 (unless (or (condition-case code
428 (message "No w3: %s %s retrying..." code
429 (locate-library "w3-forms"))
431 ;; Maybe mis-configured Makefile is used (e.g.
432 ;; configured for FSFmacs but XEmacs is running).
433 (let ((lp (delete dgnushack-w3-directory
434 (copy-sequence load-path))))
435 (if (let ((load-path lp))
439 ;; If success, fix `load-path' for compiling.
442 (message " => fixed; W3DIR=%s"
444 (locate-library "w3-forms")))
446 (message " => ignored")
448 '("nnweb.el" "nnlistserv.el" "nnultimate.el"
449 "nnslashdot.el" "nnwarchive.el" "webmail.el"
450 "nnwfm.el" "nnrss.el"))
452 (progn (require 'bbdb) nil)
453 (error '("gnus-bbdb.el")))
454 (unless (featurep 'xemacs)
455 '("gnus-xmas.el" "gnus-picon.el" "messagexmas.el"
456 "nnheaderxm.el" "smiley.el"))
457 (when (or (featurep 'xemacs) (<= emacs-major-version 20))
459 (when (and (fboundp 'base64-decode-string)
460 (subrp (symbol-function 'base64-decode-string)))
462 (when (and (fboundp 'md5) (subrp (symbol-function 'md5)))
464 "Files which will not be installed.")
466 (defconst dgnushack-exporting-files
467 (let ((files (directory-files srcdir nil "^[^=].*\\.el$" t)))
468 (dolist (file dgnushack-unexporting-files)
469 (setq files (delete file files)))
470 (sort files 'string-lessp))
471 "Files which will be compiled and installed.")
473 (defun dgnushack-exporting-files ()
474 "Print name of files which will be installed."
475 (princ (mapconcat 'identity dgnushack-exporting-files " ")))
477 (defun dgnushack-compile (&optional warn)
478 ;;(setq byte-compile-dynamic t)
480 (setq byte-compile-warnings
481 '(free-vars unresolved callargs redefine)))
482 (unless (locate-library "cus-edit")
483 (error "You do not seem to have Custom installed.
484 Fetch it from <URL:http://www.dina.kvl.dk/~abraham/custom/>.
485 You also then need to add the following to the lisp/dgnushack.el file:
487 (push \"~/lisp/custom\" load-path)
489 Modify to suit your needs."))
492 (message "load-path=(\"%s\")"
493 (mapconcat 'identity load-path "\"\n \""))
495 (dolist (file dgnushack-exporting-files)
496 (setq file (expand-file-name file srcdir))
497 (when (and (file-exists-p
498 (setq elc (concat (file-name-nondirectory file) "c")))
499 (file-newer-than-file-p file elc))
502 (let ((files dgnushack-exporting-files)
503 ;;(byte-compile-generate-call-tree t)
505 ;; Avoid barfing (from gnus-xmas) because the etc directory is not yet
507 (when (featurep 'xemacs)
508 (setq gnus-xmas-glyph-directory "dummy"))
509 (while (setq file (pop files))
510 (setq file (expand-file-name file srcdir))
511 (when (or (not (file-exists-p
512 (setq elc (concat (file-name-nondirectory file) "c"))))
513 (file-newer-than-file-p file elc))
515 (byte-compile-file file))))))
517 (defun dgnushack-recompile ()
519 (byte-recompile-directory "." 0))
521 (defvar dgnushack-gnus-load-file (expand-file-name "gnus-load.el" srcdir))
522 (defvar dgnushack-cus-load-file (expand-file-name "cus-load.el" srcdir))
523 (defvar dgnushack-auto-load-file (expand-file-name "auto-autoloads.el" srcdir))
525 (defun dgnushack-make-cus-load ()
526 (when (condition-case nil
529 (let ((cusload-base-file dgnushack-cus-load-file))
530 (if (fboundp 'custom-make-dependencies)
531 (custom-make-dependencies)
532 (Custom-make-dependencies)))))
534 (defun dgnushack-make-auto-load ()
536 (let ((generated-autoload-file dgnushack-gnus-load-file)
537 (make-backup-files nil)
538 (autoload-package-name "gnus"))
539 (if (featurep 'xemacs)
541 (if (file-exists-p generated-autoload-file)
542 (delete-file generated-autoload-file))
543 (if (file-exists-p dgnushack-auto-load-file)
544 (delete-file dgnushack-auto-load-file)))
545 (with-temp-file generated-autoload-file
547 (if (featurep 'xemacs)
548 (let ((si:message (symbol-function 'message)))
549 (defun message (fmt &rest args)
550 (cond ((and (string-equal "Generating autoloads for %s..." fmt)
551 (file-exists-p (file-name-nondirectory (car args))))
553 fmt (file-name-nondirectory (car args))))
554 ((string-equal "No autoloads found in %s" fmt))
555 ((string-equal "Generating autoloads for %s...done" fmt))
556 (t (apply si:message fmt args))))
558 (batch-update-autoloads)
559 (fset 'message si:message)))
560 (batch-update-autoloads))))
562 (defun dgnushack-make-load ()
563 (message (format "Generating %s..." dgnushack-gnus-load-file))
564 (with-temp-file dgnushack-gnus-load-file
565 (if (file-exists-p dgnushack-cus-load-file)
567 (insert-file-contents dgnushack-cus-load-file)
568 (delete-file dgnushack-cus-load-file)
569 (goto-char (point-min))
570 (search-forward ";;; Code:")
572 (delete-region (point-min) (point))
573 (unless (re-search-forward "\
574 ^[\t ]*(autoload[\t\n ]+\\('\\|(quote[\t\n ]+\\)custom-add-loads[\t\n ]"
576 (insert "\n(autoload 'custom-add-loads \"cus-load\")\n"))
577 (goto-char (point-min))
579 ;;; gnus-load.el --- automatically extracted custom dependencies and autoload
583 (goto-char (point-max))
584 (if (search-backward "custom-versions-load-alist" nil t)
587 (while (eq (char-after) ?\;)
590 (delete-region (point) (point-max))
593 ;;; gnus-load.el --- automatically extracted autoload
597 ;; smiley-* are duplicated. Remove them all.
598 (let ((point (point)))
599 (insert-file-contents dgnushack-gnus-load-file)
601 (while (search-forward "smiley-" nil t)
603 (if (looking-at "(autoload ")
604 (delete-region (point) (progn (forward-sexp) (point)))
607 (goto-char (point-max))
608 (when (search-backward "\n(provide " nil t)
610 (delete-region (point) (point-max)))
613 \(provide 'gnus-load)
616 ;;; version-control: never
617 ;;; no-byte-compile: t
618 ;;; no-update-autoloads: t
620 ;;; gnus-load.el ends here\n"))
621 (message (format "Compiling %s..." dgnushack-gnus-load-file))
622 (byte-compile-file dgnushack-gnus-load-file))
625 (defun dgnushack-compose-package ()
626 "Re-split the file gnus-load.el into custom-load.el and
627 auto-autoloads.el. It is silly, should be improved!"
629 Re-splitting gnus-load.el into custom-load.el and auto-autoloads.el...")
630 (let ((customload (expand-file-name "custom-load.el" srcdir))
631 (autoloads (expand-file-name "auto-autoloads.el" srcdir))
634 (insert-file-contents dgnushack-gnus-load-file)
635 (delete-file dgnushack-gnus-load-file)
636 (when (file-exists-p (concat dgnushack-gnus-load-file "c"))
637 (delete-file (concat dgnushack-gnus-load-file "c")))
639 (looking-at "[\t ;]")
643 ;;; custom-load.el --- automatically extracted custom dependencies\n
645 (goto-char (point-max))
648 (not (looking-at "[\t ]*(custom-add-loads[\t\n ]"))))
651 (insert "\n;;; custom-load.el ends here\n")
652 (write-region start (point) customload)
653 (while (looking-at "[\t ]*$")
656 (if (re-search-forward "^[\t\n ]*(if[\t\n ]+(featurep[\t\n ]" nil t)
657 (let ((from (goto-char (match-beginning 0))))
658 (delete-region from (progn
662 (while (looking-at "[\t ;]")
664 (insert "(if (featurep 'gnus-autoloads) (error \"Already loaded\"))\n")
665 (goto-char (point-max))
668 (not (looking-at "[\t ]*(provide[\t\n ]"))))
669 (insert "(provide 'gnus-autoloads)\n")
670 (write-region start (point) autoloads))
671 (byte-compile-file customload)
672 (byte-compile-file autoloads))
674 Re-splitting gnus-load.el into custom-load.el and auto-autoloads.el...done
678 (defconst dgnushack-info-file-regexp-en
679 (let ((names '("gnus" "message" "emacs-mime"))
681 (while (setq name (pop names))
682 (setq regexp (concat regexp "^" name "\\.info\\(-[0-9]+\\)?$"
683 (when names "\\|"))))
685 "Regexp matching English info files.")
687 (defconst dgnushack-info-file-regexp-ja
688 (let ((names '("gnus-ja" "message-ja"))
690 (while (setq name (pop names))
691 (setq regexp (concat regexp "^" name "\\.info\\(-[0-9]+\\)?$"
692 (when names "\\|"))))
694 "Regexp matching Japanese info files.")
696 (defun dgnushack-remove-extra-files-in-package ()
697 "Remove extra files in the lisp directory of the XEmacs package."
698 (let ((lisp-dir (expand-file-name (concat "lisp/"
700 (cadr command-line-args-left)
703 (car command-line-args-left))))
704 (when (file-directory-p lisp-dir)
706 (dolist (file dgnushack-exporting-files)
707 (setq files (nconc files (list file (concat file "c")))))
708 (dolist (file (directory-files lisp-dir nil nil t t))
709 (unless (member file files)
710 (setq file (expand-file-name file lisp-dir))
711 (message "Removing %s..." file)
716 (defun dgnushack-install-package-manifest ()
717 "Install MANIFEST file as an XEmacs package."
718 (let* ((package-dir (car command-line-args-left))
719 (product-name (cadr command-line-args-left))
720 (name (expand-file-name (concat "pkginfo/MANIFEST." product-name)
723 (message "Generating %s..." name)
725 (insert "pkginfo/MANIFEST." product-name "\n")
726 (let ((lisp-dir (concat "lisp/" product-name "/"))
727 (files (sort (directory-files "." nil "\\.elc?$" t) 'string-lessp))
729 (while (setq file (pop files))
730 (unless (member file dgnushack-unexporting-files)
731 (insert lisp-dir file "\n")))
733 (sort (directory-files "../texi/" nil
734 (concat dgnushack-info-file-regexp-en
736 dgnushack-info-file-regexp-ja)
739 (while (setq file (pop files))
740 (insert "info/" file "\n"))))))
743 (define-compiler-macro describe-key-briefly (&whole form key &optional insert)
744 (if (condition-case nil
746 (describe-key-briefly '((())) nil)
748 (wrong-number-of-arguments nil);; Old Emacsen.
753 (insert (funcall 'describe-key-briefly ,key))
754 (funcall 'describe-key-briefly ,key))
755 `(funcall 'describe-key-briefly ,key))))
757 ;;; dgnushack.el ends here