1 ;;; dgnushack.el --- a hack to set the load path for byte-compiling
2 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 ;; Free Software Foundation, Inc.
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7 ;; Katsumi Yamaoka <yamaoka@jpl.org>
9 ;; Keywords: news, path
11 ;; This file is part of GNU Emacs.
13 ;; GNU Emacs is free software; you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation; either version 2, or (at your option)
18 ;; GNU Emacs is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 ;; Boston, MA 02110-1301, USA.
32 ;; Set coding priority of Shift-JIS to the bottom.
33 (if (featurep 'xemacs)
34 (defalias 'set-coding-priority 'ignore)
35 (defalias 'coding-priority-list 'ignore)
36 (defalias 'set-coding-priority-list 'ignore))
37 (cond ((and (featurep 'xemacs) (featurep 'mule))
38 (if (memq 'shift-jis (coding-priority-list))
39 (set-coding-priority-list
40 (append (delq 'shift-jis (coding-priority-list)) '(shift-jis)))))
42 (if (memq 'coding-category-sjis coding-category-list)
44 (append (delq 'coding-category-sjis
45 (copy-sequence coding-category-list))
46 '(coding-category-sjis))))))
48 (defalias 'facep 'ignore)
53 ;; `dolist' might not be available because of ``-no-autoloads''.
55 ;; It may have been defined in egg.el.
57 (load "cl-macs" nil t))
59 (defvar srcdir (or (getenv "srcdir") "."))
60 (defvar loaddir (and load-file-name (file-name-directory load-file-name)))
62 (defvar dgnushack-w3-directory (let ((w3dir (getenv "W3DIR")))
63 (unless (zerop (length w3dir))
64 (file-name-as-directory w3dir))))
66 (let ((urldir (getenv "URLDIR")))
67 (unless (zerop (length urldir))
68 (setq urldir (file-name-as-directory urldir))
69 (push (file-name-as-directory urldir) load-path))
70 (when (and dgnushack-w3-directory
71 (not (string-equal urldir dgnushack-w3-directory)))
72 (push dgnushack-w3-directory load-path)))
74 ;; If we are building w3 in a different directory than the source
75 ;; directory, we must read *.el from source directory and write *.elc
76 ;; into the building directory. For that, we define this function
77 ;; before loading bytecomp. Bytecomp doesn't overwrite this function.
78 (defun byte-compile-dest-file (filename)
79 "Convert an Emacs Lisp source file name to a compiled file name.
80 In addition, remove directory name part from FILENAME."
81 (setq filename (byte-compiler-base-file-name filename))
82 (setq filename (file-name-sans-versions filename))
83 (setq filename (file-name-nondirectory filename))
84 (if (memq system-type '(win32 w32 mswindows windows-nt))
85 (setq filename (downcase filename)))
86 (cond ((eq system-type 'vax-vms)
87 (concat (substring filename 0 (string-match ";" filename)) "c"))
88 ((string-match emacs-lisp-file-regexp filename)
89 (concat (substring filename 0 (match-beginning 0)) ".elc"))
90 (t (concat filename ".elc"))))
93 ;; To avoid having defsubsts and inlines happen.
94 ;(if (featurep 'xemacs)
95 ; (require 'byte-optimize)
96 ; (require 'byte-opt))
97 ;(defun byte-optimize-inline-handler (form)
98 ; "byte-optimize-handler for the `inline' special-form."
99 ; (cons 'progn (cdr form)))
100 ;(defalias 'byte-compile-file-form-defsubst 'byte-compile-file-form-defun)
102 (when (and (not (featurep 'xemacs))
103 (= emacs-major-version 21)
104 (>= emacs-minor-version 3)
106 (let ((byte-compile-error-on-warn t))
107 (byte-optimize-form (quote (pop x)) t)
109 (error (string-match "called for effect"
110 (error-message-string code)))))
111 (defadvice byte-optimize-form-code-walker (around silence-warn-for-pop
114 "Silence the warning \"...called for effect\" for the `pop' form.
115 It is effective only when the `pop' macro is defined by cl.el rather
118 (if (and (eq (car-safe form) 'car)
120 (setq tmp (get 'car 'side-effect-free))
121 (not byte-compile-delete-errors)
122 (not (eq tmp 'error-free))
123 (eq (car-safe (cadr form)) 'prog1)
124 (let ((var (cadr (cadr form)))
125 (last (nth 2 (cadr form))))
127 (null (nthcdr 3 (cadr form)))
128 (eq (car-safe last) 'setq)
130 (eq (car-safe (nth 2 last)) 'cdr)
131 (eq (cadr (nth 2 last)) var))))
133 (put 'car 'side-effect-free 'error-free)
136 (put 'car 'side-effect-free tmp)))
139 (when (and (not (featurep 'xemacs))
140 (byte-optimize-form '(and (> 0 1) foo) t))
141 (defadvice byte-optimize-form-code-walker
142 (around fix-bug-in-and/or-forms (form for-effect) activate)
143 "Optimize the rest of the and/or forms.
144 It has been fixed in XEmacs before releasing 21.4 and also has been
145 fixed in Emacs after 21.3."
146 (if (and for-effect (memq (car-safe form) '(and or)))
147 (let ((fn (car form))
148 (backwards (reverse (cdr form))))
149 (while (and backwards
150 (null (setcar backwards
151 (byte-optimize-form (car backwards) t))))
152 (setq backwards (cdr backwards)))
153 (if (and (cdr form) (null backwards))
155 " all subforms of %s called for effect; deleted" form))
158 (mapcar 'byte-optimize-form (cdr backwards))))
159 (setq ad-return-value (cons fn (nreverse backwards))))
162 ;; Add `configure-package-path' to `load-path' for XEmacs. Those paths
163 ;; won't appear in `load-path' when XEmacs starts with the `-no-autoloads'
164 ;; option or the `-vanilla' option because of a bug. :<
165 (when (and (featurep 'xemacs)
166 (boundp 'configure-package-path)
167 (listp configure-package-path))
172 (when (and (stringp path)
173 (not (string-equal path ""))
175 (setq path (expand-file-name "lisp" path))))
176 (directory-files path t)))
177 configure-package-path)))
180 (setq path (car paths)
183 (not (or (string-match "/\\.\\.?\\'" path)
184 (member (file-name-as-directory path) load-path)
185 (member path load-path)))
186 (file-directory-p path))
187 (push (file-name-as-directory path) adds)))
188 (setq load-path (nconc (nreverse adds) load-path))))
190 (if (file-exists-p (expand-file-name "dgnuspath.el" srcdir))
191 (load (expand-file-name "dgnuspath.el" srcdir) nil nil t))
194 (load "~/.lpath.el" t nil t)
195 (error (message "Error in \"~/.lpath.el\" file: %s" err)))
197 (when (featurep 'xemacs)
199 (require 'timer-funcs)
201 You should upgrade your XEmacs packages, especially xemacs-base.\n"))
203 ;; The reason that to load `advice' is necessary is:
204 ;; 1. `path-util' loads poe.elc.
205 ;; 2. poe.elc requires the `ad-add-advice' function which is expanded
207 ;; 3. XEmacs is running with the -no-autoloads option.
210 ;; Don't load path-util until `char-after' and `char-before' have been
211 ;; optimized because it requires `poe' and then modify the functions.
215 APEL was not found or an error occurred. You will need to run the
216 configure script again adding the --with-addpath=APEL_PATH option.\n"
219 (unless (locate-library "mel")
221 (unless (module-installed-p 'mel)
222 ;; FLIM 1.14 may have installed in two "flim" subdirectories.
223 (push (expand-file-name "flim"
224 (file-name-directory (get-latest-path "^apel$" t)))
226 (unless (module-installed-p 'mel)
228 FLIM was not found. You will need to run the configure script again
229 adding the --with-addpath=FLIM_PATH option.\n"
233 (when (and (featurep 'xemacs)
234 (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table)))
235 (modify-syntax-entry ?= " " table)
237 (with-syntax-table table
239 (goto-char (point-min))
242 ;; The original `with-syntax-table' uses `copy-syntax-table' which
243 ;; doesn't seem to copy modified syntax entries in XEmacs 21.5.
244 (defmacro with-syntax-table (syntab &rest body)
245 "Evaluate BODY with the SYNTAB as the current syntax table."
246 `(let ((stab (syntax-table)))
249 ;;(set-syntax-table (copy-syntax-table ,syntab))
250 (set-syntax-table ,syntab)
252 (set-syntax-table stab)))))
254 (push srcdir load-path)
255 (push loaddir load-path)
256 (load (expand-file-name "lpath.el" loaddir) nil t)
260 ;; Bind functions defined by `defun-maybe'.
261 (put 'defun-maybe 'byte-hunk-handler 'byte-compile-file-form-defun-maybe)
262 (defun byte-compile-file-form-defun-maybe (form)
263 (if (and (not (fboundp (nth 1 form)))
264 (memq 'unresolved byte-compile-warnings))
265 (setq byte-compile-function-environment
266 (cons (cons (nth 1 form)
267 (cons 'lambda (cdr (cdr form))))
268 byte-compile-function-environment)))
271 ;; Unknown variables and functions.
272 (unless (featurep 'xemacs)
273 (defalias 'Custom-make-dependencies 'ignore)
274 (defalias 'update-autoloads-from-directory 'ignore))
276 (defalias 'device-sound-enabled-p 'ignore)
277 (defalias 'play-sound-file 'ignore)
278 (defalias 'nndb-request-article 'ignore)
279 (defalias 'efs-re-read-dir 'ignore)
280 (defalias 'ange-ftp-re-read-dir 'ignore)
281 (defalias 'define-mail-user-agent 'ignore)
284 (when (featurep 'xemacs)
285 (unless (fboundp 'defadvice)
286 (autoload 'defadvice "advice" nil nil 'macro))
287 (autoload 'Info-directory "info" nil t)
288 (autoload 'Info-menu "info" nil t)
289 (autoload 'annotations-at "annotations")
290 (autoload 'apropos "apropos" nil t)
291 (autoload 'apropos-command "apropos" nil t)
292 (autoload 'bbdb-complete-name "bbdb-com" nil t)
293 (autoload 'browse-url "browse-url" nil t)
294 (autoload 'c-mode "cc-mode" nil t)
295 (autoload 'customize-apropos "cus-edit" nil t)
296 (autoload 'customize-save-variable "cus-edit" nil t)
297 (autoload 'customize-set-variable "cus-edit" nil t)
298 (autoload 'customize-variable "cus-edit" nil t)
299 (autoload 'delete-annotation "annotations")
300 (autoload 'dolist "cl-macs" nil nil 'macro)
301 (autoload 'enriched-decode "enriched")
302 (autoload 'executable-find "executable")
303 (autoload 'font-lock-fontify-buffer "font-lock" nil t)
304 (autoload 'info "info" nil t)
305 (autoload 'mail-extract-address-components "mail-extr")
306 (autoload 'mail-fetch-field "mail-utils")
307 (autoload 'make-annotation "annotations")
308 (autoload 'make-display-table "disp-table")
310 (autoload 'ps-despool "ps-print" nil t)
311 (autoload 'ps-spool-buffer "ps-print" nil t)
312 (autoload 'ps-spool-buffer-with-faces "ps-print" nil t)
313 (autoload 'read-passwd "passwd")
314 (autoload 'regexp-opt "regexp-opt")
315 (autoload 'reporter-submit-bug-report "reporter")
316 (if (and (emacs-version>= 21 5)
317 (not (featurep 'sxemacs)))
318 (autoload 'setenv "process" nil t)
319 (autoload 'setenv "env" nil t))
320 (autoload 'sgml-mode "psgml" nil t)
321 (autoload 'smtpmail-send-it "smtpmail")
322 (autoload 'sort-numeric-fields "sort" nil t)
323 (autoload 'sort-subr "sort")
324 (autoload 'trace-function-background "trace" nil t)
325 (autoload 'w3-do-setup "w3")
326 (autoload 'w3-prepare-buffer "w3-display")
327 (autoload 'w3-region "w3-display" nil t)
328 (defalias 'frame-char-height 'frame-height)
329 (defalias 'frame-char-width 'frame-width)
330 (defalias 'frame-parameter 'frame-property)
331 (defalias 'make-overlay 'ignore)
332 (defalias 'overlay-end 'ignore)
333 (defalias 'overlay-get 'ignore)
334 (defalias 'overlay-put 'ignore)
335 (defalias 'overlay-start 'ignore)
336 (defalias 'overlays-in 'ignore)
337 (defalias 'replace-dehighlight 'ignore)
338 (defalias 'replace-highlight 'ignore)
339 (defalias 'w3-coding-system-for-mime-charset 'ignore)))
343 (when (featurep 'xemacs)
344 (autoload 'c-mode "cc-mode" nil t)
345 (autoload 'font-lock-mode "font-lock" nil t)
346 (autoload 'read-kbd-macro "edmacro" nil t)
347 (autoload 'turn-on-font-lock "font-lock" nil t))
348 (autoload 'nnheader-detect-coding-region "nnheader")
349 (autoload 'std11-extract-addresses-components "nnheader")
350 (autoload 'std11-fold-region "nnheader")
351 (autoload 'std11-narrow-to-field "nnheader")
352 (autoload 'std11-unfold-region "nnheader"))
354 (defconst dgnushack-unexporting-files
355 (append '("dgnushack.el" "dgnuspath.el" "dgnuskwds.el" "lpath.el"
356 "legacy-gnus-agent.el")
357 (unless (or (condition-case code
360 (message "No w3: %s%s, retrying..."
361 (error-message-string code)
362 (if (setq code (locate-library "w3-parse"))
363 (concat " (" code ")")
366 ;; Maybe mis-configured Makefile is used (e.g.
367 ;; configured for FSFmacs but XEmacs is running).
368 (let ((lp (delete dgnushack-w3-directory
369 (copy-sequence load-path))))
370 (if (let ((load-path lp))
374 ;; If success, fix `load-path' for compiling.
377 (message " => fixed; W3DIR=%s"
379 (locate-library "w3-parse")))
381 (message " => ignored")
383 '("nnultimate.el" "webmail.el" "nnwfm.el"))
385 (progn (require 'mh-e) nil)
387 (message "No mh-e: %s%s (ignored)"
388 (error-message-string code)
389 (if (setq code (locate-library "mh-e"))
390 (concat " (" code ")")
394 (progn (require 'xml) nil)
396 (message "No xml: %s%s (ignored)"
397 (error-message-string code)
398 (if (setq code (locate-library "xml"))
399 (concat " (" code ")")
403 (progn (require 'bbdb) nil)
405 (message "No bbdb: %s%s (ignored)"
406 (error-message-string code)
407 (if (setq code (locate-library "bbdb"))
408 (concat " (" code ")")
411 (unless (featurep 'xemacs)
412 '("gnus-xmas.el" "messagexmas.el" "nnheaderxm.el"))
413 (when (and (fboundp 'base64-decode-string)
414 (subrp (symbol-function 'base64-decode-string)))
416 (when (and (fboundp 'md5) (subrp (symbol-function 'md5)))
418 (when (featurep 'xemacs)
420 "Files which will not be installed.")
422 (defconst dgnushack-exporting-files
423 (let ((files (directory-files srcdir nil "^[^=].*\\.el$" t)))
424 (dolist (file dgnushack-unexporting-files)
425 (setq files (delete file files)))
426 (sort files 'string-lessp))
427 "Files which will be compiled and installed.")
429 (defun dgnushack-exporting-files ()
430 "Print name of files which will be installed."
431 (princ (mapconcat 'identity dgnushack-exporting-files " ")))
433 (defconst dgnushack-dont-compile-files
435 "mm-bodies.el" "mm-decode.el" "mm-encode.el" "mm-extern.el"
436 "mm-partial.el" "mm-uu.el" "mm-view.el" "mml-sec.el" "mml-smime.el"
437 "mml.el" "mml1991.el" "mml2015.el")
438 "Files which should not be byte-compiled.")
440 (defun dgnushack-compile-verbosely ()
441 "Call dgnushack-compile with warnings ENABLED. If you are compiling
442 patches to gnus, you should consider modifying make.bat to call
443 dgnushack-compile-verbosely. All other users should continue to use
445 (dgnushack-compile t))
447 (defun dgnushack-compile (&optional warn)
448 ;;(setq byte-compile-dynamic t)
450 (setq byte-compile-warnings
451 '(free-vars unresolved callargs redefine)))
454 (message "load-path=(\"%s\")"
455 (mapconcat 'identity load-path "\"\n \""))
457 (dolist (file dgnushack-exporting-files)
458 (setq file (expand-file-name file srcdir))
459 (when (and (file-exists-p
460 (setq elc (concat (file-name-nondirectory file) "c")))
461 (file-newer-than-file-p file elc))
464 ;; Avoid barfing (from gnus-xmas) because the etc directory is not yet
466 (when (featurep 'xemacs)
467 (setq gnus-xmas-glyph-directory "dummy"))
469 (let ((files dgnushack-exporting-files)
470 ;;(byte-compile-generate-call-tree t)
472 (while (setq file (pop files))
473 (unless (member file dgnushack-dont-compile-files)
474 (setq file (expand-file-name file srcdir))
475 (when (or (not (file-exists-p
476 (setq elc (concat (file-name-nondirectory file) "c"))))
477 (file-newer-than-file-p file elc))
479 (byte-compile-file file)))))))
481 (defun dgnushack-recompile ()
483 (byte-recompile-directory "." 0))
485 (defvar dgnushack-gnus-load-file
486 (if (featurep 'xemacs)
487 (expand-file-name "auto-autoloads.el" srcdir)
488 (expand-file-name "gnus-load.el" srcdir)))
490 (defvar dgnushack-cus-load-file
491 (if (featurep 'xemacs)
492 (expand-file-name "custom-load.el" srcdir)
493 (expand-file-name "cus-load.el" srcdir)))
495 (defun dgnushack-make-cus-load ()
497 (let ((cusload-base-file dgnushack-cus-load-file))
498 (if (fboundp 'custom-make-dependencies)
499 (custom-make-dependencies)
500 (Custom-make-dependencies))
501 (when (featurep 'xemacs)
502 (message "Compiling %s..." dgnushack-cus-load-file)
503 (byte-compile-file dgnushack-cus-load-file))))
505 (defun dgnushack-make-auto-load ()
507 (unless (make-autoload '(define-derived-mode child parent name
510 (defadvice make-autoload (around handle-define-derived-mode activate)
511 "Handle `define-derived-mode'."
512 (if (eq (car-safe (ad-get-arg 0)) 'define-derived-mode)
513 (setq ad-return-value
515 (list 'quote (nth 1 (ad-get-arg 0)))
517 (nth 4 (ad-get-arg 0))
520 (put 'define-derived-mode 'doc-string-elt 3))
521 (let ((generated-autoload-file dgnushack-gnus-load-file)
522 (make-backup-files nil)
523 (autoload-package-name "gnus"))
524 (if (featurep 'xemacs)
525 (if (file-exists-p generated-autoload-file)
526 (delete-file generated-autoload-file))
527 (with-temp-file generated-autoload-file
529 (if (featurep 'xemacs)
530 (let ((si:message (symbol-function 'message)))
531 (defun message (fmt &rest args)
532 (cond ((and (string-equal "Generating autoloads for %s..." fmt)
533 (file-exists-p (file-name-nondirectory (car args))))
535 fmt (file-name-nondirectory (car args))))
536 ((string-equal "No autoloads found in %s" fmt))
537 ((string-equal "Generating autoloads for %s...done" fmt))
538 (t (apply si:message fmt args))))
540 (batch-update-autoloads)
541 (fset 'message si:message)))
542 (batch-update-autoloads))))
544 (defun dgnushack-make-load ()
545 (unless (featurep 'xemacs)
546 (message "Generating %s..." dgnushack-gnus-load-file)
547 (with-temp-file dgnushack-gnus-load-file
548 (insert-file-contents dgnushack-cus-load-file)
549 (delete-file dgnushack-cus-load-file)
550 (goto-char (point-min))
551 (search-forward ";;; Code:")
553 (delete-region (point-min) (point))
555 ;;; gnus-load.el --- automatically extracted custom dependencies and autoload
559 (goto-char (point-max))
560 (if (search-backward "custom-versions-load-alist" nil t)
563 (while (eq (char-after) ?\;)
566 (delete-region (point) (point-max))
568 ;; smiley-* are duplicated. Remove them all.
569 (let ((point (point)))
570 (insert-file-contents dgnushack-gnus-load-file)
572 (while (search-forward "smiley-" nil t)
574 (if (looking-at "(autoload ")
575 (delete-region (point) (progn (forward-sexp) (point)))
578 (goto-char (point-max))
579 (when (search-backward "\n(provide " nil t)
581 (delete-region (point) (point-max)))
584 \(provide 'gnus-load)
587 ;;; version-control: never
588 ;;; no-byte-compile: t
589 ;;; no-update-autoloads: t
591 ;;; gnus-load.el ends here
594 (message "Compiling %s..." dgnushack-gnus-load-file)
595 (byte-compile-file dgnushack-gnus-load-file)
596 (when (featurep 'xemacs)
597 (message "Creating dummy gnus-load.el...")
598 (with-temp-file (expand-file-name "gnus-load.el")
601 \(provide 'gnus-load)
604 ;;; version-control: never
605 ;;; no-byte-compile: t
606 ;;; no-update-autoloads: t
608 ;;; gnus-load.el ends here"))))
611 (defconst dgnushack-info-file-regexp-en
612 (let ((names '("gnus" "message" "emacs-mime"))
614 (while (setq name (pop names))
615 (setq regexp (concat regexp "^" name "\\.info\\(-[0-9]+\\)?$"
616 (when names "\\|"))))
618 "Regexp matching English info files.")
620 (defconst dgnushack-info-file-regexp-ja
621 (let ((names '("gnus-ja" "message-ja"))
623 (while (setq name (pop names))
624 (setq regexp (concat regexp "^" name "\\.info\\(-[0-9]+\\)?$"
625 (when names "\\|"))))
627 "Regexp matching Japanese info files.")
629 (defun dgnushack-remove-extra-files-in-package ()
630 "Remove extra files in the lisp directory of the XEmacs package."
631 (let ((lisp-dir (expand-file-name (concat "lisp/"
633 (cadr command-line-args-left)
636 (car command-line-args-left))))
637 (setq command-line-args-left nil)
638 (when (file-directory-p lisp-dir)
640 (dolist (file dgnushack-exporting-files)
641 (setq files (nconc files (list file (concat file "c")))))
642 (dolist (file (directory-files lisp-dir nil nil t t))
643 (unless (member file files)
644 (setq file (expand-file-name file lisp-dir))
645 (message "Removing %s..." file)
650 (defun dgnushack-install-package-manifest ()
651 "Install MANIFEST file as an XEmacs package."
652 (let* ((package-dir (pop command-line-args-left))
653 (product-name (pop command-line-args-left))
654 (pkginfo-dir (expand-file-name "pkginfo" package-dir))
655 (name (expand-file-name (concat "MANIFEST." product-name)
658 (unless (file-directory-p pkginfo-dir)
659 (message "Creating directory %s/..." pkginfo-dir)
660 (make-directory pkginfo-dir))
661 (message "Generating %s..." name)
663 (insert "pkginfo/MANIFEST." product-name "\n")
664 (let ((lisp-dir (concat "lisp/" product-name "/"))
665 (files (sort (directory-files "." nil "\\.elc?$" t) 'string-lessp))
667 (while (setq file (pop files))
668 (unless (member file dgnushack-unexporting-files)
669 (insert lisp-dir file "\n")))
671 (sort (directory-files "../texi/" nil
672 (concat dgnushack-info-file-regexp-en
674 dgnushack-info-file-regexp-ja)
677 (while (setq file (pop files))
678 (insert "info/" file "\n"))
679 (insert "etc/gnus-tut.txt\n")
681 (sort (directory-files "../etc/images/gnus/" nil
682 "\\.\\(pbm\\|xbm\\|xpm\\)\\'"
685 (while (setq file (pop files))
686 (insert "etc/images/gnus/" file "\n"))
687 (insert "etc/images/gnus/x-splash\n")
689 (sort (directory-files "../etc/images/smilies/" nil
690 "\\.\\(pbm\\|xpm\\)\\'"
693 (while (setq file (pop files))
694 (insert "etc/images/smilies/" file "\n"))))))
696 ;;; dgnushack.el ends here