Fix build failure for muse-ikiwiki.
[muse-el.git] / scripts / muse-build.el
blob7b863410b764017638166caa3b29d26255a03b23
1 (add-to-list 'load-path "../contrib")
2 (add-to-list 'load-path "../experimental")
3 (add-to-list 'load-path "../lisp")
5 ;; Avoid interference from VC.el
6 (setq vc-handled-backends nil)
8 (defun muse-elint-files ()
9 (require 'elint)
10 (elint-initialize)
12 (defvar nomessage t)
13 (load "muse" nil nomessage)
14 (dolist (dir '("../lisp" "../contrib" "../experimental"))
15 (dolist (file (directory-files dir nil "\\.el$"))
16 (setq file (substring file 0 (string-match "\\.el$" file)))
17 (load file nil nomessage)))
19 (add-to-list 'elint-standard-variables 'current-prefix-arg)
20 (add-to-list 'elint-standard-variables 'command-line-args-left)
21 (add-to-list 'elint-standard-variables 'buffer-file-coding-system)
22 (add-to-list 'elint-standard-variables 'save-some-buffers-action-alist)
23 (add-to-list 'elint-standard-variables 'emacs-major-version)
24 (add-to-list 'elint-standard-variables 'emacs-minor-version)
25 (add-to-list 'elint-standard-variables 'emacs-version)
26 (add-to-list 'elint-standard-variables 'window-system)
27 (add-to-list 'elint-standard-variables 'muse-mode-abbrev-table)
28 (dolist (file command-line-args-left)
29 (find-file file)
30 (message "Checking %s ..." file)
31 (elint-current-buffer)
32 (with-current-buffer (elint-get-log-buffer)
33 (goto-char (point-min))
34 (forward-line 2)
35 (while (not (or (eobp)
36 (looking-at "^Linting complete")))
37 (message (buffer-substring (muse-line-beginning-position)
38 (muse-line-end-position)))
39 (forward-line 1)))
40 (kill-buffer (current-buffer))))
42 (defun muse-generate-autoloads ()
43 (interactive)
44 (defvar autoload-package-name)
45 (defvar command-line-args-left)
46 (defvar generated-autoload-file)
47 (require 'autoload)
48 (setq backup-inhibited t)
49 (setq generated-autoload-file (expand-file-name "muse-autoloads.el"))
50 (setq command-line-args-left (mapcar #'expand-file-name
51 command-line-args-left))
52 (if (featurep 'xemacs)
53 (progn
54 (setq autoload-package-name "muse")
55 (batch-update-autoloads))
56 (find-file generated-autoload-file)
57 (delete-region (point-min) (point-max))
58 (insert ";;; muse-autoloads.el --- autoloads for Muse
60 ;;; Code:
62 (save-buffer 0)
63 (batch-update-autoloads)
64 (find-file generated-autoload-file)
65 (goto-char (point-max))
66 (insert ?\n)
67 (insert "(provide 'muse-autoloads)
68 ;;; muse-autoloads.el ends here
70 ;; Local Variables:
71 ;; version-control: never
72 ;; no-byte-compile: t
73 ;; no-update-autoloads: t
74 ;; End:
76 (insert ?\n)
77 (save-buffer 0)
78 (kill-buffer (current-buffer))))