Mercurial > hg > xemacs-beta
annotate lib-src/vcdiff @ 5655:b7ae5f44b950
Remove some redundant functions, change others to labels, lisp/
lisp/ChangeLog addition:
2012-05-05 Aidan Kehoe <kehoea@parhasard.net>
Remove some redundant functions; turn other utility functions into
labels, avoiding visibility in the global namespace, and reducing
the size of the dumped binary.
* auto-save.el (auto-save-unhex): Removed.
* auto-save.el (auto-save-unescape-name): Use #'string-to-number
instead of #'auto-save-unhex.
* files.el (save-some-buffers):
* files.el (save-some-buffers-1): Changed to a label.
* files.el (not-modified):
* gui.el (make-gui-button):
* gui.el (gui-button-action): Changed to a label.
* gui.el (insert-gui-button):
* indent.el (indent-for-tab-command):
* indent.el (insert-tab): Changed to a label.
* indent.el (indent-rigidly):
* isearch-mode.el:
* isearch-mode.el (isearch-ring-adjust):
* isearch-mode.el (isearch-ring-adjust1): Changed to a label.
* isearch-mode.el (isearch-pre-command-hook):
* isearch-mode.el (isearch-maybe-frob-keyboard-macros): Changed to
a label.
* isearch-mode.el (isearch-highlight):
* isearch-mode.el (isearch-make-extent): Changed to a label.
* itimer.el:
* itimer.el (itimer-decrement): Removed, replaced uses with decf.
* itimer.el (itimer-increment): Removed, replaced uses with incf.
* itimer.el (itimer-signum): Removed, replaced uses with minusp, plusp.
* itimer.el (itimer-name):
* itimer.el (check-itimer): Removed, replaced with #'check-type calls.
* itimer.el (itimer-value):
* itimer.el (check-itimer-coerce-string): Removed.
* itimer.el (itimer-restart):
* itimer.el (itimer-function):
* itimer.el (check-nonnegative-number): Removed.
* itimer.el (itimer-uses-arguments):
* itimer.el (check-string): Removed.
* itimer.el (itimer-function-arguments):
* itimer.el (itimer-recorded-run-time):
* itimer.el (set-itimer-name):
* itimer.el (set-itimer-value):
* itimer.el (set-itimer-value-internal):
* itimer.el (set-itimer-restart):
* itimer.el (set-itimer-function):
* itimer.el (set-itimer-is-idle):
* itimer.el (set-itimer-recorded-run-time):
* itimer.el (get-itimer):
* itimer.el (delete-itimer):
* itimer.el (start-itimer):
* itimer.el (activate-itimer):
* itimer.el (itimer-edit-set-field):
* itimer.el (itimer-edit-next-field):
* itimer.el (itimer-edit-previous-field):
Use incf, decf, plusp, minusp and the more general argument type
checking macros.
* lib-complete.el:
* lib-complete.el (lib-complete:better-root): Changed to a label.
* lib-complete.el (lib-complete:get-completion-table): Changed to
a label.
* lib-complete.el (read-library-internal): Include labels.
* lib-complete.el (lib-complete:cache-completions): Changed to a
label.
* minibuf.el (read-buffer): Use #'set-difference, don't reinvent it.
* newcomment.el (comment-padright): Use a label instead of
repeating a lambda expression.
* packages.el (package-get-key):
* packages.el (package-get-key-1): Removed, use #'getf instead.
* simple.el (kill-backward-chars): Removed; this isn't used.
* simple.el (what-cursor-position):
(lambda (arg) (format "%S" arg) -> #'prin1-to-string.
* simple.el (debug-print-1): Renamed to #'debug-print.
* simple.el (debug-print): Removed, #'debug-print-1 was equivalent.
* subr.el (integer-to-bit-vector): check-nonnegative-number no
longer available.
* widget.el (define-widget):
* widget.el (define-widget-keywords): Removed, this was long obsolete.
| author | Aidan Kehoe <kehoea@parhasard.net> |
|---|---|
| date | Sat, 05 May 2012 18:42:00 +0100 |
| parents | 06dd936cde16 |
| children |
| rev | line source |
|---|---|
| 5491 | 1 #! /bin/sh |
| 2 | |
| 0 | 3 # Enhanced sccs diff utility for use with vc mode. |
| 4 # This version is more compatible with rcsdiff(1). | |
| 5491 | 5 |
| 6 # Copyright (C) 1992, 1993, 1995, 1997, 2001, 2002, 2003, 2004, 2005, | |
| 7 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | |
| 8 | |
| 9 # Author: Paul Eggert | |
| 10 # (according to authors.el) | |
| 11 | |
| 12 # This file is part of XEmacs. | |
| 13 | |
| 14 # XEmacs is free software: you can redistribute it and/or modify | |
| 15 # it under the terms of the GNU General Public License as published by | |
| 16 # the Free Software Foundation, either version 3 of the License, or | |
| 17 # (at your option) any later version. | |
| 18 | |
| 19 # XEmacs is distributed in the hope that it will be useful, | |
| 20 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 22 # GNU General Public License for more details. | |
| 23 | |
| 24 # You should have received a copy of the GNU General Public License | |
| 25 # along with XEmacs. If not, see <http://www.gnu.org/licenses/>. | |
| 26 | |
| 0 | 27 # Modified by: vladimir@Eng.Sun.COM on 95-06-07 |
| 28 # * Made sure that file arguments are specifed as s.<filename>. | |
| 5491 | 29 |
| 30 # Synced up with: GNU 23.1.92. | |
| 31 # Synced by: Ben Wing, 2-17-10. | |
| 32 | |
| 0 | 33 |
| 34 DIFF="diff" | |
| 35 usage="$0: Usage: vcdiff [--brief] [-q] [-r<sid1>] [-r<sid2>] [diffopts] sccsfile..." | |
| 36 | |
| 5491 | 37 # Now that we use `sccs get' rather than just `get', we don't need this. |
| 38 # PATH=$PATH:/usr/ccs/bin:/usr/sccs:/usr/xpg4/bin # common SCCS hangouts | |
| 0 | 39 |
| 5491 | 40 echo="echo" |
| 0 | 41 sid1= sid2= |
| 42 | |
| 43 for f | |
| 44 do | |
| 45 case $f in | |
| 46 -*) | |
| 47 case $f in | |
| 48 --brief) | |
| 49 DIFF=cmp;; | |
| 50 -q) | |
| 51 echo=:;; | |
| 52 -r?*) | |
| 53 case $sid1 in | |
| 5491 | 54 '') |
| 55 sid1=$f | |
| 0 | 56 ;; |
| 57 *) | |
| 58 case $sid2 in | |
| 5491 | 59 ?*) echo "$usage" >&2; exit 2 ;; |
| 0 | 60 esac |
| 5491 | 61 sid2=$f |
| 0 | 62 ;; |
| 63 esac | |
| 64 ;; | |
| 65 *) | |
| 66 options="$options $f" | |
| 67 ;; | |
| 68 esac | |
| 69 shift | |
| 70 ;; | |
| 71 *) | |
| 72 break | |
| 73 ;; | |
| 74 esac | |
| 75 done | |
| 76 | |
| 77 case $# in | |
| 78 0) | |
| 79 echo "$usage" >&2 | |
| 80 exit 2 | |
| 81 esac | |
| 82 | |
| 83 | |
| 84 rev1= rev2= status=0 | |
| 85 trap 'status=2; exit' 1 2 13 15 | |
| 86 trap 'rm -f $rev1 $rev2 || status=2; exit $status' 0 | |
| 87 | |
| 88 for f | |
| 89 do | |
| 5491 | 90 s=2 |
| 91 | |
| 92 # For files under SCCS control, fixup the file name to be the | |
| 93 # s. filename | |
| 94 if [ -d SCCS ]; then | |
| 95 if [ $f = `echo $f | sed -e 's|SCCS/s.||'` ]; then | |
| 96 f="SCCS/s.$f" | |
| 97 fi | |
| 98 fi | |
| 0 | 99 |
| 100 case $f in | |
| 101 s.* | */s.*) | |
| 102 if | |
| 5491 | 103 rev1=`mktemp /tmp/geta.XXXXXXXX` |
| 104 sccs get -s -p -k $sid1 "$f" > $rev1 && | |
| 0 | 105 case $sid2 in |
| 106 '') | |
| 107 workfile=`expr " /$f" : '.*/s.\(.*\)'` | |
| 108 ;; | |
| 109 *) | |
| 5491 | 110 rev2=`mktemp /tmp/getb.XXXXXXXX` |
| 111 sccs get -s -p -k $sid2 "$f" > $rev2 | |
| 0 | 112 workfile=$rev2 |
| 113 esac | |
| 114 then | |
| 5491 | 115 $echo $DIFF $options $rev1 $workfile >&2 |
| 0 | 116 $DIFF $options $rev1 $workfile |
| 117 s=$? | |
| 118 fi | |
| 119 ;; | |
| 120 *) | |
| 121 echo "$0: $f is not an SCCS file" >&2 | |
| 122 esac | |
| 123 | |
| 124 if test $status -lt $s | |
| 125 then status=$s | |
| 126 fi | |
| 127 done | |
| 5491 | 128 |
| 129 # arch-tag: 4344ba3a-bcbe-4f77-971c-f43c1606953a |
