Mercurial > hg > xemacs-beta
annotate lib-src/update-autoloads.sh @ 5652:cc6f0266bc36
Avoid #'delq in core Lisp, for the sake of style, a very slightly smaller binary
lisp/ChangeLog addition:
2012-05-01 Aidan Kehoe <kehoea@parhasard.net>
Avoid #'delq in core code, for the sake of style and a (very
slightly) smaller binary.
* behavior.el (disable-behavior):
* behavior.el (compute-behavior-group-children):
* buff-menu.el (buffers-tab-items):
* byte-optimize.el (byte-optimize-delay-constants-math):
* byte-optimize.el (byte-optimize-logmumble):
* byte-optimize.el (byte-decompile-bytecode-1):
* byte-optimize.el (byte-optimize-lapcode):
* bytecomp.el:
* bytecomp.el (byte-compile-arglist-warn):
* bytecomp.el (byte-compile-warn-about-unresolved-functions):
* bytecomp.el (byte-compile-lambda):
* bytecomp.el (byte-compile-out-toplevel):
* bytecomp.el (byte-compile-insert):
* bytecomp.el (byte-compile-defalias-warn):
* cl-macs.el (cl-upcase-arg):
* cl-macs.el (cl-transform-lambda):
* cl-macs.el (cl-do-proclaim):
* cl-macs.el (defstruct):
* cl-macs.el (cl-make-type-test):
* cl-macs.el (define-compiler-macro):
* cl-macs.el (delete-duplicates):
* cus-edit.el (widget-face-value-delete):
* cus-edit.el (face-history):
* easymenu.el (easy-menu-remove):
* files.el (files-fetch-hook-value):
* files.el (file-expand-wildcards):
* font-lock.el (font-lock-update-removed-keyword-alist):
* font-lock.el (font-lock-remove-keywords):
* frame.el (frame-initialize):
* frame.el (frame-notice-user-settings):
* frame.el (set-frame-font):
* frame.el (delete-other-frames):
* frame.el (get-frame-for-buffer-noselect):
* gnuserv.el (gnuserv-kill-buffer-function):
* gnuserv.el (gnuserv-check-device):
* gnuserv.el (gnuserv-kill-client):
* gnuserv.el (gnuserv-buffer-done-1):
* gtk-font-menu.el (gtk-reset-device-font-menus):
* gutter-items.el (buffers-tab-items):
* gutter.el (set-gutter-element-visible-p):
* info.el (Info-find-file-node):
* info.el (Info-history-add):
* info.el (Info-build-annotation-completions):
* info.el (Info-index):
* info.el (Info-reannotate-node):
* itimer.el (delete-itimer):
* itimer.el (start-itimer):
* lib-complete.el (lib-complete:cache-completions):
* loadhist.el (unload-feature):
* menubar-items.el (build-buffers-menu-internal):
* menubar.el (delete-menu-item):
* menubar.el (relabel-menu-item):
* msw-font-menu.el (mswindows-reset-device-font-menus):
* mule/make-coding-system.el (fixed-width-generate-helper):
* next-error.el (next-error-find-buffer):
* obsolete.el:
* obsolete.el (find-non-ascii-charset-string):
* obsolete.el (find-non-ascii-charset-region):
* occur.el (multi-occur-by-filename-regexp):
* occur.el (occur-1):
* packages.el (packages-package-hierarchy-directory-names):
* packages.el (package-get-key-1):
* process.el (setenv):
* simple.el (undo):
* simple.el (handle-pre-motion-command-current-command-is-motion):
* sound.el (load-sound-file):
* wid-edit.el (widget-field-value-delete):
* wid-edit.el (widget-checklist-match-inline):
* wid-edit.el (widget-checklist-match-find):
* wid-edit.el (widget-editable-list-delete-at):
* wid-edit.el (widget-editable-list-entry-create):
* window.el (quit-window):
* x-font-menu.el (x-reset-device-font-menus-core):
1. Replace (delq nil (mapcar ....)) with analogous (mapcan ...)
forms; this is in non-dumped files, it was done previously in
dumped files.
2. Replace (delq FOO (copy-sequence BAR)) with (remove* FOO BAR),
where #'eq and #'eql are equivalent
3. Replace (delq FOO BAR) with (delete* FOO BAR), where FOO is not
a non-fixnum number. Saves a little space in the dumped file
(since the compiler macro adds :test #'eq to the delete* call if
it's not clear that FOO is not a non-fixnum number).
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 01 May 2012 16:17:42 +0100 |
parents | 308d34e9f07d |
children |
rev | line source |
---|---|
428 | 1 #!/bin/sh |
2 ### update-autoloads.sh --- update auto-autoloads.el as necessary | |
3 | |
4 # Author: Jamie Zawinski, Ben Wing, Martin Buchholz, Steve Baur | |
5 # Maintainer: Steve Baur | |
6 # Keywords: internal | |
7 | |
8 # This file is part of XEmacs. | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
9 # |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
10 # XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
11 # under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
12 # Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
13 # option) any later version. |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
14 # |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
15 # XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
17 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
18 # for more details. |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
19 # |
428 | 20 # You should have received a copy of the GNU General Public License |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
428
diff
changeset
|
21 # along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
428 | 22 |
23 ### Commentary: | |
24 | |
25 ### Code: | |
26 | |
27 set -eu | |
28 | |
29 # This means we're running in a Sun workspace | |
30 test -d ../era-specific && cd ../editor | |
31 | |
32 # get to the right directory | |
33 test ! -d ./lisp -a -d ../lisp && cd .. | |
34 if test ! -d ./lisp ; then | |
35 echo $0: neither ./lisp/ nor ../lisp/ exist | |
36 exit 1 | |
37 fi | |
38 | |
39 test -z "$EMACS" && EMACS="./src/xemacs" | |
40 echo " (using $EMACS)" | |
41 | |
42 export EMACS | |
43 | |
44 EMACS_DIR=`cd \`dirname $EMACS\` && pwd`; | |
45 CANON_PWD=`pwd` | |
46 # Account for various system automounter configurations | |
47 if test -d "/net"; then | |
48 if test -d "/tmp_mnt/net"; then tdir="/tmp_mnt/net"; else tdir="/tmp_mnt"; fi | |
49 EMACS_DIR=`echo "$EMACS_DIR" | \ | |
50 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"` | |
51 CANON_PWD=`echo "$CANON_PWD" | \ | |
52 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"` | |
53 fi | |
54 REAL="$EMACS_DIR/`basename $EMACS`" | |
55 | |
56 echo "Rebuilding autoloads in $CANON_PWD" | |
57 echo " with $REAL..." | |
58 | |
59 #### echon really sucks! | |
60 if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then | |
61 echon() | |
62 { | |
63 /bin/echo $* '\c' | |
64 } | |
65 else | |
66 echon() | |
67 { | |
68 echo -n $* | |
69 } | |
70 fi | |
71 | |
72 # Compute patterns to ignore when searching for files | |
73 # These directories don't have autoloads or are partially broken. | |
74 ignore_dirs="egg eos ilisp its locale mel mu sunpro term tooltalk" | |
75 | |
76 # Prepare for autoloading directories with directory-specific instructions | |
77 make_special_commands='' | |
78 make_special () { | |
79 dir="$1"; shift; | |
80 ignore_dirs="$ignore_dirs $dir" | |
81 make_special_commands="$make_special_commands \ | |
82 (cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*});" | |
83 } | |
84 | |
85 # Only use Mule XEmacs to build Mule-specific autoloads & custom-loads. | |
86 echon "Checking for Mule support..." | |
87 lisp_prog='(princ (featurep (quote mule)))' | |
88 mule_p="`$EMACS -batch -q -no-site-file -eval \"$lisp_prog\"`" | |
89 if test "$mule_p" = nil ; then | |
90 echo No | |
91 ignore_dirs="$ignore_dirs mule leim language skk" | |
92 else | |
93 echo Yes | |
94 fi | |
95 | |
96 ## AUCTeX is a Package now | |
97 # if test "$mule_p" = nil ; then | |
98 # make_special auctex autoloads | |
99 # else | |
100 # make_special auctex autoloads MULE_EL=tex-jp.elc | |
101 # fi | |
102 #make_special cc-mode autoloads | |
103 # EFS is now packaged | |
104 #make_special efs autoloads | |
105 #make_special eos autoloads # EOS doesn't have custom or autoloads | |
106 # Hyperbole is now packaged | |
107 # make_special hyperbole autoloads | |
108 # make_special ilisp autoloads | |
109 # oobr is now packaged | |
110 # make_special oobr HYPB_ELC='' autoloads | |
111 ## W3 is a package now | |
112 ##make_special w3 autoloads | |
113 | |
114 dirs= | |
115 for dir in lisp/*; do | |
116 if test -d $dir \ | |
117 -a $dir != lisp/CVS \ | |
118 -a $dir != lisp/SCCS; then | |
119 for ignore in $ignore_dirs; do | |
120 if test $dir = lisp/$ignore; then | |
121 continue 2 | |
122 fi | |
123 done | |
124 dirs="$dirs $dir" | |
125 fi | |
126 done | |
127 | |
128 $EMACS -batch -q -no-site-file -eval '(setq autoload-package-name "Standard")' \ | |
129 -l autoload -f batch-update-directory lisp | |
130 | |
131 # set -x | |
132 for dir in $dirs; do | |
133 $EMACS -batch -q -no-site-file -l autoload -f batch-update-directory $dir | |
134 done | |
135 | |
136 # eval "$make_special_commands" |