#!/bin/sh #### Patch script - GNU Emacs - version 19.15 to 19.16 #### This file contains patches to turn version 19.15 of GNU Emacs into #### 19.16. To apply them, cd to the top of the Emacs source tree, and #### then type 'sh '. ### Patchmaker's checklist: ### - update version numbers in comments and version.el tweak ### - diff -u ls -R listings, and decide on rm's and mv's. ### - apply rm's and mv's, and then do a diff -cprP --exclude=\*.elc ### to generate the body. ### - stick a line saying "\end-of-emacs-patch-kit" on the end. if [ ! -d lisp ] ; then (echo "$0: In order to apply this patch, the current directory" echo "must be the top of the Emacs distribution tree.") >&2 exit 1 fi sed < lisp/version.el > $$ \ -e 's/emacs-version "[^"]*"/emacs-version "19.16.0"/' mv lisp/version.el lisp/version.el~ mv $$ lisp/version.el ### Put moves and renames here. (cd lisp mv sun-curs.el sun-fns.el term rm -f texinfmt.el texinfmt.elc) patch -p1 << \end-of-emacs-patch-kit diff -cprP --exclude=*.elc emacs-19.15/ChangeLog emacs-19.16/ChangeLog *** emacs-19.15/ChangeLog Sat Jun 19 17:57:20 1993 --- emacs-19.16/ChangeLog Tue Jul 6 11:07:48 1993 *************** *** 1,3 **** --- 1,11 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + + Wed Jun 23 21:52:34 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * configure.in: Add --verbose flag. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. diff -cprP --exclude=*.elc emacs-19.15/README emacs-19.16/README *** emacs-19.15/README Sat Jun 19 19:13:41 1993 --- emacs-19.16/README Tue Jul 6 12:34:36 1993 *************** *** 1,4 **** ! This directory tree holds version 19.15 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. See the files `etc/NEWS' and `etc/news.texi' for information on new --- 1,4 ---- ! This directory tree holds version 19.16 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. See the files `etc/NEWS' and `etc/news.texi' for information on new diff -cprP --exclude=*.elc emacs-19.15/config.sub emacs-19.16/config.sub *** emacs-19.15/config.sub Sat Jun 19 19:13:39 1993 --- emacs-19.16/config.sub Tue Jul 6 12:34:35 1993 *************** *** 1,6 **** #!/bin/sh # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1991, 1992 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. --- 1,6 ---- #!/bin/sh # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. *************** case $os in *** 71,76 **** --- 71,84 ---- os= basic_machine=$1 ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` *************** case $os in *** 493,499 **** # First accept the basic system types. # The portable systems comes first. # Each alternative must end in a *, to match a version number. ! -bsd* | -sysv* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \ | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ --- 501,508 ---- # First accept the basic system types. # The portable systems comes first. # Each alternative must end in a *, to match a version number. ! # -sysv* is not here because it comes later, after sysvr4. ! -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \ | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ *************** case $os in *** 536,541 **** --- 545,556 ---- ;; -svr3) os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) ;; -xenix) os=-xenix diff -cprP --exclude=*.elc emacs-19.15/configure emacs-19.16/configure *** emacs-19.15/configure Sat Jun 19 17:02:59 1993 --- emacs-19.16/configure Tue Jul 6 11:13:47 1993 *************** *** 254,259 **** --- 254,264 ---- exec_prefix="${val}" ;; + ## Verbose flag, tested by autoconf macros. + "verbose" ) + verbose=yes + ;; + ## Has the user asked for some help? "usage" | "help" ) echo "${short_usage}" | more *************** opsysfile="s/${opsys}.h" *** 908,914 **** trap 'rm -f conftest* core; exit 1' 1 3 15 # NLS nuisances. ! LANG=C; LC_ALL=C; export LANG; export LC_ALL; rm -f conftest* compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1' --- 913,922 ---- trap 'rm -f conftest* core; exit 1' 1 3 15 # NLS nuisances. ! # These must not be set unconditionally because not all systems understand ! # e.g. LANG=C (notably SCO). ! if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi ! if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi rm -f conftest* compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1' *************** char **p; *** 1605,1611 **** It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ! p = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; --- 1613,1619 ---- It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ! ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; *************** for dir in . /tmp /usr/tmp $prefix $exec *** 1667,1673 **** (echo 2 > $dir/conftest9012346) 2>/dev/null val=`cat $dir/conftest9012345 2>/dev/null` test -f $dir/conftest9012345 && test "$val" = 1 || lost=true ! rm -f $dir/conftest9012345 $dir/conftest9012346 done $lost || { test -n "$verbose" && \ --- 1675,1681 ---- (echo 2 > $dir/conftest9012346) 2>/dev/null val=`cat $dir/conftest9012345 2>/dev/null` test -f $dir/conftest9012345 && test "$val" = 1 || lost=true ! rm -f $dir/conftest9012345 $dir/conftest9012346 2> /dev/null done $lost || { test -n "$verbose" && \ diff -cprP --exclude=*.elc emacs-19.15/configure.in emacs-19.16/configure.in *** emacs-19.15/configure.in Fri Jun 18 11:59:29 1993 --- emacs-19.16/configure.in Tue Jul 6 02:53:27 1993 *************** *** 262,267 **** --- 262,272 ---- exec_prefix="${val}" ;; + ## Verbose flag, tested by autoconf macros. + "verbose" ) + verbose=yes + ;; + ## Has the user asked for some help? "usage" | "help" ) echo "${short_usage}" | more diff -cprP --exclude=*.elc emacs-19.15/etc/ChangeLog emacs-19.16/etc/ChangeLog *** emacs-19.15/etc/ChangeLog Sat Jun 19 17:57:21 1993 --- emacs-19.16/etc/ChangeLog Tue Jul 6 11:07:49 1993 *************** *** 1,3 **** --- 1,7 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. diff -cprP --exclude=*.elc emacs-19.15/etc/MACHINES emacs-19.16/etc/MACHINES *** emacs-19.15/etc/MACHINES Fri Jun 18 12:35:34 1993 --- emacs-19.16/etc/MACHINES Sun Jul 4 16:03:12 1993 *************** *** 687,695 **** that run on the Motorola 68000 processors. All are derived from Berkeley 4.2. Emacs 17 has run on all of them. ! If you have trouble using open-network-stream, get the ! distribution of `bind' (the BSD name-server), build libresolv.a, ! and link Emacs with -lresolv. This problem is due to obsolete software in the nonshared standard library. If you want to use SunWindows, define HAVE_SUN_WINDOWS --- 687,696 ---- that run on the Motorola 68000 processors. All are derived from Berkeley 4.2. Emacs 17 has run on all of them. ! If you have trouble using open-network-stream, get the distribution ! of `bind' (the BSD name-server), build libresolv.a, and link Emacs ! with -lresolv, by copying the #definition of LIBS_SYSTEM in ! src/s/sunos4-1.h to src/config.h. This problem is due to obsolete software in the nonshared standard library. If you want to use SunWindows, define HAVE_SUN_WINDOWS diff -cprP --exclude=*.elc emacs-19.15/etc/NEWS emacs-19.16/etc/NEWS *** emacs-19.15/etc/NEWS Sat Jun 19 16:30:52 1993 --- emacs-19.16/etc/NEWS Tue Jul 6 05:22:11 1993 *************** *** 6,11 **** --- 6,138 ---- For older news, see the file ONEWS. For Lisp changes in Emacs 19, see the file LNEWS. + Changes in version 19.16. + + * When dragging the mouse to select a region, Emacs now highlights the + region as you drag. If you continue the drag beyond the boundaries of + the window, Emacs scrolls its text until you return the mouse to the + window, or release the button. + + * RET now exits `query-replace' and `query-replace-regexp'; this makes it + more consistent with the incremental search facility, which uses RET + to end the search. + + * In C mode, C-c C-u now runs c-up-conditional. + C-c C-n and C-c C-p now run new commands that move forward + and back over balanced sets of C conditionals (c-forward-conditional + and c-backward-conditional). + + * The Edit entry in the menu bar has a new alternative: + "Choose Next Paste". It gives you a menu showing the various + strings in the kill ring; click on one to select it as the text + to be yanked ("pasted") the next time you yank. + + * If you enable Transient Mark mode and set mark-even-if-inactive to + non-nil, then the region is highlighted in a transient fashion just as + normally in Transient Mark mode, but the mark really remains active + all the time; commands that use the region can be used even if the + region highlighting turns off. + + * If you type C-h after a prefix key, it displays the bindings + that start with that prefix. + + * The VC package now searches for version control commands in the + directories named by the variable `vc-path'; its value should be a + list of strings. + + * VC now displays in the mode line the head version number of the file + you are visiting. This follows the string `RCS' or `SCCS'. + If that version is locked, the name of the person who has locked it + appears before the version number, with a colon between them. + If other versions are locked, name/version pairs for those versions + follow the head version number. + + * When using X, if you load the `paren' library, Emacs automatically + underlines or highlights the matching paren whenever point is + next to the outside of a paren. When point is before an open-paren, + this shows the matching close; when point is after a close-paren, + this shows the matching open. + + * The new function `define-key-after' is like `define-key', + but takes an extra argument AFTER. It places the newly defined + binding after the binding for the event AFTER. + + * `accessible-keymaps' now takes an optional second argument, PREFIX. + If PREFIX is non-nil, it means the value should include only maps for + keys that start with PREFIX. + + `describe-bindings' also accepts an optional argument PREFIX which + means to describe only the keys that start with PREFIX. + + * The variable `prefix-help-command' hold a command to run to display help + whenever the character `help-char' follows a prefix key and does not have + a key binding in that context. + + * Emacs now detects double- and triple-mouse clicks. A single mouse + click produces a pair events of the form: + (down-mouse-N POSITION) + (mouse-N POSITION) + Clicking the same mouse button again, soon thereafter and at the same + location, produces another pair of events of the form: + (down-mouse-N POSITION) + (double-mouse-N POSITION 2) + Another click will produce an event pair of the form: + (down-mouse-N POSITION) + (triple-mouse-N POSITION 3) + All the POSITIONs in such a sequence would be identical, except for + their timestamps. + + To count as double- and triple-clicks, mouse clicks must be at the + same location as the first click, and the number of milliseconds + between the first release and the second must be less than the value + of the lisp variable `double-click-time'. Setting `double-click-time' + to nil disables multi-click detection. Setting it to t removes the + time limit; Emacs then detects multi-clicks by position only. + + If `read-key-sequence' finds no binding for a double-click event, but + the corresponding single-click event would be bound, + `read-key-sequence' demotes it to a single-click. Similarly, it + demotes unbound triple-clicks to double- or single-clicks. This means + you don't have to distinguish between single- and multi-clicks if you + don't want to. + + Emacs reports all clicks after the third as `triple-mouse-N' clicks, + but increments the click count after POSITION. For example, a fourth + click, soon after the third and at the same location, produces a pair + of events of the form: + (down-mouse-N POSITION) + (triple-mouse-N POSITION 4) + + * The way Emacs reports positions of mouse events has changed + slightly. If a mouse event includes a position list of the form: + (WINDOW (PLACE-SYMBOL) (COLUMN . ROW) TIMESTAMP) + this denotes exactly the same position as the list: + (WINDOW PLACE-SYMBOL (COLUMN . ROW) TIMESTAMP) + That is, the event occurred over a non-textual area of the frame, + specified by PLACE-SYMBOL, a symbol like `mode-line' or + `vertical-scroll-bar'. + + Enclosing PLACE-SYMBOL in a singleton list does not change the + position denoted, but the `read-key-sequence' function uses the + presence or absence of the singleton list to tell whether or not it + should prefix the event with its place symbol. + + Normally, `read-key-sequence' prefixes mouse events occuring over + non-textual areas with their PLACE-SYMBOLs, to select the sub-keymap + appropriate for the event; for example, clicking on the mode line + produces a sequence like + [mode-line (mouse-1 POSN)] + However, if lisp code elects to unread the resulting key sequence by + placing it in the `unread-command-events' variable, it is important + that `read-key-sequence' not insert the prefix symbol again; that + would produce a malformed key sequence like + [mode-line mode-line (mouse-1 POSN)] + For this reason, `read-key-sequence' encloses the event's PLACE-SYMBOL + in a singleton list when it first inserts the prefix, but doesn't + insert the prefix when processing events whose PLACE-SYMBOLs are + already thus enclosed. + + Changes in version 19.15. * `make-frame-visible', which uniconified frames, is now a command, *************** again at the same place kills that text. *** 20,27 **** M-Mouse-2 kills the secondary selection. ! Setting the secondary seletion does not move point or the mark. It is ! possible to make a secondary selection that does not all fit on the screen, by using M-Mouse-1 at one end, scrolling, then using M-Mouse-3 at the other end. --- 147,154 ---- M-Mouse-2 kills the secondary selection. ! Setting the secondary selection does not move point or the mark. It ! is possible to make a secondary selection that does not all fit on the screen, by using M-Mouse-1 at one end, scrolling, then using M-Mouse-3 at the other end. diff -cprP --exclude=*.elc emacs-19.15/etc/ORDERS emacs-19.16/etc/ORDERS *** emacs-19.15/etc/ORDERS Mon Jun 14 12:44:46 1993 --- emacs-19.16/etc/ORDERS Fri Jun 25 01:54:06 1993 *************** *** 377,382 **** --- 377,388 ---- ____ @ $ 15 = $ ______ Flex manual, 120 pages, with a reference card. + The following manual, 6 by 9.25 inches, soft cover, photocopied, GBC binding: + + ____ @ $ 15 = $ ______ Termcap manual, 68 pages. Documents the termcap + library and GNU's extensions to it. The GNU termcap + library is included with GNU Emacs. + The following manuals, 8.5 by 11 inches, soft cover, photocopied, GBC binding: ____ @ $ 50 = $ ______ Using and Porting GNU CC version 2.4, 388 pages. *************** ____ @ $ 50 = $ ______ GNU C Library *** 390,401 **** ____ @ $ 50 = $ ______ GNU Emacs Calc manual, 596 pages, with a reference card. Calc is an extensible, advanced mathematical tool and desk calculator that runs under GNU Emacs. - - The following manual, 6 by 9.25 inches, soft cover, photocopied, GBC binding: - - ____ @ $ 15 = $ ______ Termcap manual, 68 pages. Documents the termcap - library and GNU's extensions to it. The GNU termcap - library is included with GNU Emacs. The following reference cards, unit price, without the manuals: --- 396,401 ---- diff -cprP --exclude=*.elc emacs-19.15/etc/SERVICE emacs-19.16/etc/SERVICE *** emacs-19.15/etc/SERVICE Fri Jun 11 21:06:31 1993 --- emacs-19.16/etc/SERVICE Thu Jul 1 15:27:11 1993 *************** *** 233,238 **** --- 233,261 ---- Entered: 10 Jul 92  + Stuart Cracraft + The MSM Company + Unix & PC Consulting Services + 25682 Cresta Loma + Laguna Niguel, Ca. + 92677 + GNUline: 714-347-8106 + GNUbeeper: 714-509-3133 (leave number for callback) + + Rate: based on your ability to afford. + + Programs supported: all GNU programs. + + Method: telephone line support, call-in via modem to your site, + or direct visit. + + Experience: supporting GNU since the mid-1980's, coordinator + of GNU Chess (original author), GNU Shogi, GNU Go. Ported GNU Emacs + to Solaris (System V Release 4). Expertise in C, Emacs Lisp, and Perl. + Customized programming also available. + + Entered: 1 Jul 93 +  Cygnus Support 1937 Landings Drive ...uunet!cygint!info Mountain View, CA 94043 USA *************** Annual Support starts at $3,000. *** 264,283 **** Updated: 16 Feb 93  - Bradley N. Davis - 3242 South 540 West - Bountiful, UT 84010 - (801) 298-6345 - - Will work on most GNU software. Especially GNU Emacs, GCC and a - little X11 and G++. Experienced with PCs and 386s. - - Services offered: Installation, porting, customizing, troubleshooting. - - Fee: $20 to $50 / hour depending on job - - Updated: 6/11/91 -  DePalma SoftCraft Contact: Mauro DePalma 2923 Cohansey Drive Voice: (408) 259-4789 San Jose, CA 95132-1619 Fax: (408) 259-6935 --- 287,292 ---- *************** email: *** 302,308 **** We distribute, install and/or port, teach, support free software and offer regular consulting. We accept software development contracts for ! any (unix) software as long as you will release it into free software. Rates are DM 200,-- plus VAT per hour. 25 % will be donated to the Free Software Foundation. For worthy organizations, we may --- 311,317 ---- We distribute, install and/or port, teach, support free software and offer regular consulting. We accept software development contracts for ! any (unix) software as long as you will release it into free software. Rates are DM 200,-- plus VAT per hour. 25 % will be donated to the Free Software Foundation. For worthy organizations, we may *************** Services offered: *** 708,714 **** - Installation and customizing GNU and other free software. We will make free software as easy to install and use as shrink wrapped programs. ! - Warranty protection. - Customization and porting. - Subscriptions to new versions which we will send monthly or with any other interval. --- 717,723 ---- - Installation and customizing GNU and other free software. We will make free software as easy to install and use as shrink wrapped programs. ! - Warranty protection. - Customization and porting. - Subscriptions to new versions which we will send monthly or with any other interval. *************** period. Resume available on request. *** 806,811 **** --- 815,829 ---- Entered: 10 Feb 92  + Julian Stacey + Holz Strasse 27d, 80469, Munich, Germany + +49 89 268616 + + GCC for Symmetric Computer Systems SCS/375 (NSC32016, BSD4.2) + Binary & Source Free of Charge (native compiler hopelessly broken) + + Entered: 18 May 93 +  Richard M. Stallman UUCP: {mit-eddie,ucbvax,uunet,harvard,uw-beaver}!ai.mit.edu!rms 545 Tech Sq, Rm 430 *************** Fees: $50/hour, discounts for educationa *** 1028,1031 **** --- 1046,1052 ---- Updated: 7/11/92  + For a current copy of this directory, or to have yourself listed, ask: + gnu@prep.ai.mit.edu + ** Please keep this file alphabetical ** diff -cprP --exclude=*.elc emacs-19.15/info/emacs emacs-19.16/info/emacs *** emacs-19.15/info/emacs Thu Jun 17 19:44:47 1993 --- emacs-19.16/info/emacs Tue Jul 6 11:11:23 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  *************** emacs-1: 92 *** 7,30 **** emacs-2: 32628 emacs-3: 80365 emacs-4: 129131 ! emacs-5: 178995 ! emacs-6: 226919 ! emacs-7: 276698 ! emacs-8: 326464 ! emacs-9: 374424 ! emacs-10: 419985 ! emacs-11: 469595 ! emacs-12: 517969 ! emacs-13: 567203 ! emacs-14: 616306 ! emacs-15: 665025 ! emacs-16: 710826 ! emacs-17: 760317 ! emacs-18: 809742 ! emacs-19: 851572 ! emacs-20: 885901 ! emacs-21: 913464 ! emacs-22: 954606  Tag Table: (Indirect) --- 7,30 ---- emacs-2: 32628 emacs-3: 80365 emacs-4: 129131 ! emacs-5: 177696 ! emacs-6: 227064 ! emacs-7: 276843 ! emacs-8: 326609 ! emacs-9: 374569 ! emacs-10: 420130 ! emacs-11: 469740 ! emacs-12: 518206 ! emacs-13: 567440 ! emacs-14: 616543 ! emacs-15: 665262 ! emacs-16: 711063 ! emacs-17: 760554 ! emacs-18: 809979 ! emacs-19: 851809 ! emacs-20: 886138 ! emacs-21: 913701 ! emacs-22: 954897  Tag Table: (Indirect) *************** Node: Key Help125942 *** 66,408 **** Node: Name Help126743 Node: Apropos129131 Node: Library Keywords131312 ! Node: Misc Help132998 ! Node: Mark135469 ! Node: Setting Mark137175 ! Node: Transient Mark139358 ! Node: Using Region141756 ! Node: Marking Objects142613 ! Node: Mark Ring144527 ! Node: Killing146463 ! Node: Deletion147989 ! Node: Killing by Lines149871 ! Node: Other Kill Commands151393 ! Node: Yanking152715 ! Node: Kill Ring153523 ! Node: Appending Kills154735 ! Node: Earlier Kills156950 ! Node: Accumulating Text159739 ! Node: Rectangles162778 ! Node: Registers167175 ! Node: RegPos168254 ! Node: RegText169133 ! Node: RegRect170120 ! Node: RegConfig170859 ! Node: RegFiles171548 ! Node: Display172184 ! Node: Scrolling173721 ! Node: Horizontal Scrolling177551 ! Node: Selective Display178995 ! Node: European Display180169 ! Node: Optional Display181414 ! Node: Display Vars183046 ! Node: Search187114 ! Node: Incremental Search188308 ! Node: Nonincremental Search195760 ! Node: Word Search197217 ! Node: Regexp Search198835 ! Node: Regexps200774 ! Node: Search Case211748 ! Node: Replace212754 ! Node: Unconditional Replace213866 ! Node: Regexp Replace214995 ! Node: Replacement and Case215913 ! Node: Query Replace216862 ! Node: Other Repeating Search220681 ! Node: Fixit221898 ! Node: Kill Errors222486 ! Node: Transpose223753 ! Node: Fixing Case226262 ! Node: Spelling226919 ! Node: Files229919 ! Node: File Names231207 ! Node: Visiting235268 ! Node: Saving241171 ! Node: Backup247277 ! Node: Backup Names248669 ! Node: Backup Deletion250640 ! Node: Backup Copying251815 ! Node: Interlocking253545 ! Node: Reverting257465 ! Node: Auto Save258647 ! Node: Auto Save Files259788 ! Node: Auto Save Control261903 ! Node: Recover263768 ! Node: File Aliases264634 ! Node: Version Control265786 ! Node: Concepts of VC267822 ! Node: Editing with VC269283 ! Node: Variables for Check-in/out273844 ! Node: Log Entries275508 ! Node: Change Logs and VC276698 ! Node: Comparing Versions279966 ! Node: VC Status281346 ! Node: Renaming and VC283042 ! Node: Snapshots283717 ! Node: Making Snapshots284212 ! Node: Snapshot Caveats285471 ! Node: Version Headers287137 ! Node: ListDir289584 ! Node: Comparing Files291086 ! Node: Misc File Ops292703 ! Node: Buffers295687 ! Node: Select Buffer297962 ! Node: List Buffers299245 ! Node: Misc Buffer300721 ! Node: Kill Buffer303285 ! Node: Several Buffers304741 ! Node: Windows309002 ! Node: Basic Window309694 ! Node: Split Window311854 ! Node: Other Window313819 ! Node: Pop Up Window315580 ! Node: Change Window317047 ! Node: Frames318878 ! Node: Mouse Commands320443 ! Node: Creating Frames322075 ! Node: Frame Parameters323428 ! Node: Scroll Bars324942 ! Node: Menu Bars326464 ! Node: Faces327375 ! Node: Misc X329817 ! Node: Major Modes330448 ! Node: Choosing Modes332716 ! Node: Indentation335369 ! Node: Indentation Commands337556 ! Node: Tab Stops340489 ! Node: Just Spaces342397 ! Node: Text343202 ! Node: Words345237 ! Node: Sentences348181 ! Node: Paragraphs350360 ! Node: Pages352661 ! Node: Filling355251 ! Node: Auto Fill355821 ! Node: Fill Commands357966 ! Node: Fill Prefix360597 ! Node: Case364033 ! Node: Text Mode366337 ! Node: Outline Mode368422 ! Node: Outline Format370078 ! Node: Outline Motion372858 ! Node: Outline Visibility374424 ! Node: TeX Mode377385 ! Node: TeX Editing378864 ! Node: LaTeX Editing382192 ! Node: TeX Print383630 ! Node: TeX Distrib389843 ! Node: Nroff Mode390955 ! Node: Programs392499 ! Node: Program Modes395189 ! Node: Lists397403 ! Node: List Commands399366 ! Node: Defuns402878 ! Node: Program Indent405535 ! Node: Basic Indent406168 ! Node: Multi-line Indent408165 ! Node: Lisp Indent409800 ! Node: C Indent413186 ! Node: Matching418436 ! Node: Comments419985 ! Node: Balanced Editing427368 ! Node: Symbol Completion428379 ! Node: Documentation429764 ! Node: Change Log431226 ! Node: Tags433604 ! Node: Tag Syntax435342 ! Node: Create Tag Table436523 ! Node: Select Tag Table438116 ! Node: Find Tag439644 ! Node: Tags Search442618 ! Node: Tags Stepping445483 ! Node: List Tags446025 ! Node: Emerge447180 ! Node: Overview of Emerge448122 ! Node: Submodes of Emerge451223 ! Node: State of Difference452903 ! Node: Merge Commands455417 ! Node: Exiting Emerge457974 ! Node: Combining in Emerge458822 ! Node: Fine Points of Emerge459681 ! Node: C Mode460626 ! Node: Fortran463007 ! Node: Fortran Motion464305 ! Node: Fortran Indent465092 ! Node: ForIndent Commands465840 ! Node: ForIndent Cont467257 ! Node: ForIndent Num469595 ! Node: ForIndent Conv470564 ! Node: ForIndent Vars471611 ! Node: Fortran Comments473428 ! Node: Fortran Autofill477332 ! Node: Fortran Columns478942 ! Node: Fortran Abbrev480468 ! Node: Asm Mode481374 ! Node: Building481916 ! Node: Compilation483074 ! Node: Debuggers488255 ! Node: Starting GUD488878 ! Node: Debugger Operation490366 ! Node: Commands of GUD491652 ! Node: GUD Customization494121 ! Node: Executing Lisp495872 ! Node: Lisp Libraries497801 ! Node: Lisp Eval501442 ! Node: Lisp Interaction505067 ! Node: External Lisp506236 ! Node: Abbrevs508412 ! Node: Defining Abbrevs510621 ! Node: Expanding Abbrevs513053 ! Node: Editing Abbrevs516083 ! Node: Saving Abbrevs517969 ! Node: Dynamic Abbrevs519958 ! Node: Picture521254 ! Node: Basic Picture523620 ! Node: Insert in Picture526078 ! Node: Tabs in Picture527494 ! Node: Rectangles in Picture528997 ! Node: Sending Mail530734 ! Node: Mail Format533088 ! Node: Mail Headers534429 ! Node: Mail Aliases537954 ! Node: Mail Mode539886 ! Node: Distracting NSA544662 ! Node: Rmail545430 ! Node: Rmail Scrolling548698 ! Node: Rmail Motion549674 ! Node: Rmail Deletion552823 ! Node: Rmail Inbox555570 ! Node: Rmail Files557841 ! Node: Rmail Output560317 ! Node: Rmail Labels563438 ! Node: Rmail Reply567203 ! Node: Rmail Summary571531 ! Node: Rmail Make Summary572514 ! Node: Rmail Summary Edit574281 ! Node: Rmail Editing576829 ! Node: Rmail Digest579060 ! Node: Out of Rmail580156 ! Node: Rmail Rot13580640 ! Node: Dired581259 ! Node: Dired Enter582641 ! Node: Dired Commands583504 ! Node: Dired Deletion584521 ! Node: Dired Visiting588520 ! Node: Marks vs Flags589785 ! Node: Operating on Files592441 ! Node: Shell Commands in Dired595764 ! Node: Transforming File Names597448 ! Node: Comparison in Dired599865 ! Node: Subdirectories in Dired600684 ! Node: Subdirectory Motion602299 ! Node: Hiding Subdirectories603235 ! Node: Dired Updating604446 ! Node: Dired and Find606263 ! Node: Calendar/Diary607482 ! Node: Calendar Motion608842 ! Node: Calendar Unit Motion609666 ! Node: Move to Beginning or End611958 ! Node: Specified Dates612973 ! Node: Scroll Calendar613857 ! Node: Counting Days615874 ! Node: General Calendar616306 ! Node: Holidays617265 ! Node: Sunrise/Sunset619582 ! Node: Lunar Phases622211 ! Node: Other Calendars623609 ! Node: Calendar Systems624784 ! Node: To Other Calendar626636 ! Node: From Other Calendar627766 ! Node: Mayan Calendar629583 ! Node: Diary632739 ! Node: Diary Commands634245 ! Node: Format of Diary File636985 ! Node: Date Formats639758 ! Node: Adding to Diary642302 ! Node: Special Diary Entries643930 ! Node: Appointments648213 ! Node: Daylight Savings650155 ! Node: GNUS652859 ! Node: Buffers of GNUS653590 ! Node: GNUS Startup654601 ! Node: Summary of GNUS655575 ! Node: Sorting659055 ! Node: Shell664027 ! Node: Single Shell665025 ! Node: Interactive Shell666681 ! Node: Shell Mode669829 ! Node: Shell History672757 ! Node: Narrowing674529 ! Node: Hardcopy676815 ! Node: Two-Column677943 ! Node: Editing Binary Files681127 ! Node: Emacs Server682460 ! Node: Recursive Edit685152 ! Node: Dissociated Press688476 ! Node: Amusements691172 ! Node: Emulation692100 ! Node: Customization694741 ! Node: Minor Modes696653 ! Node: Variables699865 ! Node: Examining701985 ! Node: Edit Options703552 ! Node: Hooks705303 ! Node: Locals707419 ! Node: File Variables710826 ! Node: Keyboard Macros715449 ! Node: Basic Kbd Macro717630 ! Node: Save Kbd Macro720322 ! Node: Kbd Macro Query721996 ! Node: Key Bindings723954 ! Node: Keymaps725170 ! Node: Prefix Keymaps728577 ! Node: Local Keymaps729862 ! Node: Minibuffer Maps732027 ! Node: Rebinding732645 ! Node: Init Rebinding735713 ! Node: Function Keys737199 ! Node: Mouse Buttons739883 ! Node: Disabling742364 ! Node: Keyboard Translations744103 ! Node: Syntax745610 ! Node: Init File746740 ! Node: Init Syntax748201 ! Node: Init Examples750295 ! Node: Terminal Init754224 ! Node: Find Init755899 ! Node: Quitting756759 ! Node: Lossage760317 ! Node: DEL Gets Help761029 ! Node: Stuck Recursive761397 ! Node: Screen Garbled762103 ! Node: Text Garbled763222 ! Node: Unasked-for Search763861 ! Node: Emergency Escape765345 ! Node: Total Frustration767096 ! Node: Bugs767715 ! Node: Bug Criteria768420 ! Node: Understanding Bug Reporting771014 ! Node: Checklist773511 ! Node: Sending Patches784119 ! Node: Service788990 ! Node: Command Arguments789586 ! Node: Ordinary Arguments791546 ! Node: Initial Options792298 ! Node: Command Example794230 ! Node: Resume Arguments795080 ! Node: Display X796731 ! Node: Font X799112 ! Node: Colors X800586 ! Node: Window Size X801803 ! Node: Borders X804140 ! Node: Icons X805071 ! Node: Resources X806031 ! Node: Antinews809742 ! Node: Manifesto825576 ! Node: Glossary851572 ! Node: Key Index885901 ! Node: Command Index913464 ! Node: Variable Index954606 ! Node: Concept Index966800  End Tag Table --- 66,408 ---- Node: Name Help126743 Node: Apropos129131 Node: Library Keywords131312 ! Node: Misc Help133143 ! Node: Mark135614 ! Node: Setting Mark137320 ! Node: Transient Mark139503 ! Node: Using Region141901 ! Node: Marking Objects142758 ! Node: Mark Ring144672 ! Node: Killing146608 ! Node: Deletion148134 ! Node: Killing by Lines150016 ! Node: Other Kill Commands151538 ! Node: Yanking152860 ! Node: Kill Ring153668 ! Node: Appending Kills154880 ! Node: Earlier Kills157095 ! Node: Accumulating Text159884 ! Node: Rectangles162923 ! Node: Registers167320 ! Node: RegPos168399 ! Node: RegText169278 ! Node: RegRect170265 ! Node: RegConfig171004 ! Node: RegFiles171693 ! Node: Display172329 ! Node: Scrolling173866 ! Node: Horizontal Scrolling177696 ! Node: Selective Display179140 ! Node: European Display180314 ! Node: Optional Display181559 ! Node: Display Vars183191 ! Node: Search187259 ! Node: Incremental Search188453 ! Node: Nonincremental Search195905 ! Node: Word Search197362 ! Node: Regexp Search198980 ! Node: Regexps200919 ! Node: Search Case211893 ! Node: Replace212899 ! Node: Unconditional Replace214011 ! Node: Regexp Replace215140 ! Node: Replacement and Case216058 ! Node: Query Replace217007 ! Node: Other Repeating Search220826 ! Node: Fixit222043 ! Node: Kill Errors222631 ! Node: Transpose223898 ! Node: Fixing Case226407 ! Node: Spelling227064 ! Node: Files230064 ! Node: File Names231352 ! Node: Visiting235413 ! Node: Saving241316 ! Node: Backup247422 ! Node: Backup Names248814 ! Node: Backup Deletion250785 ! Node: Backup Copying251960 ! Node: Interlocking253690 ! Node: Reverting257610 ! Node: Auto Save258792 ! Node: Auto Save Files259933 ! Node: Auto Save Control262048 ! Node: Recover263913 ! Node: File Aliases264779 ! Node: Version Control265931 ! Node: Concepts of VC267967 ! Node: Editing with VC269428 ! Node: Variables for Check-in/out273989 ! Node: Log Entries275653 ! Node: Change Logs and VC276843 ! Node: Comparing Versions280111 ! Node: VC Status281491 ! Node: Renaming and VC283187 ! Node: Snapshots283862 ! Node: Making Snapshots284357 ! Node: Snapshot Caveats285616 ! Node: Version Headers287282 ! Node: ListDir289729 ! Node: Comparing Files291231 ! Node: Misc File Ops292848 ! Node: Buffers295832 ! Node: Select Buffer298107 ! Node: List Buffers299390 ! Node: Misc Buffer300866 ! Node: Kill Buffer303430 ! Node: Several Buffers304886 ! Node: Windows309147 ! Node: Basic Window309839 ! Node: Split Window311999 ! Node: Other Window313964 ! Node: Pop Up Window315725 ! Node: Change Window317192 ! Node: Frames319023 ! Node: Mouse Commands320588 ! Node: Creating Frames322220 ! Node: Frame Parameters323573 ! Node: Scroll Bars325087 ! Node: Menu Bars326609 ! Node: Faces327520 ! Node: Misc X329962 ! Node: Major Modes330593 ! Node: Choosing Modes332861 ! Node: Indentation335514 ! Node: Indentation Commands337701 ! Node: Tab Stops340634 ! Node: Just Spaces342542 ! Node: Text343347 ! Node: Words345382 ! Node: Sentences348326 ! Node: Paragraphs350505 ! Node: Pages352806 ! Node: Filling355396 ! Node: Auto Fill355966 ! Node: Fill Commands358111 ! Node: Fill Prefix360742 ! Node: Case364178 ! Node: Text Mode366482 ! Node: Outline Mode368567 ! Node: Outline Format370223 ! Node: Outline Motion373003 ! Node: Outline Visibility374569 ! Node: TeX Mode377530 ! Node: TeX Editing379009 ! Node: LaTeX Editing382337 ! Node: TeX Print383775 ! Node: TeX Distrib389988 ! Node: Nroff Mode391100 ! Node: Programs392644 ! Node: Program Modes395334 ! Node: Lists397548 ! Node: List Commands399511 ! Node: Defuns403023 ! Node: Program Indent405680 ! Node: Basic Indent406313 ! Node: Multi-line Indent408310 ! Node: Lisp Indent409945 ! Node: C Indent413331 ! Node: Matching418581 ! Node: Comments420130 ! Node: Balanced Editing427513 ! Node: Symbol Completion428524 ! Node: Documentation429909 ! Node: Change Log431371 ! Node: Tags433749 ! Node: Tag Syntax435487 ! Node: Create Tag Table436668 ! Node: Select Tag Table438261 ! Node: Find Tag439789 ! Node: Tags Search442763 ! Node: Tags Stepping445628 ! Node: List Tags446170 ! Node: Emerge447325 ! Node: Overview of Emerge448267 ! Node: Submodes of Emerge451368 ! Node: State of Difference453048 ! Node: Merge Commands455562 ! Node: Exiting Emerge458119 ! Node: Combining in Emerge458967 ! Node: Fine Points of Emerge459826 ! Node: C Mode460771 ! Node: Fortran463152 ! Node: Fortran Motion464450 ! Node: Fortran Indent465237 ! Node: ForIndent Commands465985 ! Node: ForIndent Cont467402 ! Node: ForIndent Num469740 ! Node: ForIndent Conv470709 ! Node: ForIndent Vars471756 ! Node: Fortran Comments473573 ! Node: Fortran Autofill477477 ! Node: Fortran Columns479087 ! Node: Fortran Abbrev480613 ! Node: Asm Mode481519 ! Node: Building482061 ! Node: Compilation483219 ! Node: Debuggers488400 ! Node: Starting GUD489023 ! Node: Debugger Operation490564 ! Node: Commands of GUD491850 ! Node: GUD Customization494319 ! Node: Executing Lisp496109 ! Node: Lisp Libraries498038 ! Node: Lisp Eval501679 ! Node: Lisp Interaction505304 ! Node: External Lisp506473 ! Node: Abbrevs508649 ! Node: Defining Abbrevs510858 ! Node: Expanding Abbrevs513290 ! Node: Editing Abbrevs516320 ! Node: Saving Abbrevs518206 ! Node: Dynamic Abbrevs520195 ! Node: Picture521491 ! Node: Basic Picture523857 ! Node: Insert in Picture526315 ! Node: Tabs in Picture527731 ! Node: Rectangles in Picture529234 ! Node: Sending Mail530971 ! Node: Mail Format533325 ! Node: Mail Headers534666 ! Node: Mail Aliases538191 ! Node: Mail Mode540123 ! Node: Distracting NSA544899 ! Node: Rmail545667 ! Node: Rmail Scrolling548935 ! Node: Rmail Motion549911 ! Node: Rmail Deletion553060 ! Node: Rmail Inbox555807 ! Node: Rmail Files558078 ! Node: Rmail Output560554 ! Node: Rmail Labels563675 ! Node: Rmail Reply567440 ! Node: Rmail Summary571768 ! Node: Rmail Make Summary572751 ! Node: Rmail Summary Edit574518 ! Node: Rmail Editing577066 ! Node: Rmail Digest579297 ! Node: Out of Rmail580393 ! Node: Rmail Rot13580877 ! Node: Dired581496 ! Node: Dired Enter582878 ! Node: Dired Commands583741 ! Node: Dired Deletion584758 ! Node: Dired Visiting588757 ! Node: Marks vs Flags590022 ! Node: Operating on Files592678 ! Node: Shell Commands in Dired596001 ! Node: Transforming File Names597685 ! Node: Comparison in Dired600102 ! Node: Subdirectories in Dired600921 ! Node: Subdirectory Motion602536 ! Node: Hiding Subdirectories603472 ! Node: Dired Updating604683 ! Node: Dired and Find606500 ! Node: Calendar/Diary607719 ! Node: Calendar Motion609079 ! Node: Calendar Unit Motion609903 ! Node: Move to Beginning or End612195 ! Node: Specified Dates613210 ! Node: Scroll Calendar614094 ! Node: Counting Days616111 ! Node: General Calendar616543 ! Node: Holidays617502 ! Node: Sunrise/Sunset619819 ! Node: Lunar Phases622448 ! Node: Other Calendars623846 ! Node: Calendar Systems625021 ! Node: To Other Calendar626873 ! Node: From Other Calendar628003 ! Node: Mayan Calendar629820 ! Node: Diary632976 ! Node: Diary Commands634482 ! Node: Format of Diary File637222 ! Node: Date Formats639995 ! Node: Adding to Diary642539 ! Node: Special Diary Entries644167 ! Node: Appointments648450 ! Node: Daylight Savings650392 ! Node: GNUS653096 ! Node: Buffers of GNUS653827 ! Node: GNUS Startup654838 ! Node: Summary of GNUS655812 ! Node: Sorting659292 ! Node: Shell664264 ! Node: Single Shell665262 ! Node: Interactive Shell666918 ! Node: Shell Mode670066 ! Node: Shell History672994 ! Node: Narrowing674766 ! Node: Hardcopy677052 ! Node: Two-Column678180 ! Node: Editing Binary Files681364 ! Node: Emacs Server682697 ! Node: Recursive Edit685389 ! Node: Dissociated Press688713 ! Node: Amusements691409 ! Node: Emulation692337 ! Node: Customization694978 ! Node: Minor Modes696890 ! Node: Variables700102 ! Node: Examining702222 ! Node: Edit Options703789 ! Node: Hooks705540 ! Node: Locals707656 ! Node: File Variables711063 ! Node: Keyboard Macros715686 ! Node: Basic Kbd Macro717867 ! Node: Save Kbd Macro720559 ! Node: Kbd Macro Query722233 ! Node: Key Bindings724191 ! Node: Keymaps725407 ! Node: Prefix Keymaps728814 ! Node: Local Keymaps730099 ! Node: Minibuffer Maps732264 ! Node: Rebinding732882 ! Node: Init Rebinding735950 ! Node: Function Keys737436 ! Node: Mouse Buttons740120 ! Node: Disabling742601 ! Node: Keyboard Translations744340 ! Node: Syntax745847 ! Node: Init File746977 ! Node: Init Syntax748438 ! Node: Init Examples750532 ! Node: Terminal Init754461 ! Node: Find Init756136 ! Node: Quitting756996 ! Node: Lossage760554 ! Node: DEL Gets Help761266 ! Node: Stuck Recursive761634 ! Node: Screen Garbled762340 ! Node: Text Garbled763459 ! Node: Unasked-for Search764098 ! Node: Emergency Escape765582 ! Node: Total Frustration767333 ! Node: Bugs767952 ! Node: Bug Criteria768657 ! Node: Understanding Bug Reporting771251 ! Node: Checklist773748 ! Node: Sending Patches784356 ! Node: Service789227 ! Node: Command Arguments789823 ! Node: Ordinary Arguments791783 ! Node: Initial Options792535 ! Node: Command Example794467 ! Node: Resume Arguments795317 ! Node: Display X796968 ! Node: Font X799349 ! Node: Colors X800823 ! Node: Window Size X802040 ! Node: Borders X804377 ! Node: Icons X805308 ! Node: Resources X806268 ! Node: Antinews809979 ! Node: Manifesto825813 ! Node: Glossary851809 ! Node: Key Index886138 ! Node: Command Index913701 ! Node: Variable Index954897 ! Node: Concept Index967150  End Tag Table diff -cprP --exclude=*.elc emacs-19.15/info/emacs-1 emacs-19.16/info/emacs-1 *** emacs-19.15/info/emacs-1 Thu Jun 17 19:44:44 1993 --- emacs-19.16/info/emacs-1 Tue Jul 6 11:11:14 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  *************** File: emacs, Node: Top, Next: Distrib, *** 9,15 **** Emacs is the extensible, customizable, self-documenting real-time display editor. This Info file describes how to edit with Emacs and some of how to customize it, but not how to extend it. It corresponds ! to GNU Emacs version 19.14. * Menu: --- 9,15 ---- Emacs is the extensible, customizable, self-documenting real-time display editor. This Info file describes how to edit with Emacs and some of how to customize it, but not how to extend it. It corresponds ! to GNU Emacs version 19.16. * Menu: diff -cprP --exclude=*.elc emacs-19.15/info/emacs-10 emacs-19.16/info/emacs-10 *** emacs-19.15/info/emacs-10 Thu Jun 17 19:44:45 1993 --- emacs-19.16/info/emacs-10 Tue Jul 6 11:11:18 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-11 emacs-19.16/info/emacs-11 *** emacs-19.15/info/emacs-11 Thu Jun 17 19:44:45 1993 --- emacs-19.16/info/emacs-11 Tue Jul 6 11:11:18 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  *************** to a particular debugger program. *** 480,485 **** --- 480,488 ---- happens, generate a valid tags table in the working directory and try again. + `M-x xdb' + Similar, but run XDB instead of GDB. + You can only run one debugger process at a time. Each of these commands takes one argument: a command line to invoke *************** GUD Customization *** 602,611 **** ----------------- On startup, GUD runs one of the following hooks: `gdb-mode-hook', if ! you are using GDB; `dbx-mode-hook', if you are using DBX; and ! `sdb-mode-hook', if you are using SDB. You can use these hooks to ! define custom keybindings for the debugger interaction buffer. *Note ! Hooks::. Here is a convenient way to define a command that sends a particular command string to the debugger, and set up a key binding for it in the --- 605,614 ---- ----------------- On startup, GUD runs one of the following hooks: `gdb-mode-hook', if ! you are using GDB; `dbx-mode-hook', if you are using DBX; ! `sdb-mode-hook', if you are using SDB; and `xdb-mode-hook', if you are ! using XDB. You can use these hooks to define custom keybindings for ! the debugger interaction buffer. *Note Hooks::. Here is a convenient way to define a command that sends a particular command string to the debugger, and set up a key binding for it in the diff -cprP --exclude=*.elc emacs-19.15/info/emacs-12 emacs-19.16/info/emacs-12 *** emacs-19.15/info/emacs-12 Thu Jun 17 19:44:45 1993 --- emacs-19.16/info/emacs-12 Tue Jul 6 11:11:18 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-13 emacs-19.16/info/emacs-13 *** emacs-19.15/info/emacs-13 Thu Jun 17 19:44:45 1993 --- emacs-19.16/info/emacs-13 Tue Jul 6 11:11:19 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-14 emacs-19.16/info/emacs-14 *** emacs-19.15/info/emacs-14 Thu Jun 17 19:44:45 1993 --- emacs-19.16/info/emacs-14 Tue Jul 6 11:11:19 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-15 emacs-19.16/info/emacs-15 *** emacs-19.15/info/emacs-15 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-15 Tue Jul 6 11:11:20 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-16 emacs-19.16/info/emacs-16 *** emacs-19.15/info/emacs-16 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-16 Tue Jul 6 11:11:20 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-17 emacs-19.16/info/emacs-17 *** emacs-19.15/info/emacs-17 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-17 Tue Jul 6 11:11:21 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-18 emacs-19.16/info/emacs-18 *** emacs-19.15/info/emacs-18 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-18 Tue Jul 6 11:11:21 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-19 emacs-19.16/info/emacs-19 *** emacs-19.15/info/emacs-19 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-19 Tue Jul 6 11:11:21 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-2 emacs-19.16/info/emacs-2 *** emacs-19.15/info/emacs-2 Thu Jun 17 19:44:44 1993 --- emacs-19.16/info/emacs-2 Tue Jul 6 11:11:14 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-20 emacs-19.16/info/emacs-20 *** emacs-19.15/info/emacs-20 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-20 Tue Jul 6 11:11:22 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-21 emacs-19.16/info/emacs-21 *** emacs-19.15/info/emacs-21 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-21 Tue Jul 6 11:11:22 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  *************** Command and Function Index *** 142,150 **** * define-abbrevs: Saving Abbrevs. * define-key: Init Rebinding. * define-mail-alias: Mail Aliases. * delete-backward-char: Kill Errors. * delete-backward-char: Killing. - * delete-backward-char: Inserting Text. * delete-blank-lines: Blank Lines. * delete-char: Killing. * delete-file: Misc File Ops. --- 142,150 ---- * define-abbrevs: Saving Abbrevs. * define-key: Init Rebinding. * define-mail-alias: Mail Aliases. + * delete-backward-char: Inserting Text. * delete-backward-char: Kill Errors. * delete-backward-char: Killing. * delete-blank-lines: Blank Lines. * delete-char: Killing. * delete-file: Misc File Ops. *************** Command and Function Index *** 229,236 **** * doctor: Total Frustration. * down-list: List Commands. * downcase-region: Case. - * downcase-word: Case. * downcase-word: Fixing Case. * edit-abbrevs: Editing Abbrevs. * edit-abbrevs-redefine: Editing Abbrevs. * edit-options: Edit Options. --- 229,236 ---- * doctor: Total Frustration. * down-list: List Commands. * downcase-region: Case. * downcase-word: Fixing Case. + * downcase-word: Case. * edit-abbrevs: Editing Abbrevs. * edit-abbrevs-redefine: Editing Abbrevs. * edit-options: Edit Options. *************** Command and Function Index *** 363,370 **** * hide-leaves: Outline Visibility. * hide-subtree: Outline Visibility. * holidays: Holidays. - * iconify-frame: Misc X. * iconify-frame: Exiting. * indent-c-exp: Multi-line Indent. * indent-for-comment: Comments. * indent-new-comment-line: Comments. --- 363,370 ---- * hide-leaves: Outline Visibility. * hide-subtree: Outline Visibility. * holidays: Holidays. * iconify-frame: Exiting. + * iconify-frame: Misc X. * indent-c-exp: Multi-line Indent. * indent-for-comment: Comments. * indent-new-comment-line: Comments. *************** Command and Function Index *** 706,713 **** * transient-mark-mode: Transient Mark. * transpose-chars: Transpose. * transpose-lines: Transpose. - * transpose-sexps: Transpose. * transpose-sexps: List Commands. * transpose-words: Words. * transpose-words: Transpose. * undigestify-rmail-message: Rmail Digest. --- 706,713 ---- * transient-mark-mode: Transient Mark. * transpose-chars: Transpose. * transpose-lines: Transpose. * transpose-sexps: List Commands. + * transpose-sexps: Transpose. * transpose-words: Words. * transpose-words: Transpose. * undigestify-rmail-message: Rmail Digest. *************** Command and Function Index *** 752,757 **** --- 752,758 ---- * write-abbrev-file: Saving Abbrevs. * write-file: Saving. * write-region: Misc File Ops. + * xdb: Starting GUD. * yank: Kill Ring. * yank-pop: Earlier Kills. * yank-rectangle: Rectangles. diff -cprP --exclude=*.elc emacs-19.15/info/emacs-22 emacs-19.16/info/emacs-22 *** emacs-19.15/info/emacs-22 Thu Jun 17 19:44:46 1993 --- emacs-19.16/info/emacs-22 Tue Jul 6 11:11:22 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  *************** Variable Index *** 230,235 **** --- 230,236 ---- * window-min-width: Change Window. * write-contents-hooks: Saving. * write-file-hooks: Saving. + * xdb-mode-hook: GUD Customization.  File: emacs, Node: Concept Index, Next: Screen, Prev: Variable Index, Up: Top *************** Concept Index *** 283,290 **** * backup file: Backup. * batch mode: Initial Options. * binding: Commands. - * blank lines: Comments. * blank lines: Blank Lines. * body lines (Outline mode): Outline Format. * bold font: Faces. * borders (X Windows): Borders X. --- 284,291 ---- * backup file: Backup. * batch mode: Initial Options. * binding: Commands. * blank lines: Blank Lines. + * blank lines: Comments. * body lines (Outline mode): Outline Format. * bold font: Faces. * borders (X Windows): Borders X. *************** Concept Index *** 302,309 **** * C-: User Input. * C-g: Quitting. * calendar: Calendar/Diary. - * case conversion: Fixing Case. * case conversion: Case. * centering: Fill Commands. * change buffers: Select Buffer. * change log: Change Log. --- 303,310 ---- * C-: User Input. * C-g: Quitting. * calendar: Calendar/Diary. * case conversion: Case. + * case conversion: Fixing Case. * centering: Fill Commands. * change buffers: Select Buffer. * change log: Change Log. *************** Concept Index *** 342,350 **** * creating frames: Creating Frames. * current buffer: Buffers. * cursor: Point. - * customization: Customization. * customization: Lisp Indent. * customization: Commands. * cutting: Killing. * cutting and X: Mouse Commands. * day of year: General Calendar. --- 343,351 ---- * creating frames: Creating Frames. * current buffer: Buffers. * cursor: Point. * customization: Lisp Indent. * customization: Commands. + * customization: Customization. * cutting: Killing. * cutting and X: Mouse Commands. * day of year: General Calendar. *************** Concept Index *** 397,405 **** * file directory: ListDir. * file names: File Names. * file truenames: File Aliases. - * files: Visiting. - * files: Basic Files. * files: Files. * fill prefix: Fill Prefix. * filling: Filling. * flagging files (in Dired): Dired Deletion. --- 398,406 ---- * file directory: ListDir. * file names: File Names. * file truenames: File Aliases. * files: Files. + * files: Basic Files. + * files: Visiting. * fill prefix: Fill Prefix. * filling: Filling. * flagging files (in Dired): Dired Deletion. *************** Concept Index *** 442,449 **** * in-situ subdirectory (Dired): Subdirectories in Dired. * inbox file: Rmail Inbox. * indentation: Program Indent. - * indentation: Comments. * indentation: Indentation. * indentation: Indentation. * Indented Text mode: Text Mode. * inferior process: Compilation. --- 443,450 ---- * in-situ subdirectory (Dired): Subdirectories in Dired. * inbox file: Rmail Inbox. * indentation: Program Indent. * indentation: Indentation. + * indentation: Comments. * indentation: Indentation. * Indented Text mode: Text Mode. * inferior process: Compilation. *************** Concept Index *** 687,699 **** * widening: Narrowing. * windows: Windows. * word search: Word Search. * words: Case. * words: Words. - * words: Fixing Case. * work file: Concepts of VC. * wrapping: Continuation Lines. * X cutting and pasting: Mouse Commands. * X pasting and cutting: Mouse Commands. * xon-xoff: Unasked-for Search. * yahrzeits: From Other Calendar. * yanking: Yanking. --- 688,701 ---- * widening: Narrowing. * windows: Windows. * word search: Word Search. + * words: Fixing Case. * words: Case. * words: Words. * work file: Concepts of VC. * wrapping: Continuation Lines. * X cutting and pasting: Mouse Commands. * X pasting and cutting: Mouse Commands. + * XDB: Debuggers. * xon-xoff: Unasked-for Search. * yahrzeits: From Other Calendar. * yanking: Yanking. diff -cprP --exclude=*.elc emacs-19.15/info/emacs-3 emacs-19.16/info/emacs-3 *** emacs-19.15/info/emacs-3 Thu Jun 17 19:44:44 1993 --- emacs-19.16/info/emacs-3 Tue Jul 6 11:11:15 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-4 emacs-19.16/info/emacs-4 *** emacs-19.15/info/emacs-4 Thu Jun 17 19:44:44 1993 --- emacs-19.16/info/emacs-4 Tue Jul 6 11:11:15 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  *************** use: *** 79,84 **** --- 79,87 ---- `extensions' Emacs Lisp language extensions. + `faces' + Support for using faces (fonts and colors; *note Faces::.). + `games' Games, jokes and amusements. *************** use: *** 112,117 **** --- 115,123 ---- `news' Support for netnews reading and posting. + `non-text' + Support for editing files that are not ordinary text. + `processes' Process, subshell, compilation, and job control support. *************** is done so as to put point vertically ce *** 1214,1250 **** However, if the variable `scroll-step' has a nonzero value, an attempt is made to scroll the buffer by that many lines; if that is enough to bring point back into visibility, that is what is done. - -  - File: emacs, Node: Horizontal Scrolling, Next: Selective Display, Prev: Scrolling, Up: Display - - Horizontal Scrolling - ==================== - - `C-x <' - Scroll text in current window to the left (`scroll-left'). - - `C-x >' - Scroll to the right (`scroll-right'). - - The text in a window can also be scrolled horizontally. This means - that each line of text is shifted sideways in the window, and one or - more characters at the beginning of each line are not displayed at all. - When a window has been scrolled horizontally in this way, text lines - are truncated rather than continued (*note Continuation Lines::.), with - a `$' appearing in the first column when there is text truncated to the - left, and in the last column when there is text truncated to the right. - - The command `C-x <' (`scroll-left') scrolls the selected window to - the left by N columns with argument N. This moves part of the - beginning of each line off the left edge of the window. With no - argument, it scrolls by almost the full width of the window (two - columns less, to be precise). - - `C-x >' (`scroll-right') scrolls similarly to the right. The window - cannot be scrolled any farther to the right once it is displaying - normally (with each line starting at the window's left margin); - attempting to do so has no effect. This means that you don't have to - calculate the argument precisely for `C-x >'; any sufficiently large - argument will restore normally display. --- 1220,1223 ---- diff -cprP --exclude=*.elc emacs-19.15/info/emacs-5 emacs-19.16/info/emacs-5 *** emacs-19.15/info/emacs-5 Thu Jun 17 19:44:44 1993 --- emacs-19.16/info/emacs-5 Tue Jul 6 11:11:15 1993 *************** *** 1,5 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  File: emacs, Node: Selective Display, Next: Optional Display, Prev: Horizontal Scrolling, Up: Display --- 1,38 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi. + +  + File: emacs, Node: Horizontal Scrolling, Next: Selective Display, Prev: Scrolling, Up: Display + + Horizontal Scrolling + ==================== + + `C-x <' + Scroll text in current window to the left (`scroll-left'). + + `C-x >' + Scroll to the right (`scroll-right'). + + The text in a window can also be scrolled horizontally. This means + that each line of text is shifted sideways in the window, and one or + more characters at the beginning of each line are not displayed at all. + When a window has been scrolled horizontally in this way, text lines + are truncated rather than continued (*note Continuation Lines::.), with + a `$' appearing in the first column when there is text truncated to the + left, and in the last column when there is text truncated to the right. + + The command `C-x <' (`scroll-left') scrolls the selected window to + the left by N columns with argument N. This moves part of the + beginning of each line off the left edge of the window. With no + argument, it scrolls by almost the full width of the window (two + columns less, to be precise). + + `C-x >' (`scroll-right') scrolls similarly to the right. The window + cannot be scrolled any farther to the right once it is displaying + normally (with each line starting at the window's left margin); + attempting to do so has no effect. This means that you don't have to + calculate the argument precisely for `C-x >'; any sufficiently large + argument will restore normally display.  File: emacs, Node: Selective Display, Next: Optional Display, Prev: Horizontal Scrolling, Up: Display diff -cprP --exclude=*.elc emacs-19.15/info/emacs-6 emacs-19.16/info/emacs-6 *** emacs-19.15/info/emacs-6 Thu Jun 17 19:44:44 1993 --- emacs-19.16/info/emacs-6 Tue Jul 6 11:11:16 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-7 emacs-19.16/info/emacs-7 *** emacs-19.15/info/emacs-7 Thu Jun 17 19:44:44 1993 --- emacs-19.16/info/emacs-7 Tue Jul 6 11:11:16 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-8 emacs-19.16/info/emacs-8 *** emacs-19.15/info/emacs-8 Thu Jun 17 19:44:45 1993 --- emacs-19.16/info/emacs-8 Tue Jul 6 11:11:17 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/info/emacs-9 emacs-19.16/info/emacs-9 *** emacs-19.15/info/emacs-9 Thu Jun 17 19:44:45 1993 --- emacs-19.16/info/emacs-9 Tue Jul 6 11:11:17 1993 *************** *** 1,4 **** ! This is Info file ../info/emacs, produced by Makeinfo-1.55 from the input file emacs.texi.  --- 1,4 ---- ! This is Info file ../info/emacs, produced by Makeinfo-1.54 from the input file emacs.texi.  diff -cprP --exclude=*.elc emacs-19.15/lib-src/ChangeLog emacs-19.16/lib-src/ChangeLog *** emacs-19.15/lib-src/ChangeLog Sat Jun 19 17:57:22 1993 --- emacs-19.16/lib-src/ChangeLog Tue Jul 6 12:07:21 1993 *************** *** 1,3 **** --- 1,25 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + + * b2m.c: #include . + (ltoday): Declare this to be time_t. + + Wed Jun 30 18:54:08 1993 Paul Eggert (eggert@twinsun.com) + + * vcdiff: Add -q option. + + Tue Jun 29 18:47:53 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * etags.c: #include "config.h" and the alloca CPP tangle before + #including the system headers and getopt.h. AIX requires the + #pragma to come before any actual C code. + + Mon Jun 21 23:57:37 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * Makefile.in (ctags): Depend on etags, so that parallel makes + don't write etags.o files on top of each other. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. diff -cprP --exclude=*.elc emacs-19.15/lib-src/Makefile.in emacs-19.16/lib-src/Makefile.in *** emacs-19.15/lib-src/Makefile.in Wed Jun 16 21:08:35 1993 --- emacs-19.16/lib-src/Makefile.in Mon Jun 21 23:57:34 1993 *************** *** 212,218 **** etags: ${srcdir}/etags.c $(GETOPTDEPS) $(CC) ${CPP_CFLAGS} -DETAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags ! ctags: ${srcdir}/etags.c $(GETOPTDEPS) $(CC) ${CPP_CFLAGS} -DCTAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags wakeup: ${srcdir}/wakeup.c --- 212,220 ---- etags: ${srcdir}/etags.c $(GETOPTDEPS) $(CC) ${CPP_CFLAGS} -DETAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags ! # We depend on etags to assure that parallel makes don't write two ! # etags.o files on top of each other. ! ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags $(CC) ${CPP_CFLAGS} -DCTAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags wakeup: ${srcdir}/wakeup.c diff -cprP --exclude=*.elc emacs-19.15/lib-src/b2m.c emacs-19.16/lib-src/b2m.c *** emacs-19.15/lib-src/b2m.c Fri May 28 03:54:20 1993 --- emacs-19.16/lib-src/b2m.c Tue Jul 6 12:07:27 1993 *************** *** 17,22 **** --- 17,23 ---- #include #include + #include #include "../src/config.h" *************** extern char *strtok (); *** 33,39 **** #define FALSE (0) int header = FALSE, printing; ! long ltoday; char from[256], labels[256], data[256], *p, *today; main (argc, argv) --- 34,40 ---- #define FALSE (0) int header = FALSE, printing; ! time_t ltoday; char from[256], labels[256], data[256], *p, *today; main (argc, argv) diff -cprP --exclude=*.elc emacs-19.15/lib-src/etags.c emacs-19.16/lib-src/etags.c *** emacs-19.15/lib-src/etags.c Sat Jun 19 16:35:01 1993 --- emacs-19.16/lib-src/etags.c Tue Jun 29 18:48:52 1993 *************** *** 26,41 **** * Sam Kendall added C++. */ - #include - #include - #include - #include - #include "../src/config.h" #undef static - #include "getopt.h" - /* AIX requires this to be the first thing in the file. */ #ifdef __GNUC__ #ifndef alloca --- 26,34 ---- *************** char *alloca (); *** 52,57 **** --- 45,57 ---- #endif /* not _AIX */ #endif /* not HAVE_ALLOCA_H */ #endif /* not __GNUC__ */ + + #include + #include + #include + #include + + #include "getopt.h" extern char *malloc (), *realloc (); extern char *getenv (); diff -cprP --exclude=*.elc emacs-19.15/lib-src/getopt.c emacs-19.16/lib-src/getopt.c *** emacs-19.15/lib-src/getopt.c Wed Jun 9 07:05:42 1993 --- emacs-19.16/lib-src/getopt.c Sat Jun 26 15:30:01 1993 *************** *** 20,47 **** along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - /* NOTE!!! AIX requires this to be the first thing in the file. - Do not put ANYTHING before it! */ - #if !defined (__GNUC__) && defined (_AIX) - #pragma alloca - #endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif - #ifdef __GNUC__ - #define alloca __builtin_alloca - #else /* not __GNUC__ */ - #if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__)))) - #include - #else - #ifndef _AIX - char *alloca (); - #endif - #endif /* alloca.h */ - #endif /* not __GNUC__ */ - #if !__STDC__ && !defined(const) && IN_GCC #define const #endif --- 20,29 ---- *************** char *alloca (); *** 67,78 **** /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ - #undef alloca /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include - #else /* Not GNU C library. */ - #define __alloca alloca #endif /* GNU C library. */ /* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a --- 49,57 ---- *************** static enum *** 180,186 **** in GCC. */ #include #define my_index strchr - #define my_bcopy(src, dst, n) memcpy ((dst), (src), (n)) #else /* Avoid depending on library functions or files --- 159,164 ---- *************** my_index (str, chr) *** 202,217 **** return 0; } ! static void ! my_bcopy (from, to, size) ! const char *from; ! char *to; ! int size; ! { ! int i; ! for (i = 0; i < size; i++) ! to[i] = from[i]; ! } #endif /* GNU C library. */ /* Handle permutation of arguments. */ --- 180,196 ---- return 0; } ! /* If using GCC, we can safely declare strlen this way. ! If not using GCC, it is ok not to declare it. */ ! #ifdef __GNUC__ ! #ifdef IN_GCC ! #include "gstddef.h" ! #else ! #include ! #endif ! extern size_t strlen (const char *); ! #endif ! #endif /* GNU C library. */ /* Handle permutation of arguments. */ *************** static void *** 236,252 **** exchange (argv) char **argv; { ! int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *); ! char **temp = (char **) __alloca (nonopts_size); ! ! /* Interchange the two blocks of data in ARGV. */ ! my_bcopy ((char *) &argv[first_nonopt], (char *) temp, nonopts_size); ! my_bcopy ((char *) &argv[last_nonopt], (char *) &argv[first_nonopt], ! (optind - last_nonopt) * sizeof (char *)); ! my_bcopy ((char *) temp, ! (char *) &argv[first_nonopt + optind - last_nonopt], ! nonopts_size); /* Update records for the slots the non-options now occupy. */ --- 215,265 ---- exchange (argv) char **argv; { ! int bottom = first_nonopt; ! int middle = last_nonopt; ! int top = optind; ! char *tem; ! ! /* Exchange the shorter segment with the far end of the longer segment. ! That puts the shorter segment into the right place. ! It leaves the longer segment in the right place overall, ! but it consists of two parts that need to be swapped next. */ ! while (top > middle && middle > bottom) ! { ! if (top - middle > middle - bottom) ! { ! /* Bottom segment is the short one. */ ! int len = middle - bottom; ! register int i; ! ! /* Swap it with the top part of the top segment. */ ! for (i = 0; i < len; i++) ! { ! tem = argv[bottom + i]; ! argv[bottom + i] = argv[top - (middle - bottom) + i]; ! argv[top - (middle - bottom) + i] = tem; ! } ! /* Exclude the moved bottom segment from further swapping. */ ! top -= len; ! } ! else ! { ! /* Top segment is the short one. */ ! int len = top - middle; ! register int i; ! ! /* Swap it with the bottom part of the bottom segment. */ ! for (i = 0; i < len; i++) ! { ! tem = argv[bottom + i]; ! argv[bottom + i] = argv[middle + i]; ! argv[middle + i] = tem; ! } ! /* Exclude the moved top segment from further swapping. */ ! bottom += len; ! } ! } /* Update records for the slots the non-options now occupy. */ diff -cprP --exclude=*.elc emacs-19.15/lib-src/vcdiff emacs-19.16/lib-src/vcdiff *** emacs-19.15/lib-src/vcdiff Wed Oct 7 14:22:10 1992 --- emacs-19.16/lib-src/vcdiff Wed Jun 30 14:54:15 1993 *************** *** 3,14 **** # Enhanced sccs diff utility for use with vc mode. # This version is more compatible with rcsdiff(1). # ! # $Id: vcdiff,v 1.1 1992/08/04 16:08:22 eric Exp $ # DIFF="diff" ! usage="$0: Usage: vcdiff [-r] [-r] [diffopts] sccsfile..." sid1=-r sid2= for f --- 3,15 ---- # Enhanced sccs diff utility for use with vc mode. # This version is more compatible with rcsdiff(1). # ! # $Id: vcdiff,v 1.2 1993/06/30 18:54:08 eggert Exp $ # DIFF="diff" ! usage="$0: Usage: vcdiff [-q] [-r] [-r] [diffopts] sccsfile..." + echo= sid1=-r sid2= for f *************** do *** 16,21 **** --- 17,24 ---- case $f in -*) case $f in + -q) + echo=:;; -r?*) case $sid1 in -r) *************** do *** 71,77 **** workfile=$rev2 esac then ! echo $DIFF $options $sid1 $sid2 $workfile >&2 $DIFF $options $rev1 $workfile s=$? fi --- 74,80 ---- workfile=$rev2 esac then ! $echo $DIFF $options $sid1 $sid2 $workfile >&2 $DIFF $options $rev1 $workfile s=$? fi diff -cprP --exclude=*.elc emacs-19.15/lisp/ChangeLog emacs-19.16/lisp/ChangeLog *** emacs-19.15/lisp/ChangeLog Sat Jun 19 17:57:30 1993 --- emacs-19.16/lisp/ChangeLog Tue Jul 6 11:08:00 1993 *************** *** 1,3 **** --- 1,420 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + + Tue Jul 6 01:21:37 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * vc.el (vc-start-entry): Don't call file-name-nondirectory on + FILE before passing it to vc-mode-line. Everyplace else passes + vc-mode-line full filenames, and vc-mode-line now needs the real + file name to decide which version-control system the file is under. + + * man.el (Man-build-man-command): Don't leave a pipe symbol at the + end of the command list if Man-filter-list is nil. + (Man-default-man-args): Don't write out assq and mapconcat. + (Man-default-man-entry): Don't default to section 2 for C-mode. + Call Man-default-man-args, and let people use + Man-auto-section-alist if this is what they want. + (manual-entry): Call Man-translate-references, instead of writing + it out. + (Man-getpage-in-background): Don't apply Man-default-man-args + here; manual-entry has already run it, and + Man-follow-manual-reference provides the sections itself. + + Mon Jul 5 00:43:20 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * map-ynp.el (map-y-or-n-p): If we get a switch-frame-event, + save it until we're done asking questions, and then unread it. + + Mon Jul 5 03:20:12 1993 Paul Eggert (eggert@twinsun.com) + + * vc.el (vc-name): Move to vc-hooks.el. + * vc-hooks.el (vc-name): Moved from vc.el; vc-rcs-status now uses it. + (vc-name, vc-backend-deduce): Set both vc-name and vc-backend + properties, to avoid calling vc-registered unnecessarily when + the other property is needed. + (vc-rcs-status): Yield only status of locks; do not try to yield " REV" + if there are no locks, since this cannot be done easily if there are + branches. Use vc-name instead of duplicating its function incorrectly. + Fix off-by-one bug when inserting master header pieces. Read headers + 8192 bytes at a time instead of 100. Don't bother to expand-file-name. + (vc-rcs-glean-field): Removed. + + Sun Jul 4 17:29:43 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * outline.el (outline-mode-map): Add menu bar items. + (outline-minor-mode-map): Copy menu bar submap from outline-mode-map. + + * help.el (describe-key-briefly): Don't set `foo'. + + Sun Jul 4 17:01:01 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * subr.el (posn-point): Properly extract the BUFFER-POSITION field + of an event when read-key-sequence has placed it in a singleton + list. + + * comint.el (comint-prompt-regexp): Double the backslashes in the + sample prompt regexps, so that they print properly when unquoted. + + Sun Jul 4 18:54:59 1993 Paul Eggert (eggert@twinsun.com) + + * vc.el (vc-backend-diff): Undo "-q" change. This was fixed + instead by adding -q support to vcdiff. + + Sun Jul 4 13:55:13 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * help.el (describe-prefix-bindings): New command. + (prefix-help-command): Set it. + + * hexl.el: Added a keyword. + + Sun Jul 4 12:46:27 1993 Johan Vromans (jv@mh.nl) + + * forms.el (forms-new-record-filter): Correct default value. + (forms-modified-record-filter): Correct default value. + + Sun Jul 4 00:53:27 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * paren.el (show-paren-command-hook): Add message for paren mismatch. + + * vc-hooks.el (vc-mode-line): Put `RCS' or `SCCS' before version num. + + Sat Jul 3 21:44:54 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * faces.el (make-face-bold, make-face-italic, + make-face-bold-italic, make-face-unbold, make-face-unitalic): + Properly pass noerror argument to recursive calls. + + * frame.el (frame-remove-geometry-params): New function. + (frame-initialize): Call it, instead of writing it out. + + Sat Jul 3 15:03:44 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * simple.el (kill-region): Cope with change hooks that change props. + + Sat Jul 3 06:15:43 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * term/x-win.el: Check the reverseVideo/ReverseVideo resource, + correctly distinguish between "on" and "off" values, and put a + parameter in default-frame-alist. + * frame.el (frame-initialize): Don't call x-get-resource here. + + Sat Jul 3 03:22:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoload.el (update-file-autoloads): + Do nothing when there are no cookies. + + Fri Jul 2 18:55:23 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * mouse.el (mouse-drag-region): Correctly handle drags which enter + other frames. + + Fri Jul 2 17:28:59 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * vc.el (vc-path): New variable. + (vc-do-command): Use vc-path. + + * menu-bar.el (menu-bar-edit-menu): Rename menu item to + Choose Next Paste. Create this item along with all the others. + + * isearch.el (isearch-other-meta-char): Handle sequences + containing mouse clicks in scroll-bar that used another buffer's map. + + Fri Jul 2 16:06:38 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * vc.el (vc-backend-diff): Pass the "-q" flag only if we're using + rcsdiff. + + Fri Jul 2 14:31:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * menu-bar.el: Put mouse-menu-choose-yank binding after + paste=>yank binding in menu-bar-edit-menu. + + Fri Jul 2 13:32:10 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * bytecomp.el (byte-compile-keep-pending): Handle fset like defalias. + (byte-compile-file-form-defmumble): Fix backward if in prev change. + + Thu Jul 1 20:14:44 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * dired-aux.el (dired-diff): Work even when the mark is inactive. + + Thu Jul 1 18:10:45 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * sendmail.el (mail-send): Don't test buffer-modified-p + if buffer is visiting a file. + + * bytecomp.el (byte-compile-file-form-defmumble): + If byte-compile-compatibility, use fset, not defalias. + + Thu Jul 1 16:33:01 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * simple.el: Add bindings to function-key-map so that the keypad + keys act like ordinary self-insertion keys, unless explicitly bound. + + Thu Jul 1 14:39:35 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * mailabbrev.el (build-mail-abbrevs): Do substitute-in-file-name + on the abbrev, for `source'. + + * files.el (set-visited-file-name): Rename the old auto save file. + + Thu Jun 30 23:31:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * menu-bar.el (mouse-menu-choose-yank): + Just return when x-popup-menu returns nil. + Add menu-enable property to this function. + + Wed Jun 30 17:50:25 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * compile.el (compile-abbreviate-directory): New function. + (compilation-parse-errors): Use that, to visit files with a dirname + more like the one the user specified. + + Wed Jun 30 15:38:53 1993 Johan Vromans (jv@mh.nl) + + * forms.el: Add e-mail address and version info. + Adjust commentary and doc strings. + (forms-mode): Add ###autoload. + (forms-find-file): Add ###autoload. + (forms-find-file-other-window): Add ###autoload. + + Wed Jun 30 21:35:59 1993 Paul Eggert (eggert@twinsun.com) + + * vc.el (vc-update-change-log): Ensure that file names inserted + into a ChangeLog are relative to that ChangeLog. + + Wed Jun 30 12:43:18 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * simple.el (mark-even-if-inactive): New variable. + (mark): Test it. + + * rmail.el: Doc fixes. + + Wed Jun 30 00:29:08 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * gud.el: Add history lists to the debugging commands, so we don't + have to retype the filename every invocation. + (gud-gdb-history, gud-sdb-history, gud-dbx-history, + gud-xdb-history): New variables. + (gdb, sdb, dbx, xdb): Use them when reading the argument string. + + * mouse.el (mouse-drag-region-1): Commented out. + (mouse-drag-region): Commented out, and replaced with new version, + which highlights the region as we drag. + (mouse-scroll-delay, mouse-drag-overlay): New variables. + (mouse-scroll-subr): New function. + + * sun-fns.el, sun-curs.el: Move these to lisp/term, to be with + sun-mouse.el. + + Tue Jun 29 19:00:38 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * faces.el (global-face-data): Doc fix. + + * gnus.el (gnus-newsrc-to-gnus-format): Correct regexp which + matches .newsrc lines not to match more than one line. + + Tue Jun 29 13:05:15 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * ls-lisp.el (insert-directory): Doc fix. + (ls-lisp-format): Provide user name when known. + On ms-dos, provide a name for the group, to be prettier. + + Mon Jun 28 00:47:48 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * subr.el (define-key-after): Delete duplicate bindings that come + after the new one. Do insert when we reach the end, if haven't before. + + * paren.el: New file. + + * faces.el (face-initialize): Create `underline' face. + (x-initialize-frame-faces): Set up `underline' face. + + * faces.el (x-initialize-frame-faces): Check x-display-color-p + and x-display-planes to decide whether to try using colors or gray. + + * man.el (Man-auto-section-alist): Default value nil. + (Man-getpage-in-background): Call Man-default-man-args. + (Man-filter-list): Don't discard overstrike here. + (Man-set-fonts): New function. + (Man-bgproc-sentinel): Call Man-set-fonts. + (Man-version-number): Var deleted. + (Man-version): Command and binding deleted. + (Man-mode): Use Manual, not Man, as official mode name. + + * solar.el: Doc fixes. + + * c-mode.el (c-forward-conditional): New function. + (c-up-conditional): Use c-forward-conditional. + (c-backward-conditional): New function. + (c-mode-map): Make bindings for them. + + Sun Jun 27 20:56:11 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * vc.el (vc-update-change-log): Restore previous default-directory + for running rcs2log. + + Sat Jun 26 00:18:21 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * subr.el (define-key-after): New function. + + Fri Jun 25 13:58:52 1993 Barry A. Warsaw (warsaw@anthem.nlm.nih.gov) + + * reporter.el (reporter-submit-bug-report): Rename local var curbuf + to reporter-eval-buffer. + (reporter-dump-variable): Eval varsym in reporter-eval-buffer. + + * c++-mode.el (c++-fast-backward-syntactic-ws-2) + (c++-fast-backward-syntactic-ws-1): Change the proper syntax table + depending on whether we are editing C or C++ code. + + * c++-mode.el (c++-indent-exp): When computing offset for open-brace + line, check not at class top level before adding c-indent-level. + Fix bug handling member init lists. + Fix case where comments follow a continued statement. + Fix handling of c-brace-offset < 0. + + * c++-mode.el (c++-calculate-indent): + Fixed indentation when base class declaration is on a separate line + then the derived class intro header. + Don't skip up past compound statement if we're in a member init list. + + * c++-mode.el (c++-indent-line): Clean up adjustment + of block closing braces. Handle a list as value of + c++-block-close-brace-offset. + + * c++-mode.el (c++-indent-exp): Use c-continued-statement-offset + instead of c-indent-level to indent comma separated arg decl lists. + + * c++-mode.el (c++-fast-backward-syntactic-ws-2): Simplify for + new forward-comment semantics. + + * c++-mode.el (c++-calculate-indent): Change if's to cond in CASE3. + Require colon when looking for `case' or `default'. + Use c++-compound-offset. + (c++-compound-offset): New function. + Distinguish statement continuation from enum and initializer lists. + + Fri Jun 25 18:30:17 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * vc-hooks.el (vc-rcs-status): New variable. + (vc-mode-line): Display the lock status and head version. + (vc-rcs-status, vc-rcs-glean-field): New function. + + * menu-bar.el (mouse-menu-bar-buffers): Include % and * in each item. + Calculate amount of space needed for longest buffer name. + * mouse.el (mouse-buffer-menu): Likewise. + + Fri Jun 25 18:01:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * add-log.el (find-change-log): Try get-file-buffer before + file-exists-p. + + Fri Jun 25 17:30:19 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * vc.el (vc-diff): If `diff' gives empty output, return nil. + + Wed Jun 23 21:45:19 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * ange-ftp.el: Loosen file-name-handler-alist regexp so we can do + host name completion. + + * hexl.el (hexl-in-save-buffer): New flag. + (hexl-save-buffer): Prevent infinite recursion. + + Tue Jun 22 04:11:33 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * term/x-win.el (command-switch-alist): "-ib" takes a numeric + argument; use x-handle-numeric-switch for it. + + * replace.el (query-replace-map): Fix typo in binding for [return]. + + Tue Jun 22 00:23:04 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * rmailsort.el: Don't touch rmail-summary-mode-map. + Don't touch rmail-mode-map. Don't require rmail or sort. + (rmail-summary-sort-...): Moved to rmailsum.el. + (rmail-sort-from-summary): Likewise. + + * rmail.el: Add autoloads for rmailsort commands. + (rmail-mode-map): Add bindings for those commands. + + * rmailsum.el (rmail-summary-mode-map): Bind summary sort commands. + (rmail-summary-sort-...): Moved from rmailsort.el. + (rmail-sort-from-summary): Likewise. Require rmailsort. + + Mon Jun 21 22:01:23 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * compile.el (compile-file-of-error): Remember that + compilation-error-list stores file names as strings, not as (DIR . + FILE) pairs. + + * diff.el (diff-parse-differences): Preserve the match data + across the call to find-file-noselect. + + * subr.el (event-end): Modified to account for multi-click events. + + Mon Jun 21 01:53:46 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * rmail.el (rmail-mode-map): Add local menu bar bindings. + (rmail-search-backward): New command. + (rmail-mode): Move to the last message. + + * rmailsum.el (rmail-summary-mode-map): Add local menu bar bindings. + (rmail-summary-search-backward): New command. + (rmail-summary-search): Don't use save-excursion. + + * sendmail.el (mail-mode-map): Add local menu bar bindings. + + * texinfo.el: Set up autoloads for files `makeinfo' and `texnfo-upd'. + (texinfo-delete-from-print-queue-command): New var. + (texinfo-tex-trailer): New var. + (texinfo-tex-region): Use that. + (texinfo-tex-buffer): Rewritten; use the actual source file. + Binding is now C-c C-t C-b. + (texinfo-texindex): Turned back on. + (texinfo-quit-job): New command, with binding. + (texinfo-delete-from-print-queue): Likewise. + (texinfo-show-structure): Indent each line according to depth. + Require texnfo-upd. + (texinfo-section-types-regexp): Var deleted. + (texinfo-insert-@-with-arg): New function. + (texinfo-insert-@var, etc.): Use that. + (texinfo-insert-@end): New command, now on C-c C-c e. + (texinfo-insert-@end-example): Deleted. + (texinfo-insert-@table): New command, on C-c C-c t. + (texinfo-start-menu-description): New command, on C-c C-c C-d. + (texinfo-mode): No longer set tex-trailer. + Make the @node for the top node start a page. + Use shorter values for tex-end-of-header and tex-start-of-header. + (texinfo-mode-map): Add bindings for makeinfo-buffer, etc. + Delete bindings for texinfo-format-buffer/region. + (texinfo-define-common-keys): New function. + + * texinfmt.el: File deleted. + + * makeinfo.el: New file. + + * metamail.el: New file. + + * time-stamp.el: New file. + + Sun Jun 20 20:44:36 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * add-log.el (add-log-current-defun): To find the name of the + function being defined in emacs-lisp-mode, lisp-mode, and + scheme-mode, skip an opening paren and an s-expression, instead of + just one word. This allows us to properly recognize things like + define-key and define-macro. + + * replace.el (query-replace-map): Make RET exit query-replace, + just like ESC. + + Sun Jun 20 18:44:30 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * mh-e.el (mh-yank-cur-msg): Test mark-active. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. *************** Fri Jun 18 13:49:53 1993 Jim Blandy (j *** 49,54 **** --- 466,572 ---- * dired.el (dired-summary): dired-do-rename is on "R", not "r". + Fri Jun 18 10:14:45 1993 Edward M. Reingold (reingold@emr.cs.uiuc.edu) + + * calendar.el (calendar-version): Update to 5.1. Fixed a variety + of spelling error in comments and doc strings. + (calendar-sexp-debug): New variable to turn off error catching. + (calendar-absolute-from-gregorian): Removed unused vars month, day. + (view-calendar-holidays-initially, all-hebrew-calendar-holidays, + all-christian-calendar-holidays, all-christian-islamic-holidays, + diary-nonmarking-symbol, hebrew-diary-entry-symbol, + islamic-diary-entry-symbol, diary-include-string, + abbreviated-calendar-year, european-calendar-style, + european-calendar-display-form, american-calendar-display-form, + calendar-date-display-form, print-diary-entries-hook, + list-diary-entries-hook, nongregorian-diary-listing-hook, + nongregorian-diary-marking-hook, diary-list-include-blanks, + holidays-in-diary-buffer, general-holidays, + increment-calendar-month, calendar-sum, calendar-string-spread, + calendar-absolute-from-iso, calendar-print-iso-date, + hebrew-calendar-elapsed-days, list-yahrzeit-dates, + calendar-print-astro-day-number): Fix doc strings. + (calendar-nth-named-day): Rewritten to include optional day of month. + (general-holidays, calendar-holidays, hebrew-holidays, + christian-holidays, islamic-holidays, + solar-holidays): Rewritten to include require of cal-dst.el and to + show the time of the change to/from daylight savings time. + (calendar-current-time-zone, calendar-time-zone, + calendar-daylight-time-offset, calendar-standard-time-zone-name, + calendar-daylight-time-zone-name, calendar-daylight-savings-starts, + calendar-daylight-savings-ends, + calendar-daylight-savings-switchover-time): Moved to cal-dst.el. + (calendar-location-name, calendar-time-display-form, calendar-latitude, + calendar-longitude): Moved to solar.el. + (calendar-holidays): Unquote it! + + * solar.el (calendar-holiday-solar-equinoxes-solstices): Renamed + solar-equinoxes-solstices. + (calendar-time-display-form, calendar-latitude, + calendar-longitude): Moved from calendar.el. + (calendar-time-zone, calendar-standard-time-zone-name, + calendar-daylight-time-zone-name, + calendar-daylight-savings-starts, calendar-daylight-savings-ends): + Take default values from calendar-current-time-zone, instead of + being overwritten in open code if they were set to nil. + (solar-time-string): Subtract calendar-daylight-time-offset when + computing dst-ends. Avoid rounding errors when rounding time to + the nearest minute. + + * diary.el (list-sexp-diary-entries, + hebrew-calendar-year-Saturday-incomplete-Sunday, + hebrew-calendar-year-Monday-incomplete-Tuesday, + hebrew-calendar-year-Tuesday-regular-Thursday, + hebrew-calendar-year-Thursday-complete-Sunday, + hebrew-calendar-year-Saturday-complete-Thursday, + hebrew-calendar-year-Monday-complete-Saturday, + hebrew-calendar-year-Thursday-incomplete-Sunday): Fix doc strings. + (diary-sexp-entry): Use calendar-sexp-debug to turn off error catching. + + * diary-ins.el (insert-cyclic-diary-entry): Fix date form. + + * cal-mayan.el (calendar-mayan-days-before-absolute-zero, + calendar-mayan-haab-difference, calendar-mayan-tzolkin-difference, + calendar-mayan-tzolkin-haab-on-or-before, + calendar-previous-calendar-round-date, + calendar-absolute-from-mayan-long-count, + calendar-print-mayan-date): Fix doc strings. + + * holidays.el (calendar-holiday-function-fixed, + calendar-holiday-function-float, calendar-holiday-function-julian, + calendar-holiday-function-islamic, + calendar-holiday-function-hebrew, calendar-holiday-function-sexp, + calendar-holiday-function-advent, + calendar-holiday-function-easter-etc, + calendar-holiday-function-greek-orthodox-easter, + calendar-holiday-function-rosh-hashanah-etc, + calendar-holiday-function-hanukkah, + calendar-holiday-function-passover-etc, + calendar-holiday-function-tisha-b-av-etc): Renamed without words + "calendar" and "function"; changed argument from a list of values to + individual values. Fixed doc strings. + (calendar-holiday-function-if): Removed. + (calendar-holiday-solar-equinoxes-solstices): Renamed + solar-equinoxes-solstices. + (calendar-holiday-list): Rewrote to accomodate the name changes + above and the unquoting of calendar-holidays. + (calendar-cursor-holidays): Change screen-width to frame-width. + (holiday-sexp): Rewritten. + + * lunar.el (lunar-phase): Use time conversion from solar.el + + * cal-dst.el: New file. + (calendar-/, calendar-%, calendar-absolute-from-time, + calendar-time-from-absolute, calendar-next-time-zone-transition, + calendar-time-zone-daylight-rules): New functions. + (calendar-current-time-zone): Moved from calendar.el and rewritten. + (calendar-current-time-zone-cache): New variable. + (calendar-current-time-zone, calendar-time-zone, + calendar-daylight-time-offset, calendar-standard-time-zone-name, + calendar-daylight-time-zone-name, + calendar-daylight-savings-starts, calendar-daylight-savings-ends, + calendar-daylight-savings-switchover-time): Moved from calendar.el. + Thu Jun 17 19:29:56 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * Version 19.14 released. *************** Thu Jun 10 06:39:46 1993 Jim Blandy (j *** 343,349 **** instead of the variable. * gnus.el (gnus-start-news-server): If no server has been ! specificed, but gnus-nntp-service is nil, don't ask for a server name; use the local host. * ange-ftp.el (ange-ftp-make-directory): Take second optional --- 861,867 ---- instead of the variable. * gnus.el (gnus-start-news-server): If no server has been ! specified, but gnus-nntp-service is nil, don't ask for a server name; use the local host. * ange-ftp.el (ange-ftp-make-directory): Take second optional *************** Wed May 26 16:26:16 1993 Richard Stallm *** 983,989 **** * hexl.el (hexlify-command, dehexlify-command): Use exec-directory. ! * rmailsort.el: New version from Umeda. Needs detailed entry. * paths.el (gnus-local-organization): Renamed from ...-your-... (gnus-local-domain): Likewise. --- 1501,1521 ---- * hexl.el (hexlify-command, dehexlify-command): Use exec-directory. ! * rmailsort.el: New version from Umeda. ! (timezone-make-date-sortable): Make autoload for this. ! (rmail-sort-by-recipient): Downcase the strings for sorting. ! (rmail-sort-by-recipient): Likewise. ! (rmail-sort-by-lines): Renamed from rmail-sort-by-size-lines. ! Use numbers to sort by. ! (rmail-summary-...): New functions. Bind in rmail-summary-mode-map. ! (rmail-sort-from-summary): New function. ! (rmail-sort-messages): Don't bother checking major mode. ! Put message bounds in sort list, not its text. ! Choose string< or < as predicate. ! Reorder messages by exchanging them, with inhibit-quit bound. ! (rmail-fetch-field): Start by widening. ! (rmail-sortable-date-strng): Deleted. ! (rmail-make-date-sortable): New function, used instead. * paths.el (gnus-local-organization): Renamed from ...-your-... (gnus-local-domain): Likewise. diff -cprP --exclude=*.elc emacs-19.15/lisp/add-log.el emacs-19.16/lisp/add-log.el *** emacs-19.15/lisp/add-log.el Wed Jun 9 06:56:36 1993 --- emacs-19.16/lisp/add-log.el Sat Jul 3 21:44:41 1993 *************** *** 75,81 **** ;; Move up in the dir hierarchy till we find a change log file. (let ((file1 file-name) parent-dir) ! (while (and (not (file-exists-p file1)) (progn (setq parent-dir (file-name-directory (directory-file-name --- 75,81 ---- ;; Move up in the dir hierarchy till we find a change log file. (let ((file1 file-name) parent-dir) ! (while (and (not (or (get-file-buffer file1) (file-exists-p file1))) (progn (setq parent-dir (file-name-directory (directory-file-name *************** *** 86,92 **** ;; Move up to the parent dir and try again. (setq file1 (expand-file-name (change-log-name) parent-dir))) ;; If we found a change log in a parent, use that. ! (if (file-exists-p file1) (setq file-name file1))) ;; Make a local variable in this buffer so we needn't search again. (set (make-local-variable 'change-log-default-name) file-name) --- 86,92 ---- ;; Move up to the parent dir and try again. (setq file1 (expand-file-name (change-log-name) parent-dir))) ;; If we found a change log in a parent, use that. ! (if (or (get-file-buffer file1) (file-exists-p file1)) (setq file-name file1))) ;; Make a local variable in this buffer so we needn't search again. (set (make-local-variable 'change-log-default-name) file-name) *************** Has a preference of looking backwards." *** 267,273 **** (progn (forward-sexp -1) (>= location (point)))) (progn ! (forward-word 1) (skip-chars-forward " ") (buffer-substring (point) (progn (forward-sexp 1) (point)))))) --- 267,275 ---- (progn (forward-sexp -1) (>= location (point)))) (progn ! (if (looking-at "\\s(") ! (forward-char 1)) ! (forward-sexp 1) (skip-chars-forward " ") (buffer-substring (point) (progn (forward-sexp 1) (point)))))) diff -cprP --exclude=*.elc emacs-19.15/lisp/ange-ftp.el emacs-19.16/lisp/ange-ftp.el *** emacs-19.15/lisp/ange-ftp.el Fri Jun 18 21:13:35 1993 --- emacs-19.16/lisp/ange-ftp.el Wed Jun 23 23:02:29 1993 *************** *** 856,862 **** ;;;; Internal variables. ;;;; ------------------------------------------------------------ ! (defconst ange-ftp-version "$Revision: 1.28 $") (defvar ange-ftp-data-buffer-name " *ftp data*" "Buffer name to hold directory listing data received from ftp process.") --- 856,862 ---- ;;;; Internal variables. ;;;; ------------------------------------------------------------ ! (defconst ange-ftp-version "$Revision: 1.29 $") (defvar ange-ftp-data-buffer-name " *ftp data*" "Buffer name to hold directory listing data received from ftp process.") *************** NEWNAME should be the name to give the n *** 3748,3755 **** (let (file-name-handler-alist) (apply operation args))))) ;;;###autoload ! (or (assoc "^/[^/:]+:" file-name-handler-alist) (setq file-name-handler-alist (cons '("^/[^/:]+:" . ange-ftp-hook-function) file-name-handler-alist))) --- 3748,3759 ---- (let (file-name-handler-alist) (apply operation args))))) + + ;;; This regexp takes care of real ange-ftp file names (with a slash + ;;; and colon), and absolute filenames with only one component, for + ;;; the sake of hostname completion. ;;;###autoload ! (or (assoc "^/[^/:]*\\([^/:]:\\|\\'\\)" file-name-handler-alist) (setq file-name-handler-alist (cons '("^/[^/:]+:" . ange-ftp-hook-function) file-name-handler-alist))) diff -cprP --exclude=*.elc emacs-19.15/lisp/autoload.el emacs-19.16/lisp/autoload.el *** emacs-19.15/lisp/autoload.el Thu Jun 17 02:54:01 1993 --- emacs-19.16/lisp/autoload.el Sat Jul 3 03:21:40 1993 *************** *** 235,240 **** --- 235,241 ---- (widen) (goto-char (point-min)) (while (search-forward generate-autoload-section-header nil t) + (or done (setq done 'seen)) (let ((form (condition-case () (read (current-buffer)) (end-of-file nil)))) diff -cprP --exclude=*.elc emacs-19.15/lisp/bytecomp.el emacs-19.16/lisp/bytecomp.el *** emacs-19.15/lisp/bytecomp.el Wed Jun 16 13:41:59 1993 --- emacs-19.16/lisp/bytecomp.el Mon Jul 5 05:56:27 1993 *************** *** 1396,1402 **** (let ((for-effect t)) ;; To avoid consing up monstrously large forms at load time, we split ;; the output regularly. ! (and (eq (car-safe form) 'defalias) (nthcdr 300 byte-compile-output) (byte-compile-flush-pending)) (funcall handler form) (if for-effect --- 1396,1403 ---- (let ((for-effect t)) ;; To avoid consing up monstrously large forms at load time, we split ;; the output regularly. ! (and (memq (car-safe form) '(fset defalias)) ! (nthcdr 300 byte-compile-output) (byte-compile-flush-pending)) (funcall handler form) (if for-effect *************** *** 1579,1585 **** (if (not (stringp (nth 3 form))) ;; No doc string to make-docfile; insert form in normal code. (byte-compile-keep-pending ! (list 'defalias (list 'quote name) (cond ((not macrop) code) ((eq 'make-byte-code (car-safe code)) --- 1580,1588 ---- (if (not (stringp (nth 3 form))) ;; No doc string to make-docfile; insert form in normal code. (byte-compile-keep-pending ! (list (if (byte-compile-version-cond byte-compile-compatibility) ! 'fset 'defalias) ! (list 'quote name) (cond ((not macrop) code) ((eq 'make-byte-code (car-safe code)) *************** *** 1590,1596 **** ;; Output the form by hand, that's much simpler than having ;; b-c-output-file-form analyze the defalias. (byte-compile-flush-pending) ! (princ "\n(defalias '" outbuffer) (prin1 name outbuffer) (byte-compile-output-docform (cond ((atom code) --- 1593,1601 ---- ;; Output the form by hand, that's much simpler than having ;; b-c-output-file-form analyze the defalias. (byte-compile-flush-pending) ! (princ (if (byte-compile-version-cond byte-compile-compatibility) ! "\n(fset '" "\n(defalias '") ! outbuffer) (prin1 name outbuffer) (byte-compile-output-docform (cond ((atom code) diff -cprP --exclude=*.elc emacs-19.15/lisp/c-mode.el emacs-19.16/lisp/c-mode.el *** emacs-19.15/lisp/c-mode.el Sun Jun 13 15:15:04 1993 --- emacs-19.16/lisp/c-mode.el Mon Jun 28 00:48:39 1993 *************** *** 48,53 **** --- 48,56 ---- (define-key c-mode-map "\ea" 'c-beginning-of-statement) (define-key c-mode-map "\ee" 'c-end-of-statement) (define-key c-mode-map "\eq" 'c-fill-paragraph) + (define-key c-mode-map "\C-c\C-n" 'c-forward-conditional) + (define-key c-mode-map "\C-c\C-p" 'c-backward-conditional) + (define-key c-mode-map "\C-c\C-u" 'c-up-conditional) (define-key c-mode-map "\177" 'backward-delete-char-untabify) (define-key c-mode-map "\t" 'c-indent-command)) *************** move forward to the end of the containin *** 1252,1258 **** When going backwards, `#elif' is treated like `#else' followed by `#if'. When going forwards, `#elif' is ignored." (interactive "p") ! (let* ((forward (< count 0)) (increment (if forward -1 1)) (search-function (if forward 're-search-forward 're-search-backward)) (opoint (point)) --- 1255,1275 ---- When going backwards, `#elif' is treated like `#else' followed by `#if'. When going forwards, `#elif' is ignored." (interactive "p") ! (c-forward-conditional (- count) t)) ! ! (defun c-backward-conditional (count &optional up-flag) ! "Move back across a preprocessor conditional, leaving mark behind. ! A prefix argument acts as a repeat count. With a negative argument, ! move forward across a preprocessor conditional." ! (interactive "p") ! (c-forward-conditional (- count) up-flag)) ! ! (defun c-forward-conditional (count &optional up-flag) ! "Move forward across a preprocessor conditional, leaving mark behind. ! A prefix argument acts as a repeat count. With a negative argument, ! move backward across a preprocessor conditional." ! (interactive "p") ! (let* ((forward (> count 0)) (increment (if forward -1 1)) (search-function (if forward 're-search-forward 're-search-backward)) (opoint (point)) *************** When going forwards, `#elif' is ignored. *** 1259,1266 **** (new)) (save-excursion (while (/= count 0) ! (if forward (end-of-line)) ! (let ((depth 0) found) (save-excursion ;; Find the "next" significant line in the proper direction. (while (and (not found) --- 1276,1282 ---- (new)) (save-excursion (while (/= count 0) ! (let ((depth (if up-flag 0 -1)) found) (save-excursion ;; Find the "next" significant line in the proper direction. (while (and (not found) *************** When going forwards, `#elif' is ignored. *** 1276,1282 **** (beginning-of-line) ;; Now verify it is really a preproc line. (if (looking-at "^[ \t]*#[ \t]*\\(if\\|elif\\|endif\\)") ! (progn ;; Update depth according to what we found. (beginning-of-line) (cond ((looking-at "[ \t]*#[ \t]*endif") --- 1292,1298 ---- (beginning-of-line) ;; Now verify it is really a preproc line. (if (looking-at "^[ \t]*#[ \t]*\\(if\\|elif\\|endif\\)") ! (let ((prev depth)) ;; Update depth according to what we found. (beginning-of-line) (cond ((looking-at "[ \t]*#[ \t]*endif") *************** When going forwards, `#elif' is ignored. *** 1285,1300 **** (if (and forward (= depth 0)) (setq found (point)))) (t (setq depth (- depth increment)))) ;; If this line exits a level of conditional, exit inner loop. (if (< depth 0) ! (setq found (point))) ! ;; When searching forward, start from end of line ! ;; so that we don't find the same line again. ! (if forward (end-of-line)))))) (or found (error "No containing preprocessor conditional")) (goto-char (setq new found))) ! (setq count (- count increment)))) (push-mark) (goto-char new))) --- 1301,1322 ---- (if (and forward (= depth 0)) (setq found (point)))) (t (setq depth (- depth increment)))) + ;; If we are trying to move across, and we find + ;; an end before we find a beginning, get an error. + (if (and (< prev 0) (< depth prev)) + (error (if forward + "No following conditional at this level" + "No previous conditional at this level"))) + ;; When searching forward, start from next line + ;; so that we don't find the same line again. + (if forward (forward-line 1)) ;; If this line exits a level of conditional, exit inner loop. (if (< depth 0) ! (setq found (point))))))) (or found (error "No containing preprocessor conditional")) (goto-char (setq new found))) ! (setq count (+ count increment)))) (push-mark) (goto-char new))) diff -cprP --exclude=*.elc emacs-19.15/lisp/cal-dst.el emacs-19.16/lisp/cal-dst.el *** emacs-19.15/lisp/cal-dst.el --- emacs-19.16/lisp/cal-dst.el Mon Jun 21 07:22:17 1993 *************** *** 0 **** --- 1,352 ---- + ;;; cal-dst.el --- calendar functions for daylight savings rules. + + ;; Copyright (C) 1993 Free Software Foundation, Inc. + + ;; Author: Paul Eggert + ;; Edward M. Reingold + ;; Keywords: calendar + ;; Human-Keywords: daylight savings time, calendar, diary, holidays + + ;; This file is part of GNU Emacs. + + ;; GNU Emacs is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY. No author or distributor + ;; accepts responsibility to anyone for the consequences of using it + ;; or for whether it serves any particular purpose or works at all, + ;; unless he says so in writing. Refer to the GNU Emacs General Public + ;; License for full details. + + ;; Everyone is granted permission to copy, modify and redistribute + ;; GNU Emacs, but only under the conditions described in the + ;; GNU Emacs General Public License. A copy of this license is + ;; supposed to have been given to you along with GNU Emacs so you + ;; can know your rights and responsibilities. It should be in a + ;; file named COPYING. Among other things, the copyright notice + ;; and this notice must be preserved on all copies. + + ;;; Commentary: + + ;; This collection of functions implements the features of calendar.el and + ;; holiday.el that deal with daylight savings time. + + ;; Comments, corrections, and improvements should be sent to + ;; Edward M. Reingold Department of Computer Science + ;; (217) 333-6733 University of Illinois at Urbana-Champaign + ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue + ;; Urbana, Illinois 61801 + + ;;; Code: + + (require 'calendar) + + (defvar calendar-current-time-zone-cache nil + "Cache for result of calendar-current-time-zone.") + + (defvar calendar-system-time-basis + (calendar-absolute-from-gregorian '(1 1 1970)) + "Absolute date of starting date of system clock.") + + (defun calendar-/ (a b) + "Floor(A/B) = the greatest integer not greater than A divided by B. + A and B be must both be integers, and B must be positive." + (if (< a 0) + (- (/ (- b 1 a) b)) + (/ a b))) + + (defun calendar-% (a b) + "A modulo B; always nonnegative. + A and B be must both be integers, and B must be positive." + (let ((m (% a b))) + (if (< m 0) + (+ m b) + m))) + + (defun calendar-absolute-from-time (x utc-diff) + "Absolute local date of time X; local time is UTC-DIFF seconds from UTC. + + X is (HIGH . LOW) or (HIGH LOW . IGNORED) where HIGH and LOW are the + high and low 16 bits, respectively, of the number of seconds since + 1970-01-01 00:00:00 UTC, ignoring leap seconds. + + Returns the pair (ABS-DATE . SECONDS) where SECONDS after local midnight on + absolute date ABS-DATE is the equivalent moment to X." + (let* ((h (car x)) + (xtail (cdr x)) + (l (+ utc-diff (if (numberp xtail) xtail (car xtail)))) + (u (+ (* 512 (calendar-% h 675)) (calendar-/ l 128)))) + ;; Overflow is a terrible thing! + (cons (+ calendar-system-time-basis + ;; floor((2^16 h +l) / (60*60*24)) + (* 512 (calendar-/ h 675)) (calendar-/ u 675)) + ;; (2^16 h +l) % (60*60*24) + (+ (* (calendar-% u 675) 128) (calendar-% l 128))))) + + (defun calendar-time-from-absolute (abs-date s) + "Time of absolute date ABS-DATE, S seconds after midnight. + + Returns the pair (HIGH . LOW) where HIGH and LOW are the high and low + 16 bits, respectively, of the number of seconds 1970-01-01 00:00:00 UTC, + ignoring leap seconds, that is the equivalent moment to S seconds after + midnight UTC on absolute date ABS-DATE." + (let* ((a (- abs-date calendar-system-time-basis)) + (u (+ (* 163 (calendar-% a 512)) (calendar-/ s 128)))) + ;; Overflow is a terrible thing! + (cons + ;; (60*60*24*a + s) / 2^16 + (+ a (* 163 (calendar-/ a 512)) (calendar-/ u 512)) + ;; (60*60*24*a + s) % 2^16 + (+ (* 128 (calendar-% u 512)) (calendar-% s 128))))) + + (defun calendar-next-time-zone-transition (time) + "Return the time of the next time zone transition after TIME. + Both TIME and the result are acceptable arguments to current-time-zone. + Return nil if no such transition can be found." + (let* ((base 65536);; 2^16 = base of current-time output + (quarter-multiple 120);; approx = (seconds per quarter year) / base + (time-zone (current-time-zone time)) + (time-utc-diff (car time-zone)) + hi + hi-zone + (hi-utc-diff time-utc-diff) + (quarters '(2 1 3))) + ;; Heuristic: probe the time zone offset in the next three calendar + ;; quarters, looking for a time zone offset different from TIME. + (while (and quarters (eq time-utc-diff hi-utc-diff)) + (setq hi (cons (+ (car time) (* (car quarters) quarter-multiple)) 0)) + (setq hi-zone (current-time-zone hi)) + (setq hi-utc-diff (car hi-zone)) + (setq quarters (cdr quarters))) + (and + time-utc-diff + hi-utc-diff + (not (eq time-utc-diff hi-utc-diff)) + ;; Now HI is after the next time zone transition. + ;; Set LO to TIME, and then binary search to increase LO and decrease HI + ;; until LO is just before and HI is just after the time zone transition. + (let* ((tail (cdr time)) + (lo (cons (car time) (if (numberp tail) tail (car tail)))) + probe) + (while + ;; Set PROBE to halfway between LO and HI, rounding down. + ;; If PROBE equals LO, we are done. + (let* ((lsum (+ (cdr lo) (cdr hi))) + (hsum (+ (car lo) (car hi) (/ lsum base))) + (hsumodd (logand 1 hsum))) + (setq probe (cons (/ (- hsum hsumodd) 2) + (/ (+ (* hsumodd base) (% lsum base)) 2))) + (not (equal lo probe))) + ;; Set either LO or HI to PROBE, depending on probe results. + (if (eq (car (current-time-zone probe)) hi-utc-diff) + (setq hi probe) + (setq lo probe))) + hi)))) + + (defun calendar-time-zone-daylight-rules (abs-date utc-diff) + "Return daylight transition rule for ABS-DATE, UTC-DIFF sec offset from UTC. + ABS-DIFF must specify a day that contains a daylight savings transition. + The result has the proper form for calendar-daylight-savings-starts'." + (let* ((date (calendar-gregorian-from-absolute abs-date)) + (weekday (% abs-date 7)) + (m (extract-calendar-month date)) + (d (extract-calendar-day date)) + (y (extract-calendar-year date)) + (last (calendar-last-day-of-month m y)) + (candidate-rules + (append + ;; Day D of month M. + (list (list 'list m d 'year)) + ;; The first WEEKDAY of month M. + (if (< d 8) + (list (list 'calendar-nth-named-day 1 weekday m 'year))) + ;; The last WEEKDAY of month M. + (if (> d (- last 7)) + (list (list 'calendar-nth-named-day -1 weekday m 'year))) + ;; The first WEEKDAY after day J of month M, for D-6 < J <= D. + (let (l) + (calendar-for-loop j from (max 2 (- d 6)) to (min d (- last 8)) do + (setq l + (cons + (list 'calendar-nth-named-day 1 weekday m 'year j) + l))) + l) + ;; Israel is special. + (if (zerop weekday) + (if (< m 7) + (list + '(calendar-gregorian-from-absolute + (calendar-dayname-on-or-before + 0 + (calendar-absolute-from-hebrew + (list 1 28 (+ year 3760)))))) + (list '(calendar-gregorian-from-absolute + (calendar-dayname-on-or-before + 0 + (- (calendar-absolute-from-hebrew + (list 7 1 (+ year 3761))) 3)))))))) + (prevday-sec (- -1 utc-diff)) ;; last sec of previous local day + last-surviving-rule + (i 1)) + ;; Scan through the next few years; take the rule that explains them best. + (while (and candidate-rules (cdr candidate-rules) (<= i 28)) + (let ((year (+ y i)) + new-rules) + (while candidate-rules + (let* ((rule (car candidate-rules)) + (date (calendar-absolute-from-gregorian (eval rule)))) + (or (equal (current-time-zone + (calendar-time-from-absolute date prevday-sec)) + (current-time-zone + (calendar-time-from-absolute (1+ date) prevday-sec))) + (progn + (setq new-rules (cons rule new-rules)) + (setq last-surviving-rule rule)))) + (setq candidate-rules (cdr candidate-rules))) + (setq candidate-rules (nreverse new-rules))) + (setq i (1+ i))) + last-surviving-rule)) + + (defun calendar-current-time-zone () + "Return UTC difference, dst offset, names and rules for current time zone. + + Returns (UTC-DIFF DST-OFFSET STD-ZONE DST-ZONE DST-STARTS DST-ENDS DST-SWITCH), + based on a heuristic probing of what the system knows: + + UTC-DIFF is an integer specifying the number of minutes difference between + standard time in the current time zone and Coordinated Universal Time + (Greenwich Mean Time). A negative value means west of Greenwich. + DST-OFFSET is an integer giving the daylight savings time offset in minutes. + STD-ZONE is a string giving the name of the time zone when no seasonal time + adjustment is in effect. + DST-ZONE is a string giving the name of the time zone when there is a seasonal + time adjustment in effect. + DST-STARTS and DST-ENDS are sexps in the variable `year' giving the daylight + savings time start rules, in the form expected by + `calendar-daylight-savings-starts'. + DST-SWITCH is an integer giving the number of minutes after midnight that + daylight savings time starts or ends. + + If the local area does not use a seasonal time adjustment, DST-OFFSET and + DST-SWITCH are 0, STD-ZONE and DST-ZONE are equal, and DST-STARTS and DST-ENDS + are nil. + + Some operating systems cannot provide all this information to Emacs; in this + case, `calendar-current-time-zone' returns a list containing nil for the data + it can't find." + (or + calendar-current-time-zone-cache + (progn + (message "Checking time zone data...") + (setq + calendar-current-time-zone-cache + (let* ((now (current-time)) + (now-zone (current-time-zone now)) + (now-utc-diff (car now-zone)) + (now-name (car (cdr now-zone))) + (next (calendar-next-time-zone-transition now))) + (if (null next) + (list (and now-utc-diff (/ now-utc-diff 60)) + 0 now-name now-name nil nil 0) + (let* ((next-zone (current-time-zone next)) + (next-utc-diff (car next-zone)) + (next-name (car (cdr next-zone))) + (next-absdate-seconds + (calendar-absolute-from-time next now-utc-diff)) + (next-transitions + (calendar-time-zone-daylight-rules + (car next-absdate-seconds) now-utc-diff)) + (nextnext (calendar-next-time-zone-transition next)) + (now-transitions + (calendar-time-zone-daylight-rules + (car (calendar-absolute-from-time nextnext next-utc-diff)) + next-utc-diff)) + (now-is-std (< now-utc-diff next-utc-diff))) + (list (/ (min now-utc-diff next-utc-diff) 60) + (/ (abs (- now-utc-diff next-utc-diff)) 60) + (if now-is-std now-name next-name) + (if now-is-std next-name now-name) + (if now-is-std next-transitions now-transitions) + (if now-is-std now-transitions next-transitions) + (/ (cdr next-absdate-seconds) 60)))))) + (message "Checking time zone data...done"))) + calendar-current-time-zone-cache) + + ;;; The following six defvars relating to daylight savings time should NOT be + ;;; marked to go into loaddefs.el where they would be evaluated when Emacs is + ;;; dumped. These variables' appropriate values depend on the conditions under + ;;; which the code is INVOKED; so it's inappropriate to initialize them when + ;;; Emacs is dumped---they should be initialized when calendar.el is loaded. + + (calendar-current-time-zone) + + (defvar calendar-time-zone (car calendar-current-time-zone-cache) + "*Number of minutes difference between local standard time at + `calendar-location-name' and Coordinated Universal (Greenwich) Time. For + example, -300 for New York City, -480 for Los Angeles.") + + (defvar calendar-daylight-time-offset + (car (cdr calendar-current-time-zone-cache)) + "*Number of minutes difference between daylight savings and standard time. + + If the locale never uses daylight savings time, set this to 0.") + + (defvar calendar-standard-time-zone-name + (car (nthcdr 2 calendar-current-time-zone-cache)) + "*Abbreviated name of standard time zone at `calendar-location-name'. + For example, \"EST\" in New York City, \"PST\" for Los Angeles.") + + (defvar calendar-daylight-time-zone-name + (car (nthcdr 3 calendar-current-time-zone-cache)) + "*Abbreviated name of daylight-savings time zone at `calendar-location-name'. + For example, \"EDT\" in New York City, \"PDT\" for Los Angeles.") + + (defvar calendar-daylight-savings-starts + (car (nthcdr 4 calendar-current-time-zone-cache)) + "*Sexp giving the date on which daylight savings time starts. + This is an expression in the variable `year' whose value gives the Gregorian + date in the form (month day year) on which daylight savings time starts. It is + used to determine the starting date of daylight savings time for the holiday + list and for correcting times of day in the solar and lunar calculations. + + For example, if daylight savings time is mandated to start on October 1, + you would set `calendar-daylight-savings-starts' to + + '(10 1 year) + + For a more complex example, daylight savings time begins in Israel on the + first Sunday after Passover ends on Nisan 21: + + '(calendar-gregorian-from-absolute + (calendar-dayname-on-or-before + 0 + (calendar-absolute-from-hebrew (list 1 28 (+ year 3760))))) + + because Nisan is the first month in the Hebrew calendar. + + If the locale never uses daylight savings time, set this to nil.") + + (defvar calendar-daylight-savings-ends + (car (nthcdr 5 calendar-current-time-zone-cache)) + "*Sexp giving the date on which daylight savings time ends. + This is an expression in the variable `year' whose value gives the Gregorian + date in the form (month day year) on which daylight savings time ends. It is + used to determine the starting date of daylight savings time for the holiday + list and for correcting times of day in the solar and lunar calculations. + + For example, daylight savings time ends in Israel on the Sunday Selichot + begins: + + '(calendar-gregorian-from-absolute + (calendar-dayname-on-or-before + 0 + (- (calendar-absolute-from-hebrew (list 7 1 (+ year 3761))) 3))) + + If the locale never uses daylight savings time, set this to nil.") + + (defvar calendar-daylight-savings-switchover-time + (car (nthcdr 6 calendar-current-time-zone-cache)) + "*Number of minutes after midnight that daylight savings time begins/ends. + If the locale never uses daylight savings time, set this to 0.") + + (provide 'cal-dst) + + ;;; cal-dst.el ends here diff -cprP --exclude=*.elc emacs-19.15/lisp/cal-mayan.el emacs-19.16/lisp/cal-mayan.el *** emacs-19.15/lisp/cal-mayan.el Fri May 21 20:22:52 1993 --- emacs-19.16/lisp/cal-mayan.el Fri Jun 18 12:49:51 1993 *************** *** 65,75 **** (1+ (mayan-mod (1- m) n))) (defconst calendar-mayan-days-before-absolute-zero 1137140 ! "Number of days of the Mayan calendar epoch before absolute day 0 (that is, ! Dec 31, 0 (Gregorian)), according to the Goodman-Martinez-Thompson ! correlation. This correlation is not universally accepted, as it still a ! subject of astro-archeological research. Using 1232041 will give you the ! correlation used by Spinden.") (defconst calendar-mayan-haab-at-epoch '(8 . 18) "Mayan haab date at the epoch.") --- 65,74 ---- (1+ (mayan-mod (1- m) n))) (defconst calendar-mayan-days-before-absolute-zero 1137140 ! "Number of days of the Mayan calendar epoch before absolute day 0. ! According to the Goodman-Martinez-Thompson correlation. This correlation is ! not universally accepted, as it still a subject of astro-archeological ! research. Using 1232041 will give you the correlation used by Spinden.") (defconst calendar-mayan-haab-at-epoch '(8 . 18) "Mayan haab date at the epoch.") *************** correlation used by Spinden.") *** 132,139 **** (cons day month))) (defun calendar-mayan-haab-difference (date1 date2) ! "Number of days from Mayan haab date DATE1 to the next occurrence of Mayan ! haab date DATE2." (mayan-mod (+ (* 20 (- (cdr date2) (cdr date1))) (- (car date2) (car date1))) 365)) --- 131,137 ---- (cons day month))) (defun calendar-mayan-haab-difference (date1 date2) ! "Number of days from Mayan haab DATE1 to next occurrence of haab date DATE2." (mayan-mod (+ (* 20 (- (cdr date2) (cdr date1))) (- (car date2) (car date1))) 365)) *************** Echo Mayan date if NOECHO is t." *** 192,199 **** (cons day name))) (defun calendar-mayan-tzolkin-difference (date1 date2) ! "Number of days from Mayan tzolkin date DATE1 to the next occurrence of ! Mayan tzolkin date DATE2." (let ((number-difference (- (car date2) (car date1))) (name-difference (- (cdr date2) (cdr date1)))) (mayan-mod (+ number-difference --- 190,196 ---- (cons day name))) (defun calendar-mayan-tzolkin-difference (date1 date2) ! "Number of days from Mayan tzolkin DATE1 to next occurrence of tzolkin DATE2." (let ((number-difference (- (car date2) (car date1))) (name-difference (- (cdr date2) (cdr date1)))) (mayan-mod (+ number-difference *************** Echo Mayan date if NOECHO is t." *** 239,246 **** (aref calendar-mayan-tzolkin-names-array (1- (cdr tzolkin))))) (defun calendar-mayan-tzolkin-haab-on-or-before (tzolkin-date haab-date date) ! "Absolute date of latest date on or before date that is Mayan TZOLKIN-DATE ! and HAAB-DATE; returns nil if such a tzolkin-haab combination is impossible." (let* ((haab-difference (calendar-mayan-haab-difference (calendar-mayan-haab-from-absolute 0) --- 236,244 ---- (aref calendar-mayan-tzolkin-names-array (1- (cdr tzolkin))))) (defun calendar-mayan-tzolkin-haab-on-or-before (tzolkin-date haab-date date) ! "Absolute date that is Mayan TZOLKIN-DATE and HAAB-DATE. ! Latest such date on or before DATE. ! Returns nil if such a tzolkin-haab combination is impossible." (let* ((haab-difference (calendar-mayan-haab-difference (calendar-mayan-haab-from-absolute 0) *************** Echo Mayan date if NOECHO is t." *** 311,318 **** (defun calendar-previous-calendar-round-date (tzolkin-date haab-date &optional noecho) ! "Move cursor to previous instance of Mayan TZOKLIN-DATE HAAB-DATE ! combination. Echo Mayan date if NOECHO is t." (interactive (list (calendar-read-mayan-tzolkin-date) (calendar-read-mayan-haab-date))) (let ((date (calendar-mayan-tzolkin-haab-on-or-before --- 309,316 ---- (defun calendar-previous-calendar-round-date (tzolkin-date haab-date &optional noecho) ! "Move to previous instance of Mayan TZOKLIN-DATE HAAB-DATE combination. ! Echo Mayan date if NOECHO is t." (interactive (list (calendar-read-mayan-tzolkin-date) (calendar-read-mayan-haab-date))) (let ((date (calendar-mayan-tzolkin-haab-on-or-before *************** combination. Echo Mayan date if NOECHO *** 327,334 **** (or noecho (calendar-print-mayan-date))))) (defun calendar-absolute-from-mayan-long-count (c) ! "Compute the absolute date corresponding to the Mayan Long ! Count $c$, which is a list (baktun katun tun uinal kin)" (+ (* (nth 0 c) 144000) ; baktun (* (nth 1 c) 7200) ; katun (* (nth 2 c) 360) ; tun --- 325,332 ---- (or noecho (calendar-print-mayan-date))))) (defun calendar-absolute-from-mayan-long-count (c) ! "Compute the absolute date corresponding to the Mayan Long Count C. ! Long count is a list (baktun katun tun uinal kin)" (+ (* (nth 0 c) 144000) ; baktun (* (nth 1 c) 7200) ; katun (* (nth 2 c) 360) ; tun *************** Count $c$, which is a list (baktun katun *** 338,345 **** calendar-mayan-days-before-absolute-zero))) (defun calendar-print-mayan-date () ! "Show the Mayan long count, tzolkin, and haab equivalents of the date ! under the cursor." (interactive) (let* ((d (calendar-absolute-from-gregorian (or (calendar-cursor-to-date) --- 336,342 ---- calendar-mayan-days-before-absolute-zero))) (defun calendar-print-mayan-date () ! "Show the Mayan long count, tzolkin, and haab equivalents of date." (interactive) (let* ((d (calendar-absolute-from-gregorian (or (calendar-cursor-to-date) diff -cprP --exclude=*.elc emacs-19.15/lisp/calendar.el emacs-19.16/lisp/calendar.el *** emacs-19.15/lisp/calendar.el Mon Jun 14 11:26:31 1993 --- emacs-19.16/lisp/calendar.el Mon Jun 21 15:33:43 1993 *************** *** 8,14 **** ;; Hebrew calendar, Islamic calendar, ISO calendar, Julian day number, ;; diary, holidays ! (defconst calendar-version "Version 5, released August 10, 1992") ;; This file is part of GNU Emacs. --- 8,14 ---- ;; Hebrew calendar, Islamic calendar, ISO calendar, Julian day number, ;; diary, holidays ! (defconst calendar-version "Version 5.1, released June 18, 1993") ;; This file is part of GNU Emacs. *************** *** 57,62 **** --- 57,63 ---- ;; holidays.el Holiday functions ;; cal-french.el French Revolutionary calendar ;; cal-mayan.el Mayan calendars + ;; cal-dst.el Daylight savings time rules ;; solar.el Sunrise/sunset, equinoxes/solstices ;; lunar.el Phases of the moon ;; appt.el Appointment notification *************** The marking symbol is specified by the v *** 133,141 **** ;;;###autoload (defvar view-calendar-holidays-initially nil ! "*If t, the holidays for the current three month period will be displayed ! on entry. The holidays are displayed in another window when the calendar is ! first displayed.") ;;;###autoload (defvar mark-holidays-in-calendar nil --- 134,142 ---- ;;;###autoload (defvar view-calendar-holidays-initially nil ! "*If t, holidays for current three month period will be displayed on entry. ! The holidays are displayed in another window when the calendar is first ! displayed.") ;;;###autoload (defvar mark-holidays-in-calendar nil *************** The marking symbol is specified by the v *** 148,172 **** ;;;###autoload (defvar all-hebrew-calendar-holidays nil ! "*If nil, the holidays from the Hebrew calendar that are shown will ! include only those days of such major interest as to appear on secular ! calendars. If t, the holidays shown in the calendar will include all ! special days that would be shown on a complete Hebrew calendar.") ;;;###autoload (defvar all-christian-calendar-holidays nil ! "*If nil, the holidays from the Christian calendar that are shown will ! include only those days of such major interest as to appear on secular ! calendars. If t, the holidays shown in the calendar will include all ! special days that would be shown on a complete Christian calendar.") ;;;###autoload (defvar all-islamic-calendar-holidays nil ! "*If nil, the holidays from the Islamic calendar that are shown will ! include only those days of such major interest as to appear on secular ! calendars. If t, the holidays shown in the calendar will include all ! special days that would be shown on a complete Islamic calendar.") ;;;###autoload (defvar calendar-load-hook nil "*List of functions to be called after the calendar is first loaded. --- 149,182 ---- ;;;###autoload (defvar all-hebrew-calendar-holidays nil ! "*If nil, show only major holidays from the Hebrew calendar. + If nil, the only holidays from the Hebrew calendar shown will be those days of + such major interest as to appear on secular calendars. + + If t, the holidays shown in the calendar will include all special days that + would be shown on a complete Hebrew calendar.") + ;;;###autoload (defvar all-christian-calendar-holidays nil ! "*If nil, show only major holidays from the Christian calendar. ! ! If nil, the only holidays from the Christian calendar shown will be those days ! of such major interest as to appear on secular calendars. + If t, the holidays shown in the calendar will include all special days that + would be shown on a complete Christian calendar.") + ;;;###autoload (defvar all-islamic-calendar-holidays nil ! "*If nil, show only major holidays from the Islamic calendar. ! ! If nil, the only holidays from the Islamic calendar shown will be those days ! of such major interest as to appear on secular calendars. + If t, the holidays shown in the calendar will include all special days that + would be shown on a complete Islamic calendar.") + ;;;###autoload (defvar calendar-load-hook nil "*List of functions to be called after the calendar is first loaded. *************** details, see the documentation for the v *** 307,330 **** ;;;###autoload (defvar diary-nonmarking-symbol "&" ! "*The symbol used to indicate that a diary entry is not to be marked in the ! calendar window.") ;;;###autoload (defvar hebrew-diary-entry-symbol "H" ! "*The symbol used to indicate that a diary entry is according to the ! Hebrew calendar.") ;;;###autoload (defvar islamic-diary-entry-symbol "I" ! "*The symbol used to indicate that a diary entry is according to the ! Islamic calendar.") ;;;###autoload (defvar diary-include-string "#include" ! "*The string used to indicate the inclusion of another file of diary entries ! in diary-file. See the documentation for the function ! `include-other-diary-files'.") ;;;###autoload (defvar sexp-diary-entry-symbol "%%" --- 317,336 ---- ;;;###autoload (defvar diary-nonmarking-symbol "&" ! "*Symbol indicating that a diary entry is not to be marked in the calendar.") ;;;###autoload (defvar hebrew-diary-entry-symbol "H" ! "*Symbol indicating a diary entry according to the Hebrew calendar.") ;;;###autoload (defvar islamic-diary-entry-symbol "I" ! "*Symbol indicating a diary entry according to the Islamic calendar.") ;;;###autoload (defvar diary-include-string "#include" ! "*The string indicating inclusion of another file of diary entries. ! See the documentation for the function `include-other-diary-files'.") ;;;###autoload (defvar sexp-diary-entry-symbol "%%" *************** See the documentation for the function ` *** 333,347 **** ;;;###autoload (defvar abbreviated-calendar-year t ! "*Interpret a two-digit year DD in a diary entry as being either 19DD or ! 20DD, as appropriate, for the Gregorian calendar; similarly for the Hebrew and ! Islamic calendars. If this variable is nil, years must be written in full.") ;;;###autoload (defvar european-calendar-style nil ! "*Use the European style of dates in the diary and in any displays. If this ! variable is t, a date 1/2/1990 would be interpreted as February 1, 1990. ! The accepted European date styles are DAY/MONTH DAY/MONTH/YEAR --- 339,353 ---- ;;;###autoload (defvar abbreviated-calendar-year t ! "*Interpret a two-digit year DD in a diary entry as either 19DD or 20DD. ! For the Gregorian calendar; similarly for the Hebrew and Islamic calendars. ! If this variable is nil, years must be written in full.") ;;;###autoload (defvar european-calendar-style nil ! "*Use the European style of dates in the diary and in any displays. ! If this variable is t, a date 1/2/1990 would be interpreted as February 1, ! 1990. The accepted European date styles are DAY/MONTH DAY/MONTH/YEAR *************** a portion of the first word of the diary *** 403,418 **** ;;;###autoload (defvar european-calendar-display-form '((if dayname (concat dayname ", ")) day " " monthname " " year) ! "*The pseudo-pattern that governs the way a Gregorian date is formatted ! in the European style. See the documentation of calendar-date-display-forms ! for an explanation.") ;;;###autoload (defvar american-calendar-display-form '((if dayname (concat dayname ", ")) monthname " " day ", " year) ! "*The pseudo-pattern that governs the way a Gregorian date is formatted ! in the American style. See the documentation of calendar-date-display-forms ! for an explanation.") ;;;###autoload (defvar calendar-date-display-form --- 409,422 ---- ;;;###autoload (defvar european-calendar-display-form '((if dayname (concat dayname ", ")) day " " monthname " " year) ! "*Pseudo-pattern governing the way a date appears in the European style. ! See the documentation of calendar-date-display-forms for an explanation.") ;;;###autoload (defvar american-calendar-display-form '((if dayname (concat dayname ", ")) monthname " " day ", " year) ! "*Pseudo-pattern governing the way a date appears in the American style. ! See the documentation of calendar-date-display-forms for an explanation.") ;;;###autoload (defvar calendar-date-display-form *************** for an explanation.") *** 419,430 **** (if european-calendar-style european-calendar-display-form american-calendar-display-form) ! "*The pseudo-pattern that governs the way a Gregorian date is formatted ! as a string by the function `calendar-date-string'. A pseudo-pattern is a ! list of expressions that can involve the keywords `month', `day', and ! `year', all numbers in string form, and `monthname' and `dayname', both ! alphabetic strings. For example, the ISO standard would use the pseudo- ! pattern '(year \"-\" month \"-\" day) --- 423,434 ---- (if european-calendar-style european-calendar-display-form american-calendar-display-form) ! "*Pseudo-pattern governing the way a date appears. ! ! Used by the function `calendar-date-string', a pseudo-pattern is a list of ! expressions that can involve the keywords `month', `day', and `year', all ! numbers in string form, and `monthname' and `dayname', both alphabetic ! strings. For example, the ISO standard would use the pseudo- pattern '(year \"-\" month \"-\" day) *************** would give the usual American style in f *** 440,603 **** See the documentation of the function `calendar-date-string'.") - ;;;###autoload - (defvar calendar-time-display-form - '(12-hours ":" minutes am-pm - (if time-zone " (") time-zone (if time-zone ")")) - "*The pseudo-pattern that governs the way a time of day is formatted. - - A pseudo-pattern is a list of expressions that can involve the keywords - `12-hours', `24-hours', and `minutes', all numbers in string form, - and `am-pm' and `time-zone', both alphabetic strings. - - For example, the form - - '(24-hours \":\" minutes - (if time-zone \" (\") time-zone (if time-zone \")\")) - - would give military-style times like `21:07 (UT)'.") - - ;;;###autoload - (defvar calendar-latitude nil - "*Latitude of `calendar-location-name' in degrees, + north, - south. - For example, 40.7 for New York City.") - - ;;;###autoload - (defvar calendar-longitude nil - "*Longitude of `calendar-location-name' in degrees, + east, - west. - For example, -74.0 for New York City.") - - ;;;###autoload - (defvar calendar-location-name - '(let ((float-output-format "%.1f")) - (format "%s%s, %s%s" - (abs calendar-latitude) - (if (> calendar-latitude 0) "N" "S") - (abs calendar-longitude) - (if (> calendar-longitude 0) "E" "W"))) - "*An expression that evaluates to the name of the location at - `calendar-longitude', calendar-latitude'. Default value is just the latitude, - longitude pair.") - - (defun calendar-current-time-zone () - "Return the UTC difference, dst offset, and names for the current time zone. - - Returns a list of the form (UTC-DIFF DST-OFFSET STD-ZONE DST-ZONE), based on - a heuristic probing of what the system knows: - - UTC-DIFF is an integer specifying the number of minutes difference between - standard time in the current time zone and Coordinated Universal Time - (Greenwich Mean Time). A negative value means west of Greenwich. - DST-OFFSET is an integer giving the daylight savings time offset in minutes. - STD-ZONE is a string giving the name of the time zone when no seasonal time - adjustment is in effect. - DST-ZONE is a string giving the name of the time zone when there is a seasonal - time adjustment in effect. - - If the local area does not use a seasonal time adjustment, OFFSET is 0, and - STD-ZONE and DST-ZONE are equal. - - Some operating systems cannot provide all this information to Emacs; in this - case, `calendar-current-time-zone' returns a list containing nil for the data - it can't find." - (let* ((now (current-time)) - (now-zone (current-time-zone now)) - (now-utc-diff (car now-zone)) - (now-name (car (cdr now-zone))) - probe-zone - (probe-utc-diff now-utc-diff) - (i 1)) - ;; Heuristic: probe the time zone offset in the next three calendar - ;; quarters, looking for a time zone offset different from now. - ;; There about 120 * 2^16 seconds in a quarter year - (while (and (< i 4) (eq now-utc-diff probe-utc-diff)) - (setq probe-zone (current-time-zone (list (+ (car now) (* i 120)) 0))) - (setq probe-utc-diff (car probe-zone)) - (setq i (1+ i))) - (if (or (eq now-utc-diff probe-utc-diff) - (not now-utc-diff) - (not probe-utc-diff)) - ;; No change found - (list (and now-utc-diff (/ now-utc-diff 60)) 0 now-name now-name) - ;; Found a different utc-diff - (let ((utc-diff (min now-utc-diff probe-utc-diff)) - (probe-name (car (cdr probe-zone)))) - (list (/ utc-diff 60) - (/ (abs (- now-utc-diff probe-utc-diff)) 60) - (if (eq utc-diff now-utc-diff) now-name probe-name) - (if (eq utc-diff now-utc-diff) probe-name now-name)))))) - - ;;; The following six defvars relating to daylight savings time should NOT be - ;;; marked to go into loaddefs.el where they would be evaluated when Emacs is - ;;; dumped. These variables' appropriate values really on the conditions under - ;;; which the code is INVOKED; so it's inappropriate to initialize them when - ;;; Emacs is dumped---they should be initialized when calendar.el is loaded. - - (defvar calendar-time-zone (car (calendar-current-time-zone)) - "*Number of minutes difference between local standard time at - `calendar-location-name' and Coordinated Universal (Greenwich) Time. For - example, -300 for New York City, -480 for Los Angeles.") - - (defvar calendar-daylight-time-offset (car (cdr (calendar-current-time-zone))) - "*A sexp in the variable `year' that gives the number of minutes difference - between daylight savings time and standard time. - - Should be set to 0 if locale has no daylight savings time.") - - (defvar calendar-standard-time-zone-name - (car (nthcdr 2 (calendar-current-time-zone))) - "*Abbreviated name of standard time zone at `calendar-location-name'. - For example, \"EST\" in New York City, \"PST\" for Los Angeles.") - - (defvar calendar-daylight-time-zone-name - (car (nthcdr 3 (calendar-current-time-zone))) - "*Abbreviated name of daylight-savings time zone at `calendar-location-name'. - For example, \"EDT\" in New York City, \"PDT\" for Los Angeles.") - - (defvar calendar-daylight-savings-starts - (if (not (eq calendar-daylight-time-offset 0)) - '(calendar-nth-named-day 1 0 4 year)) - "*A sexp in the variable `year' that gives the Gregorian date, in the form - of a list (month day year), on which daylight savings time starts. This is - used to determine the starting date of daylight savings time for the holiday - list and for correcting times of day in the solar and lunar calculations. - - For example, if daylight savings time is mandated to start on October 1, - you would set `calendar-daylight-savings-starts' to - - '(10 1 year) - - For a more complex example, if daylight savings time begins on the first of - Nisan on the Hebrew calendar, we would set `calendar-daylight-savings-starts' - to - - '(calendar-gregorian-from-absolute - (calendar-absolute-from-hebrew - (list 1 1 (+ year 3760)))) - - because Nisan is the first month in the Hebrew calendar. - - If the locale never uses daylight savings time, set this to nil.") - - (defvar calendar-daylight-savings-ends - (if (not (eq calendar-daylight-time-offset 0)) - '(calendar-nth-named-day -1 0 10 year)) - "*An expression in the variable `year' that gives the Gregorian date, in the - form of a list (month day year), on which daylight savings time ends. This - is used to determine the ending date of daylight savings time for the holiday - list and for correcting times of day in the solar and lunar calculations. - - The default value is the American rule of the last Sunday in October, - - If the locale never uses daylight savings time, set this to nil. - - See the documentation for `calendar-daylight-savings-starts' for other - examples.") - - (defvar calendar-daylight-savings-switchover-time 120 - "*A sexp in the variable `year' that gives the number of minutes after - midnight that daylight savings time begins and ends.") - (defun european-calendar () "Set the interpretation and display of dates to the European style." (interactive) --- 444,449 ---- *************** midnight that daylight savings time begi *** 616,632 **** ;;;###autoload (defvar print-diary-entries-hook 'lpr-buffer ! "*List of functions to be called after a temporary buffer is prepared with ! the diary entries currently visible in the diary buffer. The default just ! does the printing. Other uses might include, for example, rearranging the ! lines into order by day and time, saving the buffer instead of deleting it, or ! changing the function used to do the printing.") ;;;###autoload (defvar list-diary-entries-hook nil ! "*List of functions to be called after the diary file is culled for ! relevant entries. It is to be used for diary entries that are not found in ! the diary file. A function `include-other-diary-files' is provided for use as the value of this hook. This function enables you to use shared diary files together --- 462,477 ---- ;;;###autoload (defvar print-diary-entries-hook 'lpr-buffer ! "*List of functions called after a temporary diary buffer is prepared. ! The buffer shows only the diary entries currently visible in the diary ! buffer. The default just does the printing. Other uses might include, for ! example, rearranging the lines into order by day and time, saving the buffer ! instead of deleting it, or changing the function used to do the printing.") ;;;###autoload (defvar list-diary-entries-hook nil ! "*List of functions called after diary file is culled for relevant entries. ! It is to be used for diary entries that are not found in the diary file. A function `include-other-diary-files' is provided for use as the value of this hook. This function enables you to use shared diary files together *************** diary buffer, set the variable `diary-li *** 675,684 **** ;;;###autoload (defvar nongregorian-diary-listing-hook nil ! "*List of functions to be called for the diary file and included files as ! they are processed for listing diary entries. You can use any or all of ! `list-hebrew-diary-entries' and `list-islamic-diary-entries'. The ! documentation for these functions describes the style of such diary entries.") ;;;###autoload (defvar mark-diary-entries-hook nil --- 520,530 ---- ;;;###autoload (defvar nongregorian-diary-listing-hook nil ! "*List of functions called for listing diary file and included files. ! As the files are processed for diary entries, these functions are used to cull ! relevant entries. You can use either or both of `list-hebrew-diary-entries' ! and `list-islamic-diary-entries'. The documentation for these functions ! describes the style of such diary entries.") ;;;###autoload (defvar mark-diary-entries-hook nil *************** function `include-other-diary-files' as *** 697,742 **** ;;;###autoload (defvar nongregorian-diary-marking-hook nil ! "*List of functions to be called as the diary file and included files are ! processed for marking diary entries. You can use either or both of ! mark-hebrew-diary-entries and mark-islamic-diary-entries. The documentation ! for these functions describes the style of such diary entries.") ;;;###autoload (defvar diary-list-include-blanks nil ! "*If nil, do not include days with no diary entry in the list of diary ! entries. Such days will then not be shown in the the fancy diary buffer, ! even if they are holidays.") ;;;###autoload (defvar holidays-in-diary-buffer t ! "*If t, the holidays will be indicated in the mode line of the diary buffer ! (or in the fancy diary buffer next to the date). This slows down the diary ! functions somewhat; setting it to nil will make the diary display faster.") (defvar calendar-mark-ring nil) ;;;###autoload (defvar general-holidays ! '((fixed 1 1 "New Year's Day") ! (float 1 1 3 "Martin Luther King Day") ! (fixed 2 2 "Ground Hog Day") ! (fixed 2 14 "Valentine's Day") ! (float 2 1 3 "President's Day") ! (fixed 3 17 "St. Patrick's Day") ! (fixed 4 1 "April Fool's Day") ! (float 5 0 2 "Mother's Day") ! (float 5 1 -1 "Memorial Day") ! (fixed 6 14 "Flag Day") ! (float 6 0 3 "Father's Day") ! (fixed 7 4 "Independence Day") ! (float 9 1 1 "Labor Day") ! (float 10 1 2 "Columbus Day") ! (fixed 10 31 "Halloween") ! (fixed 11 11 "Veteran's Day") ! (float 11 4 4 "Thanksgiving")) ! "*General holidays. Default value is for the United States. See the ! documentation for `calendar-holidays' for details.") ;;;###autoload (defvar local-holidays nil --- 543,590 ---- ;;;###autoload (defvar nongregorian-diary-marking-hook nil ! "*List of functions called for marking diary file and included files. ! As the files are processed for diary entries, these functions are used to cull ! relevant entries. You can use either or both of `mark-hebrew-diary-entries' ! and `mark-islamic-diary-entries'. The documentation for these functions ! describes the style of such diary entries.") ;;;###autoload (defvar diary-list-include-blanks nil ! "*If nil, do not include days with no diary entry in the list of diary entries. ! Such days will then not be shown in the the fancy diary buffer, even if they ! are holidays.") ;;;###autoload (defvar holidays-in-diary-buffer t ! "*If t, the holidays will be indicated in the diary display. ! The holidays will be given in the mode line of the diary buffer, or in the ! fancy diary buffer next to the date. This slows down the diary functions ! somewhat; setting it to nil will make the diary display faster.") (defvar calendar-mark-ring nil) ;;;###autoload (defvar general-holidays ! '((holiday-fixed 1 1 "New Year's Day") ! (holiday-float 1 1 3 "Martin Luther King Day") ! (holiday-fixed 2 2 "Ground Hog Day") ! (holiday-fixed 2 14 "Valentine's Day") ! (holiday-float 2 1 3 "President's Day") ! (holiday-fixed 3 17 "St. Patrick's Day") ! (holiday-fixed 4 1 "April Fool's Day") ! (holiday-float 5 0 2 "Mother's Day") ! (holiday-float 5 1 -1 "Memorial Day") ! (holiday-fixed 6 14 "Flag Day") ! (holiday-float 6 0 3 "Father's Day") ! (holiday-fixed 7 4 "Independence Day") ! (holiday-float 9 1 1 "Labor Day") ! (holiday-float 10 1 2 "Columbus Day") ! (holiday-fixed 10 31 "Halloween") ! (holiday-fixed 11 11 "Veteran's Day") ! (holiday-float 11 4 4 "Thanksgiving")) ! "*General holidays. Default value is for the United States. ! See the documentation for `calendar-holidays' for details.") ;;;###autoload (defvar local-holidays nil *************** See the documentation for `calendar-holi *** 750,787 **** ;;;###autoload (defvar hebrew-holidays ! '((rosh-hashanah-etc) (if all-hebrew-calendar-holidays ! (julian 11 ! (let* ((m displayed-month) ! (y displayed-year) ! (year)) ! (increment-calendar-month m y -1) ! (let ((year (extract-calendar-year ! (calendar-julian-from-absolute ! (calendar-absolute-from-gregorian ! (list m 1 y)))))) ! (if (zerop (% (1+ year) 4)) ! 22 ! 21))) "\"Tal Umatar\" (evening)")) (if all-hebrew-calendar-holidays ! (hanukkah) ! (hebrew 9 25 "Hanukkah")) (if all-hebrew-calendar-holidays ! (hebrew 10 ! (let ((h-year (extract-calendar-year ! (calendar-hebrew-from-absolute ! (calendar-absolute-from-gregorian ! (list displayed-month 28 displayed-year)))))) ! (if (= (% (calendar-absolute-from-hebrew (list 10 10 h-year)) ! 7) ! 6) ! 11 10)) ! "Tzom Teveth")) (if all-hebrew-calendar-holidays ! (hebrew 11 15 "Tu B'Shevat")) (if all-hebrew-calendar-holidays ! (hebrew 11 (let ((m displayed-month) (y displayed-year)) --- 598,637 ---- ;;;###autoload (defvar hebrew-holidays ! '((holiday-rosh-hashanah-etc) (if all-hebrew-calendar-holidays ! (holiday-julian ! 11 ! (let* ((m displayed-month) ! (y displayed-year) ! (year)) ! (increment-calendar-month m y -1) ! (let ((year (extract-calendar-year ! (calendar-julian-from-absolute ! (calendar-absolute-from-gregorian ! (list m 1 y)))))) ! (if (zerop (% (1+ year) 4)) ! 22 ! 21))) "\"Tal Umatar\" (evening)")) (if all-hebrew-calendar-holidays ! (holiday-hanukkah) ! (holiday-hebrew 9 25 "Hanukkah")) (if all-hebrew-calendar-holidays ! (holiday-hebrew ! 10 ! (let ((h-year (extract-calendar-year ! (calendar-hebrew-from-absolute ! (calendar-absolute-from-gregorian ! (list displayed-month 28 displayed-year)))))) ! (if (= (% (calendar-absolute-from-hebrew (list 10 10 h-year)) ! 7) ! 6) ! 11 10)) ! "Tzom Teveth")) (if all-hebrew-calendar-holidays ! (holiday-hebrew 11 15 "Tu B'Shevat")) (if all-hebrew-calendar-holidays ! (holiday-hebrew 11 (let ((m displayed-month) (y displayed-year)) *************** See the documentation for `calendar-holi *** 808,814 **** (day (extract-calendar-day s-s))) day)) "Shabbat Shirah")) ! (passover-etc) (if (and all-hebrew-calendar-holidays (let* ((m displayed-month) (y displayed-year) --- 658,664 ---- (day (extract-calendar-day s-s))) day)) "Shabbat Shirah")) ! (holiday-passover-etc) (if (and all-hebrew-calendar-holidays (let* ((m displayed-month) (y displayed-year) *************** See the documentation for `calendar-holi *** 819,827 **** (calendar-absolute-from-gregorian (list m 1 y)))))) (= 21 (% year 28))))) ! (julian 3 26 "Kiddush HaHamah")) (if all-hebrew-calendar-holidays ! (tisha-b-av-etc))) "*Jewish holidays. See the documentation for `calendar-holidays' for details.") --- 669,677 ---- (calendar-absolute-from-gregorian (list m 1 y)))))) (= 21 (% year 28))))) ! (holiday-julian 3 26 "Kiddush HaHamah")) (if all-hebrew-calendar-holidays ! (holiday-tisha-b-av-etc))) "*Jewish holidays. See the documentation for `calendar-holidays' for details.") *************** See the documentation for `calendar-holi *** 828,872 **** ;;;###autoload (defvar christian-holidays '((if all-christian-calendar-holidays ! (fixed 1 6 "Epiphany")) ! (easter-etc) (if all-christian-calendar-holidays ! (greek-orthodox-easter)) (if all-christian-calendar-holidays ! (fixed 8 15 "Assumption")) (if all-christian-calendar-holidays ! (advent)) ! (fixed 12 25 "Christmas") (if all-christian-calendar-holidays ! (julian 12 25 "Eastern Orthodox Christmas"))) "*Christian holidays. See the documentation for `calendar-holidays' for details.") ;;;###autoload (defvar islamic-holidays ! '((islamic 1 1 (format "Islamic New Year %d" ! (let ((m displayed-month) ! (y displayed-year)) ! (increment-calendar-month m y 1) ! (extract-calendar-year ! (calendar-islamic-from-absolute ! (calendar-absolute-from-gregorian ! (list m (calendar-last-day-of-month m y) y))))))) (if all-islamic-calendar-holidays ! (islamic 1 10 "Ashura")) (if all-islamic-calendar-holidays ! (islamic 3 12 "Mulad-al-Nabi")) (if all-islamic-calendar-holidays ! (islamic 7 26 "Shab-e-Mi'raj")) (if all-islamic-calendar-holidays ! (islamic 8 15 "Shab-e-Bara't")) ! (islamic 9 1 "Ramadan Begins") (if all-islamic-calendar-holidays ! (islamic 9 27 "Shab-e Qadr")) (if all-islamic-calendar-holidays ! (islamic 10 1 "Id-al-Fitr")) (if all-islamic-calendar-holidays ! (islamic 12 10 "Id-al-Adha"))) "*Islamic holidays. See the documentation for `calendar-holidays' for details.") --- 678,725 ---- ;;;###autoload (defvar christian-holidays '((if all-christian-calendar-holidays ! (holiday-fixed 1 6 "Epiphany")) ! (holiday-easter-etc) (if all-christian-calendar-holidays ! (holiday-greek-orthodox-easter)) (if all-christian-calendar-holidays ! (holiday-fixed 8 15 "Assumption")) (if all-christian-calendar-holidays ! (holiday-advent)) ! (holiday-fixed 12 25 "Christmas") (if all-christian-calendar-holidays ! (holiday-julian 12 25 "Eastern Orthodox Christmas"))) "*Christian holidays. See the documentation for `calendar-holidays' for details.") ;;;###autoload (defvar islamic-holidays ! '((holiday-islamic ! 1 1 ! (format "Islamic New Year %d" ! (let ((m displayed-month) ! (y displayed-year)) ! (increment-calendar-month m y 1) ! (extract-calendar-year ! (calendar-islamic-from-absolute ! (calendar-absolute-from-gregorian ! (list ! m (calendar-last-day-of-month m y) y))))))) (if all-islamic-calendar-holidays ! (holiday-islamic 1 10 "Ashura")) (if all-islamic-calendar-holidays ! (holiday-islamic 3 12 "Mulad-al-Nabi")) (if all-islamic-calendar-holidays ! (holiday-islamic 7 26 "Shab-e-Mi'raj")) (if all-islamic-calendar-holidays ! (holiday-islamic 8 15 "Shab-e-Bara't")) ! (holiday-islamic 9 1 "Ramadan Begins") (if all-islamic-calendar-holidays ! (holiday-islamic 9 27 "Shab-e Qadr")) (if all-islamic-calendar-holidays ! (holiday-islamic 10 1 "Id-al-Fitr")) (if all-islamic-calendar-holidays ! (holiday-islamic 12 10 "Id-al-Adha"))) "*Islamic holidays. See the documentation for `calendar-holidays' for details.") *************** See the documentation for `calendar-holi *** 874,891 **** (defvar solar-holidays '((if (fboundp 'atan) (solar-equinoxes-solstices)) ! (sexp (eval calendar-daylight-savings-starts) ! "Daylight Savings Time Begins") ! (sexp (eval calendar-daylight-savings-ends) ! "Daylight Savings Time Ends")) "*Sun-related holidays. See the documentation for `calendar-holidays' for details.") ;;;###autoload (defvar calendar-holidays ! '(append general-holidays local-holidays other-holidays ! christian-holidays hebrew-holidays islamic-holidays ! solar-holidays) "*List of notable days for the command M-x holidays. Additional holidays are easy to add to the list, just put them in the list --- 727,765 ---- (defvar solar-holidays '((if (fboundp 'atan) (solar-equinoxes-solstices)) ! (progn ! (require 'cal-dst) ! (funcall ! 'holiday-sexp ! calendar-daylight-savings-starts ! '(format "Daylight Savings Time Begins %s" ! (if (fboundp 'atan) ! (solar-time-string ! (/ calendar-daylight-savings-switchover-time ! (float 60)) ! date ! 'standard) ! "")))) ! (funcall ! 'holiday-sexp ! calendar-daylight-savings-ends ! '(format "Daylight Savings Time Ends %s" ! (if (fboundp 'atan) ! (solar-time-string ! (/ (- calendar-daylight-savings-switchover-time ! calendar-daylight-time-offset) ! (float 60)) ! date ! 'daylight) ! "")))) "*Sun-related holidays. See the documentation for `calendar-holidays' for details.") ;;;###autoload (defvar calendar-holidays ! (append general-holidays local-holidays other-holidays ! christian-holidays hebrew-holidays islamic-holidays ! solar-holidays) "*List of notable days for the command M-x holidays. Additional holidays are easy to add to the list, just put them in the list *************** eliminate unwanted categories of holiday *** 896,959 **** `local-holidays' be set in site-init.el and `other-holidays' be set by the user. ! The possible holiday-forms are as follows: ! ! (fixed MONTH DAY STRING) a fixed date on the Gregorian calendar ! (float MONTH DAYNAME K STRING) the Kth DAYNAME in MONTH on the Gregorian ! calendar (0 for Sunday, etc.); K<0 means ! count back from the end of the month ! (hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar ! (islamic MONTH DAY STRING) a fixed date on the Islamic calendar ! (julian MONTH DAY STRING) a fixed date on the Julian calendar ! (sexp SEXP STRING) SEXP is a Gregorian-date-valued expression in the variable `year'; if it evaluates to a visible date, that's the holiday; if it ! evaluates to nil, there's no holiday ! (if BOOLEAN HOLIDAY-FORM &optional HOLIDAY-FORM) gives a choice between ! two holidays based on the value of BOOLEAN ! (FUNCTION &optional ARGS) dates requiring special computation; ARGS, ! if any, are passed in a list to the function ! `calendar-holiday-function-FUNCTION' For example, to add Bastille Day, celebrated in France on July 14, add ! (fixed 7 14 \"Bastille Day\") to the list. To add Hurricane Supplication Day, celebrated in the Virgin Islands on the fourth Monday in August, add ! (float 8 1 4 \"Hurricane Supplication Day\") to the list (the last Monday would be specified with `-1' instead of `4'). To add the last day of Hanukkah to the list, use ! (hebrew 10 2 \"Last day of Hanukkah\") since the Hebrew months are numbered with 1 starting from Nisan, while to add the Islamic feast celebrating Mohammed's birthday use ! (islamic 3 12 \"Mohammed's Birthday\") since the Islamic months are numbered from 1 starting with Muharram. To add Thomas Jefferson's birthday, April 2, 1743 (Julian), use ! (julian 4 2 \"Jefferson's Birthday\") ! ! To include a holiday conditionally, use the if or the sexp form. For example, ! to include American presidential elections, which occur on the first Tuesday ! after the first Monday in November of years divisible by 4, add ! (sexp (if (zerop (% year 4)) ! (calendar-gregorian-from-absolute ! (1+ (calendar-dayname-on-or-before ! 1 (+ 6 (calendar-absolute-from-gregorian ! (list 11 1 year))))))) ! \"US Presidential Election\") or (if (zerop (% displayed-year 4)) ! (fixed 11 (extract-calendar-day (calendar-gregorian-from-absolute (1+ (calendar-dayname-on-or-before --- 770,835 ---- `local-holidays' be set in site-init.el and `other-holidays' be set by the user. ! Entries on the list are expressions that return (possibly empty) lists of ! items of the form ((month day year) string) of a holiday in the in the ! three-month period centered around `displayed-month' of `displayed-year'. ! Several basic functions are provided for this purpose: ! ! (holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar ! (holiday-float MONTH DAYNAME K STRING &optional day) is the Kth DAYNAME in ! MONTH on the Gregorian calendar (0 for Sunday, ! etc.); K<0 means count back from the end of the ! month. An optional parameter DAY means the Kth ! DAYNAME after/before MONTH DAY. ! (holiday-hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar ! (holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar ! (holiday-julian MONTH DAY STRING) a fixed date on the Julian calendar ! (holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression in the variable `year'; if it evaluates to a visible date, that's the holiday; if it ! evaluates to nil, there's no holiday. STRING ! is an expression in the variable `date'. For example, to add Bastille Day, celebrated in France on July 14, add ! (holiday-fixed 7 14 \"Bastille Day\") to the list. To add Hurricane Supplication Day, celebrated in the Virgin Islands on the fourth Monday in August, add ! (holiday-float 8 1 4 \"Hurricane Supplication Day\") to the list (the last Monday would be specified with `-1' instead of `4'). To add the last day of Hanukkah to the list, use ! (holiday-hebrew 10 2 \"Last day of Hanukkah\") since the Hebrew months are numbered with 1 starting from Nisan, while to add the Islamic feast celebrating Mohammed's birthday use ! (holiday-islamic 3 12 \"Mohammed's Birthday\") since the Islamic months are numbered from 1 starting with Muharram. To add Thomas Jefferson's birthday, April 2, 1743 (Julian), use ! (holiday-julian 4 2 \"Jefferson's Birthday\") ! To include a holiday conditionally, use the sexp form or a conditional. For ! example, to include American presidential elections, which occur on the first ! Tuesday after the first Monday in November of years divisible by 4, add ! ! (holiday-sexp ! (if (zerop (% year 4)) ! (calendar-gregorian-from-absolute ! (1+ (calendar-dayname-on-or-before ! 1 (+ 6 (calendar-absolute-from-gregorian ! (list 11 1 year))))))) ! \"US Presidential Election\") or (if (zerop (% displayed-year 4)) ! (holiday-fixed 11 (extract-calendar-day (calendar-gregorian-from-absolute (1+ (calendar-dayname-on-or-before *************** to the list. To include the phases of t *** 965,982 **** (lunar-phases) ! to the holiday list, where `calendar-holiday-function-lunar-phases' is an ! Emacs-Lisp function that you've written to return a (possibly empty) list of ! the relevant VISIBLE dates with descriptive strings such as ! ! (((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... ) ! ! The fixed, float, hebrew, islamic, julian, sexp, and if forms are implemented ! by the inclusion of the functions `calendar-holiday-function-fixed', ! `calendar-holiday-function-float', `calendar-holiday-function-hebrew', ! `calendar-holiday-function-islamic', `calendar-holiday-function-julian', ! `calendar-holiday-function-sexp', and `calendar-holiday-function-if', ! respectively.") (defconst calendar-buffer "*Calendar*" "Name of the buffer used for the calendar.") --- 841,851 ---- (lunar-phases) ! to the holiday list, where `lunar-phases' is an Emacs-Lisp function that ! you've written to return a (possibly empty) list of the relevant VISIBLE dates ! with descriptive strings such as ! ! (((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... ).") (defconst calendar-buffer "*Calendar*" "Name of the buffer used for the calendar.") *************** respectively.") *** 988,995 **** "Name of the buffer used for the optional fancy display of the diary.") (defmacro increment-calendar-month (mon yr n) ! "Move the variables MON and YR to the month and year N months forward ! if N is positive or backward if N is negative." (` (let (( macro-y (+ (* (, yr) 12) (, mon) -1 (, n) ))) (setq (, mon) (1+ (% macro-y 12) )) (setq (, yr) (/ macro-y 12))))) --- 857,864 ---- "Name of the buffer used for the optional fancy display of the diary.") (defmacro increment-calendar-month (mon yr n) ! "Move the variables MON and YR to the month and year by N months. ! Forward if N is positive or backward if N is negative." (` (let (( macro-y (+ (* (, yr) 12) (, mon) -1 (, n) ))) (setq (, mon) (1+ (% macro-y 12) )) (setq (, yr) (/ macro-y 12))))) *************** if N is positive or backward if N is neg *** 1001,1008 **** (,@ body))))) (defmacro calendar-sum (index initial condition expression) ! "For INDEX = INITIAL and successive integers, as long as CONDITION holds, ! sum EXPRESSION." (` (let (( (, index) (, initial)) (sum 0)) (while (, condition) --- 870,876 ---- (,@ body))))) (defmacro calendar-sum (index initial condition expression) ! "For INDEX = INITIAL et seq, as long as CONDITION holds, sum EXPRESSION." (` (let (( (, index) (, initial)) (sum 0)) (while (, condition) *************** sum EXPRESSION." *** 1065,1076 **** (defmacro calendar-leap-year-p (year) "Returns t if YEAR is a Gregorian leap year." ! (` (or ! (and (= (% (, year) 4) 0) ! (/= (% (, year) 100) 0)) ! (= (% (, year) 400) 0)))) ;;(defun calendar-leap-year-p (year) ;; "Returns t if YEAR is a Gregorian leap year." ;; (or ;; (and (= (% year 4) 0) ;; (/= (% year 100) 0)) --- 933,959 ---- (defmacro calendar-leap-year-p (year) "Returns t if YEAR is a Gregorian leap year." ! (` (and ! (zerop (% (, year) 4)) ! (or (not (zerop (% (, year) 100))) ! (zerop (% (, year) 400)))))) ;;(defun calendar-leap-year-p (year) ;; "Returns t if YEAR is a Gregorian leap year." + ;; (and + ;; (zerop (% year 4)) + ;; (or ((not (zerop (% year 100)))) + ;; (zerop (% year 400))))) + ;; + ;; The foregoing is a bit faster, but not as clear as the following: + ;; + ;;(defmacro calendar-leap-year-p (year) + ;; "Returns t if YEAR is a Gregorian leap year." + ;; (` (or + ;; (and (= (% (, year) 4) 0) + ;; (/= (% (, year) 100) 0)) + ;; (= (% (, year) 400) 0)))) + ;;(defun calendar-leap-year-p (year) + ;; "Returns t if YEAR is a Gregorian leap year." ;; (or ;; (and (= (% year 4) 0) ;; (/= (% year 100) 0)) *************** while (calendar-day-number '(12 31 1980) *** 1125,1133 **** (defmacro calendar-absolute-from-gregorian (date) "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. The Gregorian date Sunday, December 31, 1 BC is imaginary." ! (` (let ((month (, (macroexpand (` (extract-calendar-month (, date)))))) ! (day (, (macroexpand (` (extract-calendar-day (, date)))))) ! (year (, (macroexpand (` (extract-calendar-year (, date))))))) (+ (, (macroexpand (` (calendar-day-number (, date)))));; Days this year (* 365 (1- year));; + Days in prior years (/ (1- year) 4);; + Julian leap years --- 1008,1014 ---- (defmacro calendar-absolute-from-gregorian (date) "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. The Gregorian date Sunday, December 31, 1 BC is imaginary." ! (` (let ((year (, (macroexpand (` (extract-calendar-year (, date))))))) (+ (, (macroexpand (` (calendar-day-number (, date)))));; Days this year (* 365 (1- year));; + Days in prior years (/ (1- year) 4);; + Julian leap years *************** The Gregorian date Sunday, December 31, *** 1136,1144 **** ;;(defun calendar-absolute-from-gregorian (date) ;; "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. ;;The Gregorian date Sunday, December 31, 1 BC is imaginary." ! ;; (let ((month (extract-calendar-month date)) ! ;; (day (extract-calendar-day date)) ! ;; (year (extract-calendar-year date))) ;; (+ (calendar-day-number date);; Days this year ;; (* 365 (1- year));; + Days in prior years ;; (/ (1- year) 4);; + Julian leap years --- 1017,1023 ---- ;;(defun calendar-absolute-from-gregorian (date) ;; "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. ;;The Gregorian date Sunday, December 31, 1 BC is imaginary." ! ;; (let ((year (extract-calendar-year date))) ;; (+ (calendar-day-number date);; Days this year ;; (* 365 (1- year));; + Days in prior years ;; (/ (1- year) 4);; + Julian leap years *************** Each entry in diary-file visible in the *** 1308,1313 **** --- 1187,1193 ---- "Insert a weekly diary entry for the day of the week indicated by point." t) + (autoload 'insert-monthly-diary-entry "diary-ins" "Insert a monthly diary entry for the day of the month indicated by point." t) *************** the inserted text. Value is always t." *** 1470,1475 **** --- 1350,1358 ---- (generate-calendar-window displayed-month displayed-year) (calendar-cursor-to-visible-date cursor-date))) + (defvar calendar-debug-sexp nil + "*Turn debugging on when evaluating a sexp in the diary or holiday list.") + (defvar calendar-mode-map nil) (if calendar-mode-map nil *************** The Gregorian calendar is assumed." *** 1822,1831 **** (make-local-variable 'displayed-year));; Year in middle of window. (defun calendar-string-spread (strings char length) ! "A list of STRINGS is concatenated separated by copies of CHAR so that it ! fills LENGTH; there must be at least 2 strings. The effect is like mapconcat ! but the separating pieces are as balanced as possible. Each item of STRINGS ! is evaluated before concatenation so it can actually be an expression that evaluates to a string. If LENGTH is too short, the STRINGS are just concatenated and the result truncated." ;; The algorithm is based on equation (3.25) on page 85 of Concrete --- 1705,1714 ---- (make-local-variable 'displayed-year));; Year in middle of window. (defun calendar-string-spread (strings char length) ! "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH ! There must be at least 2 strings. The effect is like mapconcat but the ! separating pieces are as balanced as possible. Each item of STRINGS is ! evaluated before concatenation so it can actually be an expression that evaluates to a string. If LENGTH is too short, the STRINGS are just concatenated and the result truncated." ;; The algorithm is based on equation (3.25) on page 85 of Concrete *************** Moves forward if ARG is negative." *** 2153,2178 **** (calendar-other-month 12 (- year (1- arg))) (calendar-cursor-to-visible-date (list 12 31 displayed-year)))))) (defun calendar-gregorian-from-absolute (date) "Compute the list (month day year) corresponding to the absolute DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC." ! (let* ((approx (/ date 366));; Approximation from below. ! (year ;; Search forward from the approximation. ! (+ approx ! (calendar-sum y approx ! (>= date (calendar-absolute-from-gregorian (list 1 1 (1+ y)))) ! 1))) ! (month ;; Search forward from January. ! (1+ (calendar-sum m 1 ! (> date ! (calendar-absolute-from-gregorian ! (list m (calendar-last-day-of-month m year) year))) ! 1))) ! (day ;; Calculate the day by subtraction. ! (- date ! (1- (calendar-absolute-from-gregorian (list month 1 year)))))) ! (list month day year))) (defun calendar-cursor-to-visible-date (date) "Move the cursor to DATE that is on the screen." --- 2036,2092 ---- (calendar-other-month 12 (- year (1- arg))) (calendar-cursor-to-visible-date (list 12 31 displayed-year)))))) + ;; The following version of calendar-gregorian-from-absolute is preferred for + ;; reasons of clarity, BUT it's much slower than the version that follows it. + + ;;(defun calendar-gregorian-from-absolute (date) + ;; "Compute the list (month day year) corresponding to the absolute DATE. + ;;The absolute date is the number of days elapsed since the (imaginary) + ;;Gregorian date Sunday, December 31, 1 BC." + ;; (let* ((approx (/ date 366));; Approximation from below. + ;; (year ;; Search forward from the approximation. + ;; (+ approx + ;; (calendar-sum y approx + ;; (>= date (calendar-absolute-from-gregorian (list 1 1 (1+ y)))) + ;; 1))) + ;; (month ;; Search forward from January. + ;; (1+ (calendar-sum m 1 + ;; (> date + ;; (calendar-absolute-from-gregorian + ;; (list m (calendar-last-day-of-month m year) year))) + ;; 1))) + ;; (day ;; Calculate the day by subtraction. + ;; (- date + ;; (1- (calendar-absolute-from-gregorian (list month 1 year)))))) + ;; (list month day year))) + (defun calendar-gregorian-from-absolute (date) "Compute the list (month day year) corresponding to the absolute DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC." ! ;; See the footnote on page 384 of ``Calendrical Calculations, Part II: ! ;; Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. ! ;; Clamen, Software--Practice and Experience, Volume 23, Number 4 ! ;; (April, 1993), pages 383-404 for an explanation. ! (let* ((d0 (1- date)) ! (n400 (/ d0 146097)) ! (d1 (% d0 146097)) ! (n100 (/ d1 36524)) ! (d2 (% d1 36524)) ! (n4 (/ d2 1461)) ! (d3 (% d2 1461)) ! (n1 (/ d3 365)) ! (day (1+ (% d3 365))) ! (year (+ (* 400 n400) (* 100 n100) (* n4 4) n1))) ! (if (or (= n100 4) (= n1 4)) ! (list 12 31 year) ! (let ((year (1+ year)) ! (month 1)) ! (while (let ((mdays (calendar-last-day-of-month month year))) ! (and (< mdays day) ! (setq day (- day mdays)))) ! (setq month (1+ month))) ! (list month day year))))) (defun calendar-cursor-to-visible-date (date) "Move the cursor to DATE that is on the screen." *************** absolute date d, applying it to d-1 give *** 2617,2637 **** date d, and applying it to d+7 gives the DAYNAME following absolute date d." (- date (% (- date dayname) 7))) ! (defun calendar-nth-named-day (n dayname month year) ! "Returns the date of the Nth DAYNAME in MONTH, YEAR. ! A DAYNAME of 0 means Sunday, 1 means Monday, and so on. If N<0, the ! date returned is the Nth DAYNAME from the end of MONTH, YEAR (that is, -1 is ! the last DAYNAME, -2 is the penultimate DAYNAME, and so on." (calendar-gregorian-from-absolute (if (> n 0) ! (+ (calendar-dayname-on-or-before ! dayname (calendar-absolute-from-gregorian (list month 7 year))) ! (* 7 (1- n))) ! (+ (calendar-dayname-on-or-before ! dayname ! (calendar-absolute-from-gregorian ! (list month (calendar-last-day-of-month month year) year))) ! (* 7 (1+ n)))))) (defun calendar-print-day-of-year () "Show the day number in the year and the number of days remaining in the --- 2531,2557 ---- date d, and applying it to d+7 gives the DAYNAME following absolute date d." (- date (% (- date dayname) 7))) ! (defun calendar-nth-named-day (n dayname month year &optional day) ! "The date of Nth DAYNAME in MONTH, YEAR before/after optional DAY. ! A DAYNAME of 0 means Sunday, 1 means Monday, and so on. If N<0, ! return the Nth DAYNAME before MONTH DAY, YEAR (inclusive). ! If N>0, return the Nth DAYNAME after MONTH DAY, YEAR (inclusive). ! ! If DAY is omitted, it defaults to 1 if N>0, and MONTH's last day otherwise." (calendar-gregorian-from-absolute (if (> n 0) ! (+ (* 7 (1- n)) ! (calendar-dayname-on-or-before ! dayname ! (+ 6 (calendar-absolute-from-gregorian ! (list month (or day 1) year))))) ! (+ (* 7 (1+ n)) ! (calendar-dayname-on-or-before ! dayname ! (calendar-absolute-from-gregorian ! (list month ! (or day (calendar-last-day-of-month month year)) ! year))))))) (defun calendar-print-day-of-year () "Show the day number in the year and the number of days remaining in the *************** year for the date under the cursor." *** 2646,2653 **** day year days-remaining (if (= days-remaining 1) "" "s")))) (defun calendar-absolute-from-iso (date) ! "The number of days elapsed between the Gregorian date 12/31/1 BC and ! DATE. The `ISO year' corresponds approximately to the Gregorian year, but weeks start on Monday and end on Sunday. The first week of the ISO year is the first such week in which at least 4 days are in a year. The ISO commercial DATE has the form (week day year) in which week is in the range --- 2566,2573 ---- day year days-remaining (if (= days-remaining 1) "" "s")))) (defun calendar-absolute-from-iso (date) ! "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. ! The `ISO year' corresponds approximately to the Gregorian year, but weeks start on Monday and end on Sunday. The first week of the ISO year is the first such week in which at least 4 days are in a year. The ISO commercial DATE has the form (week day year) in which week is in the range *************** date Sunday, December 31, 1 BC." *** 2682,2689 **** year))) (defun calendar-print-iso-date () ! "Show the equivalent date on the `ISO commercial calendar' for the date ! under the cursor." (interactive) (let* ((greg-date (or (calendar-cursor-to-date) --- 2602,2608 ---- year))) (defun calendar-print-iso-date () ! "Show equivalent ISO date for the date under the cursor." (interactive) (let* ((greg-date (or (calendar-cursor-to-date) *************** Gregorian date Sunday, December 31, 1 BC *** 2872,2879 **** 30)) (defun hebrew-calendar-elapsed-days (year) ! "Number of days elapsed from the Sunday prior to the start of the Hebrew ! calendar to the mean conjunction of Tishri of Hebrew YEAR." (let* ((months-elapsed (+ (* 235 (/ (1- year) 19));; Months in complete cycles so far. (* 12 (% (1- year) 19)) ;; Regular months in this cycle --- 2791,2797 ---- 30)) (defun hebrew-calendar-elapsed-days (year) ! "Days from Sun. prior to start of Hebrew calendar to mean conjunction of Tishri of Hebrew YEAR." (let* ((months-elapsed (+ (* 235 (/ (1- year) 19));; Months in complete cycles so far. (* 12 (% (1- year) 19)) ;; Regular months in this cycle *************** Gregorian date Sunday, December 31, 1 BC *** 3006,3014 **** ;;;###autoload (defun list-yahrzeit-dates (death-date start-year end-year) ! "List of Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to ! END-YEAR. When called interactively from the calendar window, ! the date of death is taken from the cursor position." (interactive (let* ((death-date (if (equal (current-buffer) (get-buffer calendar-buffer)) --- 2924,2932 ---- ;;;###autoload (defun list-yahrzeit-dates (death-date start-year end-year) ! "List Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to END-YEAR. ! When called interactively from the calendar window, the date of death is taken ! from the cursor position." (interactive (let* ((death-date (if (equal (current-buffer) (get-buffer calendar-buffer)) *************** the date of death is taken from the curs *** 3079,3086 **** (message "Computing yahrzeits...done"))) (defun calendar-print-astro-day-number () ! "Show the astronomical (Julian) day number of afternoon on date ! shown by cursor." (interactive) (message "Astronomical (Julian) day number after noon UTC: %d" --- 2997,3003 ---- (message "Computing yahrzeits...done"))) (defun calendar-print-astro-day-number () ! "Show astronomical (Julian) day number of afternoon on date shown by cursor." (interactive) (message "Astronomical (Julian) day number after noon UTC: %d" diff -cprP --exclude=*.elc emacs-19.15/lisp/comint.el emacs-19.16/lisp/comint.el *** emacs-19.15/lisp/comint.el Wed Jun 9 07:21:31 1993 --- emacs-19.16/lisp/comint.el Sun Jul 4 17:00:59 1993 *************** *** 128,135 **** Good choices: Canonical Lisp: \"^[^> ]*>+:? *\" (Lucid, franz, kcl, T, cscheme, oaklisp) ! Lucid Common Lisp: \"^\\(>\\|\\(->\\)+\\) *\" ! franz: \"^\\(->\\|<[0-9]*>:\\) *\" kcl: \"^>+ *\" shell: \"^[^#$%>]*[#$%>] *\" T: \"^>+ *\" --- 128,135 ---- Good choices: Canonical Lisp: \"^[^> ]*>+:? *\" (Lucid, franz, kcl, T, cscheme, oaklisp) ! Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" ! franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" kcl: \"^>+ *\" shell: \"^[^#$%>]*[#$%>] *\" T: \"^>+ *\" diff -cprP --exclude=*.elc emacs-19.15/lisp/compile.el emacs-19.16/lisp/compile.el *** emacs-19.15/lisp/compile.el Fri Jun 18 17:39:33 1993 --- emacs-19.16/lisp/compile.el Wed Jun 30 18:02:59 1993 *************** *** 507,514 **** (setq data (cdr data)) (if (markerp data) (buffer-file-name (marker-buffer data)) ! (setq data (car data)) ! (expand-file-name (cdr data) (car data)))) (defun compilation-next-file (n) "Move point to the next error for a different file than the current one." --- 507,513 ---- (setq data (cdr data)) (if (markerp data) (buffer-file-name (marker-buffer data)) ! (car data))) (defun compilation-next-file (n) "Move point to the next error for a different file than the current one." *************** See variables `compilation-parse-errors- *** 903,909 **** See variable `compilation-parse-errors-function' for the interface it uses." (setq compilation-error-list nil) (message "Parsing error messages...") ! (let (text-buffer regexp enter-group leave-group error-group alist subexpr error-regexp-groups (found-desired nil) --- 902,908 ---- See variable `compilation-parse-errors-function' for the interface it uses." (setq compilation-error-list nil) (message "Parsing error messages...") ! (let (text-buffer orig orig-expanded parent-expanded regexp enter-group leave-group error-group alist subexpr error-regexp-groups (found-desired nil) *************** See variable `compilation-parse-errors-f *** 953,958 **** --- 952,961 ---- (setq subexpr (+ subexpr 1 (count-regexp-groupings (car (car alist))))) (setq alist (cdr alist))) + (setq orig default-directory) + (setq orig-expanded (file-truename orig)) + (setq parent-expanded (expand-file-name "../" orig-expanded)) + (while (and (not found-desired) ;; We don't just pass LIMIT-SEARCH to re-search-forward ;; because we want to find matches containing LIMIT-SEARCH *************** See variable `compilation-parse-errors-f *** 967,972 **** --- 970,981 ---- (expand-file-name (buffer-substring (match-beginning (+ enter-group 1)) (match-end (+ enter-group 1))))))) + ;; The directory name in the "entering" message + ;; is a truename. Try to convert it to a form + ;; like what the user typed in. + (setq dir + (compile-abbreviate-directory dir orig orig-expanded + parent-expanded)) (setq compilation-directory-stack (cons dir compilation-directory-stack)) (and (file-directory-p dir) *************** See variable `compilation-parse-errors-f *** 983,988 **** --- 992,1003 ---- (buffer-substring beg (match-end (+ leave-group 1))))))) + ;; The directory name in the "entering" message + ;; is a truename. Try to convert it to a form + ;; like what the user typed in. + (setq dir + (compile-abbreviate-directory dir orig orig-expanded + parent-expanded)) (while (and stack (not (string-equal (car stack) dir))) (setq stack (cdr stack))))) *************** See variable `compilation-parse-errors-f *** 1069,1074 **** --- 1084,1111 ---- (point-max)))) (setq compilation-error-list (nreverse compilation-error-list)) (message "Parsing error messages...done")) + + ;; If directory DIR is a subdir of ORIG or of ORIG's parent, + ;; return a relative name for it starting from ORIG or its parent. + ;; ORIG-EXPANDED is an expanded version of ORIG. + ;; PARENT-EXPANDED is an expanded version of ORIG's parent. + ;; Those two args could be computed here, but we run faster by + ;; having the caller compute them just once. + (defun compile-abbreviate-directory (dir orig orig-expanded parent-expanded) + (if (and (> (length dir) (length orig-expanded)) + (string= orig-expanded + (substring dir 0 (length orig-expanded)))) + (setq dir + (concat orig + (substring dir (length orig-expanded))))) + (if (and (> (length dir) (length parent-expanded)) + (string= parent-expanded + (substring dir 0 (length parent-expanded)))) + (setq dir + (concat (file-name-directory + (directory-file-name orig)) + (substring dir (length parent-expanded))))) + dir) (provide 'compile) diff -cprP --exclude=*.elc emacs-19.15/lisp/cplus-md1.el emacs-19.16/lisp/cplus-md1.el *** emacs-19.15/lisp/cplus-md1.el Thu Jun 17 03:04:23 1993 --- emacs-19.16/lisp/cplus-md1.el Sat Jun 26 07:11:24 1993 *************** *** 5,12 **** ;; 1985 Richard M. Stallman ;; Maintainer: c++-mode-help@anthem.nlm.nih.gov ;; Created: a long, long, time ago. adapted from the original c-mode.el ! ;; Version: 2.334 ! ;; Last Modified: 1993/06/01 14:58:00 ;; Keywords: C++ C editing major-mode ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc. --- 5,12 ---- ;; 1985 Richard M. Stallman ;; Maintainer: c++-mode-help@anthem.nlm.nih.gov ;; Created: a long, long, time ago. adapted from the original c-mode.el ! ;; Version: 2.353 ! ;; Last Modified: 1993/06/23 13:58:52 ;; Keywords: C++ C editing major-mode ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc. *************** *** 30,40 **** ;; Introduction ;; ============ ;; Do a "C-h m" in a c++-mode buffer for more information on ! ;; customizing c++-mode. To submit bug reports hit "C-c C-b" in a ! ;; c++-mode buffer. This runs the command c++-submit-bug-report and ;; automatically sets up the mail buffer with all the necessary ;; information. If you have other questions contact me at the ! ;; following address: c++-mode-help@anthem.nlm.nih.gov. Please don't ;; send bug reports to my personal account, I may not get it for a ;; long time. --- 30,40 ---- ;; Introduction ;; ============ ;; Do a "C-h m" in a c++-mode buffer for more information on ! ;; customizing c++-mode. To submit bug reports hit "C-c C-b" in a ! ;; c++-mode buffer. This runs the command c++-submit-bug-report and ;; automatically sets up the mail buffer with all the necessary ;; information. If you have other questions contact me at the ! ;; following address: c++-mode-help@anthem.nlm.nih.gov. Please don't ;; send bug reports to my personal account, I may not get it for a ;; long time. *************** *** 42,53 **** ;; ====================== ;; c++-mode facilitates editing of C++ code by automatically handling ;; the indentation of lines of code in a manner very similar to c-mode ! ;; as distributed with GNU emacs. Refer to the GNU Emacs manual, ;; chapter 21 for more information on "Editing Programs". In fact, ;; c++-mode (through its companion mode entry point c++-c-mode) can ;; also be used to edit both K&R and ANSI C code! ;; ! ;; To use c++-mode, add the following to your .emacs file. This ;; assumes you will use .cc or .C extensions for your C++ source: ;; ;; (autoload 'c++-mode "c++-mode" "C++ Editing Mode" t) --- 42,53 ---- ;; ====================== ;; c++-mode facilitates editing of C++ code by automatically handling ;; the indentation of lines of code in a manner very similar to c-mode ! ;; as distributed with GNU Emacs. Refer to the GNU Emacs manual, ;; chapter 21 for more information on "Editing Programs". In fact, ;; c++-mode (through its companion mode entry point c++-c-mode) can ;; also be used to edit both K&R and ANSI C code! ;; ! ;; To use c++-mode, add the following to your .emacs file. This ;; assumes you will use .cc or .C extensions for your C++ source: ;; ;; (autoload 'c++-mode "c++-mode" "C++ Editing Mode" t) *************** *** 71,98 **** ;; ========================================================= ;; You may notice that certain characters, when typed in comment ;; regions, get escaped with a backslash. This is a workaround for ! ;; bugs in emacs' syntax parsing algorithms. In brief, syntax parsing ! ;; in emacs 18 and derivatives is broken because syntax tables are not ;; rich enough to support more than 1 comment style per mode (as C++ ! ;; requires). The result is that emacs will sometimes choke on ;; unbalanced parentheses and single quotes in comments. Please do a ;; "C-h v c++-untame-characters" for more information. ;; ;; This problem affect both the accuracy and performance of c++-mode ! ;; because some parsing must be performed in elisp instead of relying ! ;; on the C primitives. In general, I've chosen accuracy over ;; performance, but have worked hard to give moderately acceptable ! ;; speed in all but the most uncommon situations. You will most likely ;; notice c++-mode slowing when you're editing a file of preprocessor ;; commands, or inside long functions or class definitions. ;; Optimization is an ongoing concern, but the real solution is to fix ! ;; emacs. ;; ;; As of release 19.4, Lucid Emacs is distributed with the fixes in ;; place, and c++-mode will automatically take advantage of them so ;; none of the above applies to you. Similar patches will be part of ! ;; GNU Emacs 19. Some patches for GNU emacs 18 have been released on ! ;; the beta site, but they are unsupported. Email for more ;; information. ;; Beta Testers Mailing List --- 71,98 ---- ;; ========================================================= ;; You may notice that certain characters, when typed in comment ;; regions, get escaped with a backslash. This is a workaround for ! ;; bugs in Emacs' syntax parsing algorithms. In brief, syntax parsing ! ;; in Emacs 18 and derivatives is broken because syntax tables are not ;; rich enough to support more than 1 comment style per mode (as C++ ! ;; requires). The result is that Emacs will sometimes choke on ;; unbalanced parentheses and single quotes in comments. Please do a ;; "C-h v c++-untame-characters" for more information. ;; ;; This problem affect both the accuracy and performance of c++-mode ! ;; because some parsing must be performed in Emacs lisp instead of ! ;; relying on the C primitives. In general, I've chosen accuracy over ;; performance, but have worked hard to give moderately acceptable ! ;; speed in all but the most uncommon situations. You will most likely ;; notice c++-mode slowing when you're editing a file of preprocessor ;; commands, or inside long functions or class definitions. ;; Optimization is an ongoing concern, but the real solution is to fix ! ;; Emacs. ;; ;; As of release 19.4, Lucid Emacs is distributed with the fixes in ;; place, and c++-mode will automatically take advantage of them so ;; none of the above applies to you. Similar patches will be part of ! ;; FSF GNU Emacs 19. Some patches for GNU Emacs 18 have been released ! ;; on the beta site, but they are unsupported. Email for more ;; information. ;; Beta Testers Mailing List *************** *** 109,121 **** ;; Getting c++-mode.el ;; =================== ;; The latest public release version of this file should always be ! ;; available for anonymous ftp on the elisp archive machine. The path ! ;; to the file is: ;; ;; archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/modes/c++-mode.el.Z ;; ;; For those of you without anon-ftp access, you can use the DEC's ! ;; ftpmail'er at the address ftpmail@decwrl.dec.com. Send the ;; following message in the body of your mail to that address to get ;; c++-mode: ;; --- 109,121 ---- ;; Getting c++-mode.el ;; =================== ;; The latest public release version of this file should always be ! ;; available for anonymous ftp on the Emacs lisp archive machine. The ! ;; path to the file is: ;; ;; archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/modes/c++-mode.el.Z ;; ;; For those of you without anon-ftp access, you can use the DEC's ! ;; ftpmail'er at the address ftpmail@decwrl.dec.com. Send the ;; following message in the body of your mail to that address to get ;; c++-mode: ;; *************** *** 132,143 **** ;; LCD Archive Entry: ;; c++-mode|Barry A. Warsaw|c++-mode-help@anthem.nlm.nih.gov ;; |Mode for editing C++, and ANSI/K&R C code (was Detlefs' c++-mode.el) ! ;; |1993/06/01 14:58:00|2.334| ;;; Code: ! ;; some people may not have c-mode loaded in by default. c++-mode.el ! ;; unfortunately still depends on distrib c-mode. c-mode doesn't ;; provide itself so this hack is best known way to ensure its loaded (or (fboundp 'c-mode) (load "c-mode" nil t)) --- 132,143 ---- ;; LCD Archive Entry: ;; c++-mode|Barry A. Warsaw|c++-mode-help@anthem.nlm.nih.gov ;; |Mode for editing C++, and ANSI/K&R C code (was Detlefs' c++-mode.el) ! ;; |1993/06/23 13:58:52|2.353| ;;; Code: ! ;; some people may not have c-mode loaded in by default. c++-mode.el ! ;; unfortunately still depends on distrib c-mode. c-mode doesn't ;; provide itself so this hack is best known way to ensure its loaded (or (fboundp 'c-mode) (load "c-mode" nil t)) *************** *** 154,162 **** (if (= 8 (length (parse-partial-sexp (point) (point)))) ;; we know we're using v19 style dual-comment specifications. ;; All Lemacsen use 8-bit modify-syntax-entry flags, as do all ! ;; patched GNU19, GNU18, Epoch4's. Only vanilla GNU19.7-8 ! ;; uses 1-bit flag. Lets be as smart as we can about figuring ! ;; this out. (let ((table (copy-syntax-table))) (modify-syntax-entry ?a ". 12345678" table) (if (= (logand (lsh (aref table ?a) -16) 255) 255) --- 154,162 ---- (if (= 8 (length (parse-partial-sexp (point) (point)))) ;; we know we're using v19 style dual-comment specifications. ;; All Lemacsen use 8-bit modify-syntax-entry flags, as do all ! ;; patched FSF19, GNU18, Epoch4's. Only vanilla FSF19 uses ! ;; 1-bit flag. Lets be as smart as we can about figuring this ! ;; out. (let ((table (copy-syntax-table))) (modify-syntax-entry ?a ". 12345678" table) (if (= (logand (lsh (aref table ?a) -16) 255) 255) *************** *** 170,177 **** (setq scanner 'old-v19)))) ;; now cobble up the necessary list (list mse-spec scanner)) ! "A list of needed features extant in the emacs you are using. ! There are many flavors of emacs out on the net, each with different features supporting those needed by c++-mode. Here's the current known list, along with the values for this variable: --- 170,177 ---- (setq scanner 'old-v19)))) ;; now cobble up the necessary list (list mse-spec scanner)) ! "A list of needed features extant in the Emacs you are using. ! There are many flavors of Emacs out on the net, each with different features supporting those needed by c++-mode. Here's the current known list, along with the values for this variable: *************** known list, along with the values for th *** 178,194 **** Vanilla GNU 18/Epoch 4: (no-dual-comments v18) GNU 18/Epoch 4 (patch1): (8-bit old-v19) GNU 18/Epoch 4 (patch2): (8-bit v19) ! Lemacs 19.4 - 19.6: (8-bit old-v19) ! Lemacs 19.7 and over: (8-bit v19) ! GNU 19: (1-bit v19) ! GNU 19 (patched): (8-bit v19)") (defvar c++-mode-abbrev-table nil ! "Abbrev table in use in C++-mode buffers.") (define-abbrev-table 'c++-mode-abbrev-table ()) (defvar c++-mode-map () ! "Keymap used in C++ mode.") (if c++-mode-map () (setq c++-mode-map (make-sparse-keymap)) --- 178,194 ---- Vanilla GNU 18/Epoch 4: (no-dual-comments v18) GNU 18/Epoch 4 (patch1): (8-bit old-v19) GNU 18/Epoch 4 (patch2): (8-bit v19) ! Lemacs 19.4 - 19.7: (8-bit old-v19) ! Lemacs 19.8 and over: (8-bit v19) ! FSF 19: (1-bit v19) ! FSF 19 (patched): (8-bit v19)") (defvar c++-mode-abbrev-table nil ! "Abbrev table in use in c++-mode buffers.") (define-abbrev-table 'c++-mode-abbrev-table ()) (defvar c++-mode-map () ! "Keymap used in c++-mode.") (if c++-mode-map () (setq c++-mode-map (make-sparse-keymap)) *************** GNU 19 (patched): (8-bit v19)") *** 259,272 **** (modify-syntax-entry ?* ". 23" c++-mode-syntax-table) (modify-syntax-entry ?\n "> b" c++-mode-syntax-table)) ((memq '1-bit c++-emacs-features) ! ;; GNU19 has sub-optimal, but workable implementation ! ;; Some strange behavior may be encountered. LOBBY FSF! (modify-syntax-entry ?/ ". 124" c++-mode-syntax-table) (modify-syntax-entry ?* ". 23b" c++-mode-syntax-table) (modify-syntax-entry ?\n ">" c++-mode-syntax-table)) (t ! ;; Vanilla GNU18 is just plain busted. We'll do the best we can, ! ;; but some strange behavior may be encountered. PATCH or UPGRADE! (modify-syntax-entry ?/ ". 124" c++-mode-syntax-table) (modify-syntax-entry ?* ". 23" c++-mode-syntax-table) (modify-syntax-entry ?\n ">" c++-mode-syntax-table)) --- 259,272 ---- (modify-syntax-entry ?* ". 23" c++-mode-syntax-table) (modify-syntax-entry ?\n "> b" c++-mode-syntax-table)) ((memq '1-bit c++-emacs-features) ! ;; FSF19 has sub-optimal, but workable implementation ! ;; Some strange behavior may be encountered. LOBBY FSF! (modify-syntax-entry ?/ ". 124" c++-mode-syntax-table) (modify-syntax-entry ?* ". 23b" c++-mode-syntax-table) (modify-syntax-entry ?\n ">" c++-mode-syntax-table)) (t ! ;; Vanilla GNU18 is just plain busted. We'll do the best we can, ! ;; but some strange behavior may be encountered. PATCH or UPGRADE! (modify-syntax-entry ?/ ". 124" c++-mode-syntax-table) (modify-syntax-entry ?* ". 23" c++-mode-syntax-table) (modify-syntax-entry ?\n ">" c++-mode-syntax-table)) *************** preprocessor directives, but line is alw *** 300,314 **** (defvar c++-always-arglist-indent-p nil "*Control indentation of continued arglists. When non-nil, arglists continued on subsequent lines will always ! indent c++-empty-arglist-indent spaces, otherwise, they will indent to just under previous line's argument indentation.") (defvar c++-block-close-brace-offset 0 ! "*Extra indentation given to close braces which close a block. This ! does not affect braces which close a top-level construct (e.g. function).") (defvar c++-paren-as-block-close-p nil "*Treat a parenthesis which is the first non-whitespace on a line as ! a paren which closes a block. When non-nil, c-indent-level is ! subtracted, and c++-block-close-brace-offset is added to the line's offset.") (defvar c++-continued-member-init-offset nil "*Extra indent for continuation lines of member inits; nil means to align --- 300,321 ---- (defvar c++-always-arglist-indent-p nil "*Control indentation of continued arglists. When non-nil, arglists continued on subsequent lines will always ! indent `c++-empty-arglist-indent' spaces, otherwise, they will indent to just under previous line's argument indentation.") (defvar c++-block-close-brace-offset 0 ! "*Extra indentation given to close braces which close a block. ! This variable can be either an integer or a list. If an integer, it ! describes the extra offset given a block closing brace (and a closing ! paren if `c++-paren-as-block-close-p' is non-nil), treating all ! closing parens the same. If a list of the form (OTHERS . TOPLEVEL), ! OTHERS is an integer describing the offset given to all but top-level ! (e.g. function) closing braces, while TOPLEVEL is an integer ! describing offset given only to braces which close top-level ! constructs.") (defvar c++-paren-as-block-close-p nil "*Treat a parenthesis which is the first non-whitespace on a line as ! a paren which closes a block. When non-nil, `c-indent-level' is ! subtracted, and `c++-block-close-brace-offset' is added to the line's offset.") (defvar c++-continued-member-init-offset nil "*Extra indent for continuation lines of member inits; nil means to align *************** Nil means indent to just after the paren *** 326,335 **** "*Indentation offset for line which contains only C or C++ style comments. This variable can take either a single integer or a list of integers. If a single integer this is the extra indentation offset to apply to ! all comment-only lines, except those which start in column zero. If a list is used, the first integer is for all non-column-zero comment-only lines and the second integer is for all column-zero ! lines. You can also use a list containing only 1 integer, in which case, this value is used for all comment-only lines. For example: value meaning --- 333,342 ---- "*Indentation offset for line which contains only C or C++ style comments. This variable can take either a single integer or a list of integers. If a single integer this is the extra indentation offset to apply to ! all comment-only lines, except those which start in column zero. If a list is used, the first integer is for all non-column-zero comment-only lines and the second integer is for all column-zero ! lines. You can also use a list containing only 1 integer, in which case, this value is used for all comment-only lines. For example: value meaning *************** value meaning *** 340,347 **** '(4 1) non-col0 lines indent 4 spaces, col0 lines indent 1 space") (defvar c++-C-block-comments-indent-p nil ! "*4 styles of C block comments are supported. If this variable is nil, ! then styles 1-3 are supported. If this variable is non-nil, style 4 is supported. style 1: style 2: style 3: style 4: /* /* /* /* --- 347,354 ---- '(4 1) non-col0 lines indent 4 spaces, col0 lines indent 1 space") (defvar c++-C-block-comments-indent-p nil ! "*4 styles of C block comments are supported. If this variable is nil, ! then styles 1-3 are supported. If this variable is non-nil, style 4 is supported. style 1: style 2: style 3: style 4: /* /* /* /* *************** These cleanups only take place when the *** 355,367 **** on, as evidenced by the `/a' or `/ah' appearing next to the mode name. Current legal values are: ! brace-else-brace -- clean up \"} else {\" constructs by placing entire construct on a single line. This cleanup only takes place when there is nothing but white space between the braces and the else. ! empty-defun-braces -- cleans up empty C++ function braces by placing them on the same line. ! defun-close-semi -- cleans up the terminating semi-colon on class definitions and functions by placing the semi on the same line as the closing brace.") (defvar c++-hanging-braces t --- 362,374 ---- on, as evidenced by the `/a' or `/ah' appearing next to the mode name. Current legal values are: ! `brace-else-brace' -- clean up `} else {' constructs by placing entire construct on a single line. This cleanup only takes place when there is nothing but white space between the braces and the else. ! `empty-defun-braces' -- cleans up empty C++ function braces by placing them on the same line. ! `defun-close-semi' -- cleans up the terminating semi-colon on class definitions and functions by placing the semi on the same line as the closing brace.") (defvar c++-hanging-braces t *************** top-level open braces; all other braces *** 375,401 **** (defvar c++-hanging-member-init-colon 'before "*Defines how colons which introduce member initializations are formatted. Legal values are: ! t -- no newlines inserted before or after colon ! nil -- newlines inserted before and after colon ! 'after -- newlines inserted only after colon ! 'before -- newlines inserted only before colon") (defvar c++-auto-hungry-initial-state 'none "*Initial state of auto/hungry features when buffer is first visited. Legal values are: ! 'none -- no auto-newline and no hungry-delete-key. ! 'auto-only -- auto-newline, but no hungry-delete-key. ! 'hungry-only -- no auto-newline, but hungry-delete-key. ! 'auto-hungry -- both auto-newline and hungry-delete-key enabled. ! Nil is synonymous for 'none and t is synonymous for 'auto-hungry.") (defvar c++-auto-hungry-toggle t "*Enable/disable toggling of auto/hungry features. Legal values are: ! 'none -- auto-newline and hungry-delete-key cannot be enabled. ! 'auto-only -- only auto-newline feature can be toggled. ! 'hungry-only -- only hungry-delete-key feature can be toggled. ! 'auto-hungry -- both auto-newline and hungry-delete-key can be toggled. ! Nil is synonymous for 'none and t is synonymous for 'auto-hungry.") (defvar c++-relative-offset-p t "*Control the calculation for indentation. --- 382,408 ---- (defvar c++-hanging-member-init-colon 'before "*Defines how colons which introduce member initializations are formatted. Legal values are: ! t -- no newlines inserted before or after colon ! nil -- newlines inserted before and after colon ! `after' -- newlines inserted only after colon ! `before` -- newlines inserted only before colon") (defvar c++-auto-hungry-initial-state 'none "*Initial state of auto/hungry features when buffer is first visited. Legal values are: ! `none' -- no auto-newline and no hungry-delete-key. ! `auto-only' -- auto-newline, but no hungry-delete-key. ! `hungry-only' -- no auto-newline, but hungry-delete-key. ! `auto-hungry' -- both auto-newline and hungry-delete-key enabled. ! Nil is synonymous for `none' and t is synonymous for `auto-hungry'.") (defvar c++-auto-hungry-toggle t "*Enable/disable toggling of auto/hungry features. Legal values are: ! `none' -- auto-newline and hungry-delete-key cannot be enabled. ! `auto-only' -- only auto-newline feature can be toggled. ! `hungry-only' -- only hungry-delete-key feature can be toggled. ! `auto-hungry' -- both auto-newline and hungry-delete-key can be toggled. ! Nil is synonymous for `none' and t is synonymous for `auto-hungry'.") (defvar c++-relative-offset-p t "*Control the calculation for indentation. *************** first statement in the block. When nil, *** 404,410 **** without regard to how the first statement is indented.") (defvar c++-untame-characters (and (memq 'v18 c++-emacs-features) '(?\')) ! "*Utilize a backslashing workaround of an emacs syntax parsing bug. If non-nil, this variable should contain a list of characters which will be prepended by a backslash in comment regions. By default, the list contains only the most troublesome character, the single quote. --- 411,417 ---- without regard to how the first statement is indented.") (defvar c++-untame-characters (and (memq 'v18 c++-emacs-features) '(?\')) ! "*Utilize a backslashing workaround of an Emacs syntax parsing bug. If non-nil, this variable should contain a list of characters which will be prepended by a backslash in comment regions. By default, the list contains only the most troublesome character, the single quote. *************** To be completely safe, set this variable *** 413,429 **** '(?\( ?\) ?\' ?\{ ?\} ?\[ ?\]) This is the full list of characters which can potentially cause ! problems if they exist unbalanced within comments. Setting this variable to nil will defeat this feature, but be forewarned! Such un-escaped characters in comment regions can potentially break many things such as some indenting and blinking of parenthesis. Note further that only the default set of characters will be escaped ! automatically as they are typed. But, executing c++-tame-comments (\\[c++-tame-comments]) will escape all characters which are members of this set, and which are found in comments throughout the file. ! Finally, c++-mode can tell if you're running a patched emacs. If so, taming characters isn't necessary and this variable is automatically set to nil.") --- 420,436 ---- '(?\( ?\) ?\' ?\{ ?\} ?\[ ?\]) This is the full list of characters which can potentially cause ! problems if they exist unbalanced within comments. Setting this variable to nil will defeat this feature, but be forewarned! Such un-escaped characters in comment regions can potentially break many things such as some indenting and blinking of parenthesis. Note further that only the default set of characters will be escaped ! automatically as they are typed. But, executing `c++-tame-comments' (\\[c++-tame-comments]) will escape all characters which are members of this set, and which are found in comments throughout the file. ! Finally, c++-mode can tell if you're running a patched Emacs. If so, taming characters isn't necessary and this variable is automatically set to nil.") *************** set to nil.") *** 431,452 **** "*Column to insert backslashes.") (defvar c++-special-indent-hook nil "*Hook for user defined special indentation adjustments. ! This hook gets called after a line is indented by the mode. By supplying a hook, you can make adjustments to the line's standard indentation. If you do use this hook, you will likely need to also ! set c++-relative-offset-p to nil. The call to this hook is wrapped in ! a save-excursion so you don't need to worry about restoring point and mark inside the hook function.") (defvar c++-delete-function 'backward-delete-char-untabify ! "*Function called by c++-electric-delete when deleting a single char.") (defvar c++-electric-pound-behavior nil "*List of behaviors for electric pound insertion. ! Only currently supported behavior is '(alignleft).") (defvar c++-backscan-limit 2000 "*Limit in characters for looking back while skipping syntactic ws. If you typically write really big methods, and start noticing incorrect indentations, try cranking this value up. The larger this ! value is, though, the slower parts of c++-mode can become. Setting this variable to nil defeats backscan limits.") ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- 438,459 ---- "*Column to insert backslashes.") (defvar c++-special-indent-hook nil "*Hook for user defined special indentation adjustments. ! This hook gets called after a line is indented by the mode. By supplying a hook, you can make adjustments to the line's standard indentation. If you do use this hook, you will likely need to also ! set `c++-relative-offset-p' to nil. The call to this hook is wrapped in ! a `save-excursion' so you don't need to worry about restoring point and mark inside the hook function.") (defvar c++-delete-function 'backward-delete-char-untabify ! "*Function called by `c++-electric-delete' when deleting a single char.") (defvar c++-electric-pound-behavior nil "*List of behaviors for electric pound insertion. ! Only currently supported behavior is `alignleft'.") (defvar c++-backscan-limit 2000 "*Limit in characters for looking back while skipping syntactic ws. If you typically write really big methods, and start noticing incorrect indentations, try cranking this value up. The larger this ! value is, though, the slower parts of c++-mode can become. Setting this variable to nil defeats backscan limits.") ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *************** this variable to nil defeats backscan li *** 479,487 **** ;; c++-mode main entry point ;; ====================================================================== (defun c++-mode () ! "Major mode for editing C++ code. 2.334 ! To submit a bug report, enter \"\\[c++-submit-bug-report]\" ! from a c++-mode buffer. 1. Very much like editing C code, 2. Expression and list commands understand all C++ brackets, --- 486,496 ---- ;; c++-mode main entry point ;; ====================================================================== (defun c++-mode () ! "Major mode for editing C++ code. 2.353 ! To submit a problem report, enter `\\[c++-submit-bug-report]' from a ! c++-mode buffer. This automatically sets up a mail buffer with ! version information already added. You just need to add a description ! of the problem and send the message. 1. Very much like editing C code, 2. Expression and list commands understand all C++ brackets, *************** from a c++-mode buffer. *** 493,500 **** IMPORTANT NOTE: You may notice that some characters (by default, only single quote) will get escaped with a backslash when typed in a comment region. This is a necessary workaround of a bug present in ! GNU emacs 18 and derivatives. Enter \"\\[describe-variable] c++-untame-characters RET\" ! for more information. If you are running a patched emacs, no characters will be escaped in comment regions, and many functions will run much faster. --- 502,509 ---- IMPORTANT NOTE: You may notice that some characters (by default, only single quote) will get escaped with a backslash when typed in a comment region. This is a necessary workaround of a bug present in ! GNU Emacs 18 and derivatives. Enter `\\[describe-variable] c++-untame-characters RET' ! for more information. If you are running a patched Emacs, no characters will be escaped in comment regions, and many functions will run much faster. *************** run much faster. *** 501,507 **** Key bindings: \\{c++-mode-map} ! These variables control indentation style. Those with names like c- are inherited from c-mode. Those with names like c++- are unique for this mode, or have extended functionality from their c-mode cousins. --- 510,516 ---- Key bindings: \\{c++-mode-map} ! These variables control indentation style. Those with names like c- are inherited from c-mode. Those with names like c++- are unique for this mode, or have extended functionality from their c-mode cousins. *************** from their c-mode cousins. *** 515,521 **** Extra indentation for line if it starts with an open brace. c-continued-brace-offset Extra indentation given to a brace that starts a substatement. ! This is in addition to c-continued-statement-offset. c-continued-statement-offset Extra indentation given to a substatement, such as the then-clause of an if or body of a while. --- 524,530 ---- Extra indentation for line if it starts with an open brace. c-continued-brace-offset Extra indentation given to a brace that starts a substatement. ! This is in addition to `c-continued-statement-offset'. c-continued-statement-offset Extra indentation given to a substatement, such as the then-clause of an if or body of a while. *************** from their c-mode cousins. *** 524,530 **** The surrounding block's indentation is the indentation of the line on which the open-brace appears. c-label-offset ! Extra indentation for line that is a label, or case or ``default:'' c++-C-block-comments-indent-p Style of C block comments to support. --- 533,539 ---- The surrounding block's indentation is the indentation of the line on which the open-brace appears. c-label-offset ! Extra indentation for line that is a label, or case or `default:'. c++-C-block-comments-indent-p Style of C block comments to support. *************** from their c-mode cousins. *** 531,539 **** c++-access-specifier-offset Extra indentation given to public, protected, and private keyword lines. c++-always-arglist-indent-p ! Control indentation of continued arglists. When non-nil, arglists continued on subsequent lines will always indent ! c++-empty-arglist-indent spaces, otherwise, they will indent to just under previous line's argument indentation. c++-auto-hungry-initial-state Initial state of auto/hungry feature when a C++ buffer is first visited. --- 540,548 ---- c++-access-specifier-offset Extra indentation given to public, protected, and private keyword lines. c++-always-arglist-indent-p ! Control indentation of continued arglists. When non-nil, arglists continued on subsequent lines will always indent ! `c++-empty-arglist-indent' spaces, otherwise, they will indent to just under previous line's argument indentation. c++-auto-hungry-initial-state Initial state of auto/hungry feature when a C++ buffer is first visited. *************** from their c-mode cousins. *** 541,559 **** Enable/disable toggling of auto/hungry features. c++-backscan-limit Limit in characters for looking back while skipping syntactic ! whitespace. This variable is only used in an un-patched emacs to ! help improve performance at the expense of some accuracy. Patched ! emacses are both fast and accurate. c++-block-close-brace-offset ! Extra indentation give to braces which close a block. This does ! not affect braces which close top-level constructs (e.g. functions). c++-cleanup-list A list of construct \"clean ups\" which c++-mode will perform when auto-newline feature is on. Current legal values are: ! brace-else-brace, empty-defun-braces, defun-close-semi. c++-comment-only-line-offset Extra indentation for a line containing only a C or C++ style ! comment. Can be an integer or list, specifying the various styles of comment-only line special indentations. c++-continued-member-init-offset Extra indentation for continuation lines of member initializations; nil --- 550,567 ---- Enable/disable toggling of auto/hungry features. c++-backscan-limit Limit in characters for looking back while skipping syntactic ! whitespace. This variable is only used in an un-patched Emacs to ! help improve performance at the expense of some accuracy. Patched ! Emacses are both fast and accurate. c++-block-close-brace-offset ! Extra indentation give to braces which close a block. c++-cleanup-list A list of construct \"clean ups\" which c++-mode will perform when auto-newline feature is on. Current legal values are: ! `brace-else-brace', `empty-defun-braces', `defun-close-semi'. c++-comment-only-line-offset Extra indentation for a line containing only a C or C++ style ! comment. Can be an integer or list, specifying the various styles of comment-only line special indentations. c++-continued-member-init-offset Extra indentation for continuation lines of member initializations; nil *************** from their c-mode cousins. *** 561,599 **** c++-default-macroize-column Column to insert backslashes when macroizing a region. c++-delete-function ! Function called by c++-electric-delete when deleting a single char. c++-electric-pound-behavior List of behaviors for electric pound insertion. c++-empty-arglist-indent Extra indentation to apply to a line following an empty argument ! list. nil means to line it up with the left paren. c++-friend-offset Offset of C++ friend class declarations relative to member declarations. c++-hanging-braces Controls open brace hanging behavior when using auto-newline feature. ! nil says no braces hang, t says all open braces hang. non-nil-or-t means top-level open braces don't hang, all others do. c++-hanging-member-init-colon Defines how colons which introduce member initialization lists are ! formatted. t means no newlines are inserted either before or after ! the colon. nil means newlines are inserted both before and after ! the colon. 'before inserts newlines only before the colon, and ! 'after inserts newlines only after colon. c++-member-init-indent Indentation level of member initializations in function declarations, if they are on a separate line beginning with a colon. c++-paren-as-block-close-p If non-nil, treat a parenthesis which is the first non-whitespace ! on a line as a paren whcih closes a block (i.e. treat it similar ! to right curly brace) c++-relative-offset-p ! Control the calculation for indentation. When non-nil (the default), indentation is calculated relative to the first statement in the block. When nil, the indentation is calculated ! without regard to how the first statement is indented. Useful when ! using a c++-special-indent-hook. c++-special-indent-hook ! Hook for user defined special indentation adjustments. You can use this hook, which gets called after a line is indented by the mode, to customize indentations of the line. c++-tab-always-indent --- 569,607 ---- c++-default-macroize-column Column to insert backslashes when macroizing a region. c++-delete-function ! Function called by `c++-electric-delete' when deleting a single char. c++-electric-pound-behavior List of behaviors for electric pound insertion. c++-empty-arglist-indent Extra indentation to apply to a line following an empty argument ! list. nil means to line it up with the left paren. c++-friend-offset Offset of C++ friend class declarations relative to member declarations. c++-hanging-braces Controls open brace hanging behavior when using auto-newline feature. ! nil says no braces hang, t says all open braces hang. non-nil-or-t means top-level open braces don't hang, all others do. c++-hanging-member-init-colon Defines how colons which introduce member initialization lists are ! formatted. t means no newlines are inserted either before or after ! the colon. nil means newlines are inserted both before and after ! the colon. `before' inserts newlines only before the colon, and ! `after' inserts newlines only after colon. c++-member-init-indent Indentation level of member initializations in function declarations, if they are on a separate line beginning with a colon. c++-paren-as-block-close-p If non-nil, treat a parenthesis which is the first non-whitespace ! on a line as a paren which closes a block (i.e. treat it similar ! to right curly brace). c++-relative-offset-p ! Control the calculation for indentation. When non-nil (the default), indentation is calculated relative to the first statement in the block. When nil, the indentation is calculated ! without regard to how the first statement is indented. Useful when ! using a `c++-special-indent-hook'. c++-special-indent-hook ! Hook for user defined special indentation adjustments. You can use this hook, which gets called after a line is indented by the mode, to customize indentations of the line. c++-tab-always-indent *************** from their c-mode cousins. *** 600,618 **** Controls the operation of the TAB key. t means always just indent the current line. nil means indent the current line only if point is at the left margin or in the line's indentation; otherwise ! insert a tab. If not-nil-or-t, then tab is inserted only within literals (comments and strings) and inside preprocessor ! directives, but the line is always reindented. Default is value ! for c-tab-always-indent. c++-untame-characters When non-nil, inserts backslash escapes before certain untamed ! characters in comment regions. It is recommended that you keep the ! default setting to workaround a nasty emacs bug, unless you are ! running a patched emacs. ! Auto-newlining is no longer an all or nothing proposition. In my opinion, I don't believe it is possible to implement a perfect ! auto-newline algorithm. Sometimes you want it and sometimes you don't. So now auto-newline (and its companion feature, hungry-delete-key) can be toggled on and off on the fly. Hungry-delete-key is the optional behavior of the delete key so that, when enabled, hitting the delete --- 608,626 ---- Controls the operation of the TAB key. t means always just indent the current line. nil means indent the current line only if point is at the left margin or in the line's indentation; otherwise ! insert a tab. Any other value means insert tab only within literals (comments and strings) and inside preprocessor ! directives, but always reindent the line. The default is value ! for `c-tab-always-indent'. c++-untame-characters When non-nil, inserts backslash escapes before certain untamed ! characters in comment regions. It is recommended that you keep the ! default setting to workaround a nasty Emacs bug, unless you are ! running a patched Emacs. ! Auto-newlining is no longer an all or nothing proposition. In my opinion, I don't believe it is possible to implement a perfect ! auto-newline algorithm. Sometimes you want it and sometimes you don't. So now auto-newline (and its companion feature, hungry-delete-key) can be toggled on and off on the fly. Hungry-delete-key is the optional behavior of the delete key so that, when enabled, hitting the delete *************** behavior of the delete key so that, when *** 619,644 **** key once consumes all preceding whitespace, unless point is within a literal (defined as a C or C++ comment, or string). Inside literals, and with hungry-delete-key disabled, the delete key just calls the ! function in variable c++-delete-function. Selection and toggling of these features is controlled by the ! variables c++-auto-hungry-initial-state and c++-auto-hungry-toggle. Legal values for both variables are: ! 'none (or nil) -- no auto-newline or hungry-delete-key. ! 'auto-only -- function affects only auto-newline feature. ! 'hungry-only -- function affects only hungry-delete-key feature. ! 'auto-hungry (or t) -- function affects both features. ! Thus if c++-auto-hungry-initial-state is 'hungry-only, then only hungry-delete-key feature is turned on when the buffer is first ! visited. If c++-auto-hungry-toggle is 'auto-hungry, and both auto-newline and hungry-delete-key features are on, then hitting ! \"\\[c++-toggle-auto-hungry-state]\" will toggle both features. ! Hitting \"\\[c++-toggle-hungry-state]\" will always toggle ! hungry-delete-key feature and hitting \"\\[c++-toggle-auto-state]\" ! will always toggle auto-newline feature, regardless of the value of ! c++-auto-hungry-toggle. Settings for K&R, BSD, and Stroustrup indentation styles are c-indent-level 5 8 4 --- 627,652 ---- key once consumes all preceding whitespace, unless point is within a literal (defined as a C or C++ comment, or string). Inside literals, and with hungry-delete-key disabled, the delete key just calls the ! function in variable `c++-delete-function'. Selection and toggling of these features is controlled by the ! variables `c++-auto-hungry-initial-state' and `c++-auto-hungry-toggle'. Legal values for both variables are: ! `none' (or nil) -- no auto-newline or hungry-delete-key. ! `auto-only' -- function affects only auto-newline feature. ! `hungry-only' -- function affects only hungry-delete-key feature. ! `auto-hungry' (or t) -- function affects both features. ! Thus if `c++-auto-hungry-initial-state' is `hungry-only', then only hungry-delete-key feature is turned on when the buffer is first ! visited. If `c++-auto-hungry-toggle' is `auto-hungry', and both auto-newline and hungry-delete-key features are on, then hitting ! `\\[c++-toggle-auto-hungry-state]' will toggle both features. Hitting ! `\\[c++-toggle-hungry-state]' will always toggle hungry-delete-key ! feature and hitting `\\[c++-toggle-auto-state]' will always toggle ! auto-newline feature, regardless of the value of ! `c++-auto-hungry-toggle'. Settings for K&R, BSD, and Stroustrup indentation styles are c-indent-level 5 8 4 *************** Settings for K&R, BSD, and Stroustrup in *** 652,664 **** c++-empty-arglist-indent 4 c++-friend-offset 0 ! Turning on C++ mode calls the value of the variable c++-mode-hook with ! no args, if that value is non-nil. ! ! Report bugs by entering \"\\[c++-submit-bug-report]\". This ! automatically sets up a mail buffer with version information already ! added. You just need to add a description of the problem and send the ! message." (interactive) (kill-all-local-variables) (use-local-map c++-mode-map) --- 660,667 ---- c++-empty-arglist-indent 4 c++-friend-offset 0 ! Turning on C++ mode calls the value of the variable `c++-mode-hook' with ! no args, if that value is non-nil." (interactive) (kill-all-local-variables) (use-local-map c++-mode-map) *************** message." *** 700,708 **** (memq c++-auto-hungry-initial-state '(hungry-only auto-hungry t)))) (defun c++-c-mode () ! "Major mode for editing K&R and ANSI C code. 2.334 ! This mode is based on c++-mode. Documentation for this mode is ! available by doing a \"\\[describe-function] c++-mode\"." (interactive) (c++-mode) (setq major-mode 'c++-c-mode --- 703,711 ---- (memq c++-auto-hungry-initial-state '(hungry-only auto-hungry t)))) (defun c++-c-mode () ! "Major mode for editing K&R and ANSI C code. 2.353 ! This mode is based on c++-mode. Documentation for this mode is ! available by doing a `\\[describe-function] c++-mode'." (interactive) (c++-mode) (setq major-mode 'c++-c-mode *************** available by doing a \"\\[describe-funct *** 715,721 **** (run-hooks 'c++-c-mode-hook)) (defun c++-comment-indent () ! "Used by indent-for-comment to decide how much to indent a comment in C++ code based on its context." (if (looking-at "^\\(/\\*\\|//\\)") 0 ; Existing comment at bol stays there. --- 718,724 ---- (run-hooks 'c++-c-mode-hook)) (defun c++-comment-indent () ! "Used by `indent-for-comment' to decide how much to indent a comment in C++ code based on its context." (if (looking-at "^\\(/\\*\\|//\\)") 0 ; Existing comment at bol stays there. *************** Update mode line to indicate state to us *** 759,765 **** (defun c++-toggle-auto-state (arg) "Toggle auto-newline feature. ! This function ignores c++-auto-hungry-toggle variable. Optional numeric ARG, if supplied turns on auto-newline when positive, turns off auto-newline when negative and toggles when zero." (interactive "P") --- 762,768 ---- (defun c++-toggle-auto-state (arg) "Toggle auto-newline feature. ! This function ignores `c++-auto-hungry-toggle' variable. Optional numeric ARG, if supplied turns on auto-newline when positive, turns off auto-newline when negative and toggles when zero." (interactive "P") *************** off auto-newline when negative and toggl *** 774,780 **** (defun c++-toggle-hungry-state (arg) "Toggle hungry-delete-key feature. ! This function ignores c++-auto-hungry-toggle variable. Optional numeric ARG, if supplied turns on hungry-delete-key when positive, turns off hungry-delete-key when negative and toggles when zero." (interactive "P") --- 777,783 ---- (defun c++-toggle-hungry-state (arg) "Toggle hungry-delete-key feature. ! This function ignores `c++-auto-hungry-toggle' variable. Optional numeric ARG, if supplied turns on hungry-delete-key when positive, turns off hungry-delete-key when negative and toggles when zero." (interactive "P") *************** turns off hungry-delete-key when negativ *** 790,806 **** (defun c++-toggle-auto-hungry-state (arg) "Toggle auto-newline and hungry-delete-key features. Actual toggling of these features is controlled by ! c++-auto-hungry-toggle variable. Optional argument has the following meanings when supplied: ! Universal argument \\[universal-argument] ! resets features to c++-auto-hungry-initial-state. ! negative number ! turn off both auto-newline and hungry-delete-key features. ! positive number ! turn on both auto-newline and hungry-delete-key features. ! zero ! toggle both features regardless of c++-auto-hungry-toggle-p." (interactive "P") (let* ((numarg (prefix-numeric-value arg)) (apl (list 'auto-only 'auto-hungry t)) --- 793,809 ---- (defun c++-toggle-auto-hungry-state (arg) "Toggle auto-newline and hungry-delete-key features. Actual toggling of these features is controlled by ! `c++-auto-hungry-toggle' variable. Optional argument has the following meanings when supplied: ! Universal argument \\[universal-argument] ! resets features to c++-auto-hungry-initial-state. ! negative number ! turn off both auto-newline and hungry-delete-key features. ! positive number ! turn on both auto-newline and hungry-delete-key features. ! zero ! toggle both features regardless of `c++-auto-hungry-toggle-p'." (interactive "P") (let* ((numarg (prefix-numeric-value arg)) (apl (list 'auto-only 'auto-hungry t)) *************** Optional argument has the following mean *** 831,843 **** (defun c++-tame-insert (arg) "Safely inserts certain troublesome characters in comment regions. ! Because of syntax bugs in emacs, characters with string or parenthesis syntax must be escaped with a backslash or lots of things get messed ! up. Unfortunately, setting parse-sexp-ignore-comments to non-nil does not fix the problem, but this function is unnecessary if you are ! running a patched emacs. ! See also the variable c++-untame-characters." (interactive "p") (if (and (memq last-command-char c++-untame-characters) (memq (c++-in-literal) '(c c++))) --- 834,846 ---- (defun c++-tame-insert (arg) "Safely inserts certain troublesome characters in comment regions. ! Because of syntax bugs in Emacs, characters with string or parenthesis syntax must be escaped with a backslash or lots of things get messed ! up. Unfortunately, setting `parse-sexp-ignore-comments' to non-nil does not fix the problem, but this function is unnecessary if you are ! running a patched Emacs. ! See also the variable `c++-untame-characters'." (interactive "p") (if (and (memq last-command-char c++-untame-characters) (memq (c++-in-literal) '(c c++))) *************** See also the variable c++-untame-charact *** 845,857 **** (self-insert-command arg)) (defun c++-electric-delete (arg) ! "If c++-hungry-delete-key is non-nil, consumes all preceding whitespace unless ARG is supplied, or point is inside a C or C++ style comment or string. If ARG is supplied, this just calls ! backward-delete-char-untabify passing along ARG. ! If c++-hungry-delete-key is nil, just call ! backward-delete-char-untabify." (interactive "P") (cond ((or (not c++-hungry-delete-key) arg) --- 848,859 ---- (self-insert-command arg)) (defun c++-electric-delete (arg) ! "If `c++-hungry-delete-key' is non-nil, consumes all preceding whitespace unless ARG is supplied, or point is inside a C or C++ style comment or string. If ARG is supplied, this just calls ! `backward-delete-char-untabify' passing along ARG. ! If `c++-hungry-delete-key' is nil, just call `backward-delete-char-untabify'." (interactive "P") (cond ((or (not c++-hungry-delete-key) arg) *************** backward-delete-char-untabify." *** 869,874 **** --- 871,877 ---- (t (funcall c++-delete-function 1)))) (defun c++-electric-pound (arg) + "Electric pound command." (interactive "p") (if (memq (c++-in-literal) '(c c++ string)) (self-insert-command arg) *************** backward-delete-char-untabify." *** 921,927 **** (if (and (memq last-command-char c++-untame-characters) (memq (c++-in-literal bod) '(c c++))) (insert "\\")) ! ;; we need to work around a bogus feature of emacs where an ;; open brace at bolp means a beginning-of-defun. but it ;; really might not. (and (= last-command-char ?{) --- 924,930 ---- (if (and (memq last-command-char c++-untame-characters) (memq (c++-in-literal bod) '(c c++))) (insert "\\")) ! ;; we need to work around a bogus feature of Emacs where an ;; open brace at bolp means a beginning-of-defun. but it ;; really might not. (and (= last-command-char ?{) *************** backward-delete-char-untabify." *** 984,990 **** (defun c++-electric-slash (arg) "Insert slash, and if slash is second of a double-slash comment introducing construct, indent line as comment. This only indents if ! we're on a comment-only line, otherwise use indent-for-comment (\\[indent-for-comment])." (interactive "P") (let ((here (point)) char) (self-insert-command (prefix-numeric-value arg)) --- 987,993 ---- (defun c++-electric-slash (arg) "Insert slash, and if slash is second of a double-slash comment introducing construct, indent line as comment. This only indents if ! we're on a comment-only line, otherwise use `indent-for-comment' (\\[indent-for-comment])." (interactive "P") (let ((here (point)) char) (self-insert-command (prefix-numeric-value arg)) *************** we're on a comment-only line, otherwise *** 995,1001 **** (c++-indent-line))))) (defun c++-electric-star (arg) ! "Works with c++-electric-slash to auto indent C style comment lines." (interactive "P") (let ((here (point)) char) (self-insert-command (prefix-numeric-value arg)) --- 998,1004 ---- (c++-indent-line))))) (defun c++-electric-star (arg) ! "Works with `c++-electric-slash' to auto indent C style comment lines." (interactive "P") (let ((here (point)) char) (self-insert-command (prefix-numeric-value arg)) *************** we're on a comment-only line, otherwise *** 1030,1037 **** (c++-electric-terminator arg))) (defun c++-electric-colon (arg) ! "Electrify colon. De-auto-newline double colons. No auto-new-lines ! for member initialization list." (interactive "P") (if (c++-in-literal) (self-insert-command (prefix-numeric-value arg)) --- 1033,1041 ---- (c++-electric-terminator arg))) (defun c++-electric-colon (arg) ! "Electrify colon. ! De-auto-newline double colons. No auto-new-lines for member ! initialization list." (interactive "P") (if (c++-in-literal) (self-insert-command (prefix-numeric-value arg)) *************** for member initialization list." *** 1148,1154 **** (defun c++-indent-command (&optional whole-exp) "Indent current line as C++ code, or in some cases insert a tab character. ! If c++-tab-always-indent is t, always just indent the current line. If nil, indent the current line only if point is at the left margin or in the line's indentation; otherwise insert a tab. If not-nil-or-t, then tab is inserted only within literals (comments and strings) and --- 1152,1158 ---- (defun c++-indent-command (&optional whole-exp) "Indent current line as C++ code, or in some cases insert a tab character. ! If `c++-tab-always-indent' is t, always just indent the current line. If nil, indent the current line only if point is at the left margin or in the line's indentation; otherwise insert a tab. If not-nil-or-t, then tab is inserted only within literals (comments and strings) and *************** of the expression are preserved." *** 1364,1370 **** (setq this-indent (if (>= (current-column) comment-column) (current-column) ! (c++-comment-offset (bolp) this-indent))))) ;; looking at a friend declaration ((looking-at "friend[ \t]") (setq this-indent (+ this-indent c++-friend-offset))) --- 1368,1383 ---- (setq this-indent (if (>= (current-column) comment-column) (current-column) ! (c++-comment-offset ! (bolp) ! (+ this-indent ! (if (save-excursion ! (c++-backward-syntactic-ws ! (car contain-stack)) ! (memq (preceding-char) ! '(nil ?\, ?\; ?} ?: ?{))) ! 0 c-continued-statement-offset)) ! ))))) ;; looking at a friend declaration ((looking-at "friend[ \t]") (setq this-indent (+ this-indent c++-friend-offset))) *************** of the expression are preserved." *** 1373,1390 **** (setq this-indent (- this-indent c-indent-level))) ;; looking at an open brace ((= (following-char) ?{) ! (setq this-indent (+ this-indent c-brace-offset))) ;; check for continued statements ((save-excursion (c++-backward-syntactic-ws (car contain-stack)) (and (not (c++-in-parens-p)) ! (not (memq (preceding-char) ! '(nil ?\000 ?\, ?\; ?\} ?\: ?\{))) (progn (beginning-of-line) (skip-chars-forward " \t") (not (looking-at c++-class-key))))) ! (setq this-indent (+ this-indent c-continued-statement-offset))) ;; check for stream operator ((looking-at "\\(<<\\|>>\\)") (setq this-indent (c++-calculate-indent))) --- 1386,1426 ---- (setq this-indent (- this-indent c-indent-level))) ;; looking at an open brace ((= (following-char) ?{) ! (setq this-indent ! (+ this-indent c-brace-offset ! (if (c++-at-top-level-p t (car contain-stack)) ! 0 c-indent-level)))) ;; check for continued statements ((save-excursion (c++-backward-syntactic-ws (car contain-stack)) (and (not (c++-in-parens-p)) ! (not (memq (preceding-char) '(nil ?\000 ?\; ?\} ?\: ?\{))) (progn (beginning-of-line) (skip-chars-forward " \t") (not (looking-at c++-class-key))))) ! (setq this-indent ! (+ this-indent ! c-continued-statement-offset ! ;; are we in a member init list? ! (if (not (looking-at "[ \t]*:")) ! (save-excursion ! (let ((lim (car contain-stack))) ! (c++-backward-syntactic-ws lim) ! (while (and (< lim (point)) ! (= (preceding-char) ?,)) ! (beginning-of-line) ! (c++-backward-syntactic-ws)) ! (forward-line 1) ! (beginning-of-line) ! (if (looking-at "[ \t]*:") ! (- (save-excursion ! (skip-chars-forward " \t") ! (point)) ! (point)) ! 0))) ! 0) ! ))) ;; check for stream operator ((looking-at "\\(<<\\|>>\\)") (setq this-indent (c++-calculate-indent))) *************** of the expression are preserved." *** 1416,1425 **** (defun c++-tame-comments () "Backslashifies all untamed in comment regions found in the buffer. ! This is a workaround for emacs syntax bugs. This function is unnecessary (and un-used automatically) if you are running a patched ! emacs. Untamed characters to escape are defined in the variable ! c++-untame-characters." (interactive) ;; make the list into a valid charset, escaping where necessary (let ((charset (concat "^" (mapconcat --- 1452,1461 ---- (defun c++-tame-comments () "Backslashifies all untamed in comment regions found in the buffer. ! This is a workaround for Emacs syntax bugs. This function is unnecessary (and un-used automatically) if you are running a patched ! Emacs. Untamed characters to escape are defined in the variable ! `c++-untame-characters'." (interactive) ;; make the list into a valid charset, escaping where necessary (let ((charset (concat "^" (mapconcat *************** c++-untame-characters." *** 1455,1465 **** --- 1491,1503 ---- (t (message "Could not find matching paren."))))) (defun c++-forward-sexp (&optional arg) + "Safe forward-sexp call." (interactive "p") (let ((parse-sexp-ignore-comments (memq 'v19 c++-emacs-features))) (forward-sexp arg))) (defun c++-backward-sexp (&optional arg) + "Safe backward-sexp call." (interactive "p") (let ((parse-sexp-ignore-comments (memq 'v19 c++-emacs-features))) (backward-sexp arg))) *************** c++-untame-characters." *** 1478,1485 **** (defun c++-backward-syntactic-ws (&optional lim) "Skip backwards over syntactic whitespace. Syntactic whitespace is defined as lexical whitespace, C and C++ style ! comments, and preprocessor directives. Search no farther back than ! optional LIM. If LIM is omitted, beginning-of-defun is used." (let ((lim (or lim (c++-point 'bod))) literal stop) (if (and c++-backscan-limit --- 1516,1523 ---- (defun c++-backward-syntactic-ws (&optional lim) "Skip backwards over syntactic whitespace. Syntactic whitespace is defined as lexical whitespace, C and C++ style ! comments, and preprocessor directives. Search no farther back than ! optional LIM. If LIM is omitted, `beginning-of-defun' is used." (let ((lim (or lim (c++-point 'bod))) literal stop) (if (and c++-backscan-limit *************** optional LIM. If LIM is omitted, beginn *** 1528,1542 **** ;; none of the above (setq stop t)))))))) ! ;; This defun works well for Lemacs 19.4 through 19.6, which ! ;; implemented a first shot at doing this via a C built-in ! ;; backward-syntactic-ws. This has been obsoleted in future Lemacsen ! ;; and in GNU19 (defun c++-fast-backward-syntactic-ws-1 (&optional lim) "Skip backwards over syntactic whitespace. Syntactic whitespace is defined as lexical whitespace, C and C++ style ! comments, and preprocessor directives. Search no farther back than ! optional LIM. If LIM is omitted, beginning-of-defun is used." (save-restriction (let ((parse-sexp-ignore-comments t) donep boi char --- 1566,1579 ---- ;; none of the above (setq stop t)))))))) ! ;; This defun works well for Lemacs 19.4-7, which implemented a first ! ;; shot at doing this via a C built-in backward-syntactic-ws. This ! ;; has been obsoleted in future Lemacsen and in FSF19 (defun c++-fast-backward-syntactic-ws-1 (&optional lim) "Skip backwards over syntactic whitespace. Syntactic whitespace is defined as lexical whitespace, C and C++ style ! comments, and preprocessor directives. Search no farther back than ! optional LIM. If LIM is omitted, `beginning-of-defun' is used." (save-restriction (let ((parse-sexp-ignore-comments t) donep boi char *************** optional LIM. If LIM is omitted, beginn *** 1545,1551 **** (unwind-protect (progn (narrow-to-region lim (point)) ! (modify-syntax-entry ?# "< b" c++-mode-syntax-table) (while (not donep) ;; if you're not running a patched lemacs, the new byte ;; compiler will complain about this function. ignore that --- 1582,1592 ---- (unwind-protect (progn (narrow-to-region lim (point)) ! ;; cpp statements are comments for our purposes here ! (if (eq major-mode 'c++-mode) ! (modify-syntax-entry ?# "< b" c++-mode-syntax-table) ! (modify-syntax-entry ?\n "> b" c++-c-mode-syntax-table) ! (modify-syntax-entry ?# "< b" c++-c-mode-syntax-table)) (while (not donep) ;; if you're not running a patched lemacs, the new byte ;; compiler will complain about this function. ignore that *************** optional LIM. If LIM is omitted, beginn *** 1559,1604 **** (setq donep (<= (point) lim))) (setq donep t)) )) ! (modify-syntax-entry ?# "." c++-mode-syntax-table))) ))) ! ;; This is the way it should be done for all post 19.6 Lemacsen and ! ;; for all GNU19 implementations (defun c++-fast-backward-syntactic-ws-2 (&optional lim) "Skip backwards over syntactic whitespace. Syntactic whitespace is defined as lexical whitespace, C and C++ style ! comments, and preprocessor directives. Search no farther back than ! optional LIM. If LIM is omitted, beginning-of-defun is used." (save-restriction ! (let ((lim (or lim (c++-point 'bod))) ! donep boi char) (if (< lim (point)) (unwind-protect (progn (narrow-to-region lim (point)) ! (modify-syntax-entry ?# "< b" c++-mode-syntax-table) ! (while (not donep) ! (forward-comment -1) ! (if (not (looking-at "#\\|/\\*\\|//\\|\n")) ! (forward-char 1)) ! (setq boi (c++-point 'boi) ! char (char-after boi)) ! (if (and char (= char ?#)) ! (progn (goto-char boi) ! (setq donep (<= (point) lim))) ! (setq donep t)) ! )) ! (modify-syntax-entry ?# "." c++-mode-syntax-table))) ))) ;; This is the slow and ugly way, but its the best we can do in ;; vanilla GNU18 emacsen (defun c++-in-literal (&optional lim) ! "Determine if point is in a C++ `literal'. ! Return 'c if in a C-style comment, 'c++ if in a C++ style comment, ! 'string if in a string literal, 'pound if on a preprocessor line, or nil if not in a comment at all. Optional LIM is used as the backward ! limit of the search. If omitted, or nil, c++-beginning-of-defun is used." (save-excursion (let* ((here (point)) --- 1600,1649 ---- (setq donep (<= (point) lim))) (setq donep t)) )) ! ;; cpp statements are not comments anywhere else. ! (if (eq major-mode 'c++-mode) ! (modify-syntax-entry ?# "." c++-mode-syntax-table) ! (modify-syntax-entry ?\n " " c++-c-mode-syntax-table) ! (modify-syntax-entry ?# "." c++-c-mode-syntax-table)))) ))) ! ;; This is the way it should be done for all post 19.7 Lemacsen and ! ;; for all FSF19 implementations (defun c++-fast-backward-syntactic-ws-2 (&optional lim) "Skip backwards over syntactic whitespace. Syntactic whitespace is defined as lexical whitespace, C and C++ style ! comments, and preprocessor directives. Search no farther back than ! optional LIM. If LIM is omitted, `beginning-of-defun' is used." (save-restriction ! (let* ((lim (or lim (c++-point 'bod))) ! (here lim)) (if (< lim (point)) (unwind-protect (progn (narrow-to-region lim (point)) ! ;; cpp statements are comments for our purposes here ! (if (eq major-mode 'c++-mode) ! (modify-syntax-entry ?# "< b" c++-mode-syntax-table) ! (modify-syntax-entry ?\n "> b" c++-c-mode-syntax-table) ! (modify-syntax-entry ?# "< b" c++-c-mode-syntax-table)) ! (while (/= here (point)) ! (setq here (point)) ! (forward-comment -1))) ! ;; cpp statements are not comments everywhere else ! (if (eq major-mode 'c++-mode) ! (modify-syntax-entry ?# "." c++-mode-syntax-table) ! (modify-syntax-entry ?\n " " c++-c-mode-syntax-table) ! (modify-syntax-entry ?# "." c++-c-mode-syntax-table)))) ))) ;; This is the slow and ugly way, but its the best we can do in ;; vanilla GNU18 emacsen (defun c++-in-literal (&optional lim) ! "Determine if point is in a C++ \"literal\". ! Return `c' if in a C-style comment, `c++' if in a C++ style comment, ! `string' if in a string literal, `pound' if on a preprocessor line, or nil if not in a comment at all. Optional LIM is used as the backward ! limit of the search. If omitted, or nil, `c++-beginning-of-defun' is used." (save-excursion (let* ((here (point)) *************** used." *** 1652,1662 **** ;; This is for all 8-bit emacsen (Lucid 19, patched GNU18) (defun c++-in-literal-8-bit (&optional lim) ! "Determine if point is in a C++ `literal'. ! Return 'c if in a C-style comment, 'c++ if in a C++ style comment, ! 'string if in a string literal, 'pound if on a preprocessor line, or nil if not in a comment at all. Optional LIM is used as the backward ! limit of the search. If omitted, or nil, c++-beginning-of-defun is used." (save-excursion (let* ((backlim (or lim (c++-point 'bod))) --- 1697,1707 ---- ;; This is for all 8-bit emacsen (Lucid 19, patched GNU18) (defun c++-in-literal-8-bit (&optional lim) ! "Determine if point is in a C++ \"literal\". ! Return `c' if in a C-style comment, `c++' if in a C++ style comment, ! `string' if in a string literal, `pound' if on a preprocessor line, or nil if not in a comment at all. Optional LIM is used as the backward ! limit of the search. If omitted, or nil, `c++-beginning-of-defun' is used." (save-excursion (let* ((backlim (or lim (c++-point 'bod))) *************** used." *** 1673,1685 **** 'pound) (t nil))))) ! ;; This is for all 1-bit emacsen (GNU19) (defun c++-in-literal-1-bit (&optional lim) ! "Determine if point is in a C++ `literal'. ! Return 'c if in a C-style comment, 'c++ if in a C++ style comment, ! 'string if in a string literal, 'pound if on a preprocessor line, or nil if not in a comment at all. Optional LIM is used as the backward ! limit of the search. If omitted, or nil, c++-beginning-of-defun is used." (save-excursion (let* ((backlim (or lim (c++-point 'bod))) --- 1718,1730 ---- 'pound) (t nil))))) ! ;; This is for all 1-bit emacsen (FSF19) (defun c++-in-literal-1-bit (&optional lim) ! "Determine if point is in a C++ \"literal\". ! Return `c' if in a C-style comment, `c++' if in a C++ style comment, ! `string' if in a string literal, `pound' if on a preprocessor line, or nil if not in a comment at all. Optional LIM is used as the backward ! limit of the search. If omitted, or nil, `c++-beginning-of-defun' is used." (save-excursion (let* ((backlim (or lim (c++-point 'bod))) *************** used." *** 1715,1723 **** ;; ====================================================================== (defun c++-parse-state (&optional limit) "Determinate the syntactic state of the code at point. ! Iteratively uses parse-partial-sexp from point to LIMIT and returns ! the result of parse-partial-sexp at point. LIMIT is optional and ! defaults to point-max." (let ((limit (or limit (point-max))) (parse-sexp-ignore-comments t) state) --- 1760,1768 ---- ;; ====================================================================== (defun c++-parse-state (&optional limit) "Determinate the syntactic state of the code at point. ! Iteratively uses `parse-partial-sexp' from point to LIMIT and returns ! the result of `parse-partial-sexp' at point. LIMIT is optional and ! defaults to `point-max'." (let ((limit (or limit (point-max))) (parse-sexp-ignore-comments t) state) *************** Optional LIM is used as the backward lim *** 1787,1793 **** (defun c++-in-function-p (&optional containing) "Return t if inside a C++ function definition. ! Optional CONTAINING is position of containing s-exp open brace. If not supplied, point is used as search start." (save-excursion (let ((here (if (not containing) --- 1832,1838 ---- (defun c++-in-function-p (&optional containing) "Return t if inside a C++ function definition. ! Optional CONTAINING is position of containing s-exp open brace. If not supplied, point is used as search start." (save-excursion (let ((here (if (not containing) *************** point of the beginning of the C++ defini *** 1813,1820 **** --- 1858,1873 ---- (let* ((bod (or bod (c++-point 'bod))) (indent (c++-calculate-indent nil bod)) beg shift-amt + close-paren top-close-paren (case-fold-search nil) (pos (- (point-max) (point)))) + ;; calculate block close paren offset + (if (listp c++-block-close-brace-offset) + (setq close-paren (car c++-block-close-brace-offset) + top-close-paren (cdr c++-block-close-brace-offset)) + (setq close-paren c++-block-close-brace-offset + top-close-paren c++-block-close-brace-offset)) + ;; now start cleanup (beginning-of-line) (setq beg (point)) (cond *************** point of the beginning of the C++ defini *** 1865,1879 **** (if (save-excursion (forward-char 1) (c++-at-top-level-p nil bod)) ! (- c++-block-close-brace-offset) ! c++-block-close-brace-offset)))) ((= (following-char) ?}) (setq indent (+ (- indent c-indent-level) (if (save-excursion (forward-char 1) (c++-at-top-level-p nil bod)) ! (- c++-block-close-brace-offset) ! c++-block-close-brace-offset)))) ((= (following-char) ?{) (setq indent (+ indent c-brace-offset)))))) (skip-chars-forward " \t") --- 1918,1932 ---- (if (save-excursion (forward-char 1) (c++-at-top-level-p nil bod)) ! top-close-paren ! close-paren)))) ((= (following-char) ?}) (setq indent (+ (- indent c-indent-level) (if (save-excursion (forward-char 1) (c++-at-top-level-p nil bod)) ! top-close-paren ! close-paren)))) ((= (following-char) ?{) (setq indent (+ indent c-brace-offset)))))) (skip-chars-forward " \t") *************** point of the beginning of the C++ defini *** 1897,1903 **** "Calculate the indentation for a continued statement. IPNT is the indentation point; CHAR is the character before the indentation point, excluding any intervening whitespace; LIM is the ! minimum point to search backwards to" (let ((charlist '(nil ?\000 ?\, ?\; ?\} ?\: ?\{)) streamop-pos here) (goto-char ipnt) --- 1950,1956 ---- "Calculate the indentation for a continued statement. IPNT is the indentation point; CHAR is the character before the indentation point, excluding any intervening whitespace; LIM is the ! minimum point to search backwards to." (let ((charlist '(nil ?\000 ?\, ?\; ?\} ?\: ?\{)) streamop-pos here) (goto-char ipnt) *************** BOD is the beginning of the C++ definiti *** 1959,1965 **** (beginning-of-line) (let ((indent-point (point)) (case-fold-search nil) ! state do-indentation literal containing-sexp streamop-pos char-before-ip (inclass-shift 0) inclass-depth inclass-unshift (bod (or bod (c++-point 'bod)))) --- 2012,2018 ---- (beginning-of-line) (let ((indent-point (point)) (case-fold-search nil) ! state do-indentation literal in-meminit-p containing-sexp streamop-pos char-before-ip (inclass-shift 0) inclass-depth inclass-unshift (bod (or bod (c++-point 'bod)))) *************** BOD is the beginning of the C++ definiti *** 2011,2019 **** ;; ((setq inclass-depth (c++-at-top-level-p t bod)) (+ ! ;; add an offset if we are inside a class defun body, ! ;; i.e. we are at the top level, but only wrt a ! ;; containing class (let ((shift/level (+ c-indent-level c-brace-imaginary-offset))) (setq inclass-shift (* shift/level inclass-depth) inclass-unshift (* shift/level (max 0 (1- inclass-depth)))) --- 2064,2071 ---- ;; ((setq inclass-depth (c++-at-top-level-p t bod)) (+ ! ;; add an offset if we are inside a class defun body, i.e. we ! ;; are at the top level, but only wrt a containing class (let ((shift/level (+ c-indent-level c-brace-imaginary-offset))) (setq inclass-shift (* shift/level inclass-depth) inclass-unshift (* shift/level (max 0 (1- inclass-depth)))) *************** BOD is the beginning of the C++ definiti *** 2021,2177 **** (progn (goto-char indent-point) (skip-chars-forward " \t") ! (if (or (= (following-char) ?{) ! (progn ! (c++-backward-syntactic-ws parse-start) ! (bobp))) ! 0 ! (if (c++-in-function-p) ! (progn ; first arg decl or member init ! (goto-char indent-point) ! (skip-chars-forward " \t") ! (if (= (following-char) ?:) ! c++-member-init-indent ! c-argdecl-indent)) (if (= (preceding-char) ?\;) (progn (backward-char 1) (skip-chars-backward " \t"))) ! ;; may be first line after a hanging member init ! ;; colon. check to be sure its not a scope ! ;; operator meaning we are inside a member def ! (if (or (= (preceding-char) ?:) ! (save-excursion ! (forward-line 1) ! (skip-chars-forward " \t") ! (or (eobp) (forward-char 1)) ! (and (= (preceding-char) ?:) ! (/= (following-char) ?:))) ! (save-excursion ! (and (= (preceding-char) ?,) ! (let ((bol (c++-point 'bol))) ! (skip-chars-backward "^:" bol) ! (= (preceding-char) ?:)) ! (not (c++-in-parens-p)) ! (progn ! (forward-char -1) ! (skip-chars-backward " \t") ! (not (bolp))) ! ;; make sure its not a multiple inheritance ! ;; continuation line ! (progn ! (beginning-of-line) ! (not (looking-at c++-inher-key))) ! ))) ! ;; check to see if we're looking at a member ! ;; init, or access specifier ! (if (progn ! (beginning-of-line) ! (skip-chars-forward " \t") ! (looking-at c++-access-key)) ! ;; access specifier. class defun opening brace ! ;; may not be in col zero ! (progn (goto-char (or containing-sexp bod)) ! (- (current-indentation) ! ;; remove some nested inclass indentation ! inclass-unshift)) ! ;; member init, so add offset. add additional ! ;; offset if looking at line with just a member ! ;; init colon ! (+ c++-member-init-indent ! (if (looking-at ":[ \t]*$") ! (or c++-continued-member-init-offset 0) 0))) ! (if (or (= (preceding-char) ?}) ! (= (preceding-char) ?\)) ! (save-excursion ! (beginning-of-line) ! (looking-at "[ \t]*\\"))) ! ;; indentation of class defun opening brace ! ;; may not be zero ! (progn (goto-char (or containing-sexp bod)) ! (- (current-indentation) ! ;; remove some nested inclass indentation ! inclass-unshift)) ! ;; cont arg decls or member inits (beginning-of-line) ! ;; we might be inside a K&R C arg decl ! (if (save-excursion ! (c++-backward-syntactic-ws bod) ! (and (eq major-mode 'c++-c-mode) ! (= (preceding-char) ?\)))) ! c-argdecl-indent (skip-chars-forward " \t") ! (if (or (memq (c++-in-literal bod) '(c c++)) ! (looking-at "/[/*]")) ! 0 ! (if (= (following-char) ?:) ! (if c++-continued-member-init-offset ! (+ (current-indentation) ! c++-continued-member-init-offset) ! (progn ! (forward-char 1) ! (skip-chars-forward " \t") ! (- (current-column) ! inclass-shift))) ! ;; else first check to see if its a ! ;; multiple inheritance continuation line, ! ;; but not a K&R C arg decl ! (if (and (not (eq major-mode 'c++-c-mode)) ! (looking-at c++-inher-key)) ! (if (= char-before-ip ?,) ! (progn (goto-char (match-end 0)) ! (current-column)) ! ;; nope, its probably a nested class ! 0) ! ;; we might be looking at the opening ! ;; brace of a class defun ! (if (= (following-char) ?\{) ! ;; indentation of opening brace may not ! ;; be zero ! (- (current-indentation) ! ;; remove some nested inclass indentation ! inclass-unshift) ! (if (eolp) ! ;; looking at a blank line, indent ! ;; next line to zero ! 0 ! (if (save-excursion ! (goto-char indent-point) ! (beginning-of-line) ! (bobp)) ! ;; at beginning of buffer, if ! ;; nothing else, indent to zero ! 0 ! (if (c++-in-parens-p) ! ;; we are perhaps inside a ! ;; member init call ! (while (and (c++-in-parens-p) ! (< bod (point))) ! (forward-line -1) ! (skip-chars-forward " \t"))) ! ;; check to be sure that we're ! ;; not on the first line of the ! ;; member init list ! (if (= (following-char) ?:) ! (progn ! (forward-char 1) ! (skip-chars-forward " \t"))) ! ;; subtract inclass-shift since ! ;; its already incorporated by ! ;; default in current-column ! (- (cond ! ;;((save-excursion ! ;;(c++-cont-indent ! ;;indent-point char-before-ip ! ;;(or containing-sexp bod)))) ! ;;((= char-before-ip ?\;) ! ;;(goto-char (or containing-sexp bod)) ! ;;(+ (current-indentation) ! ;;inclass-shift)) ! (t (current-column))) ! inclass-shift) ! ))))))))) ! ))))) ;; CASE 4: line is expression, not statement. indent to just ;; after the surrounding open -- unless empty arg list, in ;; which case we do what c++-empty-arglist-indent says to do. --- 2073,2265 ---- (progn (goto-char indent-point) (skip-chars-forward " \t") ! (cond ! ;; ! ((or (= (following-char) ?{) ! (progn ! (c++-backward-syntactic-ws parse-start) ! (bobp))) ! 0) ! ;; first arg decl or member init ! ((c++-in-function-p) ! (goto-char indent-point) ! (skip-chars-forward " \t") ! (if (= (following-char) ?:) ! c++-member-init-indent ! c-argdecl-indent)) ! ;; ! ((progn (if (= (preceding-char) ?\;) (progn (backward-char 1) (skip-chars-backward " \t"))) ! ;; may be first line after a hanging member init colon. ! ;; check to be sure its not a scope operator meaning we ! ;; are inside a member def ! (or (= (preceding-char) ?:) ! (save-excursion ! (forward-line 1) ! (skip-chars-forward " \t") ! (or (eobp) (forward-char 1)) ! (and (= (preceding-char) ?:) ! (/= (following-char) ?:))) ! (save-excursion ! (and (= (preceding-char) ?,) ! (let ((bol (c++-point 'bol))) ! (skip-chars-backward "^:" bol) ! (= (preceding-char) ?:)) ! (not (c++-in-parens-p)) ! (progn ! (forward-char -1) ! (skip-chars-backward " \t") ! (not (bolp))) ! ;; make sure its not a multiple inheritance ! ;; continuation line ! (progn ! (beginning-of-line) ! (not (looking-at c++-inher-key))) ! )))) ! ;; check to see if we're looking at a member init, or ! ;; access specifier ! (if (progn (beginning-of-line) ! (skip-chars-forward " \t") ! (looking-at c++-access-key)) ! ;; access specifier. class defun opening brace may ! ;; not be in col zero, and derived classes could be ! ;; on a separate line than class intro ! (progn ! (goto-char (or containing-sexp bod)) ! (beginning-of-line) ! (skip-chars-forward " \t") ! (if (looking-at ! ":[ \t]*\\<\\(public\\|protected\\|private\\)\\>") ! (forward-line -1)) ! (- (current-indentation) ! ;; remove some nested inclass indentation ! inclass-unshift)) ! ;; member init, so add offset. add additional offset if ! ;; looking at line with just a member init colon ! (+ c++-member-init-indent ! (if (looking-at ":[ \t]*$") ! (or c++-continued-member-init-offset 0) 0)))) ! ((or (= (preceding-char) ?}) ! (= (preceding-char) ?\)) ! (save-excursion ! (beginning-of-line) ! (looking-at "[ \t]*\\"))) ! ;; indentation of class defun opening brace may not be ! ;; zero ! (goto-char (or containing-sexp bod)) ! (- (current-indentation) ! ;; remove some nested inclass indentation ! inclass-unshift)) ! ;; cont arg decls or member inits. we might be inside a ! ;; K&R C arg decl ! ((save-excursion ! (while (and (< bod (point)) ! (memq (preceding-char) '(?\, ?\;))) ! (beginning-of-line) ! (c++-backward-syntactic-ws bod)) ! (and (eq major-mode 'c++-c-mode) ! (= (preceding-char) ?\)))) ! (+ c-argdecl-indent ! (progn ! (goto-char indent-point) ! (c++-backward-syntactic-ws bod) ! (if (= (preceding-char) ?,) ! c-continued-statement-offset ! 0)))) ! ((progn ! (beginning-of-line) ! (skip-chars-forward " \t") ! (or (memq (c++-in-literal bod) '(c c++)) ! (looking-at "/[/*]"))) ! 0) ! ;; are we looking at the first member init? ! ((and (= (following-char) ?:) ! (save-excursion ! (c++-backward-syntactic-ws bod) ! (= (preceding-char) ?\)))) ! (if c++-continued-member-init-offset ! (+ (current-indentation) ! c++-continued-member-init-offset) ! (progn ! (forward-char 1) ! (skip-chars-forward " \t") ! (- (current-column) ! inclass-shift)))) ! ;; else first check to see if its a multiple inheritance ! ;; continuation line, but not a K&R C arg decl ! ((and (not (eq major-mode 'c++-c-mode)) ! (looking-at c++-inher-key)) ! (if (= char-before-ip ?,) ! (progn (goto-char (match-end 0)) ! (current-column)) ! ;; nope, its probably a nested class ! 0)) ! ;; we might be looking at the opening brace of a class ! ;; defun ! ((= (following-char) ?\{) ! ;; indentation of opening brace may not be zero ! (- (current-indentation) ! ;; remove some nested inclass indentation ! inclass-unshift)) ! ((eolp) ! ;; looking at a blank line, indent next line to zero ! 0) ! ;; at beginning of buffer, if nothing else, indent to zero ! ((save-excursion ! (goto-char indent-point) ! (beginning-of-line) ! (bobp)) ! 0) ! ;; this could be a compound statement, but make sure its ! ;; not a member init list ! ((save-excursion ! (goto-char indent-point) ! (c++-backward-syntactic-ws bod) ! (and (= (preceding-char) ?,) ! (save-excursion ! (while (and (< bod (point)) ! (= (preceding-char) ?,)) ! (beginning-of-line) ! (c++-backward-syntactic-ws bod)) ! (forward-line 1) ! (not (setq in-meminit-p (looking-at "[ \t]*:")))))) ! c-continued-statement-offset) ! (t ! (if (c++-in-parens-p) ! ;; we are perhaps inside a member init call ! (while (and (c++-in-parens-p) ! (< bod (point))) ! (forward-line -1) ! (skip-chars-forward " \t"))) ! ;; check to be sure that we're not on the first line of ! ;; the member init list ! (if (and (= (following-char) ?:) ! (save-excursion ! (c++-backward-syntactic-ws bod) ! (= (preceding-char) ?\)))) ! (progn ! (forward-char 1) ! (skip-chars-forward " \t"))) ! ;; skip to start of compound statement, but only if we're ! ;; not in a member initialization list ! (if (not in-meminit-p) ! (let ((ipnt (point))) ! (c++-backward-syntactic-ws bod) ! (while (and (= (preceding-char) ?,) ! (< bod (point))) ! (beginning-of-line) (skip-chars-forward " \t") ! (setq ipnt (point)) ! (c++-backward-syntactic-ws bod)) ! (goto-char ipnt))) ! ;; subtract inclass-shift since its already incorporated ! ;; by default in current-column ! (- (current-column) inclass-shift) ! ))))) ;; CASE 4: line is expression, not statement. indent to just ;; after the surrounding open -- unless empty arg list, in ;; which case we do what c++-empty-arglist-indent says to do. *************** BOD is the beginning of the C++ definiti *** 2198,2204 **** ;; empty-arglist, so we'll indent to the min of that ;; and the beginning of the first argument. (goto-char (1+ containing-sexp)) ! ;; we want to skip any whitespace b/w open paren and ;; first argument. this handles while (thing) style ;; and while( thing ) style (skip-chars-forward " \t") --- 2286,2292 ---- ;; empty-arglist, so we'll indent to the min of that ;; and the beginning of the first argument. (goto-char (1+ containing-sexp)) ! ;; We want to skip any whitespace b/w open paren and ;; first argument. this handles while (thing) style ;; and while( thing ) style (skip-chars-forward " \t") *************** BOD is the beginning of the C++ definiti *** 2243,2249 **** (looking-at (concat "#\\|/\\*\\|//" ! "\\|\\(case[ \t]+.*\\|default[ \t]*\\)" "\\|[a-zA-Z0-9_$]*:[^:]" "\\|friend[ \t]" c++-class-key --- 2331,2337 ---- (looking-at (concat "#\\|/\\*\\|//" ! "\\|\\(case[ \t]+.*\\|default[ \t]*\\):" "\\|[a-zA-Z0-9_$]*:[^:]" "\\|friend[ \t]" c++-class-key *************** BOD is the beginning of the C++ definiti *** 2267,2279 **** ;; if it is before the line we want to indent. (and (< (point) indent-point) (+ (current-column) ! ;; check if this is a true ! ;; statement continuation, not a ! ;; list of enums or static arrays elems ! (if (and ! (= char-before-ip ?,) ! (c++-in-function-p containing-sexp)) ! c-indent-level 0))))) ;; If no previous statement, indent it relative to ;; line brace is on. For open brace in column ;; zero, don't let statement start there too. If --- 2355,2362 ---- ;; if it is before the line we want to indent. (and (< (point) indent-point) (+ (current-column) ! (c++-compound-offset ! char-before-ip containing-sexp bod))))) ;; If no previous statement, indent it relative to ;; line brace is on. For open brace in column ;; zero, don't let statement start there too. If *************** the current line is to be regarded as pa *** 2324,2330 **** (defun c++-comment-offset (col0-line-p indent) "Calculates and returns the comment-only line offset. ! Offset is based on the value of c++-comment-only-line-offset, the argument COL0-LINE-P, and the current indentation INDENT." (let ((offset 0)) (if col0-line-p --- 2407,2413 ---- (defun c++-comment-offset (col0-line-p indent) "Calculates and returns the comment-only line offset. ! Offset is based on the value of `c++-comment-only-line-offset', the argument COL0-LINE-P, and the current indentation INDENT." (let ((offset 0)) (if col0-line-p *************** argument COL0-LINE-P, and the current in *** 2344,2349 **** --- 2427,2473 ---- c++-comment-only-line-offset)))) offset)) + (defun c++-compound-offset (char-before-ip containing-sexp bod) + "Calculates any addition offset due a comma separated compound statement. + CHAR-BEFORE-IP is the character before the indentation point and + CONTAINING-SEXP is the buffer position of the open brace or paren. + BOD is the `beginning-of-defun' point." + (cond + ;; not a compound statement + ((/= char-before-ip ?,) 0) + ;; open brace could be at column zero == bod + ((and (= containing-sexp bod) + (or (let ((lim (progn + (goto-char containing-sexp) + (forward-line -1) + (point)))) + (end-of-line) + (c++-backward-syntactic-ws lim) + (= (preceding-char) ?=)) + (progn + (beginning-of-line) + (looking-at "\\(^\\|[ \t]*\\)enum[ \t]")) + )) + 0) + ;; check for inside an enum + ((let ((parse-sexp-ignore-comments t) + in-enum-p) + (goto-char containing-sexp) + (while (< bod (point)) + (c++-backward-syntactic-ws) + (if (memq (preceding-char) '(?\) ?\" ?\; ?\})) + (goto-char bod) + (forward-sexp -1) + (if (looking-at "\\(enum[ \t\n]\\|\\[.*\\]\\)") + (progn (goto-char bod) + (setq in-enum-p t))))) + in-enum-p) + 0) + ;; assume we're not in a list of enums or static array elems + (t c-continued-statement-offset) + )) + + ;; ====================================================================== ;; defuns to look backwards for things *************** argument COL0-LINE-P, and the current in *** 2350,2356 **** ;; ====================================================================== (defun c++-backward-to-start-of-do (&optional limit) ! "Move to the start of the last ``unbalanced'' do." (let ((do-level 1) (case-fold-search nil) (limit (or limit (c++-point 'bod)))) --- 2474,2480 ---- ;; ====================================================================== (defun c++-backward-to-start-of-do (&optional limit) ! "Move to the start of the last \"unbalanced\" do." (let ((do-level 1) (case-fold-search nil) (limit (or limit (c++-point 'bod)))) *************** argument COL0-LINE-P, and the current in *** 2374,2380 **** (setq do-level 0)))))) (defun c++-backward-to-start-of-if (&optional limit) ! "Move to the start of the last ``unbalanced'' if." (let ((if-level 1) (case-fold-search nil) (limit (or limit (c++-point 'bod)))) --- 2498,2504 ---- (setq do-level 0)))))) (defun c++-backward-to-start-of-if (&optional limit) ! "Move to the start of the last \"unbalanced\" if." (let ((if-level 1) (case-fold-search nil) (limit (or limit (c++-point 'bod)))) *************** string according to mode's syntax." *** 2402,2411 **** (defun c++-point (position) "Returns the value of point at certain commonly referenced POSITIONs. POSITION can be one of the following symbols: ! bol -- beginning of line ! eol -- end of line ! bod -- beginning of defun ! boi -- back to indentation This function does not modify point or mark." (let ((here (point)) bufpos) (cond --- 2526,2535 ---- (defun c++-point (position) "Returns the value of point at certain commonly referenced POSITIONs. POSITION can be one of the following symbols: ! `bol' -- beginning of line ! `eol' -- end of line ! `bod' -- beginning of defun ! `boi' -- back to indentation This function does not modify point or mark." (let ((here (point)) bufpos) (cond *************** it will remove trailing backslashes." *** 2465,2471 **** ;; ====================================================================== (defun c++-comment-region (beg end) "Comment out all lines in a region between mark and current point by ! inserting comment-start in front of each line." (interactive "*r") (save-excursion (save-restriction --- 2589,2595 ---- ;; ====================================================================== (defun c++-comment-region (beg end) "Comment out all lines in a region between mark and current point by ! inserting `comment-start' in front of each line." (interactive "*r") (save-excursion (save-restriction *************** inserting comment-start in front of each *** 2481,2487 **** (defun c++-uncomment-region (beg end) "Uncomment all lines in region between mark and current point by deleting ! the leading \"// \" from each line, if any." (interactive "*r") (save-excursion (save-restriction --- 2605,2611 ---- (defun c++-uncomment-region (beg end) "Uncomment all lines in region between mark and current point by deleting ! the leading `// ' from each line, if any." (interactive "*r") (save-excursion (save-restriction *************** the leading \"// \" from each line, if a *** 2512,2519 **** ;;; determines which to use; the default is the weak one. (defvar c++-match-header-strongly nil ! "*If NIL, use c++-defun-header-weak to identify beginning of definitions, ! if nonNIL, use c++-defun-header-strong") (defvar c++-defun-header-strong-struct-equivs "\\(class\\|struct\\|union\\|enum\\)" --- 2636,2643 ---- ;;; determines which to use; the default is the weak one. (defvar c++-match-header-strongly nil ! "*If nil, use `c++-defun-header-weak' to identify beginning of definitions, ! if non-nil, use `c++-defun-header-strong'.") (defvar c++-defun-header-strong-struct-equivs "\\(class\\|struct\\|union\\|enum\\)" *************** function definition.") *** 2580,2589 **** ;; strong scheme shown above) are welcomed. (defconst c++-defun-header-weak "^{\\|^[_a-zA-Z].*{" ! "Weakly-defined regexp to match beginning of structure or function definition.") (defun c++-beginning-of-defun (&optional arg) (interactive "p") (if (not arg) (setq arg 1)) (let ((c++-defun-header (if c++-match-header-strongly --- 2704,2715 ---- ;; strong scheme shown above) are welcomed. (defconst c++-defun-header-weak "^{\\|^[_a-zA-Z].*{" ! "Weakly-defined regexp to match beginning of structure or function ! definition.") (defun c++-beginning-of-defun (&optional arg) + "Find the beginning of the C++ function or class." (interactive "p") (if (not arg) (setq arg 1)) (let ((c++-defun-header (if c++-match-header-strongly *************** function definition.") *** 2614,2619 **** --- 2740,2746 ---- (defun c++-end-of-defun (arg) + "Find the end of the C++ function or class." (interactive "p") (let ((c++-defun-header (if c++-match-header-strongly c++-defun-header-strong *************** function definition.") *** 2639,2645 **** t))) (defun c++-indent-defun () ! "Indents the current function def, struct or class decl." (interactive) (let ((restore (point))) (c++-end-of-defun 1) --- 2766,2772 ---- t))) (defun c++-indent-defun () ! "Indents the current function def, struct or class declaration." (interactive) (let ((restore (point))) (c++-end-of-defun 1) *************** function definition.") *** 2657,2663 **** ;; ====================================================================== ;; defuns for submitting bug reports ;; ====================================================================== ! (defconst c++-version "2.334" "c++-mode version number.") (defconst c++-mode-help-address "c++-mode-help@anthem.nlm.nih.gov" "Address accepting submission of bug reports.") --- 2784,2790 ---- ;; ====================================================================== ;; defuns for submitting bug reports ;; ====================================================================== ! (defconst c++-version "2.353" "c++-mode version number.") (defconst c++-mode-help-address "c++-mode-help@anthem.nlm.nih.gov" "Address accepting submission of bug reports.") diff -cprP --exclude=*.elc emacs-19.15/lisp/diary-ins.el emacs-19.16/lisp/diary-ins.el *** emacs-19.15/lisp/diary-ins.el Mon Mar 22 21:13:40 1993 --- emacs-19.16/lisp/diary-ins.el Fri Jun 18 12:40:01 1993 *************** *** 147,162 **** "Insert a cyclic diary entry starting at the date given by point. Prefix arg will make the entry nonmarking." (interactive "P") ! (make-diary-entry ! (format "%s(diary-cyclic %d %s)" ! sexp-diary-entry-symbol ! (calendar-read "Repeat every how many days: " ! '(lambda (x) (> x 0))) ! (calendar-date-string ! (or (calendar-cursor-to-date) ! (error "Cursor is not on a date!")) ! nil t)) ! arg)) (defun insert-hebrew-diary-entry (arg) "Insert a diary entry. --- 147,166 ---- "Insert a cyclic diary entry starting at the date given by point. Prefix arg will make the entry nonmarking." (interactive "P") ! (let* ((calendar-date-display-form ! (if european-calendar-style ! '(day " " month " " year) ! '(month " " day " " year)))) ! (make-diary-entry ! (format "%s(diary-cyclic %d %s)" ! sexp-diary-entry-symbol ! (calendar-read "Repeat every how many days: " ! '(lambda (x) (> x 0))) ! (calendar-date-string ! (or (calendar-cursor-to-date) ! (error "Cursor is not on a date!")) ! nil t)) ! arg))) (defun insert-hebrew-diary-entry (arg) "Insert a diary entry. diff -cprP --exclude=*.elc emacs-19.15/lisp/diary.el emacs-19.16/lisp/diary.el *** emacs-19.15/lisp/diary.el Thu Mar 18 16:54:57 1993 --- emacs-19.16/lisp/diary.el Sun Jun 20 13:17:29 1993 *************** *** 1046,1053 **** (calendar-gregorian-from-absolute date))))))))) (defun list-sexp-diary-entries (date) ! "Add any sexp entries for DATE from the diary-file to diary-entries-list ! and make them visible in the diary file. Returns t if any entries were found. Sexp diary entries must be prefaced by a sexp-diary-entry-symbol (normally `%%'). The form of a sexp diary entry is --- 1046,1054 ---- (calendar-gregorian-from-absolute date))))))))) (defun list-sexp-diary-entries (date) ! "Add sexp entries for DATE from the diary-file to diary-entries-list. ! Also, Make them visible in the diary file. Returns t if any entries were ! found. Sexp diary entries must be prefaced by a sexp-diary-entry-symbol (normally `%%'). The form of a sexp diary entry is *************** best if they are nonmarking." *** 1222,1242 **** (defun diary-sexp-entry (sexp entry date) "Process a SEXP diary ENTRY for DATE." ! (let ((result (condition-case nil ! (eval (car (read-from-string sexp))) ! (error ! (beep) ! (message "Bad sexp at line %d in %s: %s" ! (save-excursion ! (save-restriction ! (narrow-to-region 1 (point)) ! (goto-char (point-min)) ! (let ((lines 1)) ! (while (re-search-forward "\n\\|\^M" nil t) ! (setq lines (1+ lines))) ! lines))) ! diary-file sexp) ! (sleep-for 2))))) (if (stringp result) result (if result --- 1223,1246 ---- (defun diary-sexp-entry (sexp entry date) "Process a SEXP diary ENTRY for DATE." ! (let ((result (if calendar-debug-sexp ! (let ((stack-trace-on-error t)) ! (eval (car (read-from-string sexp)))) ! (condition-case nil ! (eval (car (read-from-string sexp))) ! (error ! (beep) ! (message "Bad sexp at line %d in %s: %s" ! (save-excursion ! (save-restriction ! (narrow-to-region 1 (point)) ! (goto-char (point-min)) ! (let ((lines 1)) ! (while (re-search-forward "\n\\|\^M" nil t) ! (setq lines (1+ lines))) ! lines))) ! diary-file sexp) ! (sleep-for 2)))))) (if (stringp result) result (if result *************** Do nothing if DATE or STRING is nil." *** 1545,1585 **** [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 50] ! "The structure of the parashiot in a Hebrew year that starts on Saturday, ! is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover ! start on Sunday.") (defconst hebrew-calendar-year-Saturday-complete-Tuesday [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Saturday, ! is `complete' (Heshvan and Kislev each have 30 days), and has Passover ! start on Tuesday.") (defconst hebrew-calendar-year-Monday-incomplete-Tuesday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Monday, ! is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover ! start on Tuesday.") (defconst hebrew-calendar-year-Monday-complete-Thursday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Monday, ! is `complete' (Heshvan and Kislev each have 30 days), and has Passover ! start on Thursday.") (defconst hebrew-calendar-year-Tuesday-regular-Thursday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Tuesday, ! is `regular' (Heshvan has 29 days and Kislev has 30 days), and has Passover ! start on Thursday.") (defconst hebrew-calendar-year-Thursday-regular-Saturday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 --- 1549,1589 ---- [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 50] ! "The structure of the parashiot. ! Hebrew year starts on Saturday, is `incomplete' (Heshvan and Kislev each have ! 29 days), and has Passover start on Sunday.") (defconst hebrew-calendar-year-Saturday-complete-Tuesday [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each ! have 30 days), and has Passover start on Tuesday.") (defconst hebrew-calendar-year-Monday-incomplete-Tuesday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each ! have 29 days), and has Passover start on Tuesday.") (defconst hebrew-calendar-year-Monday-complete-Thursday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have ! 30 days), and has Passover start on Thursday.") (defconst hebrew-calendar-year-Tuesday-regular-Thursday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and ! Kislev has 30 days), and has Passover start on Thursday.") (defconst hebrew-calendar-year-Thursday-regular-Saturday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 *************** start on Thursday.") *** 1586,1602 **** 24 nil (nil . 25) (25 . [26 27]) ([26 27] . [28 29]) ([28 29] . 30) (30 . 31) ([31 32] . 32) 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 50] ! "The structure of the parashiot in a Hebrew year that starts on Thursday, ! is `regular' (Heshvan has 29 days and Kislev has 30 days), and has Passover ! start on Saturday.") (defconst hebrew-calendar-year-Thursday-complete-Sunday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 50] ! "The structure of the parashiot in a Hebrew year that starts on Thursday, ! is `complete' (Heshvan and Kislev each have 30 days), and has Passover ! start on Sunday.") ;; The seven leap year types (keviot) --- 1590,1606 ---- 24 nil (nil . 25) (25 . [26 27]) ([26 27] . [28 29]) ([28 29] . 30) (30 . 31) ([31 32] . 32) 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 50] ! "The structure of the parashiot. ! Hebrew year that starts on Thursday, is `regular' (Heshvan has 29 days and ! Kislev has 30 days), and has Passover start on Saturday.") (defconst hebrew-calendar-year-Thursday-complete-Sunday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 50] ! "The structure of the parashiot. ! Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev each ! have 30 days), and has Passover start on Sunday.") ;; The seven leap year types (keviot) *************** start on Sunday.") *** 1604,1628 **** [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Saturday, ! is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover ! start on Tuesday.") (defconst hebrew-calendar-year-Saturday-complete-Thursday [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Saturday, ! is `complete' (Heshvan and Kislev each have 30 days), and has Passover ! start on Thursday.") (defconst hebrew-calendar-year-Monday-incomplete-Thursday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Monday, ! is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover ! start on Thursday.") (defconst hebrew-calendar-year-Monday-complete-Saturday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 --- 1608,1632 ---- [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev each ! have 29 days), and has Passover start on Tuesday.") (defconst hebrew-calendar-year-Saturday-complete-Thursday [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each ! have 30 days), and has Passover start on Thursday.") (defconst hebrew-calendar-year-Monday-incomplete-Thursday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each ! have 29 days), and has Passover start on Thursday.") (defconst hebrew-calendar-year-Monday-complete-Saturday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 *************** start on Thursday.") *** 1629,1637 **** 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50] ! "The structure of the parashiot in a Hebrew year that starts on Monday, ! is `complete' (Heshvan and Kislev each have 30 days), and has Passover ! start on Saturday.") (defconst hebrew-calendar-year-Tuesday-regular-Saturday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 --- 1633,1641 ---- 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50] ! "The structure of the parashiot. ! Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have ! 30 days), and has Passover start on Saturday.") (defconst hebrew-calendar-year-Tuesday-regular-Saturday [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 *************** start on Saturday.") *** 1638,1662 **** 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50] ! "The structure of the parashiot in a Hebrew year that starts on Tuesday, ! is `regular' (Heshvan has 29 days and Kislev has 30 days), and has Passover ! start on Saturday.") (defconst hebrew-calendar-year-Thursday-incomplete-Sunday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50] ! "The structure of the parashiot in a Hebrew year that starts on Thursday, ! is `incomplete' (Heshvan and Kislev both have 29 days), and has Passover ! start on Sunday.") (defconst hebrew-calendar-year-Thursday-complete-Tuesday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot in a Hebrew year that starts on Thursday, ! is `complete' (Heshvan and Kislev both have 30 days), and has Passover ! start on Tuesday.") (defun hebrew-calendar-parasha-name (p) "Name(s) corresponding to parasha P." --- 1642,1666 ---- 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50] ! "The structure of the parashiot. ! Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and ! Kislev has 30 days), and has Passover start on Saturday.") (defconst hebrew-calendar-year-Thursday-incomplete-Sunday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50] ! "The structure of the parashiot. ! Hebrew year that starts on Thursday, is `incomplete' (Heshvan and Kislev both ! have 29 days), and has Passover start on Sunday.") (defconst hebrew-calendar-year-Thursday-complete-Tuesday [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 [50 51]] ! "The structure of the parashiot. ! Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev both ! have 30 days), and has Passover start on Tuesday.") (defun hebrew-calendar-parasha-name (p) "Name(s) corresponding to parasha P." diff -cprP --exclude=*.elc emacs-19.15/lisp/diff.el emacs-19.16/lisp/diff.el *** emacs-19.15/lisp/diff.el Wed Jun 2 13:09:00 1993 --- emacs-19.16/lisp/diff.el Mon Jun 21 23:47:55 1993 *************** *** 113,119 **** (match-beginning subexpr) (match-end subexpr))))) (save-excursion ! (set-buffer (find-file-noselect file)) (save-excursion (goto-line line) (point-marker))))) --- 113,120 ---- (match-beginning subexpr) (match-end subexpr))))) (save-excursion ! (save-match-data ! (set-buffer (find-file-noselect file))) (save-excursion (goto-line line) (point-marker))))) diff -cprP --exclude=*.elc emacs-19.15/lisp/dired-aux.el emacs-19.16/lisp/dired-aux.el *** emacs-19.15/lisp/dired-aux.el Wed Jun 9 07:21:53 1993 --- emacs-19.16/lisp/dired-aux.el Thu Jul 1 20:14:30 1993 *************** *** 45,52 **** FILE defaults to the file at the mark. The prompted-for file is the first file given to `diff'." (interactive ! (let ((default (if (mark) ! (save-excursion (goto-char (mark)) (dired-get-filename t t))))) (list (read-file-name (format "Diff %s with: %s" (dired-get-filename t) --- 45,52 ---- FILE defaults to the file at the mark. The prompted-for file is the first file given to `diff'." (interactive ! (let ((default (if (mark t) ! (save-excursion (goto-char (mark t)) (dired-get-filename t t))))) (list (read-file-name (format "Diff %s with: %s" (dired-get-filename t) diff -cprP --exclude=*.elc emacs-19.15/lisp/faces.el emacs-19.16/lisp/faces.el *** emacs-19.15/lisp/faces.el Thu Jun 17 18:54:40 1993 --- emacs-19.16/lisp/faces.el Sat Jul 3 21:41:25 1993 *************** *** 126,132 **** ;;;; Associating face names (symbols) with their face vectors. ! (defvar global-face-data nil "do not use this") (defun face-list () "Returns a list of all defined face names." --- 126,135 ---- ;;;; Associating face names (symbols) with their face vectors. ! (defvar global-face-data nil ! "Internal data for face support functions. Not for external use. ! This is an alist associating face names with the default values for ! their parameters. Newly created frames get their data from here.") (defun face-list () "Returns a list of all defined face names." *************** If NOERROR is non-nil, return nil on fai *** 495,501 **** (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-bold face (car frames)) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font (or (face-font face frame) --- 498,504 ---- (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-bold face (car frames) noerror) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font (or (face-font face frame) *************** If NOERROR is non-nil, return nil on fai *** 519,525 **** (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-italic face (car frames)) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font (or (face-font face frame) --- 522,528 ---- (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-italic face (car frames) noerror) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font (or (face-font face frame) *************** If NOERROR is non-nil, return nil on fai *** 543,549 **** (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-bold-italic face (car frames)) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font (or (face-font face frame) --- 546,552 ---- (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-bold-italic face (car frames) noerror) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font (or (face-font face frame) *************** If NOERROR is non-nil, return nil on fai *** 583,589 **** (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-unbold face (car frames)) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font1 (or (face-font face frame) --- 586,592 ---- (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-unbold face (car frames) noerror) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font1 (or (face-font face frame) *************** If NOERROR is non-nil, return nil on fai *** 605,611 **** (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-unitalic face (car frames)) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font1 (or (face-font face frame) --- 608,614 ---- (if (null frame) (let ((frames (frame-list))) (while frames ! (make-face-unitalic face (car frames) noerror) (setq frames (cdr frames)))) (setq face (internal-get-face face frame)) (setq font1 (or (face-font face frame) *************** If NOERROR is non-nil, return nil on fai *** 618,626 **** (and (not noerror) (error "No unitalic version of %S" font1))))) ! ;;; Make the builtin faces; the C code knows these as faces 0, 1, and 2, ! ;;; respectively, so they must be the first three faces made. ! (defun face-initialize () (make-face 'default) (make-face 'modeline) --- 621,629 ---- (and (not noerror) (error "No unitalic version of %S" font1))))) ! ;;; Make the default and modeline faces; the C code knows these as ! ;;; faces 0 and 1, respectively, so they must be the first two faces ! ;;; made. (defun face-initialize () (make-face 'default) (make-face 'modeline) *************** If NOERROR is non-nil, return nil on fai *** 634,639 **** --- 637,643 ---- (make-face 'bold-italic) (make-face 'region) (make-face 'secondary-selection) + (make-face 'underline) (setq region-face (face-id 'region)) *************** If NOERROR is non-nil, return nil on fai *** 697,727 **** ) (or (face-differs-from-default-p 'highlight frame) ! (condition-case () ! (condition-case () ! (set-face-background 'highlight "darkseagreen2" frame) ! (error (set-face-background 'highlight "green" frame))) ;;; (set-face-background-pixmap 'highlight "gray1" frame) ! (error (invert-face 'highlight frame)))) (or (face-differs-from-default-p 'region frame) ! (condition-case () ! (set-face-background 'region "gray" frame) ! (error (invert-face 'region frame)))) (or (face-differs-from-default-p 'modeline frame) (invert-face 'modeline frame)) (or (face-differs-from-default-p 'secondary-selection frame) ! (condition-case () ! (condition-case () ! ;; some older X servers don't have this one. ! (set-face-background 'secondary-selection "paleturquoise" ! frame) ! (error ! (set-face-background 'secondary-selection "green" frame))) ;;; (set-face-background-pixmap 'secondary-selection "gray1" frame) ! (error (invert-face 'secondary-selection frame)))) ) (defun internal-x-complain-about-font (face frame) --- 701,742 ---- ) (or (face-differs-from-default-p 'highlight frame) ! (if (or (not (x-display-color-p)) ! (= (x-display-planes) 1)) ! (invert-face 'highlight frame) ! (condition-case () ! (condition-case () ! (set-face-background 'highlight "darkseagreen2" frame) ! (error (set-face-background 'highlight "green" frame))) ;;; (set-face-background-pixmap 'highlight "gray1" frame) ! (error (invert-face 'highlight frame))))) (or (face-differs-from-default-p 'region frame) ! (if (= (x-display-planes) 1) ! (invert-face 'region frame) ! (condition-case () ! (set-face-background 'region "gray" frame) ! (error (invert-face 'region frame))))) (or (face-differs-from-default-p 'modeline frame) (invert-face 'modeline frame)) + (or (face-differs-from-default-p 'underline frame) + (set-face-underline-p 'underline t frame)) + (or (face-differs-from-default-p 'secondary-selection frame) ! (if (or (not (x-display-color-p)) ! (= (x-display-planes) 1)) ! (invert-face 'secondary-selection frame) ! (condition-case () ! (condition-case () ! ;; some older X servers don't have this one. ! (set-face-background 'secondary-selection "paleturquoise" ! frame) ! (error ! (set-face-background 'secondary-selection "green" frame))) ;;; (set-face-background-pixmap 'secondary-selection "gray1" frame) ! (error (invert-face 'secondary-selection frame))))) ) (defun internal-x-complain-about-font (face frame) diff -cprP --exclude=*.elc emacs-19.15/lisp/files.el emacs-19.16/lisp/files.el *** emacs-19.15/lisp/files.el Sat Jun 19 15:05:52 1993 --- emacs-19.16/lisp/files.el Sat Jul 3 15:43:19 1993 *************** *** 1093,1109 **** (progn (make-local-variable 'backup-inhibited) (setq backup-inhibited t))) ! ;; If auto-save was not already on, turn it on if appropriate. ! (if (not buffer-auto-save-file-name) ! (and buffer-file-name auto-save-default ! (auto-save-mode t)) ! ;; If auto save is on, start using a new name. ! ;; We deliberately don't rename or delete the old auto save ! ;; for the old visited file name. This is because perhaps ! ;; the user wants to save the new state and then compare with the ! ;; previous state from the auto save file. ! (setq buffer-auto-save-file-name ! (make-auto-save-file-name))) (if buffer-file-name (set-buffer-modified-p t))) --- 1093,1114 ---- (progn (make-local-variable 'backup-inhibited) (setq backup-inhibited t))) ! (let ((oauto buffer-auto-save-file-name)) ! ;; If auto-save was not already on, turn it on if appropriate. ! (if (not buffer-auto-save-file-name) ! (and buffer-file-name auto-save-default ! (auto-save-mode t)) ! ;; If auto save is on, start using a new name. ! ;; We deliberately don't rename or delete the old auto save ! ;; for the old visited file name. This is because perhaps ! ;; the user wants to save the new state and then compare with the ! ;; previous state from the auto save file. ! (setq buffer-auto-save-file-name ! (make-auto-save-file-name))) ! ;; Rename the old auto save file if any. ! (and oauto buffer-auto-save-file-name ! (file-exists-p oauto) ! (rename-file oauto buffer-auto-save-file-name t))) (if buffer-file-name (set-buffer-modified-p t))) diff -cprP --exclude=*.elc emacs-19.15/lisp/forms.el emacs-19.16/lisp/forms.el *** emacs-19.15/lisp/forms.el Fri Jun 18 20:15:32 1993 --- emacs-19.16/lisp/forms.el Sun Jul 4 13:54:46 1993 *************** *** 1,7 **** ;;; forms.el -- Forms mode: edit a file as a form to fill in. ;;; Copyright (C) 1991, 1993 Free Software Foundation, Inc. ! ;;; Author: Johan Vromans ;; This file is part of GNU Emacs. --- 1,9 ---- ;;; forms.el -- Forms mode: edit a file as a form to fill in. ;;; Copyright (C) 1991, 1993 Free Software Foundation, Inc. ! ;; Author: Johan Vromans ! ;; Version: 1.2.14 ! ;; Keywords: non-text ;; This file is part of GNU Emacs. *************** *** 41,55 **** ;;; separated by a newline, the fields are separated by a user-defined ;;; field separater (default: TAB). ;;; When shown, a record is transferred to an emacs buffer and ! ;;; presented using a user-defined form. One record is shown at a ;;; time. ;;; ! ;;; Forms mode is a composite mode. It involves two files, and two ;;; buffers. ;;; The first file, called the control file, defines the name of the ! ;;; data file and the forms format. This file buffer will be used to ;;; present the forms. ! ;;; The second file holds the actual data. The buffer of this file ;;; will be buried, for it is never accessed directly. ;;; ;;; Forms mode is invoked using "forms-find-file control-file". --- 43,57 ---- ;;; separated by a newline, the fields are separated by a user-defined ;;; field separater (default: TAB). ;;; When shown, a record is transferred to an emacs buffer and ! ;;; presented using a user-defined form. One record is shown at a ;;; time. ;;; ! ;;; Forms mode is a composite mode. It involves two files, and two ;;; buffers. ;;; The first file, called the control file, defines the name of the ! ;;; data file and the forms format. This file buffer will be used to ;;; present the forms. ! ;;; The second file holds the actual data. The buffer of this file ;;; will be buried, for it is never accessed directly. ;;; ;;; Forms mode is invoked using "forms-find-file control-file". *************** *** 76,87 **** ;;; ;;; - a string, e.g. "hello" (which is inserted \"as is\"), ;;; ! ;;; - an integer, denoting a field number. The contents of the field ;;; are inserted at this point. ;;; The first field has number one. ;;; ! ;;; - a function call, e.g. (insert "text"). This function call is ! ;;; dynamically evaluated and should return a string. It should *NOT* ;;; have side-effects on the forms being constructed. ;;; The current fields are available to the function in the variable ;;; forms-fields, they should *NOT* be modified. --- 78,89 ---- ;;; ;;; - a string, e.g. "hello" (which is inserted \"as is\"), ;;; ! ;;; - an integer, denoting a field number. The contents of the field ;;; are inserted at this point. ;;; The first field has number one. ;;; ! ;;; - a function call, e.g. (insert "text"). This function call is ! ;;; dynamically evaluated and should return a string. It should *NOT* ;;; have side-effects on the forms being constructed. ;;; The current fields are available to the function in the variable ;;; forms-fields, they should *NOT* be modified. *************** *** 92,98 **** ;;; ;;; forms-field-sep [string, default TAB] ;;; The field separator used to separate the ! ;;; fields in the data file. It may be a string. ;;; ;;; forms-read-only [bool, default nil] ;;; 't' means that the data file is visited read-only. --- 94,100 ---- ;;; ;;; forms-field-sep [string, default TAB] ;;; The field separator used to separate the ! ;;; fields in the data file. It may be a string. ;;; ;;; forms-read-only [bool, default nil] ;;; 't' means that the data file is visited read-only. *************** *** 104,112 **** ;;; contain fields which span multiple lines in ;;; the form. ;;; This variable denoted the separator character ! ;;; to be used for this purpose. Upon display, all ;;; occurrencies of this character are translated ! ;;; to newlines. Upon storage they are translated ;;; back to the separator. ;;; ;;; forms-forms-scroll [bool, default t] --- 106,114 ---- ;;; contain fields which span multiple lines in ;;; the form. ;;; This variable denoted the separator character ! ;;; to be used for this purpose. Upon display, all ;;; occurrencies of this character are translated ! ;;; to newlines. Upon storage they are translated ;;; back to the separator. ;;; ;;; forms-forms-scroll [bool, default t] *************** *** 121,127 **** ;;; forms-new-record-filter [symbol, no default] ;;; If defined: this should be the name of a ;;; function that is called when a new ! ;;; record is created. It can be used to fill in ;;; the new record with default fields, for example. ;;; Instead of the name of the function, it may ;;; be the function itself. --- 123,129 ---- ;;; forms-new-record-filter [symbol, no default] ;;; If defined: this should be the name of a ;;; function that is called when a new ! ;;; record is created. It can be used to fill in ;;; the new record with default fields, for example. ;;; Instead of the name of the function, it may ;;; be the function itself. *************** *** 129,136 **** ;;; forms-modified-record-filter [symbol, no default] ;;; If defined: this should be the name of a ;;; function that is called when a record has ! ;;; been modified. It is called after the fields ! ;;; are parsed. It can be used to register ;;; modification dates, for example. ;;; Instead of the name of the function, it may ;;; be the function itself. --- 131,138 ---- ;;; forms-modified-record-filter [symbol, no default] ;;; If defined: this should be the name of a ;;; function that is called when a record has ! ;;; been modified. It is called after the fields ! ;;; are parsed. It can be used to register ;;; modification dates, for example. ;;; Instead of the name of the function, it may ;;; be the function itself. *************** *** 149,156 **** ;;; the records. ;;; ;;; When a form is changed the record is updated as soon as this form ! ;;; is left. The contents of the form are parsed using forms-format-list, ! ;;; and the fields which are deduced from the form are modified. So, ;;; fields not shown on the forms retain their origional values. ;;; The newly formed record and replaces the contents of the ;;; old record in forms--file-buffer. --- 151,158 ---- ;;; the records. ;;; ;;; When a form is changed the record is updated as soon as this form ! ;;; is left. The contents of the form are parsed using forms-format-list, ! ;;; and the fields which are deduced from the form are modified. So, ;;; fields not shown on the forms retain their origional values. ;;; The newly formed record and replaces the contents of the ;;; old record in forms--file-buffer. *************** *** 158,164 **** ;;; the records. ;;; ;;; Two exit functions exist: forms-exit (which saves) and forms-exit-no-save ! ;;; (which doesn't). However, if forms-exit-no-save is executed and the file ;;; buffer has been modified, emacs will ask questions. ;;; ;;; Other functions are: --- 160,166 ---- ;;; the records. ;;; ;;; Two exit functions exist: forms-exit (which saves) and forms-exit-no-save ! ;;; (which doesn't). However, if forms-exit-no-save is executed and the file ;;; buffer has been modified, emacs will ask questions. ;;; ;;; Other functions are: *************** *** 204,210 **** ;;; The bindings of standard functions scroll-up, scroll-down, ;;; beginning-of-buffer and end-of-buffer are locally replaced with ;;; forms mode functions next/prev record and first/last ! ;;; record. Buffer-local variables forms-forms-scroll and ;;; forms-forms-jump (default: t) may be set to nil to inhibit ;;; rebinding. ;;; --- 206,212 ---- ;;; The bindings of standard functions scroll-up, scroll-down, ;;; beginning-of-buffer and end-of-buffer are locally replaced with ;;; forms mode functions next/prev record and first/last ! ;;; record. Buffer-local variables forms-forms-scroll and ;;; forms-forms-jump (default: t) may be set to nil to inhibit ;;; rebinding. ;;; *************** *** 222,228 **** (provide 'forms) ;;; official (provide 'forms-mode) ;;; for compatibility ! (defconst forms-version "1.2.11" "Version of forms-mode implementation.") (defvar forms-mode-hooks nil --- 224,230 ---- (provide 'forms) ;;; official (provide 'forms-mode) ;;; for compatibility ! (defconst forms-version "1.2.14" "Version of forms-mode implementation.") (defvar forms-mode-hooks nil *************** *** 238,244 **** (defvar forms-number-of-fields nil "Number of fields per record.") - ;;; Optional variables with default values --- 240,245 ---- *************** *** 249,255 **** "Read-only mode (defaults to the write access on the data file).") (defvar forms-multi-line "\C-k" ! "Character to separate multi-line fields (default C-k)") (defvar forms-forms-scroll t "*Non-nil means replace scroll-up/down commands in Forms mode. --- 250,256 ---- "Read-only mode (defaults to the write access on the data file).") (defvar forms-multi-line "\C-k" ! "Character to separate multi-line fields (default C-k).") (defvar forms-forms-scroll t "*Non-nil means replace scroll-up/down commands in Forms mode. *************** The replacement commands performs forms- *** 305,323 **** "Internal - holds dynamic text to insert between fields.") (defvar forms-fields nil ! "List with fields of the current forms. First field has number 1.") ! (defvar forms-new-record-filter "The name of a function that is called when a new record is created.") ! (defvar forms-modified-record-filter "The name of a function that is called when a record has been modified.") ;;; forms-mode ;;; ! ;;; This is not a simple major mode, as usual. Therefore, forms-mode ;;; takes an optional argument 'primary' which is used for the initial ! ;;; set-up. Normal use would leave 'primary' to nil. ;;; ;;; A global buffer-local variable 'forms--mode-setup' has the same effect ;;; but makes it possible to auto-invoke forms-mode using find-file. --- 306,324 ---- "Internal - holds dynamic text to insert between fields.") (defvar forms-fields nil ! "List with fields of the current forms. First field has number 1.") ! (defvar forms-new-record-filter nil "The name of a function that is called when a new record is created.") ! (defvar forms-modified-record-filter nil "The name of a function that is called when a record has been modified.") ;;; forms-mode ;;; ! ;;; This is not a simple major mode, as usual. Therefore, forms-mode ;;; takes an optional argument 'primary' which is used for the initial ! ;;; set-up. Normal use would leave 'primary' to nil. ;;; ;;; A global buffer-local variable 'forms--mode-setup' has the same effect ;;; but makes it possible to auto-invoke forms-mode using find-file. *************** The replacement commands performs forms- *** 325,336 **** ;;; Note: although it seems logical to have (make-local-variable) executed ;;; where the variable is first needed, I deliberately placed all calls ;;; in the forms-mode function. ! (defun forms-mode (&optional primary) "Major mode to visit files in a field-structured manner using a form. ! Commands (prefix with C-c if not in read-only mode): ! \\{forms-mode-map}" (interactive) ; no - 'primary' is not prefix arg --- 326,338 ---- ;;; Note: although it seems logical to have (make-local-variable) executed ;;; where the variable is first needed, I deliberately placed all calls ;;; in the forms-mode function. ! ! ;;;###autoload (defun forms-mode (&optional primary) "Major mode to visit files in a field-structured manner using a form. ! Commands (prefix with C-c if not in read-only mode): ! \\{forms-mode-map}" (interactive) ; no - 'primary' is not prefix arg *************** The replacement commands performs forms- *** 417,423 **** ;; and clean it (erase-buffer))) ! ;; Make more local variables (make-local-variable 'forms--file-buffer) (make-local-variable 'forms--total-records) (make-local-variable 'forms--current-record) --- 419,425 ---- ;; and clean it (erase-buffer))) ! ;; Make more local variables. (make-local-variable 'forms--file-buffer) (make-local-variable 'forms--total-records) (make-local-variable 'forms--current-record) *************** The replacement commands performs forms- *** 475,486 **** ;; initialization done (setq forms--mode-setup t)) - ;;; forms-process-format-list ;;; ;;; Validates forms-format-list. - ;;; ;;; Sets forms--number-of-markers and forms--markers. (defun forms--process-format-list () --- 477,486 ---- *************** The replacement commands performs forms- *** 560,567 **** 'forms--number-of-markers) (setq forms--markers (make-vector forms--number-of-markers nil))) - - ;;; Build the format routine from forms-format-list. ;;; --- 560,565 ---- *************** The replacement commands performs forms- *** 589,600 **** ;;; (defun forms--make-format () ! "Generate format function for forms" (setq forms--format (forms--format-maker forms-format-list)) (forms--debug 'forms--format)) (defun forms--format-maker (the-format-list) ! "Returns the parser function for forms" (let ((the-marker 0)) (` (lambda (arg) (setq forms--dynamic-text nil) --- 587,598 ---- ;;; (defun forms--make-format () ! "Generate format function for forms." (setq forms--format (forms--format-maker forms-format-list)) (forms--debug 'forms--format)) (defun forms--format-maker (the-format-list) ! "Returns the parser function for forms." (let ((the-marker 0)) (` (lambda (arg) (setq forms--dynamic-text nil) *************** The replacement commands performs forms- *** 619,625 **** ))))) (defun forms--concat-adjacent (the-list) ! "Concatenate adjacent strings in the-list and return the resulting list" (if (consp the-list) (let ((the-rest (forms--concat-adjacent (cdr the-list)))) (if (and (stringp (car the-list)) (stringp (car the-rest))) --- 617,623 ---- ))))) (defun forms--concat-adjacent (the-list) ! "Concatenate adjacent strings in the-list and return the resulting list." (if (consp the-list) (let ((the-rest (forms--concat-adjacent (cdr the-list)))) (if (and (stringp (car the-list)) (stringp (car the-rest))) *************** The replacement commands performs forms- *** 663,674 **** ;;; (defun forms--make-parser () ! "Generate parser function for forms" (setq forms--parser (forms--parser-maker forms-format-list)) (forms--debug 'forms--parser)) (defun forms--parser-maker (the-format-list) ! "Returns the parser function for forms" (let ((the-field nil) (seen-text nil) the--format-list) --- 661,672 ---- ;;; (defun forms--make-parser () ! "Generate parser function for forms." (setq forms--parser (forms--parser-maker forms-format-list)) (forms--debug 'forms--parser)) (defun forms--parser-maker (the-format-list) ! "Returns the parser function for forms." (let ((the-field nil) (seen-text nil) the--format-list) *************** The replacement commands performs forms- *** 726,732 **** (setq the-field nil))) )) - (defun forms--set-minor-mode () (setq minor-mode-alist (if forms-read-only --- 724,729 ---- *************** The replacement commands performs forms- *** 743,749 **** (define-key (current-local-map) "\t" 'forms-next-field))) (defun forms--mode-commands (map) ! "Fill map with all commands." (define-key map "\t" 'forms-next-field) (define-key map " " 'forms-next-record) (define-key map "d" 'forms-delete-record) --- 740,746 ---- (define-key (current-local-map) "\t" 'forms-next-field))) (defun forms--mode-commands (map) ! "Fill map with all Forms mode commands." (define-key map "\t" 'forms-next-field) (define-key map " " 'forms-next-record) (define-key map "d" 'forms-delete-record) *************** The replacement commands performs forms- *** 768,780 **** ) ;;; Changed functions - ;;; - ;;; Emacs (as of 18.55) lacks the functionality of buffer-local - ;;; funtions. Therefore we save the original meaning of some handy - ;;; functions, and replace them with a wrapper. (defun forms--change-commands () ! "Localize some commands." ;; ;; scroll-down -> forms-prev-record ;; scroll-up -> forms-next-record --- 765,773 ---- ) ;;; Changed functions (defun forms--change-commands () ! "Localize some commands for Forms mode." ;; ;; scroll-down -> forms-prev-record ;; scroll-up -> forms-next-record *************** The replacement commands performs forms- *** 809,815 **** t)))) (defun forms--help () ! "Initial help." ;; We should use ;;(message (substitute-command-keys (concat ;;"\\[forms-next-record]:next" --- 802,808 ---- t)))) (defun forms--help () ! "Initial help for Forms mode." ;; We should use ;;(message (substitute-command-keys (concat ;;"\\[forms-next-record]:next" *************** The replacement commands performs forms- *** 824,830 **** (message "C-c n:next C-c p:prev C-c <:first C-c >:last C-c ?:help C-c q:exit"))) (defun forms--trans (subj arg rep) ! "Translate in SUBJ all chars ARG into char REP. ARG and REP should be single-char strings." (let ((i 0) (x (length subj)) --- 817,823 ---- (message "C-c n:next C-c p:prev C-c <:first C-c >:last C-c ?:help C-c q:exit"))) (defun forms--trans (subj arg rep) ! "Translate in SUBJ all chars ARG into char REP. ARG and REP should be single-char strings." (let ((i 0) (x (length subj)) *************** The replacement commands performs forms- *** 868,875 **** (goto-char here)))) (defun forms--show-record (the-record) ! "Format THE-RECORD according to forms-format-list, ! and display it in the current buffer." ;; split the-record (let (the-result --- 861,867 ---- (goto-char here)))) (defun forms--show-record (the-record) ! "Format THE-RECORD and display it in the current buffer." ;; split the-record (let (the-result *************** The replacement commands performs forms- *** 920,926 **** ;; The contents of the form are parsed, and a new list of strings ;; is constructed. ;; A vector with the strings from the original record is ! ;; constructed, which is updated with the new contents. Therefore ;; fields which were not in the form are not modified. ;; Finally, the vector is transformed into a list for further processing. --- 912,918 ---- ;; The contents of the form are parsed, and a new list of strings ;; is constructed. ;; A vector with the strings from the original record is ! ;; constructed, which is updated with the new contents. Therefore ;; fields which were not in the form are not modified. ;; Finally, the vector is transformed into a list for further processing. *************** The replacement commands performs forms- *** 944,951 **** (append the-recordv nil)))) (defun forms--update () ! "Update current record with contents of form. As a side effect: sets ! forms--the-record-list ." (if forms-read-only (progn (message "Read-only buffer!") --- 936,944 ---- (append the-recordv nil)))) (defun forms--update () ! "Update current record with contents of form. ! As a side effect: sets forms--the-record-list ." ! (if forms-read-only (progn (message "Read-only buffer!") *************** forms--the-record-list ." *** 969,976 **** (save-excursion (set-buffer forms--file-buffer) ! ;; Insert something before kill-line is called. See kill-line ! ;; doc. Bugfix provided by Ignatios Souvatzis. (insert "*") (beginning-of-line) (kill-line nil) --- 962,969 ---- (save-excursion (set-buffer forms--file-buffer) ! ;; Insert something before kill-line is called. See kill-line ! ;; doc. Bugfix provided by Ignatios Souvatzis. (insert "*") (beginning-of-line) (kill-line nil) *************** forms--the-record-list ." *** 984,1000 **** (forms--update) (set-buffer-modified-p nil) (goto-char here)))) - ;;; Start and exit (defun forms-find-file (fn) ! "Visit file FN in forms mode" (interactive "fForms file: ") (find-file-read-only fn) (or forms--mode-setup (forms-mode t))) (defun forms-find-file-other-window (fn) ! "Visit file FN in form mode in other window" (interactive "fFbrowse file in other window: ") (find-file-other-window fn) (eval-current-buffer) --- 977,995 ---- (forms--update) (set-buffer-modified-p nil) (goto-char here)))) ;;; Start and exit + + ;;;###autoload (defun forms-find-file (fn) ! "Visit a file in Forms mode." (interactive "fForms file: ") (find-file-read-only fn) (or forms--mode-setup (forms-mode t))) + ;;;###autoload (defun forms-find-file-other-window (fn) ! "Visit a file in Forms mode in other window." (interactive "fFbrowse file in other window: ") (find-file-other-window fn) (eval-current-buffer) *************** forms--the-record-list ." *** 1001,1015 **** (or forms--mode-setup (forms-mode t))) (defun forms-exit (query) ! "Normal exit. Modified buffers are saved." (interactive "P") (forms--exit query t)) (defun forms-exit-no-save (query) ! "Exit without saving buffers." (interactive "P") (forms--exit query nil)) - ;;; Navigating commands --- 996,1009 ---- (or forms--mode-setup (forms-mode t))) (defun forms-exit (query) ! "Normal exit from Forms mode. Modified buffers are saved." (interactive "P") (forms--exit query t)) (defun forms-exit-no-save (query) ! "Exit from Forms mode without saving buffers." (interactive "P") (forms--exit query nil)) ;;; Navigating commands *************** forms--the-record-list ." *** 1076,1083 **** (forms-jump-record 1)) (defun forms-last-record () ! "Jump to last record. As a side effect: re-calculates the number ! of records in the data file." (interactive) (let ((numrec --- 1070,1077 ---- (forms-jump-record 1)) (defun forms-last-record () ! "Jump to last record. ! As a side effect: re-calculates the number of records in the data file." (interactive) (let ((numrec *************** forms--the-record-list ." *** 1090,1098 **** (setq forms--total-records numrec) (message "Number of records reset to %d." forms--total-records))) (forms-jump-record forms--total-records)) - ;;; Other commands (defun forms-view-mode () "Visit buffer read-only." (interactive) --- 1084,1092 ---- (setq forms--total-records numrec) (message "Number of records reset to %d." forms--total-records))) (forms-jump-record forms--total-records)) ;;; Other commands + (defun forms-view-mode () "Visit buffer read-only." (interactive) *************** forms--the-record-list ." *** 1127,1137 **** ;; (setq forms-new-record-filter 'my-new-record-filter) (defun forms-insert-record (arg) ! "Create a new record before the current one. With ARG: store the ! record after the current one. ! If a function forms-new-record-filter is defined, or forms-new-record-filter ! contains the name of a function, it is called to ! fill (some of) the fields with default values." ; The above doc is not true, but for documentary purposes only (interactive "P") --- 1121,1131 ---- ;; (setq forms-new-record-filter 'my-new-record-filter) (defun forms-insert-record (arg) ! "Create a new record before the current one. ! With ARG: store the record after the current one. ! If a function forms-new-record-filter is defined, or ! forms-new-record-filter contains the name of a function, ! it is called to fill (some of) the fields with default values." ; The above doc is not true, but for documentary purposes only (interactive "P") *************** forms--the-record-list ." *** 1167,1173 **** (forms-jump-record forms--current-record)) (defun forms-delete-record (arg) ! "Deletes a record. With ARG: don't ask." (interactive "P") (forms--checkmod) (if (or arg --- 1161,1167 ---- (forms-jump-record forms--current-record)) (defun forms-delete-record (arg) ! "Deletes a record. With a prefix argument: don't ask." (interactive "P") (forms--checkmod) (if (or arg *************** forms--the-record-list ." *** 1254,1261 **** ;;; Special service ;;; (defun forms-enumerate (the-fields) ! "Take a quoted list of symbols, and set their values to the numbers ! 1, 2 and so on. Returns the higest number. Usage: (setq forms-number-of-fields (forms-enumerate --- 1248,1256 ---- ;;; Special service ;;; (defun forms-enumerate (the-fields) ! "Take a quoted list of symbols, and set their values to sequential numbers. ! The first symbol gets number 1, the second 2 and so on. ! It returns the higest number. Usage: (setq forms-number-of-fields (forms-enumerate *************** Usage: (setq forms-number-of-fields *** 1270,1281 **** the-index)) ;;; Debugging ! ;;; (defvar forms--debug nil "*Enables forms-mode debugging if not nil.") (defun forms--debug (&rest args) ! "Internal - debugging routine" (if forms--debug (let ((ret nil)) (while args --- 1265,1276 ---- the-index)) ;;; Debugging ! (defvar forms--debug nil "*Enables forms-mode debugging if not nil.") (defun forms--debug (&rest args) ! "Internal debugging routine." (if forms--debug (let ((ret nil)) (while args diff -cprP --exclude=*.elc emacs-19.15/lisp/frame.el emacs-19.16/lisp/frame.el *** emacs-19.15/lisp/frame.el Wed Jun 16 17:23:30 1993 --- emacs-19.16/lisp/frame.el Sat Jul 3 22:18:42 1993 *************** *** 102,120 **** ;; so that we won't reapply them in frame-notice-user-settings. ;; It would be wrong to reapply them then, ;; because that would override explicit user resizing. ! ;; Remember that they may occur more than once. ! (let ((tail initial-frame-alist)) ! (while (consp tail) ! (if (and (consp (car tail)) ! (memq (car (car tail)) '(height width top left))) ! (setq initial-frame-alist ! (delq tail initial-frame-alist))) ! (setq tail (cdr tail)))) ;; Handle `reverse' as a parameter. (if (cdr (or (assq 'reverse initial-frame-alist) ! (assq 'reverse default-frame-alist) ! (cons nil ! (x-get-resource "reverseVideo" "ReverseVideo")))) (let ((params (frame-parameters frame-initial-frame))) (modify-frame-parameters frame-initial-frame --- 102,112 ---- ;; so that we won't reapply them in frame-notice-user-settings. ;; It would be wrong to reapply them then, ;; because that would override explicit user resizing. ! (setq initial-frame-alist ! (frame-remove-geometry-params initial-frame-alist)) ;; Handle `reverse' as a parameter. (if (cdr (or (assq 'reverse initial-frame-alist) ! (assq 'reverse default-frame-alist))) (let ((params (frame-parameters frame-initial-frame))) (modify-frame-parameters frame-initial-frame *************** additional frame parameters that Emacs r *** 317,322 **** --- 309,330 ---- (filtered-frame-list (function (lambda (frame) (eq frame (window-frame (minibuffer-window frame))))))) + + (defun frame-remove-geometry-params (param-list) + "Return the parameter list PARAM-LIST, but with geometry specs removed. + This deletes all bindings in PARAM-LIST for `top', `left', `width', + and `height' parameters. + Emacs uses this to avoid overriding explicit moves and resizings from + the user during startup." + (setq param-list (cons nil param-list)) + (let ((tail param-list)) + (while (consp (cdr tail)) + (if (and (consp (car (cdr tail))) + (memq (car (car (cdr tail))) '(height width top left))) + (setcdr tail (cdr (cdr tail))) + (setq tail (cdr tail))))) + (cdr param-list)) + ;;;; Frame configurations diff -cprP --exclude=*.elc emacs-19.15/lisp/gnus.el emacs-19.16/lisp/gnus.el *** emacs-19.15/lisp/gnus.el Sat Jun 12 00:23:58 1993 --- emacs-19.16/lisp/gnus.el Tue Jun 29 19:03:34 1993 *************** *** 1,6 **** ;;; GNUS: an NNTP-based News Reader for GNU Emacs ;; Copyright (C) 1987, 1988, 1989, 1990, 1993 Free Software Foundation, Inc. ! ;; $Header: /home/fsf/rms/e19/lisp/RCS/gnus.el,v 1.21 1993/06/10 11:46:43 jimb Exp $ ;; This file is part of GNU Emacs. --- 1,6 ---- ;;; GNUS: an NNTP-based News Reader for GNU Emacs ;; Copyright (C) 1987, 1988, 1989, 1990, 1993 Free Software Foundation, Inc. ! ;; $Header: /gd/gnu/emacs/19.0/lisp/RCS/gnus.el,v 1.22 1993/06/29 23:03:21 jimb Exp $ ;; This file is part of GNU Emacs. *************** If optional argument RAWFILE is non-nil, *** 6571,6577 **** ;; but no longer viable because of extensive backtracking in Emacs 19: ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" nil t) (while (re-search-forward ! "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\|[^ \t].*\\)$" nil t) (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1))) ;; Check duplications of newsgroups. ;; Note: Checking the duplications takes very long time. --- 6571,6577 ---- ;; but no longer viable because of extensive backtracking in Emacs 19: ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" nil t) (while (re-search-forward ! "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\|[^ \t\n].*\\)$" nil t) (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1))) ;; Check duplications of newsgroups. ;; Note: Checking the duplications takes very long time. diff -cprP --exclude=*.elc emacs-19.15/lisp/gud.el emacs-19.16/lisp/gud.el *** emacs-19.15/lisp/gud.el Tue Jun 15 17:03:10 1993 --- emacs-19.16/lisp/gud.el Wed Jun 30 02:21:40 1993 *************** *** 149,154 **** --- 149,157 ---- ;; ====================================================================== ;; gdb functions + ;;; History of argument lists passed to gdb. + (defvar gud-gdb-history nil) + (defun gud-gdb-debugger-startup (file args) (apply 'make-comint (concat "gud-" file) "gdb" nil "-fullname" args)) *************** *** 176,182 **** "Run gdb on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working directory and source-file directory for your debugger." ! (interactive "sRun gdb (like this): gdb ") (gud-overload-functions '((gud-debugger-startup . gud-gdb-debugger-startup) (gud-marker-filter . gud-gdb-marker-filter) (gud-find-file . gud-gdb-find-file) --- 179,191 ---- "Run gdb on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working directory and source-file directory for your debugger." ! (interactive ! (list (read-from-minibuffer "Run gdb (like this): gdb " ! (if (consp gud-gdb-history) ! (car gud-gdb-history) ! "") ! nil nil ! '(gud-gdb-history . 1)))) (gud-overload-functions '((gud-debugger-startup . gud-gdb-debugger-startup) (gud-marker-filter . gud-gdb-marker-filter) (gud-find-file . gud-gdb-find-file) *************** and source-file directory for your debug *** 204,209 **** --- 213,221 ---- ;; ====================================================================== ;; sdb functions + ;;; History of argument lists passed to sdb. + (defvar gud-sdb-history nil) + (defvar gud-sdb-needs-tags (not (file-exists-p "/var")) "If nil, we're on a System V Release 4 and don't need the tags hack.") *************** and source-file directory for your debug *** 247,253 **** "Run sdb on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working directory and source-file directory for your debugger." ! (interactive "sRun sdb (like this): sdb ") (if (and gud-sdb-needs-tags (not (and (boundp 'tags-file-name) (file-exists-p tags-file-name)))) (error "The sdb support requires a valid tags table to work.")) --- 259,271 ---- "Run sdb on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working directory and source-file directory for your debugger." ! (interactive ! (list (read-from-minibuffer "Run sdb (like this): sdb " ! (if (consp gud-sdb-history) ! (car gud-sdb-history) ! "") ! nil nil ! '(gud-sdb-history . 1)))) (if (and gud-sdb-needs-tags (not (and (boundp 'tags-file-name) (file-exists-p tags-file-name)))) (error "The sdb support requires a valid tags table to work.")) *************** and source-file directory for your debug *** 274,279 **** --- 292,300 ---- ;; ====================================================================== ;; dbx functions + ;;; History of argument lists passed to dbx. + (defvar gud-dbx-history nil) + (defun gud-dbx-debugger-startup (file args) (apply 'make-comint (concat "gud-" file) "dbx" nil args)) *************** and source-file directory for your debug *** 295,301 **** "Run dbx on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working directory and source-file directory for your debugger." ! (interactive "sRun dbx (like this): dbx") (gud-overload-functions '((gud-debugger-startup . gud-dbx-debugger-startup) (gud-marker-filter . gud-dbx-marker-filter) (gud-find-file . gud-dbx-find-file) --- 316,328 ---- "Run dbx on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working directory and source-file directory for your debugger." ! (interactive ! (list (read-from-minibuffer "Run dbx (like this): dbx " ! (if (consp gud-dbx-history) ! (car gud-dbx-history) ! "") ! nil nil ! '(gud-dbx-history . 1)))) (gud-overload-functions '((gud-debugger-startup . gud-dbx-debugger-startup) (gud-marker-filter . gud-dbx-marker-filter) (gud-find-file . gud-dbx-find-file) *************** and source-file directory for your debug *** 321,326 **** --- 348,356 ---- ;; ====================================================================== ;; xdb (HP PARISC debugger) functions + ;;; History of argument lists passed to xdb. + (defvar gud-xdb-history nil) + (defvar gud-xdb-directories nil "*A list of directories that xdb should search for source code. If nil, only source files in the program directory *************** and source-file directory for your debug *** 387,393 **** You can set the variable 'gud-xdb-directories' to a list of program source directories if your program contains sources from more than one directory." ! (interactive "sRun xdb (like this): xdb") (gud-overload-functions '((gud-debugger-startup . gud-xdb-debugger-startup) (gud-marker-filter . gud-xdb-marker-filter) (gud-find-file . gud-xdb-find-file))) --- 417,429 ---- You can set the variable 'gud-xdb-directories' to a list of program source directories if your program contains sources from more than one directory." ! (interactive ! (list (read-from-minibuffer "Run xdb (like this): xdb " ! (if (consp gud-xdb-history) ! (car gud-xdb-history) ! "") ! nil nil ! '(gud-xdb-history . 1)))) (gud-overload-functions '((gud-debugger-startup . gud-xdb-debugger-startup) (gud-marker-filter . gud-xdb-marker-filter) (gud-find-file . gud-xdb-find-file))) diff -cprP --exclude=*.elc emacs-19.15/lisp/help.el emacs-19.16/lisp/help.el *** emacs-19.15/lisp/help.el Wed May 26 18:18:32 1993 --- emacs-19.16/lisp/help.el Sun Jul 4 17:29:37 1993 *************** *** 108,114 **** (if (listp type) (setq type (car type))) (and (symbolp type) (memq 'down (event-modifiers type)) ! (setq foo (read-event)))) (let ((defn (key-binding key))) (if (or (null defn) (integerp defn)) (message "%s is undefined" (key-description key)) --- 108,114 ---- (if (listp type) (setq type (car type))) (and (symbolp type) (memq 'down (event-modifiers type)) ! (read-event))) (let ((defn (key-binding key))) (if (or (null defn) (integerp defn)) (message "%s is undefined" (key-description key)) *************** If FUNCTION is nil, applies `message' to *** 159,165 **** If optional MINOR is non-nil (or prefix argument is given if interactive), display documentation of active minor modes as well. For this to work correctly for a minor mode, the mode's indicator variable ! (listed in `minor-mode-alist') must also be a function whose documentation describes the minor mode." (interactive) (with-output-to-temp-buffer "*Help*" --- 159,165 ---- If optional MINOR is non-nil (or prefix argument is given if interactive), display documentation of active minor modes as well. For this to work correctly for a minor mode, the mode's indicator variable ! \(listed in `minor-mode-alist') must also be a function whose documentation describes the minor mode." (interactive) (with-output-to-temp-buffer "*Help*" *************** describes the minor mode." *** 208,213 **** --- 208,230 ---- (let (case-fold-search) (search-forward "NO WARRANTY") (recenter 0))) + + (defun describe-prefix-bindings () + "Describe the bindings of the prefix used to reach this command. + The prefix described consists of all but the last event + of the key sequence that ran this command." + (interactive) + (let* ((key (this-command-keys)) + (prefix (make-vector (1- (length key)) nil)) + i) + (setq i 0) + (while (< i (length prefix)) + (aset prefix i (aref key i)) + (setq i (1+ i))) + (describe-bindings prefix))) + ;; Make C-h after a prefix, when not specifically bound, + ;; run describe-prefix-bindings. + (setq prefix-help-command 'describe-prefix-bindings) (defun view-emacs-news () "Display info on recent changes to Emacs." diff -cprP --exclude=*.elc emacs-19.15/lisp/hexl.el emacs-19.16/lisp/hexl.el *** emacs-19.15/lisp/hexl.el Fri May 28 16:32:40 1993 --- emacs-19.16/lisp/hexl.el Sun Jul 4 13:55:06 1993 *************** *** 3,8 **** --- 3,9 ---- ;; Copyright (C) 1989 Free Software Foundation, Inc. ;; Author: Keith Gabryelski + ;; Keywords: non-text ;; This file is part of GNU Emacs. *************** You can use \\[hexl-find-file] to visit *** 182,212 **** (setq buffer-read-only read-only) (hexl-goto-address original-point))))) (defun hexl-save-buffer () "Save a hexl format buffer as binary in visited file if modified." (interactive) ! (set-buffer-modified-p (if (buffer-modified-p) ! (save-excursion ! (let ((buf (generate-new-buffer " hexl")) ! (name (buffer-name)) ! (file-name (buffer-file-name)) ! (start (point-min)) ! (end (point-max)) ! modified) ! (set-buffer buf) ! (insert-buffer-substring name start end) ! (set-buffer name) ! (dehexlify-buffer) ! (save-buffer) ! (setq modified (buffer-modified-p)) ! (delete-region (point-min) (point-max)) ! (insert-buffer-substring buf start end) ! (kill-buffer buf) ! modified)) ! (message "(No changes need to be saved)") ! nil)) ! ;; Return t to indicate we have saved t ! t) ;;;###autoload (defun hexl-find-file (filename) --- 183,218 ---- (setq buffer-read-only read-only) (hexl-goto-address original-point))))) + (defvar hexl-in-save-buffer nil) + (defun hexl-save-buffer () "Save a hexl format buffer as binary in visited file if modified." (interactive) ! (if hexl-in-save-buffer nil ! (set-buffer-modified-p (if (buffer-modified-p) ! (save-excursion ! (let ((buf (generate-new-buffer " hexl")) ! (name (buffer-name)) ! (file-name (buffer-file-name)) ! (start (point-min)) ! (end (point-max)) ! modified) ! (set-buffer buf) ! (insert-buffer-substring name start end) ! (set-buffer name) ! (dehexlify-buffer) ! ;; Prevent infinite recursion. ! (let ((hexl-in-save-buffer t)) ! (save-buffer)) ! (setq modified (buffer-modified-p)) ! (delete-region (point-min) (point-max)) ! (insert-buffer-substring buf start end) ! (kill-buffer buf) ! modified)) ! (message "(No changes need to be saved)") ! nil)) ! ;; Return t to indicate we have saved t ! t)) ;;;###autoload (defun hexl-find-file (filename) diff -cprP --exclude=*.elc emacs-19.15/lisp/holidays.el emacs-19.16/lisp/holidays.el *** emacs-19.15/lisp/holidays.el Mon Jun 14 11:23:51 1993 --- emacs-19.16/lisp/holidays.el Sun Jun 20 13:16:49 1993 *************** *** 7,12 **** --- 7,13 ---- ;; This file is part of GNU Emacs. + ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY. No author or distributor ;; accepts responsibility to anyone for the consequences of using it *************** *** 49,55 **** (require 'calendar) ! (autoload 'calendar-holiday-function-solar-equinoxes-solstices "solar" "Date and time of equinoxes and solstices, if visible in the calendar window. Requires floating point." t) --- 50,56 ---- (require 'calendar) ! (autoload 'solar-equinoxes-solstices "solar" "Date and time of equinoxes and solstices, if visible in the calendar window. Requires floating point." t) *************** The holidays are those in the list calen *** 109,115 **** (msg (format "%s: %s" date-string holiday-string))) (if (not holiday-list) (message "No holidays known for %s" date-string) ! (if (<= (length msg) (screen-width)) (message msg) (set-buffer (get-buffer-create holiday-buffer)) (setq buffer-read-only nil) --- 110,116 ---- (msg (format "%s: %s" date-string holiday-string))) (if (not holiday-list) (message "No holidays known for %s" date-string) ! (if (<= (length msg) (frame-width)) (message msg) (set-buffer (get-buffer-create holiday-buffer)) (setq buffer-read-only nil) *************** holidays are found, nil if not." *** 172,191 **** (defun calendar-holiday-list () "Form the list of holidays that occur on dates in the calendar window. The holidays are those in the list calendar-holidays." ! (let ((p (eval calendar-holidays)) (holiday-list)) (while p ! (let* ((function-name ! (intern (format "calendar-holiday-function-%s" (car (car p))))) ! (holidays ! (condition-case nil ! (if (cdr (car p));; optional arguments ! (funcall function-name (cdr (car p))) ! (funcall function-name)) ! (error ! (beep) ! (message "Bad holiday list item: %s" (car p)) ! (sleep-for 2))))) (if holidays (setq holiday-list (append holidays holiday-list)))) (setq p (cdr p))) --- 173,190 ---- (defun calendar-holiday-list () "Form the list of holidays that occur on dates in the calendar window. The holidays are those in the list calendar-holidays." ! (let ((p calendar-holidays) (holiday-list)) (while p ! (let* ((holidays ! (if calendar-debug-sexp ! (let ((stack-trace-on-error t)) ! (eval (car p))) ! (condition-case nil ! (eval (car p)) ! (error (beep) ! (message "Bad holiday list item: %s" (car p)) ! (sleep-for 2)))))) (if holidays (setq holiday-list (append holidays holiday-list)))) (setq p (cdr p))) *************** The holidays are those in the list calen *** 192,252 **** (setq holiday-list (sort holiday-list 'calendar-date-compare)))) ;; Below are the functions that calculate the dates of holidays; these ! ;; are called by the funcall in the function calendar-holiday-list. If you ! ;; write other such functions, be sure to imitate the style used below, ! ;; including the evaluation of each element in the list that constitutes ! ;; the argument to the function. If you don't do this evaluation, the ! ;; list calendar-holidays cannot contain expressions (as, for example, in ! ;; the entry for the Islamic new year.) Also remember that each function ! ;; must return a list of items of the form ((month day year) string); ! ;; the date (month day year) should be visible in the calendar window. ! ! (defun calendar-holiday-function-fixed (x) ! "Returns the corresponding Gregorian date, if visible in the window, to ! (month day) where month is (car X) and day is (car (cdr X)). If it is ! visible, the value returned is the list (((month day year) string)) where ! string is (car (nthcdr 2 X)). Returns nil if it is not visible in the ! current calendar window." ! (let* ((month (eval (car x))) ! (day (eval (car (cdr x)))) ! (string (eval (car (nthcdr 2 x)))) ! (m displayed-month) ! (y displayed-year)) (increment-calendar-month m y (- 11 month)) (if (> m 9) (list (list (list month day y) string))))) ! (defun calendar-holiday-function-float (x) ! "Returns the corresponding Gregorian date, if visible in the window, to the ! n-th occurrence (negative counts from the end of the month) of dayname in ! month where month is (car X), dayname is (car (cdr X)), and n is ! (car (nthcdr 2 X)). If it is visible, the value returned is the list ! (((month day year) string)) where string is (car (nthcdr 3 X)). Returns nil if it is not visible in the current calendar window." ! (let* ((month (eval (car x))) ! (dayname (eval (car (cdr x)))) ! (n (eval (car (nthcdr 2 x)))) ! (string (eval (car (nthcdr 3 x)))) ! (m displayed-month) ! (y displayed-year)) (increment-calendar-month m y (- 11 month)) (if (> m 9) ! (list (list (calendar-nth-named-day n dayname month y) string))))) ! (defun calendar-holiday-function-julian (x) ! "Returns the corresponding Gregorian date, if visible in the window, to the ! Julian date (month day) where month is (car X) and day is (car (cdr X)). ! If it is visible, the value returned is the list (((month day year) string)) ! where string is (car (nthcdr 2 X)). Returns nil if it is not visible in the ! current calendar window." ! (let* ((month (eval (car x))) ! (day (eval (car (cdr x)))) ! (string (eval (car (nthcdr 2 x)))) ! (m1 displayed-month) ! (y1 displayed-year) ! (m2 displayed-month) ! (y2 displayed-year) ! (year)) (increment-calendar-month m1 y1 -1) (increment-calendar-month m2 y2 1) (let* ((start-date (calendar-absolute-from-gregorian --- 191,237 ---- (setq holiday-list (sort holiday-list 'calendar-date-compare)))) ;; Below are the functions that calculate the dates of holidays; these ! ;; are eval'ed in the function calendar-holiday-list. If you ! ;; write other such functions, be sure to imitate the style used below. ! ;; Remember that each function must return a list of items of the form ! ;; ((month day year) string) of VISIBLE dates in the calendar window. ! ! (defun holiday-fixed (month day string) ! "Holiday on MONTH, DAY (Gregorian) called STRING. ! If MONTH, DAY is visible, the value returned is the list (((MONTH DAY year) ! STRING)). Returns nil if it is not visible in the current calendar window." ! (let ((m displayed-month) ! (y displayed-year)) (increment-calendar-month m y (- 11 month)) (if (> m 9) (list (list (list month day y) string))))) ! (defun holiday-float (month dayname n string &optional day) ! "Holiday on MONTH, DAYNAME (Nth occurrence, Gregorian) called STRING. ! If the Nth DAYNAME in MONTH is visible, the value returned is the list ! (((MONTH DAY year) STRING)). ! ! If N<0, count backward from the end of MONTH. ! ! An optional parameter DAY means the Nth DAYNAME after/before MONTH DAY. ! Returns nil if it is not visible in the current calendar window." ! (let ((m displayed-month) ! (y displayed-year)) (increment-calendar-month m y (- 11 month)) (if (> m 9) ! (list (list (calendar-nth-named-day n dayname month y day) string))))) ! (defun holiday-julian (month day string) ! "Holiday on MONTH, DAY (Julian) called STRING. ! If MONTH, DAY (Julian) is visible, the value returned is corresponding ! Gregorian date in the form of the list (((month day year) STRING)). Returns ! nil if it is not visible in the current calendar window." ! (let ((m1 displayed-month) ! (y1 displayed-year) ! (m2 displayed-month) ! (y2 displayed-year) ! (year)) (increment-calendar-month m1 y1 -1) (increment-calendar-month m2 y2 1) (let* ((start-date (calendar-absolute-from-gregorian *************** current calendar window." *** 264,279 **** (if (calendar-date-is-visible-p date) (list (list date string))))))) ! (defun calendar-holiday-function-islamic (x) ! "Returns the corresponding Gregorian date, if visible in the window, to the ! Islamic date (month day) where month is (car X) and day is (car (cdr X)). ! If it is visible, the value returned is the list (((month day year) string)) ! where string is (car (nthcdr 2 X)). Returns nil if it is not visible in ! the current calendar window." ! (let* ((month (eval (car x))) ! (day (eval (car (cdr x)))) ! (string (eval (car (nthcdr 2 x)))) ! (islamic-date (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (list displayed-month 15 displayed-year)))) (m (extract-calendar-month islamic-date)) --- 249,260 ---- (if (calendar-date-is-visible-p date) (list (list date string))))))) ! (defun holiday-islamic (month day string) ! "Holiday on MONTH, DAY (Islamic) called STRING. ! If MONTH, DAY (Islamic) is visible, the value returned is corresponding ! Gregorian date in the form of the list (((month day year) STRING)). Returns ! nil if it is not visible in the current calendar window." ! (let* ((islamic-date (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (list displayed-month 15 displayed-year)))) (m (extract-calendar-month islamic-date)) *************** the current calendar window." *** 288,362 **** (if (calendar-date-is-visible-p date) (list (list date string)))))))) ! (defun calendar-holiday-function-hebrew (x) ! "Returns the corresponding Gregorian date, if visible in the window, to the ! Hebrew date (month day) where month is (car X) and day is (car (cdr X)). ! If it is visible, the value returned is the list (((month day year) string)) ! where string is (car (nthcdr 2 X)). Returns nil if it is not visible in ! the current calendar window." ! (let* ((month (eval (car x))) ! (day (eval (car (cdr x)))) ! (string (eval (car (nthcdr 2 x))))) ! (if (memq displayed-month;; This test is only to speed things up a bit; ! (list ;; it works fine without the test too. ! (if (< 11 month) (- month 11) (+ month 1)) ! (if (< 10 month) (- month 10) (+ month 2)) ! (if (< 9 month) (- month 9) (+ month 3)) ! (if (< 8 month) (- month 8) (+ month 4)) ! (if (< 7 month) (- month 7) (+ month 5)))) ! (let ((m1 displayed-month) ! (y1 displayed-year) ! (m2 displayed-month) ! (y2 displayed-year) ! (year)) ! (increment-calendar-month m1 y1 -1) ! (increment-calendar-month m2 y2 1) ! (let* ((start-date (calendar-absolute-from-gregorian ! (list m1 1 y1))) ! (end-date (calendar-absolute-from-gregorian ! (list m2 (calendar-last-day-of-month m2 y2) y2))) ! (hebrew-start (calendar-hebrew-from-absolute start-date)) ! (hebrew-end (calendar-hebrew-from-absolute end-date)) ! (hebrew-y1 (extract-calendar-year hebrew-start)) ! (hebrew-y2 (extract-calendar-year hebrew-end))) ! (setq year (if (< 6 month) hebrew-y2 hebrew-y1)) ! (let ((date (calendar-gregorian-from-absolute ! (calendar-absolute-from-hebrew ! (list month day year))))) ! (if (calendar-date-is-visible-p date) ! (list (list date string))))))))) ! ! (defun calendar-holiday-function-if (x) ! "Conditional holiday for dates in the calendar window. ! The boolean condition is (car X). If t, the holiday (car (cdr X)) is ! checked. If nil, the holiday (car (cdr (cdr X))), if there, is checked." ! (let* ((boolean (eval (car x))) ! (h (if boolean (car (cdr x)) (car (cdr (cdr x)))))) ! (if h ! (let* ((function-name ! (intern (format "calendar-holiday-function-%s" (car h)))) ! (holidays ! (if (cdr h);; optional arguments ! (funcall function-name (cdr h)) ! (funcall function-name)))) ! holidays)))) ! (defun calendar-holiday-function-sexp (x) "Sexp holiday for dates in the calendar window. ! The sexp (in `year') is (car X). If the sexp evals to a date visible in the ! calendar window, the holiday (car (cdr X)) is on that date. If the sexp evals ! to nil, or if the date is not visible, there is no holiday." (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y -1) (filter-visible-calendar-holidays (append ! (let ((year y)) ! (list (list (eval (car x)) (eval (car (cdr x)))))) ! (let ((year (1+ y))) ! (list (list (eval (car x)) (eval (car (cdr x)))))))))) ! (defun calendar-holiday-function-advent () "Date of Advent, if visible in calendar window." (let ((year displayed-year) (month displayed-month)) --- 269,332 ---- (if (calendar-date-is-visible-p date) (list (list date string)))))))) ! (defun holiday-hebrew (month day string) ! "Holiday on MONTH, DAY (Hebrew) called STRING. ! If MONTH, DAY (Hebrew) is visible, the value returned is corresponding ! Gregorian date in the form of the list (((month day year) STRING)). Returns ! nil if it is not visible in the current calendar window." ! (if (memq displayed-month;; This test is only to speed things up a bit; ! (list ;; it works fine without the test too. ! (if (< 11 month) (- month 11) (+ month 1)) ! (if (< 10 month) (- month 10) (+ month 2)) ! (if (< 9 month) (- month 9) (+ month 3)) ! (if (< 8 month) (- month 8) (+ month 4)) ! (if (< 7 month) (- month 7) (+ month 5)))) ! (let ((m1 displayed-month) ! (y1 displayed-year) ! (m2 displayed-month) ! (y2 displayed-year) ! (year)) ! (increment-calendar-month m1 y1 -1) ! (increment-calendar-month m2 y2 1) ! (let* ((start-date (calendar-absolute-from-gregorian ! (list m1 1 y1))) ! (end-date (calendar-absolute-from-gregorian ! (list m2 (calendar-last-day-of-month m2 y2) y2))) ! (hebrew-start (calendar-hebrew-from-absolute start-date)) ! (hebrew-end (calendar-hebrew-from-absolute end-date)) ! (hebrew-y1 (extract-calendar-year hebrew-start)) ! (hebrew-y2 (extract-calendar-year hebrew-end))) ! (setq year (if (< 6 month) hebrew-y2 hebrew-y1)) ! (let ((date (calendar-gregorian-from-absolute ! (calendar-absolute-from-hebrew ! (list month day year))))) ! (if (calendar-date-is-visible-p date) ! (list (list date string)))))))) ! (defun holiday-sexp (sexp string) "Sexp holiday for dates in the calendar window. ! SEXP is an expression in variable `year' evaluates to `date'. ! ! STRING is an expression in `date' that evaluates to the holiday description ! of `date'. ! ! If `date' is visible in the calendar window, the holiday STRING is on that ! date. If date is nil, or if the date is not visible, there is no holiday." (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y -1) (filter-visible-calendar-holidays (append ! (let* ((year y) ! (date (eval sexp)) ! (string (if date (eval string)))) ! (list (list date string))) ! (let* ((year (1+ y)) ! (date (eval sexp)) ! (string (if date (eval string)))) ! (list (list date string))))))) ! (defun holiday-advent () "Date of Advent, if visible in calendar window." (let ((year displayed-year) (month displayed-month)) *************** to nil, or if the date is not visible, t *** 368,374 **** (if (calendar-date-is-visible-p advent) (list (list advent "Advent")))))) ! (defun calendar-holiday-function-easter-etc () "List of dates related to Easter, as visible in calendar window." (if (and (> displayed-month 5) (not all-christian-calendar-holidays)) nil;; Ash Wednesday, Good Friday, and Easter are not visible. --- 338,344 ---- (if (calendar-date-is-visible-p advent) (list (list advent "Advent")))))) ! (defun holiday-easter-etc () "List of dates related to Easter, as visible in calendar window." (if (and (> displayed-month 5) (not all-christian-calendar-holidays)) nil;; Ash Wednesday, Good Friday, and Easter are not visible. *************** to nil, or if the date is not visible, t *** 437,445 **** output-list))) output-list))) ! (defun calendar-holiday-function-greek-orthodox-easter () ! "Date of Easter according to the rule of the Council of Nicaea, if visible ! in the calendar window." (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) --- 407,414 ---- output-list))) output-list))) ! (defun holiday-greek-orthodox-easter () ! "Date of Easter according to the rule of the Council of Nicaea." (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) *************** in the calendar window." *** 461,467 **** (if (calendar-date-is-visible-p nicaean-easter) (list (list nicaean-easter "Pascha (Greek Orthodox Easter)")))))) ! (defun calendar-holiday-function-rosh-hashanah-etc () "List of dates related to Rosh Hashanah, as visible in calendar window." (if (or (< displayed-month 8) (> displayed-month 11)) --- 430,436 ---- (if (calendar-date-is-visible-p nicaean-easter) (list (list nicaean-easter "Pascha (Greek Orthodox Easter)")))))) ! (defun holiday-rosh-hashanah-etc () "List of dates related to Rosh Hashanah, as visible in calendar window." (if (or (< displayed-month 8) (> displayed-month 11)) *************** in the calendar window." *** 520,526 **** output-list))) output-list))) ! (defun calendar-holiday-function-hanukkah () "List of dates related to Hanukkah, as visible in calendar window." (if (memq displayed-month;; This test is only to speed things up a bit; '(10 11 12 1 2));; it works fine without the test too. --- 489,495 ---- output-list))) output-list))) ! (defun holiday-hanukkah () "List of dates related to Hanukkah, as visible in calendar window." (if (memq displayed-month;; This test is only to speed things up a bit; '(10 11 12 1 2));; it works fine without the test too. *************** in the calendar window." *** 553,559 **** (list (calendar-gregorian-from-absolute (+ abs-h 7)) "Hanukkah (eighth day)"))))))) ! (defun calendar-holiday-function-passover-etc () "List of dates related to Passover, as visible in calendar window." (if (< 7 displayed-month) nil;; None of the dates is visible --- 522,528 ---- (list (calendar-gregorian-from-absolute (+ abs-h 7)) "Hanukkah (eighth day)"))))))) ! (defun holiday-passover-etc () "List of dates related to Passover, as visible in calendar window." (if (< 7 displayed-month) nil;; None of the dates is visible *************** in the calendar window." *** 634,640 **** output-list))) output-list))) ! (defun calendar-holiday-function-tisha-b-av-etc () "List of dates around Tisha B'Av, as visible in calendar window." (if (or (< displayed-month 5) (> displayed-month 9)) --- 603,609 ---- output-list))) output-list))) ! (defun holiday-tisha-b-av-etc () "List of dates around Tisha B'Av, as visible in calendar window." (if (or (< displayed-month 5) (> displayed-month 9)) diff -cprP --exclude=*.elc emacs-19.15/lisp/isearch.el emacs-19.16/lisp/isearch.el *** emacs-19.15/lisp/isearch.el Sun Jun 13 17:43:19 1993 --- emacs-19.16/lisp/isearch.el Fri Jul 2 17:34:19 1993 *************** *** 4,10 **** ;; Author: Daniel LaLiberte ! ;; |$Date: 1993/06/13 21:43:15 $|$Revision: 1.43 $ ;; This file is not yet part of GNU Emacs, but it is based almost ;; entirely on isearch.el which is part of GNU Emacs. --- 4,10 ---- ;; Author: Daniel LaLiberte ! ;; |$Date: 1993/07/02 21:34:15 $|$Revision: 1.44 $ ;; This file is not yet part of GNU Emacs, but it is based almost ;; entirely on isearch.el which is part of GNU Emacs. *************** and the meta character is unread so that *** 1008,1020 **** (isearch-edit-string)) (search-exit-option (let ((key (this-command-keys)) window) (apply 'isearch-unread (listify-key-sequence key)) ;; If we got a mouse click, maybe it was read with the buffer ;; it was clicked on. If so, that buffer, not the current one, ;; is in isearch mode. So end the search in that buffer. ! (if (and (listp (aref key 0)) ! (setq window (posn-window (event-start (aref key 0)))) (windowp window)) (save-excursion (set-buffer (window-buffer window)) --- 1008,1028 ---- (isearch-edit-string)) (search-exit-option (let ((key (this-command-keys)) + (index 0) window) (apply 'isearch-unread (listify-key-sequence key)) + ;; Properly handle scroll-bar and mode-line clicks + ;; for which a dummy prefix event was generated as (aref key 0). + (and (> (length key) 1) + (symbolp (aref key 0)) + (listp (aref key 1)) + (consp (posn-point (event-start (aref key 1)))) + (setq index 1)) ;; If we got a mouse click, maybe it was read with the buffer ;; it was clicked on. If so, that buffer, not the current one, ;; is in isearch mode. So end the search in that buffer. ! (if (and (listp (aref key index)) ! (setq window (posn-window (event-start (aref key index)))) (windowp window)) (save-excursion (set-buffer (window-buffer window)) *************** and the meta character is unread so that *** 1023,1029 **** (t;; otherwise nil (isearch-process-search-string (this-command-keys) (this-command-keys))))) - (defun isearch-quote-char () "Quote special characters for incremental search." --- 1031,1036 ---- diff -cprP --exclude=*.elc emacs-19.15/lisp/loaddefs.el emacs-19.16/lisp/loaddefs.el *** emacs-19.15/lisp/loaddefs.el Thu Jun 17 03:03:56 1993 --- emacs-19.16/lisp/loaddefs.el Mon Jun 21 14:24:59 1993 *************** *** 4754,4786 **** ;;;*** - ;;;### (autoloads (batch-texinfo-format texinfo-format-region texinfo-format-buffer) "texinfmt" "texinfmt.el" (11285 51547)) - ;;; Generated autoloads from texinfmt.el - - (autoload (quote texinfo-format-buffer) "texinfmt" "\ - Process the current buffer as texinfo code, into an Info file. - The Info file output is generated in a buffer visiting the Info file - names specified in the @setfilename command. - - Non-nil argument (prefix, if interactive) means don't make tag table - and don't split the file if large. You can use Info-tagify and - Info-split to do these manually." t nil) - - (autoload (quote texinfo-format-region) "texinfmt" "\ - Convert the current region of the Texinfo file to Info format. - This lets you see what that part of the file will look like in Info. - The command is bound to \\[texinfo-format-region]. The text that is - converted to Info is stored in a temporary buffer." t nil) - - (autoload (quote batch-texinfo-format) "texinfmt" "\ - Runs `texinfo-format-buffer' on the files remaining on the command line. - Must be used only with -batch, and kills emacs on completion. - Each file will be processed even if an error occurred previously. - For example, invoke - \"emacs -batch -funcall batch-texinfo-format $docs/ ~/*.texinfo\"." nil nil) - - ;;;*** - ;;;### (autoloads (texinfo-mode) "texinfo" "texinfo.el" (11283 53395)) ;;; Generated autoloads from texinfo.el --- 4754,4759 ---- diff -cprP --exclude=*.elc emacs-19.15/lisp/ls-lisp.el emacs-19.16/lisp/ls-lisp.el *** emacs-19.15/lisp/ls-lisp.el Wed Jun 16 22:52:43 1993 --- emacs-19.16/lisp/ls-lisp.el Tue Jun 29 13:07:50 1993 *************** *** 22,28 **** ;; INSTALLATION ======================================================= ;; ;; Put this file into your load-path. To use it, load it ! ;; with (load "directory"). ;; OVERVIEW =========================================================== --- 22,28 ---- ;; INSTALLATION ======================================================= ;; ;; Put this file into your load-path. To use it, load it ! ;; with (load "ls-lisp"). ;; OVERVIEW =========================================================== *************** Optional third arg WILDCARD means treat *** 57,63 **** Optional fourth arg FULL-DIRECTORY-P means file is a directory and switches do not contain `d', so that a full listing is expected. ! This version of the function comes from `directory.el'. It does not support ordinary shell wildcards; instead, it allows regular expressions to match file names. --- 57,63 ---- Optional fourth arg FULL-DIRECTORY-P means file is a directory and switches do not contain `d', so that a full listing is expected. ! This version of the function comes from `ls-lisp.el'. It does not support ordinary shell wildcards; instead, it allows regular expressions to match file names. *************** The switches that work are: A a c i r S *** 187,194 **** ;; optional arg. (format " %3d %-8d %-8d %8d " (nth 1 file-attr) ; no. of links ! (nth 2 file-attr) ; uid ! (nth 3 file-attr) ; gid (nth 7 file-attr) ; size in bytes ) (ls-lisp-format-time file-attr switches) --- 187,198 ---- ;; optional arg. (format " %3d %-8d %-8d %8d " (nth 1 file-attr) ; no. of links ! (if (= (user-uid) (nth 2 file-attr)) ! (user-login-name) ! (nth 2 file-attr)) ; uid ! (if (eq system-type 'ms-dos) ! "root" ; everything is root on MSDOS. ! (nth 3 file-attr)) ; gid (nth 7 file-attr) ; size in bytes ) (ls-lisp-format-time file-attr switches) diff -cprP --exclude=*.elc emacs-19.15/lisp/lunar.el emacs-19.16/lisp/lunar.el *** emacs-19.15/lisp/lunar.el Thu Mar 18 16:55:07 1993 --- emacs-19.16/lisp/lunar.el Fri Jun 18 18:53:12 1993 *************** *** 160,200 **** ((= phase 2) (- adjustment adj)) (t adjustment))) (date (+ date adjustment)) ! (calendar-standard-time-zone-name ! (if calendar-time-zone calendar-standard-time-zone-name "UT")) ! (calendar-daylight-savings-starts ! (if calendar-time-zone calendar-daylight-savings-starts)) ! (calendar-daylight-savings-ends ! (if calendar-time-zone calendar-daylight-savings-ends)) ! (calendar-time-zone (if calendar-time-zone calendar-time-zone 0)) ! (year (extract-calendar-year ! (calendar-gregorian-from-absolute (truncate date)))) ! (dst (and calendar-daylight-savings-starts ! calendar-daylight-savings-ends ! (<= (calendar-absolute-from-gregorian ! (eval calendar-daylight-savings-starts)) ! date) ! (< date ! (calendar-absolute-from-gregorian ! (eval calendar-daylight-savings-ends))))) ! (date (+ date ! (/ (+ (if dst 60 0) calendar-time-zone) 60.0 24.0) ! (- (/ (solar-ephemeris-correction year) 60.0 24.0)))) (time (* 24 (- date (truncate date)))) ! (date (calendar-gregorian-from-absolute (truncate date))) ! (time-zone calendar-time-zone) ! (time-zone (if dst ! calendar-daylight-time-zone-name ! calendar-standard-time-zone-name)) ! (24-hours (truncate time)) ! (12-hours (format "%d" (if (> 24-hours 12) ! (- 24-hours 12) ! (if (= 24-hours 0) 12 24-hours)))) ! (am-pm (if (>= 24-hours 12) "pm" "am")) ! (minutes (format "%02d" (round (* 60 (- time 24-hours))))) ! (24-hours (format "%02d" 24-hours)) ! (time (mapconcat 'eval calendar-time-display-form ""))) ! (list date time phase))) (defun lunar-phase-name (phase) "Name of lunar PHASE. --- 160,172 ---- ((= phase 2) (- adjustment adj)) (t adjustment))) (date (+ date adjustment)) ! (date (+ date (- (/ (solar-ephemeris-correction ! (extract-calendar-year ! (calendar-gregorian-from-absolute ! (truncate date)))) 60.0 24.0)))) (time (* 24 (- date (truncate date)))) ! (date (calendar-gregorian-from-absolute (truncate date)))) ! (list date (solar-time-string time date) phase))) (defun lunar-phase-name (phase) "Name of lunar PHASE. diff -cprP --exclude=*.elc emacs-19.15/lisp/mailabbrev.el emacs-19.16/lisp/mailabbrev.el *** emacs-19.15/lisp/mailabbrev.el Tue Jun 15 16:49:58 1993 --- emacs-19.16/lisp/mailabbrev.el Thu Jul 1 16:24:57 1993 *************** *** 202,208 **** (progn (end-of-line) (build-mail-abbrevs ! (buffer-substring (match-beginning 1) (match-end 1)) t)) (re-search-forward "[ \t]+\\([^ \t\n]+\\)") (let* ((name (buffer-substring (match-beginning 1) (match-end 1))) --- 202,209 ---- (progn (end-of-line) (build-mail-abbrevs ! (substitute-in-file-name ! (buffer-substring (match-beginning 1) (match-end 1)) t))) (re-search-forward "[ \t]+\\([^ \t\n]+\\)") (let* ((name (buffer-substring (match-beginning 1) (match-end 1))) diff -cprP --exclude=*.elc emacs-19.15/lisp/makeinfo.el emacs-19.16/lisp/makeinfo.el *** emacs-19.15/lisp/makeinfo.el --- emacs-19.16/lisp/makeinfo.el Mon Jun 21 02:59:02 1993 *************** *** 0 **** --- 1,246 ---- + ;;;; makeinfo.el -- run makeinfo conveniently. + ;;; Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + ;;; Author: Robert J. Chassell + ;;; Maintainer: FSF + + ;;; This file is part of GNU Emacs. + + ;; GNU Emacs is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + + ;; GNU Emacs is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU Emacs; see the file COPYING. If not, write to + ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + ;;; Commentary: + + ;;; The Texinfo mode `makeinfo' related commands are: + + ;; makeinfo-region to run makeinfo on the current region. + ;; makeinfo-buffer to run makeinfo on the current buffer, or + ;; with optional prefix arg, on current region + ;; kill-compilation to kill currently running makeinfo job + ;; makeinfo-recenter-makeinfo-buffer to redisplay *compilation* buffer + + ;;; Keybindings (defined in `texinfo.el') + + ;; makeinfo bindings + ; (define-key texinfo-mode-map "\C-c\C-m\C-r" 'makeinfo-region) + ; (define-key texinfo-mode-map "\C-c\C-m\C-b" 'makeinfo-buffer) + ; (define-key texinfo-mode-map "\C-c\C-m\C-k" 'kill-compilation) + ; (define-key texinfo-mode-map "\C-c\C-m\C-l" + ; 'makeinfo-recenter-compilation-buffer) + + ;;; Code: + + ;;; Variables used by `makeinfo' + + (require 'compile) + + (defvar makeinfo-run-command "makeinfo" + "*Command used to run `makeinfo' subjob. + The name of the file is appended to this string, separated by a space.") + + (defvar makeinfo-options "+fill-column=70" + "*String containing options for running `makeinfo'. + Do not include `--footnote-style' or `--paragraph-indent'; + the proper way to specify those is with the Texinfo commands + `@footnotestyle` and `@paragraphindent'.") + + (require 'texinfo) + (require 'texinfmt) + + (defvar makeinfo-compilation-process nil + "Process that runs `makeinfo'. Should start out nil.") + + (defvar makeinfo-temp-file nil + "Temporary file name used for text being sent as input to `makeinfo'.") + + (defvar makeinfo-output-file-name nil + "Info file name used for text output by `makeinfo'.") + + + ;;; The `makeinfo' function definitions + + (defun makeinfo-region (region-beginning region-end) + "Make Info file from region of current Texinfo file, and switch to it. + + This command does not offer the `next-error' feature since it would + apply to a temporary file, not the original; use the `makeinfo-buffer' + command to gain use of `next-error'." + + (interactive "r") + (let (filename-or-header + filename-or-header-beginning + filename-or-header-end) + ;; Cannot use `let' for makeinfo-temp-file or + ;; makeinfo-output-file-name since `makeinfo-compilation-sentinel' + ;; needs them. + + (setq makeinfo-temp-file + (concat + (make-temp-name + (substring (buffer-file-name) + 0 + (or (string-match "\\.tex" (buffer-file-name)) + (length (buffer-file-name))))) + ".texinfo")) + + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (let ((search-end (save-excursion (forward-line 100) (point)))) + ;; Find and record the Info filename, + ;; or else explain that a filename is needed. + (if (re-search-forward + "^@setfilename[ \t]+\\([^ \t\n]+\\)[ \t]*" + search-end t) + (setq makeinfo-output-file-name + (buffer-substring (match-beginning 1) (match-end 1))) + (error + "The texinfo file needs a line saying: @setfilename ")) + + ;; Find header and specify its beginning and end. + (goto-char (point-min)) + (if (and + (prog1 + (search-forward texinfo-start-of-header search-end t) + (beginning-of-line) + ;; Mark beginning of header. + (setq filename-or-header-beginning (point))) + (prog1 + (search-forward texinfo-end-of-header nil t) + (beginning-of-line) + ;; Mark end of header + (setq filename-or-header-end (point)))) + + ;; Insert the header into the temporary file. + (write-region + (min filename-or-header-beginning region-beginning) + filename-or-header-end + makeinfo-temp-file nil nil) + + ;; Else no header; insert @filename line into temporary file. + (goto-char (point-min)) + (search-forward "@setfilename" search-end t) + (beginning-of-line) + (setq filename-or-header-beginning (point)) + (forward-line 1) + (setq filename-or-header-end (point)) + (write-region + (min filename-or-header-beginning region-beginning) + filename-or-header-end + makeinfo-temp-file nil nil)) + + ;; Insert the region into the file. + (write-region + (max region-beginning filename-or-header-end) + region-end + makeinfo-temp-file t nil) + + ;; Run the `makeinfo-compile' command in the *compilation* buffer + (save-excursion + (makeinfo-compile + (concat makeinfo-run-command + " " + makeinfo-options + " " + makeinfo-temp-file) + "Use `makeinfo-buffer' to gain use of the `next-error' command" + nil))))))) + + ;;; Actually run makeinfo. COMMAND is the command to run. + ;;; ERROR-MESSAGE is what to say when next-error can't find another error. + ;;; If PARSE-ERRORS is non-nil, do try to parse error messages. + (defun makeinfo-compile (command error-message parse-errors) + (let ((buffer + (compile-internal command error-message nil + (and (not parse-errors) + ;; If we do want to parse errors, pass nil. + ;; Otherwise, use this function, which won't + ;; ever find any errors. + '(lambda (&rest ignore) + (setq compilation-error-list nil)))))) + (set-process-sentinel (get-buffer-process buffer) + 'makeinfo-compilation-sentinel))) + + ;; Delete makeinfo-temp-file after processing is finished, + ;; and visit Info file. + ;; This function is called when the compilation process changes state. + ;; Based on `compilation-sentinel' in compile.el + (defun makeinfo-compilation-sentinel (proc msg) + (compilation-sentinel proc msg) + (if (and makeinfo-temp-file (file-exists-p makeinfo-temp-file)) + (delete-file makeinfo-temp-file)) + ;; Always use the version on disk. + (if (get-file-buffer makeinfo-output-file-name) + (progn (set-buffer makeinfo-output-file-name) + (revert-buffer t t)) + (find-file makeinfo-output-file-name)) + (goto-char (point-min))) + + (defun makeinfo-buffer () + "Make Info file from current buffer. + + Use the \\[next-error] command to move to the next error + \(if there are errors\)." + + (interactive) + (cond ((null buffer-file-name) + (error "Buffer not visiting any file")) + ((buffer-modified-p) + (if (y-or-n-p "Buffer modified; do you want to save it? ") + (save-buffer)))) + + ;; Find and record the Info filename, + ;; or else explain that a filename is needed. + (save-excursion + (goto-char (point-min)) + (let ((search-end (save-excursion (forward-line 100) (point)))) + (if (re-search-forward + "^@setfilename[ \t]+\\([^ \t\n]+\\)[ \t]*" + search-end t) + (setq makeinfo-output-file-name + (buffer-substring (match-beginning 1) (match-end 1))) + (error + "The texinfo file needs a line saying: @setfilename ")))) + + (save-excursion + (makeinfo-compile + (concat makeinfo-run-command " " makeinfo-options + " " buffer-file-name) + "No more errors." + t))) + + (defun makeinfo-recenter-compilation-buffer (linenum) + "Redisplay `*compilation*' buffer so most recent output can be seen. + The last line of the buffer is displayed on + line LINE of the window, or centered if LINE is nil." + (interactive "P") + (let ((makeinfo-buffer (get-buffer "*compilation*")) + (old-buffer (current-buffer))) + (if (null makeinfo-buffer) + (message "No *compilation* buffer") + (pop-to-buffer makeinfo-buffer) + (bury-buffer makeinfo-buffer) + (goto-char (point-max)) + (recenter (if linenum + (prefix-numeric-value linenum) + (/ (window-height) 2))) + (pop-to-buffer old-buffer) + ))) + + ;;; Place `provide' at end of file. + (provide 'makeinfo) + + ;;; makeinfo.el ends here + diff -cprP --exclude=*.elc emacs-19.15/lisp/man.el emacs-19.16/lisp/man.el *** emacs-19.15/lisp/man.el Fri Jun 18 21:43:11 1993 --- emacs-19.16/lisp/man.el Tue Jul 6 01:44:28 1993 *************** *** 62,68 **** ;; is done in the background. The cleaning commands are configurable. ;; + Syntax is the same as Un*x man ;; + Functionality is the same as Un*x man, including "man -k" and ! ;; "man
, etc. ;; + Provides a manual browsing mode with keybindings for traversing ;; the sections of a manpage, following references in the SEE ALSO ;; section, and more. --- 62,68 ---- ;; is done in the background. The cleaning commands are configurable. ;; + Syntax is the same as Un*x man ;; + Functionality is the same as Un*x man, including "man -k" and ! ;; "man
", etc. ;; + Provides a manual browsing mode with keybindings for traversing ;; the sections of a manpage, following references in the SEE ALSO ;; section, and more. *************** Any other value of `Man-notify' is equiv *** 93,99 **** "*Reuse a manpage buffer if possible. When t, and a manpage buffer already exists with the same invocation, man just indicates the manpage is ready according to the value of ! Man-notify. When nil, it always fires off a background process, putting the results in a uniquely named buffer.") (defvar Man-downcase-section-letters-p t --- 93,99 ---- "*Reuse a manpage buffer if possible. When t, and a manpage buffer already exists with the same invocation, man just indicates the manpage is ready according to the value of ! `Man-notify'. When nil, it always fires off a background process, putting the results in a uniquely named buffer.") (defvar Man-downcase-section-letters-p t *************** the results in a uniquely named buffer." *** 100,106 **** "*Letters in sections are converted to lower case. Some Un*x man commands can't handle uppercase letters in sections, for example \"man 2V chmod\", but they are often displayed in the manpage ! with the upper case letter. When this variable is t, the section letter (e.g., \"2V\") is converted to lowercase (e.g., \"2v\") before being sent to the man background process.") --- 100,106 ---- "*Letters in sections are converted to lower case. Some Un*x man commands can't handle uppercase letters in sections, for example \"man 2V chmod\", but they are often displayed in the manpage ! with the upper case letter. When this variable is t, the section letter (e.g., \"2V\") is converted to lowercase (e.g., \"2v\") before being sent to the man background process.") *************** being sent to the man background process *** 107,119 **** (defvar Man-circular-pages-p t "*If t, the manpage list is treated as circular for traversal.") (defvar Man-auto-section-alist ! '((c-mode . ("2" "3")) ! (c++-mode . ("2" "3")) ! (shell-mode . ("1" "8")) ! (cmushell-mode . ("1" "8")) ! (text-mode . "1") ! ) "*Association list of major modes and their default section numbers. List is of the form: (MAJOR-MODE . [SECTION | (SECTION*)]). If current major mode is not in list, then the default is to check for manpages --- 107,123 ---- (defvar Man-circular-pages-p t "*If t, the manpage list is treated as circular for traversal.") + ;; I changed this to nil because it is a bad idea + ;; to fail to recognize things in other sections. (defvar Man-auto-section-alist ! nil ! ;; '((c-mode . ("2" "3")) ! ;; (c++-mode . ("2" "3")) ! ;; (c++-c-mode . ("2" "3")) ! ;; (shell-mode . ("1" "8")) ! ;; (cmushell-mode . ("1" "8")) ! ;; (text-mode . "1") ! ;; ) "*Association list of major modes and their default section numbers. List is of the form: (MAJOR-MODE . [SECTION | (SECTION*)]). If current major mode is not in list, then the default is to check for manpages *************** in all sections.") *** 124,136 **** ("1-UCB" . "")) "*Association list of bogus sections to real section numbers. Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in ! their references which Un*x man(1) does not recognize. This association list is used to translate those sections, when found, to the associated section number.") (defvar Man-filter-list '(("sed " ! ("-e 's/.\010//g'" "-e '/[Nn]o such file or directory/d'" "-e '/Reformatting page. Wait... done/d'" "-e '/^\\([A-Z][A-Z.]*([0-9A-Za-z][-0-9A-Za-z+]*)\\).*\\1$/d'" --- 128,140 ---- ("1-UCB" . "")) "*Association list of bogus sections to real section numbers. Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in ! their references which Un*x `man' does not recognize. This association list is used to translate those sections, when found, to the associated section number.") (defvar Man-filter-list '(("sed " ! (;;"-e 's/.\010//g'" "-e '/[Nn]o such file or directory/d'" "-e '/Reformatting page. Wait... done/d'" "-e '/^\\([A-Z][A-Z.]*([0-9A-Za-z][-0-9A-Za-z+]*)\\).*\\1$/d'" *************** This variable contains an association li *** 158,166 **** '((command-string (phrase-string*))*) Each phrase-string is concatenated onto the command-string to form a ! command filter. The (standard) output (and standard error) of the Un*x man command is piped through each command filter in the order the ! commands appear in the association list. The final output is placed in the manpage buffer.") (defvar Man-mode-line-format --- 162,170 ---- '((command-string (phrase-string*))*) Each phrase-string is concatenated onto the command-string to form a ! command filter. The (standard) output (and standard error) of the Un*x man command is piped through each command filter in the order the ! commands appear in the association list. The final output is placed in the manpage buffer.") (defvar Man-mode-line-format *************** the manpage buffer.") *** 173,182 **** "*Mode line format for manual mode buffer.") (defvar Man-mode-map nil ! "*Keymap for Man-mode.") (defvar Man-mode-hooks nil ! "*Hooks for Man-mode.") (defvar Man-section-regexp "[0-9][a-zA-Z+]*" "*Regular expression describing a manpage section within parentheses.") --- 177,186 ---- "*Mode line format for manual mode buffer.") (defvar Man-mode-map nil ! "*Keymap for Man mode.") (defvar Man-mode-hooks nil ! "*Hooks for Man mode.") (defvar Man-section-regexp "[0-9][a-zA-Z+]*" "*Regular expression describing a manpage section within parentheses.") *************** This regular expression should start wit *** 200,209 **** ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;; end user variables - - (defconst Man-version-number "1.1" - "man's version number.") - ;; other variables and keymap initializations (make-variable-buffer-local 'Man-sections-alist) --- 204,209 ---- *************** This regular expression should start wit *** 236,242 **** (define-key Man-mode-map "s" 'Man-goto-see-also-section) (define-key Man-mode-map "q" 'Man-quit) (define-key Man-mode-map "m" 'manual-entry) - (define-key Man-mode-map "v" 'Man-version) (define-key Man-mode-map "?" 'describe-mode) ) --- 236,241 ---- *************** This regular expression should start wit *** 255,261 **** (defun Man-build-man-command () "Builds the entire background manpage and cleaning command." ! (let ((command (concat "man " Man-switches " %s 2>&1 | ")) (flist Man-filter-list)) (while flist (let ((pcom (car (car flist))) --- 254,260 ---- (defun Man-build-man-command () "Builds the entire background manpage and cleaning command." ! (let ((command (concat "man " Man-switches " %s 2>&1")) (flist Man-filter-list)) (while flist (let ((pcom (car (car flist))) *************** This regular expression should start wit *** 264,274 **** (if (or (not (stringp pcom)) (not (listp pargs))) (error "malformed Man-filter-list.")) ! (setq command (concat command pcom (mapconcat '(lambda (phrase) phrase) ! pargs " ")))) ! (if flist ! (setq command (concat command " | " )))) command)) (defun Man-downcase (man-args) --- 263,271 ---- (if (or (not (stringp pcom)) (not (listp pargs))) (error "malformed Man-filter-list.")) ! (setq command (concat command " | " pcom (mapconcat '(lambda (phrase) phrase) ! pargs " "))))) command)) (defun Man-downcase (man-args) *************** This regular expression should start wit *** 315,321 **** (defun Man-linepos (&optional position col-p) "Return the character position at various line/buffer positions. ! Preserves the state of point, mark, etc. Optional POSITION can be one of the following symbols: bol == beginning of line boi == beginning of indentation --- 312,318 ---- (defun Man-linepos (&optional position col-p) "Return the character position at various line/buffer positions. ! Preserves the state of point, mark, etc. Optional arg POSITION can be one of the following symbols: bol == beginning of line boi == beginning of indentation *************** of the following symbols: *** 323,329 **** bob == beginning of buffer eob == end of buffer ! Optional COL-P non-nil returns current-column instead of character position." (let ((tpnt (point)) rval) (cond --- 320,327 ---- bob == beginning of buffer eob == end of buffer ! Optional arg COL-P, if non-nil, means to return ! the current column instead of character position." (let ((tpnt (point)) rval) (cond *************** Optional COL-P non-nil returns current-c *** 341,370 **** ;; default man entry and get word under point (defun Man-default-man-args (manword) ! "Build the default man args from MANWORD and major-mode." ! (let ((mode major-mode) ! (slist Man-auto-section-alist)) ! (while (and slist ! (not (eq (car (car slist)) mode))) ! (setq slist (cdr slist))) ! (if (not slist) ! manword ! (let ((sections (cdr (car slist)))) ! (if (not (listp sections)) ! (concat sections " " manword) ! (let ((manarg "")) ! (while sections ! (setq manarg (concat manarg " " (car sections) " " manword)) ! (setq sections (cdr sections))) ! manarg) ! ))))) (defun Man-default-man-entry () "Make a guess at a default manual entry. This guess is based on the text surrounding the cursor, and the ! default section number is selected from Man-auto-section-alist." ! (let ((default-section nil) ! default-title) (save-excursion ;; Default man entry title is any word the cursor is on, --- 339,358 ---- ;; default man entry and get word under point (defun Man-default-man-args (manword) ! "Build the default man args from MANWORD and buffer's major mode." ! (let ((sections (cdr (assq major-mode Man-auto-section-alist)))) ! (cond ! ((null sections) manword) ! ((consp sections) ! (mapconcat (lambda (n) (concat n " " manword)) sections " ")) ! (t ! (concat sections " " manword))))) (defun Man-default-man-entry () "Make a guess at a default manual entry. This guess is based on the text surrounding the cursor, and the ! default section number is selected from `Man-auto-section-alist'." ! (let (default-title) (save-excursion ;; Default man entry title is any word the cursor is on, *************** default section number is selected from *** 383,402 **** ;; section number in default-entry (if (looking-at "[ \t]*([ \t]*[0-9][a-zA-Z]?[ \t]*)") (progn (skip-chars-forward "^0-9") ! (setq default-section ! (buffer-substring ! (point) ! (progn ! (skip-chars-forward "0-9a-zA-Z") ! (point))))) ! ! ;; Otherwise, assume section number to be 2 if we're ! ;; in C code ! (and (eq major-mode 'c-mode) ! (setq default-section "2"))) ! (if default-section ! (format "%s %s" default-section default-title) ! default-title)))) ;; ====================================================================== --- 371,386 ---- ;; section number in default-entry (if (looking-at "[ \t]*([ \t]*[0-9][a-zA-Z]?[ \t]*)") (progn (skip-chars-forward "^0-9") ! (setq default-title ! (concat (buffer-substring ! (point) ! (progn ! (skip-chars-forward "0-9a-zA-Z") ! (point))) ! " " ! default-title))) ! (setq default-title (Man-default-man-args default-title))) ! default-title))) ;; ====================================================================== *************** default section number is selected from *** 405,415 **** ;;;###autoload (defun manual-entry (arg) "Get a Un*x manual page and put it in a buffer. ! This command is the top-level command in the man package. It runs a Un*x command to retrieve and clean a manpage in the background and places the ! results in a Man-mode (manpage browsing) buffer. See variable ! Man-notify for what happens when the buffer is ready. ! Universal argument ARG, is passed to Man-getpage-in-background." (interactive "P") (let* ((default-entry (Man-default-man-entry)) (man-args --- 389,399 ---- ;;;###autoload (defun manual-entry (arg) "Get a Un*x manual page and put it in a buffer. ! This command is the top-level command in the man package. It runs a Un*x command to retrieve and clean a manpage in the background and places the ! results in a Man mode (manpage browsing) buffer. See variable ! `Man-notify' for what happens when the buffer is ready. ! Universal argument ARG, is passed to `Man-getpage-in-background'." (interactive "P") (let* ((default-entry (Man-default-man-entry)) (man-args *************** Universal argument ARG, is passed to Man *** 421,444 **** (if (string= default-entry "") (error "No man args given.") (setq man-args default-entry))) ;; Recognize the subject(section) syntax. ! (if (string-match "^[ \t]*\\([^( \t]+\\)[ \t]*(\\([^)]+\\))[ \t]*$" ! man-args) ! (setq man-args ! (concat (substring man-args (match-beginning 2) (match-end 2)) ! " " ! (substring man-args (match-beginning 1) (match-end 1))))) (if Man-downcase-section-letters-p (setq man-args (Man-downcase man-args))) (Man-getpage-in-background man-args (consp arg)) )) ! (defun Man-getpage-in-background (man-args &optional override-reuse-p) ! "Uses MAN-ARGS to build and fire off the manpage and cleaning command. ! Optional OVERRIDE-REUSE-P, when supplied non-nil forces man to start a background process even if a buffer already exists and ! Man-reuse-okay-p is non-nil." ! (let* ((bufname (concat "*man " man-args "*")) (buffer (get-buffer bufname))) (if (and Man-reuse-okay-p (not override-reuse-p) --- 405,426 ---- (if (string= default-entry "") (error "No man args given.") (setq man-args default-entry))) + ;; Recognize the subject(section) syntax. ! (setq man-args (Man-translate-references man-args)) ! (if Man-downcase-section-letters-p (setq man-args (Man-downcase man-args))) (Man-getpage-in-background man-args (consp arg)) )) ! (defun Man-getpage-in-background (TOPIC &optional override-reuse-p) ! "Uses TOPIC to build and fire off the manpage and cleaning command. ! Optional OVERRIDE-REUSE-P, when non-nil, means to start a background process even if a buffer already exists and ! `Man-reuse-okay-p' is non-nil." ! (let* ((man-args TOPIC) ! (bufname (concat "*man " man-args "*")) (buffer (get-buffer bufname))) (if (and Man-reuse-okay-p (not override-reuse-p) *************** See the variable `Man-notify' for the di *** 476,481 **** --- 458,474 ---- (message "")) )) + (defun Man-set-fonts () + (goto-char (point-min)) + (while (re-search-forward "\\(.\b.\\)+" nil t) + (let ((st (match-beginning 0)) (en (match-end 0))) + (goto-char st) + (if window-system + (put-text-property st en 'face + (if (looking-at "_") 'underline 'bold))) + (while (and (< (point) en) (looking-at ".\b")) + (replace-match "") (forward-char 1))))) + (defun Man-bgproc-sentinel (process msg) "Manpage background process sentinel." (let ((Man-buffer (process-buffer process)) *************** See the variable `Man-notify' for the di *** 507,512 **** --- 500,506 ---- (save-window-excursion (save-excursion (set-buffer Man-buffer) + (Man-set-fonts) (Man-mode) (set-buffer-modified-p nil))) (Man-notify-when-ready Man-buffer)) *************** See the variable `Man-notify' for the di *** 520,526 **** ;; set up manual mode in buffer and build alists (defun Man-mode () ! "SUPERMAN 1.1: A mode for browsing Un*x manual pages. The following man commands are available in the buffer. Try \"\\[describe-key] RET\" for more information: --- 514,520 ---- ;; set up manual mode in buffer and build alists (defun Man-mode () ! "A mode for browsing Un*x manual pages. The following man commands are available in the buffer. Try \"\\[describe-key] RET\" for more information: *************** The following man commands are available *** 534,540 **** \\[Man-goto-section] Go to a manpage section. \\[Man-goto-see-also-section] Jumps to the SEE ALSO manpage section. \\[Man-quit] Deletes the manpage, its buffer, and window. - \\[Man-version] Prints man's version number. \\[describe-mode] Prints this help text. The following variables may be of some use. Try --- 528,533 ---- *************** Man-heading-regexp Regexp d *** 555,561 **** Man-see-also-regexp Regexp for SEE ALSO section (or your equiv). Man-first-heading-regexp Regexp for first heading on a manpage. Man-reference-regexp Regexp matching a references in SEE ALSO. - Man-version-number Superman version number. Man-switches Background `man' command switches. The following key bindings are currently in effect in the buffer: --- 548,553 ---- *************** The following key bindings are currently *** 562,568 **** \\{Man-mode-map}" (interactive) (setq major-mode 'Man-mode ! mode-name "Manual" buffer-auto-save-file-name nil mode-line-format Man-mode-line-format truncate-lines t --- 554,560 ---- \\{Man-mode-map}" (interactive) (setq major-mode 'Man-mode ! mode-name "Man" buffer-auto-save-file-name nil mode-line-format Man-mode-line-format truncate-lines t *************** Returns t if section is found, nil other *** 686,692 **** (defun Man-goto-see-also-section () "Move point the the \"SEE ALSO\" section. ! Actually the section moved to is described by Man-see-also-regexp." (interactive) (if (not (Man-find-section Man-see-also-regexp)) (error (concat "No " Man-see-also-regexp --- 678,684 ---- (defun Man-goto-see-also-section () "Move point the the \"SEE ALSO\" section. ! Actually the section moved to is described by `Man-see-also-regexp'." (interactive) (if (not (Man-find-section Man-see-also-regexp)) (error (concat "No " Man-see-also-regexp *************** Actually the section moved to is describ *** 694,701 **** (defun Man-follow-manual-reference (arg) "Get one of the manpages referred to in the \"SEE ALSO\" section. ! Queries you for the page to retrieve. Of course it does this in the ! background. Universal argument ARG is passed to Man-getpage-in-background." (interactive "P") (if (not Man-refpages-alist) (error (concat "No references found in current manpage.")) --- 686,693 ---- (defun Man-follow-manual-reference (arg) "Get one of the manpages referred to in the \"SEE ALSO\" section. ! Queries you for the page to retrieve. Of course it does this in the ! background. Universal argument ARG is passed to `Man-getpage-in-background'." (interactive "P") (if (not Man-refpages-alist) (error (concat "No references found in current manpage.")) *************** background. Universal argument ARG is pa *** 768,784 **** (if Man-circular-pages-p (Man-goto-page (length Man-page-list)) (error "You're looking at the first manpage in the buffer.")))) - - (defun Man-version (arg) - "Show man's version. - Universal argument (\\[universal-argument]) ARG inserts version - information in the current buffer instead of printing the message in - the echo area." - (interactive "P") - (if (consp arg) - (insert "Using Superman version " Man-version-number ".") - (message "Using Superman version %s." Man-version-number))) - (provide 'man) --- 760,765 ---- diff -cprP --exclude=*.elc emacs-19.15/lisp/map-ynp.el emacs-19.16/lisp/map-ynp.el *** emacs-19.15/lisp/map-ynp.el Sat May 15 14:05:14 1993 --- emacs-19.16/lisp/map-ynp.el Mon Jul 5 00:49:28 1993 *************** *** 88,94 **** action-alist) query-replace-map))) (actions 0) ! prompt char elt tail def (next (if (or (symbolp list) (subrp list) (byte-code-function-p list) --- 88,94 ---- action-alist) query-replace-map))) (actions 0) ! prompt char elt tail def delayed-switch-frame (next (if (or (symbolp list) (subrp list) (byte-code-function-p list) *************** *** 103,207 **** list (cdr list)) t) nil)))))) ! ! (if (stringp prompter) ! (setq prompter (` (lambda (object) ! (format (, prompter) object))))) ! (while (funcall next) ! (setq prompt (funcall prompter elt)) ! (if (stringp prompt) ! (progn ! (setq quit-flag nil) ! ;; Prompt the user about this object. ! (let ((cursor-in-echo-area t)) ! (message "%s(y, n, !, ., q, %sor %s) " ! prompt user-keys ! (key-description (char-to-string help-char))) ! (setq char (read-event))) ! ;; Show the answer to the question. ! (message "%s(y, n, !, ., q, %sor %s) %s" ! prompt user-keys ! (key-description (char-to-string help-char)) ! (single-key-description char)) ! (setq def (lookup-key map (vector char))) ! (cond ((eq def 'exit) ! (setq next (function (lambda () nil)))) ! ((eq def 'act) ! ;; Act on the object. ! (funcall actor elt) ! (setq actions (1+ actions))) ! ((eq def 'skip) ! ;; Skip the object. ! ) ! ((eq def 'act-and-exit) ! ;; Act on the object and then exit. ! (funcall actor elt) ! (setq actions (1+ actions) ! next (function (lambda () nil)))) ! ((eq def 'quit) ! (setq quit-flag t) ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt))))) ! ((eq def 'automatic) ! ;; Act on this and all following objects. ! (if (eval (funcall prompter elt)) ! (progn (funcall actor elt) ! (setq actions (1+ actions)))) ! (while (funcall next) ! (if (eval (funcall prompter elt)) ! (progn ! (funcall actor elt) ! (setq actions (1+ actions)))))) ! ((eq def 'help) ! (with-output-to-temp-buffer "*Help*" ! (princ ! (let ((object (if help (nth 0 help) "object")) ! (objects (if help (nth 1 help) "objects")) ! (action (if help (nth 2 help) "act on"))) ! (concat (format "Type SPC or `y' to %s the current %s; DEL or `n' to skip the current %s; ! to %s all remaining %s; ESC or `q' to exit;\n" ! action object object action objects) ! (mapconcat (function ! (lambda (elt) ! (format "%c to %s" ! (nth 0 elt) ! (nth 2 elt)))) ! action-alist ! ";\n") ! (if action-alist ";\n") ! (format "or . (period) to %s \ the current %s and exit." ! action object))))) ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt))))) ! ((vectorp def) ! ;; A user-defined key. ! (if (funcall (aref def 0) elt) ;Call its function. ! ;; The function has eaten this object. ! (setq actions (1+ actions)) ! ;; Regurgitated; try again. ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt)))))) ! (t ! ;; Random char. ! (message "Type %s for help." ! (key-description (char-to-string help-char))) ! (beep) ! (sit-for 1) ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt))))))) ! (if (eval prompt) ! (progn ! (funcall actor elt) ! (setq actions (1+ actions)))))) ;; Clear the last prompt from the minibuffer. (message "") ;; Return the number of actions that were taken. --- 103,219 ---- list (cdr list)) t) nil)))))) ! (unwind-protect ! (progn ! (if (stringp prompter) ! (setq prompter (` (lambda (object) ! (format (, prompter) object))))) ! (while (funcall next) ! (setq prompt (funcall prompter elt)) ! (if (stringp prompt) ! (progn ! (setq quit-flag nil) ! ;; Prompt the user about this object. ! (let ((cursor-in-echo-area t)) ! (message "%s(y, n, !, ., q, %sor %s) " ! prompt user-keys ! (key-description (char-to-string help-char))) ! (setq char (read-event))) ! ;; Show the answer to the question. ! (message "%s(y, n, !, ., q, %sor %s) %s" ! prompt user-keys ! (key-description (char-to-string help-char)) ! (single-key-description char)) ! (setq def (lookup-key map (vector char))) ! (cond ((eq def 'exit) ! (setq next (function (lambda () nil)))) ! ((eq def 'act) ! ;; Act on the object. ! (funcall actor elt) ! (setq actions (1+ actions))) ! ((eq def 'skip) ! ;; Skip the object. ! ) ! ((eq def 'act-and-exit) ! ;; Act on the object and then exit. (funcall actor elt) ! (setq actions (1+ actions) ! next (function (lambda () nil)))) ! ((eq def 'quit) ! (setq quit-flag t) ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt))))) ! ((eq def 'automatic) ! ;; Act on this and all following objects. ! (if (eval (funcall prompter elt)) ! (progn ! (funcall actor elt) ! (setq actions (1+ actions)))) ! (while (funcall next) ! (if (eval (funcall prompter elt)) ! (progn ! (funcall actor elt) ! (setq actions (1+ actions)))))) ! ((eq def 'help) ! (with-output-to-temp-buffer "*Help*" ! (princ ! (let ((object (if help (nth 0 help) "object")) ! (objects (if help (nth 1 help) "objects")) ! (action (if help (nth 2 help) "act on"))) ! (concat ! (format "Type SPC or `y' to %s the current %s; DEL or `n' to skip the current %s; ! to %s all remaining %s; ESC or `q' to exit;\n" ! action object object action objects) ! (mapconcat (function ! (lambda (elt) ! (format "%c to %s" ! (nth 0 elt) ! (nth 2 elt)))) ! action-alist ! ";\n") ! (if action-alist ";\n") ! (format "or . (period) to %s \ the current %s and exit." ! action object))))) ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt))))) ! ((vectorp def) ! ;; A user-defined key. ! (if (funcall (aref def 0) elt) ;Call its function. ! ;; The function has eaten this object. ! (setq actions (1+ actions)) ! ;; Regurgitated; try again. ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt)))))) ! ((and (consp char) ! (eq (car char) 'switch-frame)) ! ;; switch-frame event. Put it off until we're done. ! (setq delayed-switch-frame char) ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt))))) ! (t ! ;; Random char. ! (message "Type %s for help." ! (key-description (char-to-string help-char))) ! (beep) ! (sit-for 1) ! (setq next (` (lambda () ! (setq next '(, next)) ! '(, elt))))))) ! (if (eval prompt) ! (progn ! (funcall actor elt) ! (setq actions (1+ actions))))))) ! (if delayed-switch-frame ! (setq unread-command-events ! (cons delayed-switch-frame unread-command-events)))) ;; Clear the last prompt from the minibuffer. (message "") ;; Return the number of actions that were taken. diff -cprP --exclude=*.elc emacs-19.15/lisp/menu-bar.el emacs-19.16/lisp/menu-bar.el *** emacs-19.15/lisp/menu-bar.el Thu Jun 17 00:16:59 1993 --- emacs-19.16/lisp/menu-bar.el Fri Jul 2 17:36:25 1993 *************** *** 47,52 **** --- 47,54 ---- (define-key menu-bar-edit-menu [fill] '("Fill" . fill-region)) (define-key menu-bar-edit-menu [clear] '("Clear" . delete-region)) + (define-key menu-bar-edit-menu [choose-selection] + '("Choose Next Paste" . mouse-menu-choose-yank)) (define-key menu-bar-edit-menu [paste] '("Paste" . yank)) (define-key menu-bar-edit-menu [copy] '("Copy" . kill-ring-save)) (define-key menu-bar-edit-menu [cut] '("Cut" . kill-region)) *************** A subsequent \\[yank] yanks the choice j *** 121,136 **** 0 yank-menu-length))) (prog1 (cons string count) (setq count (1+ count)))) ! kill-ring))) ! (rotate-yank-pointer (x-popup-menu event ! (list "Yank Menu" ! (cons "Pick Selection" menu)))) ! (if (interactive-p) ! (message "The next yank will insert the selected text.") ! (current-kill 0)))) ! ! (define-key menu-bar-edit-menu [choose-selection] ! '("Choose Pasting Selection" . mouse-menu-choose-yank)) (define-key global-map [menu-bar buffer] '("Buffers" . mouse-menu-bar-buffers)) --- 123,142 ---- 0 yank-menu-length))) (prog1 (cons string count) (setq count (1+ count)))) ! kill-ring)) ! (arg (x-popup-menu event ! (list "Yank Menu" ! (cons "Pick Selection" menu))))) ! ;; A mouse click outside the menu returns nil. ! ;; Avoid a confusing error from passing nil to rotate-yank-pointer. ! ;; XXX should this perhaps do something other than simply return? -rm ! (if arg ! (progn ! (rotate-yank-pointer arg) ! (if (interactive-p) ! (message "The next yank will insert the selected text.") ! (current-kill 0)))))) ! (put 'mouse-menu-choose-yank 'menu-enable 'kill-ring) (define-key global-map [menu-bar buffer] '("Buffers" . mouse-menu-bar-buffers)) *************** and selects that window." *** 160,168 **** --- 166,182 ---- (list "Buffer Menu" (cons "Select Buffer" (let ((tail buffers) + (maxbuf 0) (maxlen 0) head) (while tail + (or (eq ?\ (aref (buffer-name (car tail)) 0)) + (setq maxbuf + (max maxbuf + (length (buffer-name (car tail)))))) + (setq tail (cdr tail))) + (setq tail buffers) + (while tail (let ((elt (car tail))) (if (not (string-match "^ " (buffer-name elt))) *************** and selects that window." *** 169,176 **** (setq head (cons (cons (format ! "%14s %s" (buffer-name elt) (or (buffer-file-name elt) "")) elt) head))) --- 183,195 ---- (setq head (cons (cons (format ! (format "%%%ds %%s%%s %%s" ! maxbuf) (buffer-name elt) + (if (buffer-modified-p elt) "*" " ") + (save-excursion + (set-buffer elt) + (if buffer-read-only "%" " ")) (or (buffer-file-name elt) "")) elt) head))) diff -cprP --exclude=*.elc emacs-19.15/lisp/metamail.el emacs-19.16/lisp/metamail.el *** emacs-19.15/lisp/metamail.el --- emacs-19.16/lisp/metamail.el Mon Jun 21 03:03:20 1993 *************** *** 0 **** --- 1,119 ---- + ;;; Metamail interface for GNU Emacs + ;; Copyright (C) 1993 Masanobu UMEDA + + ;; Author: Masanobu UMEDA + ;; Version: $Header: metamail.el,v 1.3 93/06/21 15:37:28 umerin Exp $ + ;; Keywords: mail, news, mime, multimedia + + ;; This file is part of GNU Emacs. + + ;; GNU Emacs is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + + ;; GNU Emacs is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU Emacs; see the file COPYING. If not, write to + ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + ;;; Commentary: + + ;; LCD Archive Entry: + ;; metamail|Masanobu UMEDA|umerin@mse.kyutech.ac.jp| + ;; Metamail interface for GNU Emacs| + ;; $Date: 93/06/21 15:37:28 $|$Revision: 1.3 $|~/misc/metamail.el.Z| + + ;; Note: Metamail does not have all options which is compatible with + ;; the environment variables. For that reason, matamail.el have to + ;; hack the environment variables. In addition, there is no way to + ;; display all header fields without extra informative body messages + ;; which is suppressed by "-q" option. + + ;; The idea of using metamail to process MIME messages is from + ;; gnus-mime.el by Spike . + + ;;; Code: + + (defvar metamail-program-name "metamail" + "*Metamail program name.") + + (defvar metamail-environment "KEYHEADS='*';export KEYHEADS;" + "*Environment variables for Metamail. + It must be an emtpy string or a string terminated with ';'.") + + (defvar metamail-switches '("-m" "emacs" "-x" "-d" "-z") + "*Switches for Metamail program. + -z is required to remove zap file.") + + (defun metamail-buffer (&optional buffer) + "Process current buffer through 'metamail'. + Optional argument BUFFER specifies a buffer to be filled (nil means current)." + (interactive) + (metamail-region (point-min) (point-max) buffer)) + + (defun metamail-region (beg end &optional buffer) + "Process current region through 'metamail'. + Optional argument BUFFER specifies a buffer to be filled (nil means current)." + (interactive "r") + (let ((curbuf (current-buffer)) + (buffer-read-only nil) + (metafile (make-temp-name "/tmp/metamail"))) + (save-excursion + ;; Gee! Metamail does not ouput to stdout if input comes from + ;; stdin. + (write-region beg end metafile nil 'nomessage) + (if buffer + (set-buffer buffer)) + (setq buffer-read-only nil) + ;; Clear destination buffer. + (if (eq curbuf (current-buffer)) + (delete-region beg end) + (delete-region (point-min) (point-max))) + ;; We have to pass the environment variable KEYHEADS to /bin/sh + ;; to display all header fields. Metamail should have an + ;; optional argument to pass such information directly. + (apply (function call-process) + "/bin/sh" + nil + t ;Output to current buffer + t ;Force redisplay + (list "-c" + ;; Construct environment and the command. + (concat + metamail-environment + metamail-program-name + " " + (mapconcat (function identity) metamail-switches " ") + " " + metafile + ))) + ))) + + ;(defun metamail-region (beg end &optional buffer) + ; "Process current region through 'metamail'. + ;Optional argument BUFFER specifies a buffer to be filled (nil means current)." + ; (interactive "r") + ; (let ((curbuf (current-buffer)) + ; (buffer-read-only nil) + ; (metafile (make-temp-name "/tmp/metamail"))) + ; (save-excursion + ; (write-region (point-min) (point-max) metafile nil 'nomessage) + ; (if (eq curbuf + ; (if buffer (get-buffer buffer) (current-buffer))) + ; (delete-region (point-min) (point-max))) + ; (apply (function call-process) + ; metamail-program-name + ; nil + ; (or buffer t) ;BUFFER or current buffer + ; nil ;don't redisplay + ; (append metamail-switches (list metafile))) + ; ))) + + (provide 'metamail) + + ;;; metamail.el ends here diff -cprP --exclude=*.elc emacs-19.15/lisp/mh-e.el emacs-19.16/lisp/mh-e.el *** emacs-19.15/lisp/mh-e.el Wed Jun 9 07:54:32 1993 --- emacs-19.16/lisp/mh-e.el Sun Jun 20 18:45:17 1993 *************** *** 48,54 **** ;;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985. ;;; Rewritten for GNU Emacs, James Larus 1985. larus@ginger.berkeley.edu ;;; Modified by Stephen Gildea 1988. gildea@bbn.com ! (defconst mh-e-RCS-id "$Header: /home/gd/gnu/emacs/19.0/lisp/RCS/mh-e.el,v 1.12 1993/06/09 11:54:27 jimb Exp $") ;;; Code: --- 48,54 ---- ;;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985. ;;; Rewritten for GNU Emacs, James Larus 1985. larus@ginger.berkeley.edu ;;; Modified by Stephen Gildea 1988. gildea@bbn.com ! (defconst mh-e-RCS-id "$Header: /home/fsf/rms/e19/lisp/RCS/mh-e.el,v 1.13 1993/06/20 22:45:13 rms Exp $") ;;; Code: *************** yanked message will be deleted." *** 2155,2161 **** (if mh-delete-yanked-msg-window (delete-windows-on mh-show-buffer)) (set-buffer mh-show-buffer) ; Find displayed message ! (let ((mh-ins-str (cond ((mark t) (buffer-substring (region-beginning) (region-end))) ((eq 'body mh-yank-from-start-of-msg) --- 2155,2161 ---- (if mh-delete-yanked-msg-window (delete-windows-on mh-show-buffer)) (set-buffer mh-show-buffer) ; Find displayed message ! (let ((mh-ins-str (cond (mark-active (buffer-substring (region-beginning) (region-end))) ((eq 'body mh-yank-from-start-of-msg) diff -cprP --exclude=*.elc emacs-19.15/lisp/mouse.el emacs-19.16/lisp/mouse.el *** emacs-19.15/lisp/mouse.el Fri Jun 18 13:55:26 1993 --- emacs-19.16/lisp/mouse.el Fri Jul 2 19:14:39 1993 *************** *** 118,166 **** (if (numberp (posn-point end)) (goto-char (posn-point end))))) ! (defun mouse-drag-region (click) ! "Set the region to the text that the mouse is dragged over. ! This must be bound to a button-down mouse event." ! (interactive "e") ! (let ((posn (event-start click)) ! done event (mark-active nil)) ! (select-window (posn-window posn)) ! ;; Set point temporarily, so user sees where it is. ! (if (numberp (posn-point posn)) ! (goto-char (posn-point posn))) ! ;; Turn off the old mark when we set up an empty region. ! (setq deactivate-mark t))) ! ;;;Nice hack, but too slow, so not normally in use. ! (defun mouse-drag-region-1 (click) "Set the region to the text that the mouse is dragged over. This must be bound to a button-down mouse event." (interactive "e") ! (let (newmark) ! (let ((posn (event-start click)) ! done event omark (mark-active t)) ! (select-window (posn-window posn)) ! (setq omark (and mark-active (mark))) ! (if (numberp (posn-point posn)) ! (goto-char (posn-point posn))) ! ;; Set mark temporarily, so highlighting does what we want. ! (set-marker (mark-marker) (point)) (track-mouse ! (while (not done) ! (setq event (read-event)) ! (if (eq (car-safe event) 'mouse-movement) ! (goto-char (posn-point (event-start event))) ! ;; Exit when we get the drag event; ignore that event. ! (setq done t)))) ! (if (/= (mark) (point)) ! (setq newmark (mark))) ! ;; Restore previous mark status. ! (if omark (set-marker (mark-marker) omark))) ! ;; Now, if we dragged, set the mark at the proper place. ! (if newmark ! (push-mark newmark t t) ! ;; Turn off the old mark when we set up an empty region. ! (setq deactivate-mark t)))) ;; Subroutine: set the mark where CLICK happened, ;; but don't do anything else. --- 118,273 ---- (if (numberp (posn-point end)) (goto-char (posn-point end))))) ! (defvar mouse-scroll-delay 0.25 ! "*The pause between scroll steps caused by mouse drags, in seconds. ! If you drag the mouse beyond the edge of a window, Emacs scrolls the ! window to bring the text beyond that edge into view, with a delay of ! this many seconds between scroll steps. Scrolling stops when you move ! the mouse back into the window, or release the button. ! This variable's value may be non-integral. ! Setting this to zero causes Emacs to scroll as fast as it can.") ! ! (defun mouse-scroll-subr (jump &optional overlay start) ! "Scroll the selected window JUMP lines at a time, until new input arrives. ! If OVERLAY is an overlay, let it stretch from START to the far edge of ! the newly visible text. ! Upon exit, point is at the far edge of the newly visible text." ! (while (progn ! (goto-char (window-start)) ! (if (not (zerop (vertical-motion jump))) ! (progn ! (set-window-start (selected-window) (point)) ! (if (natnump jump) ! (progn ! (goto-char (window-end (selected-window))) ! ;; window-end doesn't reflect the window's new ! ;; start position until the next redisplay. Hurrah. ! (vertical-motion (1- jump))) ! (goto-char (window-start (selected-window)))) ! (if overlay ! (move-overlay overlay start (point))) ! (if (not (eobp)) ! (sit-for mouse-scroll-delay)))))) ! (point)) ! ! (defvar mouse-drag-overlay (make-overlay 1 1)) ! (overlay-put mouse-drag-overlay 'face 'region) ! (defun mouse-drag-region (start-event) "Set the region to the text that the mouse is dragged over. + Highlight the drag area as the user moves the mouse. This must be bound to a button-down mouse event." (interactive "e") ! (let* ((start-posn (event-start start-event)) ! (start-point (posn-point start-posn)) ! (start-window (posn-window start-posn)) ! (start-frame (window-frame start-window)) ! (bounds (window-edges start-window)) ! (top (nth 1 bounds)) ! (bottom (if (window-minibuffer-p start-window) ! (nth 3 bounds) ! ;; Don't count the mode line. ! (1- (nth 3 bounds))))) ! (select-window start-window) ! (goto-char start-point) ! (move-overlay mouse-drag-overlay ! start-point start-point ! (window-buffer start-window)) ! (setq mark-active nil) ! (let (event end end-point) (track-mouse ! (while (progn ! (setq event (read-event)) ! (or (mouse-movement-p event) ! (eq (car-safe event) 'switch-frame))) ! ! (if (eq (car-safe event) 'switch-frame) ! nil ! (setq end (event-end event) ! end-point (posn-point end)) ! ! (cond ! ! ;; Ignore switch-frame events. ! ((eq (car-safe event) 'switch-frame)) ! ! ;; Are we moving within the original window? ! ((and (eq (posn-window end) start-window) ! (integer-or-marker-p end-point)) ! (goto-char end-point) ! (move-overlay mouse-drag-overlay ! start-point (point))) ! ! ;; Are we moving on a different window on the same frame? ! ((and (windowp (posn-window end)) ! (eq (window-frame (posn-window end)) start-frame)) ! (let ((mouse-row ! (+ (nth 1 (window-edges (posn-window end))) ! (cdr (posn-col-row end))))) ! (cond ! ((< mouse-row top) ! (mouse-scroll-subr ! (- mouse-row top) mouse-drag-overlay start-point)) ! ((and (not (eobp)) ! (>= mouse-row bottom)) ! (mouse-scroll-subr (1+ (- mouse-row bottom)) ! mouse-drag-overlay start-point))))) ! ! ;; Otherwise, we have no idea where the mouse is. ! (t))))) ! ! (if (and (eq (get (event-basic-type event) 'event-kind) 'mouse-click) ! (eq (posn-window (event-end event)) start-window) ! (numberp (posn-point (event-end event)))) ! (goto-char (posn-point (event-end event)))) ! (if (= (point) start-point) ! (setq mark-active nil) ! (set-mark start-point)) ! (delete-overlay mouse-drag-overlay)))) ! ! ;;;! (defun mouse-drag-region (click) ! ;;;! "Set the region to the text that the mouse is dragged over. ! ;;;! This must be bound to a button-down mouse event." ! ;;;! (interactive "e") ! ;;;! (let ((posn (event-start click)) ! ;;;! done event (mark-active nil)) ! ;;;! (select-window (posn-window posn)) ! ;;;! ;; Set point temporarily, so user sees where it is. ! ;;;! (if (numberp (posn-point posn)) ! ;;;! (goto-char (posn-point posn))) ! ;;;! ;; Turn off the old mark when we set up an empty region. ! ;;;! (setq deactivate-mark t))) ! ;;;! ! ;;;! ;;;Nice hack, but too slow, so not normally in use. ! ;;;! (defun mouse-drag-region-1 (click) ! ;;;! "Set the region to the text that the mouse is dragged over. ! ;;;! This must be bound to a button-down mouse event." ! ;;;! (interactive "e") ! ;;;! (let (newmark) ! ;;;! (let ((posn (event-start click)) ! ;;;! done event omark (mark-active t)) ! ;;;! (select-window (posn-window posn)) ! ;;;! (setq omark (and mark-active (mark))) ! ;;;! (if (numberp (posn-point posn)) ! ;;;! (goto-char (posn-point posn))) ! ;;;! ;; Set mark temporarily, so highlighting does what we want. ! ;;;! (set-marker (mark-marker) (point)) ! ;;;! (track-mouse ! ;;;! (while (not done) ! ;;;! (setq event (read-event)) ! ;;;! (if (eq (car-safe event) 'mouse-movement) ! ;;;! (goto-char (posn-point (event-start event))) ! ;;;! ;; Exit when we get the drag event; ignore that event. ! ;;;! (setq done t)))) ! ;;;! (if (/= (mark) (point)) ! ;;;! (setq newmark (mark))) ! ;;;! ;; Restore previous mark status. ! ;;;! (if omark (set-marker (mark-marker) omark))) ! ;;;! ;; Now, if we dragged, set the mark at the proper place. ! ;;;! (if newmark ! ;;;! (push-mark newmark t t) ! ;;;! ;; Turn off the old mark when we set up an empty region. ! ;;;! (setq deactivate-mark t)))) ;; Subroutine: set the mark where CLICK happened, ;; but don't do anything else. *************** and selects that window." *** 371,378 **** --- 478,493 ---- (list "Buffer Menu" (cons "Select Buffer" (let ((tail (buffer-list)) + (maxbuf 0) head) (while tail + (or (eq ?\ (aref (buffer-name (car tail)) 0)) + (setq maxbuf + (max maxbuf + (length (buffer-name (car tail)))))) + (setq tail (cdr tail))) + (setq tail (buffer-list)) + (while tail (let ((elt (car tail))) (if (not (string-match "^ " (buffer-name elt))) *************** and selects that window." *** 379,386 **** (setq head (cons (cons (format ! "%-14s %s" (buffer-name elt) (or (buffer-file-name elt) "")) elt) head)))) --- 494,507 ---- (setq head (cons (cons (format ! (format "%%%ds %%s%%s %%s" ! maxbuf) (buffer-name elt) + (if (buffer-modified-p elt) + "*" " ") + (save-excursion + (set-buffer elt) + (if buffer-read-only "%" " ")) (or (buffer-file-name elt) "")) elt) head)))) diff -cprP --exclude=*.elc emacs-19.15/lisp/outline.el emacs-19.16/lisp/outline.el *** emacs-19.15/lisp/outline.el Sun Jun 6 23:47:00 1993 --- emacs-19.16/lisp/outline.el Sun Jul 4 17:42:00 1993 *************** *** 55,62 **** (define-key outline-mode-map "\C-c\C-h" 'hide-subtree) (define-key outline-mode-map "\C-c\C-u" 'outline-up-heading) (define-key outline-mode-map "\C-c\C-f" 'outline-forward-same-level) ! (define-key outline-mode-map "\C-c\C-b" 'outline-backward-same-level)) (defvar outline-minor-mode nil "Non-nil if using Outline mode as a minor mode of some other mode.") (make-variable-buffer-local 'outline-minor-mode) --- 55,102 ---- (define-key outline-mode-map "\C-c\C-h" 'hide-subtree) (define-key outline-mode-map "\C-c\C-u" 'outline-up-heading) (define-key outline-mode-map "\C-c\C-f" 'outline-forward-same-level) ! (define-key outline-mode-map "\C-c\C-b" 'outline-backward-same-level) + (define-key outline-mode-map [menu-bar hide] + (cons "Hide" (make-sparse-keymap "Hide"))) + + (define-key outline-mode-map [menu-bar hide hide-subtree] + '("Hide Subtree" . outline-hide-subtree)) + (define-key outline-mode-map [menu-bar hide hide-entry] + '("Hide Entry" . outline-hide-entry)) + (define-key outline-mode-map [menu-bar hide hide-body] + '("Hide Body" . outline-hide-body)) + (define-key outline-mode-map [menu-bar hide hide-leaves] + '("Hide Leaves" . outline-hide-leaves)) + + (define-key outline-mode-map [menu-bar show] + (cons "Show" (make-sparse-keymap "Show"))) + + (define-key outline-mode-map [menu-bar show show-subtree] + '("Show Subtree" . outline-show-subtree)) + (define-key outline-mode-map [menu-bar show show-children] + '("Show Children" . outline-show-children)) + (define-key outline-mode-map [menu-bar show show-branches] + '("Show Branches" . outline-show-branches)) + (define-key outline-mode-map [menu-bar show show-entry] + '("Show Entry" . outline-show-entry)) + (define-key outline-mode-map [menu-bar show show-all] + '("Show All" . outline-show-all)) + + (define-key outline-mode-map [menu-bar headings] + (cons "Headings" (make-sparse-keymap "Headings"))) + + (define-key outline-mode-map [menu-bar headings outline-backward-same-level] + '("Previous Same Level" . outline-backward-same-level)) + (define-key outline-mode-map [menu-bar headings outline-forward-same-level] + '("Next Same Level" . outline-forward-same-level)) + (define-key outline-mode-map [menu-bar headings outline-previous-visible-heading] + '("Previous" . outline-previous-visible-heading)) + (define-key outline-mode-map [menu-bar headings outline-next-visible-heading] + '("Next" . outline-next-visible-heading)) + (define-key outline-mode-map [menu-bar headings outline-up-heading] + '("Up" . outline-up-heading))) + (defvar outline-minor-mode nil "Non-nil if using Outline mode as a minor mode of some other mode.") (make-variable-buffer-local 'outline-minor-mode) *************** Turning on outline mode calls the value *** 128,133 **** --- 168,175 ---- (if outline-minor-mode-map nil (setq outline-minor-mode-map (make-sparse-keymap)) + (define-key outline-minor-mode-map [menu-bar] + (lookup-key outline-mode-map [menu-bar])) (define-key outline-minor-mode-map "\C-c" (lookup-key outline-mode-map "\C-c"))) diff -cprP --exclude=*.elc emacs-19.15/lisp/paren.el emacs-19.16/lisp/paren.el *** emacs-19.15/lisp/paren.el --- emacs-19.16/lisp/paren.el Tue Jul 6 04:53:02 1993 *************** *** 0 **** --- 1,96 ---- + ;;; paren.el --- highlight matching paren. + ;; Copyright (C) 1993 Free Software Foundation, Inc. + + ;; Author: rms@gnu.ai.mit.edu + ;; Maintainer: FSF + ;; Keywords: languages, faces + + ;; This file is part of GNU Emacs. + + ;; GNU Emacs is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + + ;; GNU Emacs is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU Emacs; see the file COPYING. If not, write to + ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + ;;; Commentary: + + ;; Load this and it will display highlighting on whatever + ;; paren matches the one before or after point. + + ;;; Code: + + (defvar show-paren-overlay nil) + + ;; Find the place to show, if there is one, + ;; and show it until input arrives. + (defun show-paren-command-hook () + (let (pos dir mismatch (oldpos (point)) + (face (if (face-equal 'highlight 'region) + 'underline 'highlight))) + (cond ((eq (char-syntax (following-char)) ?\() + (setq dir 1)) + ((eq (char-syntax (preceding-char)) ?\)) + (setq dir -1))) + (save-excursion + (save-restriction + ;; Determine the range within which to look for a match. + (if blink-matching-paren-distance + (narrow-to-region (max (point-min) + (- (point) blink-matching-paren-distance)) + (min (point-max) + (+ (point) blink-matching-paren-distance)))) + ;; Scan across one sexp within that range. + (condition-case () + (setq pos (scan-sexps (point) dir)) + (error nil)) + ;; See if the "matching" paren is the right kind of paren + ;; to match the one we started at. + (if pos + (let ((beg (min pos oldpos)) (end (max pos oldpos))) + (and (/= (char-syntax (char-after beg)) ?\$) + (setq mismatch + (/= (char-after (1- end)) + (logand (lsh (aref (syntax-table) + (char-after beg)) + -8) + 255)))))) + ;; If they don't properly match, don't show. + (if mismatch + (progn + (message "Paren mismatch") + ;;; (setq pos nil) + )))) + (cond (pos + (if show-paren-overlay + (move-overlay show-paren-overlay (- pos dir) pos) + (setq show-paren-overlay + (make-overlay (- pos dir) pos))) + (overlay-put show-paren-overlay 'face face) + ;;; This is code to blink the highlighting. + ;;; It is desirable to avoid this because + ;;; it would interfere with auto-save and gc when idle. + ;;; (while (sit-for 1) + ;;; (overlay-put show-paren-overlay + ;;; 'face + ;;; (if (overlay-get show-paren-overlay + ;;; 'face) + ;;; nil face))) + ) + (t + (and show-paren-overlay (overlay-buffer show-paren-overlay) + (delete-overlay show-paren-overlay)))))) + + (add-hook 'post-command-hook 'show-paren-command-hook) + + (provide 'paren) + + ;;; paren.el ends here diff -cprP --exclude=*.elc emacs-19.15/lisp/replace.el emacs-19.16/lisp/replace.el *** emacs-19.15/lisp/replace.el Sun May 9 13:41:42 1993 --- emacs-19.16/lisp/replace.el Mon Jul 5 00:39:50 1993 *************** *** 395,400 **** --- 395,402 ---- (define-key query-replace-map "\e" 'exit) (define-key query-replace-map [escape] 'exit) (define-key query-replace-map "q" 'exit) + (define-key query-replace-map "\r" 'exit) + (define-key query-replace-map [return] 'exit) (define-key query-replace-map "." 'act-and-exit) (define-key query-replace-map "\C-r" 'edit) (define-key query-replace-map "\C-w" 'delete-and-edit) diff -cprP --exclude=*.elc emacs-19.15/lisp/reporter.el emacs-19.16/lisp/reporter.el *** emacs-19.15/lisp/reporter.el Wed Jun 9 07:26:54 1993 --- emacs-19.16/lisp/reporter.el Sat Jun 26 07:59:44 1993 *************** *** 1,14 **** ;;; reporter.el --- customizable bug reporting of lisp programs ;; Author: 1993 Barry A. Warsaw, Century Computing Inc. ;; Maintainer: bwarsaw@cen.com ;; Created: 19-Apr-1993 - ;; Version: 1.18 - ;; Last Modified: 1993/05/22 00:29:49 ;; Keywords: bug reports lisp - ;; Copyright (C) 1993 Free Software Foundation, Inc. - ;; This file is not yet part of GNU Emacs. ;; ;; This program is free software; you can redistribute it and/or modify --- 1,11 ---- ;;; reporter.el --- customizable bug reporting of lisp programs + ;; Copyright (C) 1993 Free Software Foundation, Inc. ;; Author: 1993 Barry A. Warsaw, Century Computing Inc. ;; Maintainer: bwarsaw@cen.com ;; Created: 19-Apr-1993 ;; Keywords: bug reports lisp ;; This file is not yet part of GNU Emacs. ;; ;; This program is free software; you can redistribute it and/or modify *************** *** 81,90 **** ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;; end of user defined variables (defun reporter-dump-variable (varsym) "Pretty-print the value of the variable in symbol VARSYM." ! (let ((val (eval varsym)) (sym (symbol-name varsym)) (print-escape-newlines t)) (insert " " sym " " --- 78,94 ---- ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;; end of user defined variables + (defvar reporter-eval-buffer nil + "Buffer to retrieve variable's value from. + This is necessary to properly support the printing of buffer-local + variables. Current buffer will always be the mail buffer being + composed.") (defun reporter-dump-variable (varsym) "Pretty-print the value of the variable in symbol VARSYM." ! (let ((val (save-excursion ! (set-buffer reporter-eval-buffer) ! (eval varsym))) (sym (symbol-name varsym)) (print-escape-newlines t)) (insert " " sym " " *************** If a cons cell, the car must be a variab *** 108,113 **** --- 112,124 ---- a function which will be `funcall'd with the symbol. Use this to write your own custom variable value printers for specific variables. + Note that the global variable `reporter-eval-buffer' will be bound to + the buffer in which `reporter-submit-bug-report' was invoked. If you + want to print the value of a buffer local variable, you should wrap + the `eval' call in your custom printer inside a `set-buffer' (and + probably a `save-excursion'). `reporter-dump-variable' handles this + properly. + PRE-HOOKS is run after the emacs-version and PKGNAME are inserted, but before the VARLIST is dumped. POST-HOOKS is run after the VARLIST is dumped." *************** mail buffer, and point is left after the *** 143,153 **** The mailer used is described in the variable `reporter-mailer'." ! (let ((curbuf (current-buffer)) (mailbuf (progn (call-interactively reporter-mailer) (current-buffer)))) (require 'sendmail) ! (pop-to-buffer curbuf) (pop-to-buffer mailbuf) (goto-char (point-min)) ;; different mailers use different separators, some may not even --- 154,164 ---- The mailer used is described in the variable `reporter-mailer'." ! (let ((reporter-eval-buffer (current-buffer)) (mailbuf (progn (call-interactively reporter-mailer) (current-buffer)))) (require 'sendmail) ! (pop-to-buffer reporter-eval-buffer) (pop-to-buffer mailbuf) (goto-char (point-min)) ;; different mailers use different separators, some may not even diff -cprP --exclude=*.elc emacs-19.15/lisp/rmail.el emacs-19.16/lisp/rmail.el *** emacs-19.15/lisp/rmail.el Thu Jun 10 23:56:31 1993 --- emacs-19.16/lisp/rmail.el Wed Jun 30 12:43:10 1993 *************** *** 56,62 **** ;;;###autoload (defvar rmail-dont-reply-to-names nil "\ *A regexp specifying names to prune of reply to messages. ! nil means dont reply to yourself.") ;;;###autoload (defvar rmail-default-dont-reply-to-names "info-" "\ --- 56,62 ---- ;;;###autoload (defvar rmail-dont-reply-to-names nil "\ *A regexp specifying names to prune of reply to messages. ! A value of nil means exclude your own name only.") ;;;###autoload (defvar rmail-default-dont-reply-to-names "info-" "\ *************** A regular expression specifying part of *** 64,70 **** the variable `rmail-dont-reply-to-names', for when the user does not set `rmail-dont-reply-to-names' explicitly. (The other part of the default value is the user's name.) ! It is useful to set this variable in the site customisation file.") ;;;###autoload (defvar rmail-ignored-headers "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^received:\\|^message-id:\\|^summary-line:" "\ --- 64,70 ---- the variable `rmail-dont-reply-to-names', for when the user does not set `rmail-dont-reply-to-names' explicitly. (The other part of the default value is the user's name.) ! It is useful to set this variable in the site customization file.") ;;;###autoload (defvar rmail-ignored-headers "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^received:\\|^message-id:\\|^summary-line:" "\ *************** Note: it means the file has no messag *** 344,351 **** --- 344,452 ---- (define-key rmail-mode-map " " 'scroll-up) (define-key rmail-mode-map "\177" 'scroll-down) (define-key rmail-mode-map "?" 'describe-mode) + (define-key rmail-mode-map "\C-c\C-s\C-d" 'rmail-sort-by-date) + (define-key rmail-mode-map "\C-c\C-s\C-s" 'rmail-sort-by-subject) + (define-key rmail-mode-map "\C-c\C-s\C-a" 'rmail-sort-by-author) + (define-key rmail-mode-map "\C-c\C-s\C-r" 'rmail-sort-by-recipient) + (define-key rmail-mode-map "\C-c\C-s\C-c" 'rmail-sort-by-correspondent) + (define-key rmail-mode-map "\C-c\C-s\C-l" 'rmail-sort-by-lines) ) + + (define-key rmail-mode-map [menu-bar] (make-sparse-keymap)) + + (define-key rmail-mode-map [menu-bar classify] + (cons "Classify" (make-sparse-keymap "Classify"))) + + (define-key rmail-mode-map [menu-bar classify output-inbox] + '("Output (inbox)" . rmail-output)) + + (define-key rmail-mode-map [menu-bar classify output] + '("Output (Rmail)" . rmail-output-to-rmail-file)) + + (define-key rmail-mode-map [menu-bar classify kill-label] + '("Kill Label" . rmail-kill-label)) + + (define-key rmail-mode-map [menu-bar classify add-label] + '("Add Label" . rmail-add-label)) + + (define-key rmail-mode-map [menu-bar summary] + (cons "Summary" (make-sparse-keymap "Summary"))) + + (define-key rmail-mode-map [menu-bar summary labels] + '("By Labels" . rmail-summary-by-labels)) + + (define-key rmail-mode-map [menu-bar summary recipients] + '("By Recipients" . rmail-summary-by-recipients)) + + (define-key rmail-mode-map [menu-bar summary topic] + '("By Topic" . rmail-summary-by-topic)) + + (define-key rmail-mode-map [menu-bar summary regexp] + '("By Regexp" . rmail-summary-by-regexp)) + + (define-key rmail-mode-map [menu-bar summary all] + '("All" . rmail-summary)) + + (define-key rmail-mode-map [menu-bar mail] + (cons "Mail" (make-sparse-keymap "Mail"))) + + (define-key rmail-mode-map [menu-bar mail continue] + '("Continue" . rmail-continue)) + + (define-key rmail-mode-map [menu-bar mail forward] + '("Forward" . rmail-forward)) + + (define-key rmail-mode-map [menu-bar mail retry] + '("Retry" . rmail-retry-failure)) + + (define-key rmail-mode-map [menu-bar mail reply] + '("Reply" . rmail-reply)) + + (define-key rmail-mode-map [menu-bar mail mail] + '("Mail" . rmail-mail)) + + (define-key rmail-mode-map [menu-bar delete] + (cons "Delete" (make-sparse-keymap "Delete"))) + + (define-key rmail-mode-map [menu-bar delete expunge/save] + '("Expunge/Save" . rmail-expunge-and-save)) + + (define-key rmail-mode-map [menu-bar delete expunge] + '("Expunge" . rmail-expunge)) + + (define-key rmail-mode-map [menu-bar delete undelete] + '("Undelete" . rmail-undelete-previous-message)) + + (define-key rmail-mode-map [menu-bar delete delete] + '("Delete" . rmail-delete-forward)) + + (define-key rmail-mode-map [menu-bar move] + (cons "Move" (make-sparse-keymap "Move"))) + + (define-key rmail-mode-map [menu-bar move search-back] + '("Search Back" . rmail-search-backward)) + + (define-key rmail-mode-map [menu-bar move search] + '("Search" . rmail-search)) + + (define-key rmail-mode-map [menu-bar move previous] + '("Previous Nondeleted" . rmail-previous-undeleted-message)) + + (define-key rmail-mode-map [menu-bar move next] + '("Next Nondeleted" . rmail-next-undeleted-message)) + + (define-key rmail-mode-map [menu-bar move last] + '("Last" . rmail-last-message)) + (define-key rmail-mode-map [menu-bar move first] + '("First" . rmail-first-message)) + + (define-key rmail-mode-map [menu-bar move previous] + '("Previous" . rmail-previous-message)) + + (define-key rmail-mode-map [menu-bar move next] + '("Next" . rmail-next-message)) + ;; Rmail mode is suitable only for specially formatted data. (put 'rmail-mode 'mode-class 'special) *************** Instead, these commands are available: *** 400,406 **** (interactive) (rmail-mode-2) (rmail-set-message-counters) ! (rmail-show-message)) (defun rmail-mode-2 () (kill-all-local-variables) --- 501,507 ---- (interactive) (rmail-mode-2) (rmail-set-message-counters) ! (rmail-show-message rmail-total-messages)) (defun rmail-mode-2 () (kill-all-local-variables) *************** or forward if N is negative." *** 1277,1282 **** --- 1378,1407 ---- (search-forward "*** EOOH ***" (point-max)) (point)))) (re-search-forward regexp end t))) + (defun rmail-search-backward (regexp &optional n) + "Show message containing next match for REGEXP. + Prefix argument gives repeat count; negative argument means search + backwards (through earlier messages). + Interactively, empty argument means use same regexp used last time." + (interactive + (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) + (prompt + (concat (if reversep "Reverse " "") "Rmail search (regexp): ")) + regexp) + (if rmail-search-last-regexp + (setq prompt (concat prompt + "(default " + rmail-search-last-regexp + ") "))) + (setq regexp (read-string prompt)) + (cond ((not (equal regexp "")) + (setq rmail-search-last-regexp regexp)) + ((not rmail-search-last-regexp) + (error "No previous Rmail search string"))) + (list rmail-search-last-regexp + (prefix-numeric-value current-prefix-arg)))) + (rmail-search regexp (- n))) + (defvar rmail-search-last-regexp nil) (defun rmail-search (regexp &optional n) "Show message containing next match for REGEXP. *************** With prefix argument N moves backward N *** 1855,1860 **** --- 1980,2011 ---- (autoload 'rmail-edit-current-message "rmailedit" "Edit the contents of the current message" t) + + ;;;; *** Rmail Sorting *** + + (autoload 'rmail-sort-by-date "rmailsort" + "Sort messages of current Rmail file by date. + If prefix argument REVERSE is non-nil, sort them in reverse order." t) + + (autoload 'rmail-sort-by-subject "rmailsort" + "Sort messages of current Rmail file by subject. + If prefix argument REVERSE is non-nil, sort them in reverse order." t) + + (autoload 'rmail-sort-by-author "rmailsort" + "Sort messages of current Rmail file by author. + If prefix argument REVERSE is non-nil, sort them in reverse order." t) + + (autoload 'rmail-sort-by-recipient "rmailsort" + "Sort messages of current Rmail file by recipient. + If prefix argument REVERSE is non-nil, sort them in reverse order." t) + + (autoload 'rmail-sort-by-correspondent "rmailsort" + "Sort messages of current Rmail file by other correspondent. + If prefix argument REVERSE is non-nil, sort them in reverse order." t) + + (autoload 'rmail-sort-by-lines "rmailsort" + "Sort messages of current Rmail file by number of lines. + If prefix argument REVERSE is non-nil, sort them in reverse order." t) ;;;; *** Rmail Summary Mode *** diff -cprP --exclude=*.elc emacs-19.15/lisp/rmailsort.el emacs-19.16/lisp/rmailsort.el *** emacs-19.15/lisp/rmailsort.el Wed May 26 16:28:13 1993 --- emacs-19.16/lisp/rmailsort.el Tue Jun 22 01:55:42 1993 *************** *** 3,9 **** ;; Copyright (C) 1990, 1993 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA ! ;; Version: $Header: /home/fsf/rms/e19/lisp/RCS/rmailsort.el,v 1.14 1993/05/26 20:28:11 rms Exp $ ;; Keywords: mail ;; This file is part of GNU Emacs. --- 3,9 ---- ;; Copyright (C) 1990, 1993 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA ! ;; Version: $Header: /home/fsf/rms/e19/lisp/RCS/rmailsort.el,v 1.15 1993/06/22 05:55:41 rms Exp $ ;; Keywords: mail ;; This file is part of GNU Emacs. *************** *** 22,68 **** ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - ;;; Commentary: - - ;; LCD Archive Entry: - ;; rmailsort|Masanobu UMEDA|umerin@mse.kyutech.ac.jp| - ;; Rmail: sort messages.| - ;; $Date: 1993/05/26 20:28:11 $|$Revision: 1.14 $|~/misc/rmailsort.el.Z| - ;;; Code: - (require 'rmail) (require 'sort) (autoload 'timezone-make-date-sortable "timezone") - ;; GNUS compatible key bindings. - - (define-key rmail-mode-map "\C-c\C-s\C-d" 'rmail-sort-by-date) - (define-key rmail-mode-map "\C-c\C-s\C-s" 'rmail-sort-by-subject) - (define-key rmail-mode-map "\C-c\C-s\C-a" 'rmail-sort-by-author) - (define-key rmail-mode-map "\C-c\C-s\C-r" 'rmail-sort-by-recipient) - (define-key rmail-mode-map "\C-c\C-s\C-c" 'rmail-sort-by-correspondent) - (define-key rmail-mode-map "\C-c\C-s\C-l" 'rmail-sort-by-lines) - - ;; Key binding may not be installed unless Rmail Summary mode is loaded. - (if (boundp 'rmail-summary-mode-map) - (progn - (define-key rmail-summary-mode-map - "\C-c\C-s\C-d" 'rmail-summary-sort-by-date) - (define-key rmail-summary-mode-map - "\C-c\C-s\C-s" 'rmail-summary-sort-by-subject) - (define-key rmail-summary-mode-map - "\C-c\C-s\C-a" 'rmail-summary-sort-by-author) - (define-key rmail-summary-mode-map - "\C-c\C-s\C-r" 'rmail-summary-sort-by-recipient) - (define-key rmail-summary-mode-map - "\C-c\C-s\C-c" 'rmail-summary-sort-by-correspondent) - (define-key rmail-summary-mode-map - "\C-c\C-s\C-l" 'rmail-summary-sort-by-lines) - )) - - ;; Sorting messages in Rmail buffer (defun rmail-sort-by-date (reverse) --- 22,33 ---- *************** If prefix argument REVERSE is non-nil, s *** 135,141 **** ans)) (defun rmail-sort-by-lines (reverse) ! "Sort messages of current Rmail file by lines of the message. If prefix argument REVERSE is non-nil, sort them in reverse order." (interactive "P") (rmail-sort-messages reverse --- 100,106 ---- ans)) (defun rmail-sort-by-lines (reverse) ! "Sort messages of current Rmail file by number of lines. If prefix argument REVERSE is non-nil, sort them in reverse order." (interactive "P") (rmail-sort-messages reverse *************** If prefix argument REVERSE is non-nil, s *** 144,188 **** (count-lines (rmail-msgbeg msgnum) (rmail-msgend msgnum)))))) - ;; Sorting messages in Rmail Summary buffer. - - (defun rmail-summary-sort-by-date (reverse) - "Sort messages of current Rmail summary by date. - If prefix argument REVERSE is non-nil, sort them in reverse order." - (interactive "P") - (rmail-sort-from-summary (function rmail-sort-by-date) reverse)) - - (defun rmail-summary-sort-by-subject (reverse) - "Sort messages of current Rmail summary by subject. - If prefix argument REVERSE is non-nil, sort them in reverse order." - (interactive "P") - (rmail-sort-from-summary (function rmail-sort-by-subject) reverse)) - - (defun rmail-summary-sort-by-author (reverse) - "Sort messages of current Rmail summary by author. - If prefix argument REVERSE is non-nil, sort them in reverse order." - (interactive "P") - (rmail-sort-from-summary (function rmail-sort-by-author) reverse)) - - (defun rmail-summary-sort-by-recipient (reverse) - "Sort messages of current Rmail summary by recipient. - If prefix argument REVERSE is non-nil, sort them in reverse order." - (interactive "P") - (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse)) - - (defun rmail-summary-sort-by-correspondent (reverse) - "Sort messages of current Rmail summary by other correspondent. - If prefix argument REVERSE is non-nil, sort them in reverse order." - (interactive "P") - (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse)) - - (defun rmail-summary-sort-by-lines (reverse) - "Sort messages of current Rmail summary by lines of the message. - If prefix argument REVERSE is non-nil, sort them in reverse order." - (interactive "P") - (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) - - ;; Basic functions (defun rmail-sort-messages (reverse keyfun) --- 109,114 ---- *************** If 1st argument REVERSE is non-nil, sort *** 250,261 **** (rmail-show-message current-message)) )) - (defun rmail-sort-from-summary (sortfun reverse) - "Sort Rmail messages from Summary buffer and update it after sorting." - (pop-to-buffer rmail-buffer) - (funcall sortfun reverse) - (rmail-summary)) - (defun rmail-fetch-field (msg field) "Return the value of the header FIELD of MSG. Arguments are MSG and FIELD." --- 176,181 ---- *************** Arguments are MSG and FIELD." *** 274,311 **** "Make DATE sortable using the function string-lessp." ;; Assume the default time zone is GMT. (timezone-make-date-sortable date "GMT" "GMT")) - - ;; Copy of the function gnus-comparable-date in gnus.el version 3.13 - ; - ;(defun rmail-make-date-sortable (date) - ; "Make sortable string by string-lessp from DATE." - ; (let ((month '(("JAN" . " 1")("FEB" . " 2")("MAR" . " 3") - ; ("APR" . " 4")("MAY" . " 5")("JUN" . " 6") - ; ("JUL" . " 7")("AUG" . " 8")("SEP" . " 9") - ; ("OCT" . "10")("NOV" . "11")("DEC" . "12"))) - ; (date (or date ""))) - ; ;; Can understand the following styles: - ; ;; (1) 14 Apr 89 03:20:12 GMT - ; ;; (2) Fri, 17 Mar 89 4:01:33 GMT - ; (if (string-match - ; "\\([0-9]+\\) \\([^ ,]+\\) \\([0-9]+\\) \\([0-9:]+\\)" date) - ; (concat - ; ;; Year - ; (substring date (match-beginning 3) (match-end 3)) - ; ;; Month - ; (cdr - ; (assoc - ; (upcase (substring date (match-beginning 2) (match-end 2))) month)) - ; ;; Day - ; (format "%2d" (string-to-int - ; (substring date - ; (match-beginning 1) (match-end 1)))) - ; ;; Time - ; (substring date (match-beginning 4) (match-end 4))) - ; ;; Cannot understand DATE string. - ; date - ; ) - ; )) (provide 'rmailsort) --- 194,199 ---- diff -cprP --exclude=*.elc emacs-19.15/lisp/rmailsum.el emacs-19.16/lisp/rmailsum.el *** emacs-19.15/lisp/rmailsum.el Sat Jun 5 17:18:05 1993 --- emacs-19.16/lisp/rmailsum.el Tue Jun 22 01:47:57 1993 *************** *** 586,593 **** --- 586,702 ---- (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up) (define-key rmail-summary-mode-map "\177" 'rmail-summary-scroll-msg-down) (define-key rmail-summary-mode-map "?" 'describe-mode) + (define-key rmail-summary-mode-map "\C-c\C-s\C-d" + 'rmail-summary-sort-by-date) + (define-key rmail-summary-mode-map "\C-c\C-s\C-s" + 'rmail-summary-sort-by-subject) + (define-key rmail-summary-mode-map "\C-c\C-s\C-a" + 'rmail-summary-sort-by-author) + (define-key rmail-summary-mode-map "\C-c\C-s\C-r" + 'rmail-summary-sort-by-recipient) + (define-key rmail-summary-mode-map "\C-c\C-s\C-c" + 'rmail-summary-sort-by-correspondent) + (define-key rmail-summary-mode-map "\C-c\C-s\C-l" + 'rmail-summary-sort-by-lines) ) + ;;; Menu bar bindings. + + (define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap)) + + (define-key rmail-summary-mode-map [menu-bar classify] + (cons "Classify" (make-sparse-keymap "Classify"))) + + (define-key rmail-summary-mode-map [menu-bar classify output-inbox] + '("Output (inbox)" . rmail-summary-output)) + + (define-key rmail-summary-mode-map [menu-bar classify output] + '("Output (Rmail)" . rmail-summary-output-to-rmail-file)) + + (define-key rmail-summary-mode-map [menu-bar classify kill-label] + '("Kill Label" . rmail-summary-kill-label)) + + (define-key rmail-summary-mode-map [menu-bar classify add-label] + '("Add Label" . rmail-summary-add-label)) + + (define-key rmail-summary-mode-map [menu-bar summary] + (cons "Summary" (make-sparse-keymap "Summary"))) + + (define-key rmail-summary-mode-map [menu-bar summary labels] + '("By Labels" . rmail-summary-by-labels)) + + (define-key rmail-summary-mode-map [menu-bar summary recipients] + '("By Recipients" . rmail-summary-by-recipients)) + + (define-key rmail-summary-mode-map [menu-bar summary topic] + '("By Topic" . rmail-summary-by-topic)) + + (define-key rmail-summary-mode-map [menu-bar summary regexp] + '("By Regexp" . rmail-summary-by-regexp)) + + (define-key rmail-summary-mode-map [menu-bar summary all] + '("All" . rmail-summary)) + + (define-key rmail-summary-mode-map [menu-bar mail] + (cons "Mail" (make-sparse-keymap "Mail"))) + + (define-key rmail-summary-mode-map [menu-bar mail continue] + '("Continue" . rmail-summary-continue)) + + (define-key rmail-summary-mode-map [menu-bar mail forward] + '("Forward" . rmail-summary-forward)) + + (define-key rmail-summary-mode-map [menu-bar mail retry] + '("Retry" . rmail-summary-retry-failure)) + + (define-key rmail-summary-mode-map [menu-bar mail reply] + '("Reply" . rmail-summary-reply)) + + (define-key rmail-summary-mode-map [menu-bar mail mail] + '("Mail" . rmail-summary-mail)) + + (define-key rmail-summary-mode-map [menu-bar delete] + (cons "Delete" (make-sparse-keymap "Delete"))) + + (define-key rmail-summary-mode-map [menu-bar delete expunge/save] + '("Expunge/Save" . rmail-summary-expunge-and-save)) + + (define-key rmail-summary-mode-map [menu-bar delete expunge] + '("Expunge" . rmail-summary-expunge)) + + (define-key rmail-summary-mode-map [menu-bar delete undelete] + '("Undelete" . rmail-summary-undelete)) + + (define-key rmail-summary-mode-map [menu-bar delete delete] + '("Delete" . rmail-summary-delete-forward)) + + (define-key rmail-summary-mode-map [menu-bar move] + (cons "Move" (make-sparse-keymap "Move"))) + + (define-key rmail-summary-mode-map [menu-bar move search-back] + '("Search Back" . rmail-summary-search-backward)) + + (define-key rmail-summary-mode-map [menu-bar move search] + '("Search" . rmail-summary-search)) + + (define-key rmail-summary-mode-map [menu-bar move previous] + '("Previous Nondeleted" . rmail-summary-previous-msg)) + + (define-key rmail-summary-mode-map [menu-bar move next] + '("Next Nondeleted" . rmail-summary-next-msg)) + + (define-key rmail-summary-mode-map [menu-bar move last] + '("Last" . rmail-summary-last-message)) + + (define-key rmail-summary-mode-map [menu-bar move first] + '("First" . rmail-summary-first-message)) + + (define-key rmail-summary-mode-map [menu-bar move previous] + '("Previous" . rmail-summary-previous-all)) + + (define-key rmail-summary-mode-map [menu-bar move next] + '("Next" . rmail-summary-next-all)) + (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail) (interactive "P") (if (consp n) (setq n (prefix-numeric-value n))) *************** Go back to summary buffer." *** 742,747 **** --- 851,887 ---- (rmail-abort-edit) (pop-to-buffer rmail-summary-buffer)) + (defun rmail-summary-search-backward (regexp &optional n) + "Show message containing next match for REGEXP. + Prefix argument gives repeat count; negative argument means search + backwards (through earlier messages). + Interactively, empty argument means use same regexp used last time." + (interactive + (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) + (prompt + (concat (if reversep "Reverse " "") "Rmail search (regexp): ")) + regexp) + (if rmail-search-last-regexp + (setq prompt (concat prompt + "(default " + rmail-search-last-regexp + ") "))) + (setq regexp (read-string prompt)) + (cond ((not (equal regexp "")) + (setq rmail-search-last-regexp regexp)) + ((not rmail-search-last-regexp) + (error "No previous Rmail search string"))) + (list rmail-search-last-regexp + (prefix-numeric-value current-prefix-arg)))) + ;; Don't use save-excursion because that prevents point from moving + ;; properly in the summary buffer. + (let ((buffer (current-buffer))) + (unwind-protect + (progn + (set-buffer rmail-buffer) + (rmail-search regexp (- n))) + (set-buffer buffer)))) + (defun rmail-summary-search (regexp &optional n) "Show message containing next match for REGEXP. Prefix argument gives repeat count; negative argument means search *************** Interactively, empty argument means use *** 764,772 **** (error "No previous Rmail search string"))) (list rmail-search-last-regexp (prefix-numeric-value current-prefix-arg)))) ! (save-excursion ! (set-buffer rmail-buffer) ! (rmail-search regexp n))) (defun rmail-summary-toggle-header () "Show original message header if pruned header currently shown, or vice versa." --- 904,917 ---- (error "No previous Rmail search string"))) (list rmail-search-last-regexp (prefix-numeric-value current-prefix-arg)))) ! ;; Don't use save-excursion because that prevents point from moving ! ;; properly in the summary buffer. ! (let ((buffer (current-buffer))) ! (unwind-protect ! (progn ! (set-buffer rmail-buffer) ! (rmail-search regexp n)) ! (set-buffer buffer)))) (defun rmail-summary-toggle-header () "Show original message header if pruned header currently shown, or vice versa." *************** buffer visiting that file." *** 877,881 **** --- 1022,1071 ---- (save-excursion (set-buffer rmail-buffer) (call-interactively 'rmail-output))) + + ;; Sorting messages in Rmail Summary buffer. + + (defun rmail-summary-sort-by-date (reverse) + "Sort messages of current Rmail summary by date. + If prefix argument REVERSE is non-nil, sort them in reverse order." + (interactive "P") + (rmail-sort-from-summary (function rmail-sort-by-date) reverse)) + + (defun rmail-summary-sort-by-subject (reverse) + "Sort messages of current Rmail summary by subject. + If prefix argument REVERSE is non-nil, sort them in reverse order." + (interactive "P") + (rmail-sort-from-summary (function rmail-sort-by-subject) reverse)) + + (defun rmail-summary-sort-by-author (reverse) + "Sort messages of current Rmail summary by author. + If prefix argument REVERSE is non-nil, sort them in reverse order." + (interactive "P") + (rmail-sort-from-summary (function rmail-sort-by-author) reverse)) + + (defun rmail-summary-sort-by-recipient (reverse) + "Sort messages of current Rmail summary by recipient. + If prefix argument REVERSE is non-nil, sort them in reverse order." + (interactive "P") + (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse)) + + (defun rmail-summary-sort-by-correspondent (reverse) + "Sort messages of current Rmail summary by other correspondent. + If prefix argument REVERSE is non-nil, sort them in reverse order." + (interactive "P") + (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse)) + + (defun rmail-summary-sort-by-lines (reverse) + "Sort messages of current Rmail summary by lines of the message. + If prefix argument REVERSE is non-nil, sort them in reverse order." + (interactive "P") + (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) + + (defun rmail-sort-from-summary (sortfun reverse) + "Sort Rmail messages from Summary buffer and update it after sorting." + (require 'rmailsort) + (pop-to-buffer rmail-buffer) + (funcall sortfun reverse) + (rmail-summary)) ;;; rmailsum.el ends here diff -cprP --exclude=*.elc emacs-19.15/lisp/sendmail.el emacs-19.16/lisp/sendmail.el *** emacs-19.15/lisp/sendmail.el Thu Jun 17 19:42:57 1993 --- emacs-19.16/lisp/sendmail.el Thu Jul 1 19:35:15 1993 *************** *** 216,221 **** --- 216,223 ---- "$\\|^[ \t]*[-_][-_][-_]+$\\|" paragraph-separate)) (run-hooks 'text-mode-hook 'mail-mode-hook)) + + ;;; Set up keymap. (if mail-mode-map nil *************** *** 233,238 **** --- 235,282 ---- (define-key mail-mode-map "\C-c\C-v" 'mail-sent-via) (define-key mail-mode-map "\C-c\C-c" 'mail-send-and-exit) (define-key mail-mode-map "\C-c\C-s" 'mail-send)) + + (define-key mail-mode-map [menu-bar mail] + (cons "Mail" (make-sparse-keymap "Mail"))) + + (define-key mail-mode-map [menu-bar mail fill] + '("Fill Citation" . mail-fill-yanked-message)) + + (define-key mail-mode-map [menu-bar mail yank] + '("Cite Original" . mail-yank-original)) + + (define-key mail-mode-map [menu-bar mail signature] + '("Insert Signature" . mail-signature)) + + (define-key mail-mode-map [menu-bar mail send-stay] + '("Send, Keep Editing" . mail-send)) + + (define-key mail-mode-map [menu-bar mail send] + '("Send Message" . mail-send-and-exit)) + + (define-key mail-mode-map [menu-bar headers] + (cons "Headers" (make-sparse-keymap "Headers"))) + + (define-key mail-mode-map [menu-bar headers sent-via] + '("Sent Via" . mail-sent-via)) + + (define-key mail-mode-map [menu-bar headers text] + '("Text" . mail-text)) + + (define-key mail-mode-map [menu-bar headers bcc] + '("Bcc" . mail-bcc)) + + (define-key mail-mode-map [menu-bar headers fcc] + '("Fcc" . mail-fcc)) + + (define-key mail-mode-map [menu-bar headers cc] + '("Cc" . mail-cc)) + + (define-key mail-mode-map [menu-bar headers subject] + '("Subject" . mail-subject)) + + (define-key mail-mode-map [menu-bar headers to] + '("To" . mail-to)) (defun mail-send-and-exit (arg) "Send message like `mail-send', then, if no errors, exit from mail buffer. *************** or error messages, and inform user. *** 256,263 **** Otherwise any failure is reported in a message back to the user from the mailer." (interactive) ! (if (or (buffer-modified-p) ! (y-or-n-p "Message already sent; resend? ")) (progn (message "Sending...") (run-hooks 'mail-send-hook) --- 300,309 ---- Otherwise any failure is reported in a message back to the user from the mailer." (interactive) ! (if (if buffer-file-name ! (y-or-n-p "Send buffer contents as mail message? ") ! (or (buffer-modified-p) ! (y-or-n-p "Message already sent; resend? "))) (progn (message "Sending...") (run-hooks 'mail-send-hook) diff -cprP --exclude=*.elc emacs-19.15/lisp/simple.el emacs-19.16/lisp/simple.el *** emacs-19.15/lisp/simple.el Fri Jun 11 05:44:37 1993 --- emacs-19.16/lisp/simple.el Mon Jul 5 17:21:09 1993 *************** *** 1040,1050 **** (eq last-command 'kill-region) (eq beg end))) ;; Don't let the undo list be truncated before we can even access it. ! (let ((undo-strong-limit (+ (- (max beg end) (min beg end)) 100))) (delete-region beg end) ;; Take the same string recorded for undo ;; and put it in the kill-ring. ! (kill-new (car (car buffer-undo-list))) (setq this-command 'kill-region))) (t --- 1040,1057 ---- (eq last-command 'kill-region) (eq beg end))) ;; Don't let the undo list be truncated before we can even access it. ! (let ((undo-strong-limit (+ (- (max beg end) (min beg end)) 100)) ! (old-list buffer-undo-list) ! tail) (delete-region beg end) + ;; Search back in buffer-undo-list for this string, + ;; in case a change hook made property changes. + (setq tail buffer-undo-list) + (while (not (stringp (car (car tail)))) + (setq tail (cdr tail))) ;; Take the same string recorded for undo ;; and put it in the kill-ring. ! (kill-new (car (car tail))) (setq this-command 'kill-region))) (t *************** START and END specify the portion of the *** 1230,1235 **** --- 1237,1249 ---- (save-excursion (insert-buffer-substring oldbuf start end))))) + (defvar mark-even-if-inactive nil + "*Non-nil means you can use the mark even when inactive. + This option makes a difference in Transient Mark mode. + When the option is non-nil, deactivation of the mark + turns off region highlighting, but commands that use the mark + behave as if the mark were still active.") + (defun mark (&optional force) "Return this buffer's mark value as integer; error if mark inactive. If optional argument FORCE is non-nil, access the mark value *************** if there is no mark at all. *** 1238,1244 **** If you are using this in an editing command, you are most likely making a mistake; see the documentation of `set-mark'." ! (if (or force mark-active) (marker-position (mark-marker)) (error "The mark is not currently active"))) --- 1252,1258 ---- If you are using this in an editing command, you are most likely making a mistake; see the documentation of `set-mark'." ! (if (or force mark-active mark-even-if-inactive) (marker-position (mark-marker)) (error "The mark is not currently active"))) *************** it were the arg to `interactive' (which *** 2174,2178 **** --- 2188,2218 ---- 'arg)) (eval-minibuffer (format "Set %s to value: " var))))))) (set var val)) + + + ;;;; Keypad support. + + ;;; Make the keypad keys act like ordinary typing keys. If people add + ;;; bindings for the function key symbols, then those bindings will + ;;; override these, so this shouldn't interfere with any existing + ;;; bindings. + + (mapcar + (lambda (keypad-normal) + (let ((keypad (nth 0 keypad-normal)) + (normal (nth 1 keypad-normal))) + (define-key function-key-map (vector keypad) (vector normal)))) + '((kp-0 ?0) (kp-1 ?1) (kp-2 ?2) (kp-3 ?3) (kp-4 ?4) + (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9) + (kp-space ?\ ) + (kp-tab ?\t) + (kp-enter ?\r) + (kp-multiply ?*) + (kp-add ?+) + (kp-separator ?,) + (kp-subtract ?-) + (kp-decimal ?.) + (kp-divide ?/) + (kp-equal ?=))) ;;; simple.el ends here diff -cprP --exclude=*.elc emacs-19.15/lisp/solar.el emacs-19.16/lisp/solar.el *** emacs-19.15/lisp/solar.el Mon Jun 14 11:26:10 1993 --- emacs-19.16/lisp/solar.el Mon Jun 28 01:18:02 1993 *************** *** 27,33 **** ;;; Commentary: ;; This collection of functions implements the features of calendar.el and ! ;; diary.el that deal with sunrise/sunset and equinoxes/solstices. ;; Based on the ``Almanac for Computers 1984,'' prepared by the Nautical ;; Almanac Office, United States Naval Observatory, Washington, 1984 and --- 27,34 ---- ;;; Commentary: ;; This collection of functions implements the features of calendar.el and ! ;; diary.el that deal with times of day, sunrise/sunset, and ! ;; eqinoxes/solstices. ;; Based on the ``Almanac for Computers 1984,'' prepared by the Nautical ;; Almanac Office, United States Naval Observatory, Washington, 1984 and *************** *** 56,63 **** (require 'lisp-float-type) (error "Solar calculations impossible since floating point is unavailable.")) ! (require 'calendar) (defun solar-setup () "Prompt user for latitude, longitude, and time zone." (beep) --- 57,110 ---- (require 'lisp-float-type) (error "Solar calculations impossible since floating point is unavailable.")) ! (require 'cal-dst) + ;;;###autoload + (defvar calendar-time-display-form + '(12-hours ":" minutes am-pm + (if time-zone " (") time-zone (if time-zone ")")) + "*The pseudo-pattern that governs the way a time of day is formatted. + + A pseudo-pattern is a list of expressions that can involve the keywords + `12-hours', `24-hours', and `minutes', all numbers in string form, + and `am-pm' and `time-zone', both alphabetic strings. + + For example, the form + + '(24-hours \":\" minutes + (if time-zone \" (\") time-zone (if time-zone \")\")) + + would give military-style times like `21:07 (UTC)'.") + + ;;;###autoload + (defvar calendar-latitude nil + "*Latitude of `calendar-location-name' in degrees, + north, - south. + For example, 40.7 for New York City. + It may not be a good idea to set this in advance for your site; + if there may be users running Emacs at your site + who are physically located elsewhere, they would get the wrong + value and might not know how to override it.") + + ;;;###autoload + (defvar calendar-longitude nil + "*Longitude of `calendar-location-name' in degrees, + east, - west. + For example, -74.0 for New York City. + It may not be a good idea to set this in advance for your site; + if there may be users running Emacs at your site + who are physically located elsewhere, they would get the wrong + value and might not know how to override it.") + + ;;;###autoload + (defvar calendar-location-name + '(let ((float-output-format "%.1f")) + (format "%s%s, %s%s" + (abs calendar-latitude) + (if (> calendar-latitude 0) "N" "S") + (abs calendar-longitude) + (if (> calendar-longitude 0) "E" "W"))) + "*Expression evaluating to name of `calendar-longitude', calendar-latitude'. + Default value is just the latitude, longitude pair.") + (defun solar-setup () "Prompt user for latitude, longitude, and time zone." (beep) *************** savings time according to `calendar-dayl *** 237,255 **** `calendar-daylight-savings-ends', `calendar-daylight-switchover-time', and `calendar-daylight-savings-offset'." (let* ((year (extract-calendar-year date)) ! (abs-date-and-time (+ (calendar-absolute-from-gregorian date) ! (/ time 24.0))) ! (rounded-abs-date (+ abs-date-and-time (/ 1.0 60 24 2)));; half min ! (dst-change-over ! (/ (eval calendar-daylight-savings-switchover-time) 60.0 24.0)) (dst-starts (and calendar-daylight-savings-starts (+ (calendar-absolute-from-gregorian (eval calendar-daylight-savings-starts)) ! dst-change-over))) (dst-ends (and calendar-daylight-savings-ends (+ (calendar-absolute-from-gregorian (eval calendar-daylight-savings-ends)) ! dst-change-over))) (dst (and (not (eq style 'standard)) (or (eq style 'daylight) (and dst-starts dst-ends --- 284,303 ---- `calendar-daylight-savings-ends', `calendar-daylight-switchover-time', and `calendar-daylight-savings-offset'." (let* ((year (extract-calendar-year date)) ! (time (round (* 60 time))) ! (rounded-abs-date (+ (calendar-absolute-from-gregorian date) ! (/ time 60.0 24.0))) (dst-starts (and calendar-daylight-savings-starts (+ (calendar-absolute-from-gregorian (eval calendar-daylight-savings-starts)) ! (/ calendar-daylight-savings-switchover-time ! 60.0 24.0)))) (dst-ends (and calendar-daylight-savings-ends (+ (calendar-absolute-from-gregorian (eval calendar-daylight-savings-ends)) ! (/ (- calendar-daylight-savings-switchover-time ! calendar-daylight-time-offset) ! 60.0 24.0)))) (dst (and (not (eq style 'standard)) (or (eq style 'daylight) (and dst-starts dst-ends *************** savings time according to `calendar-dayl *** 263,282 **** (<= dst-starts rounded-abs-date)) (and dst-ends (not dst-starts) (< rounded-abs-date dst-ends))))) - (time (if dst - (+ time (/ (eval calendar-daylight-time-offset) 60.0)) - time)) (time-zone (if dst calendar-daylight-time-zone-name calendar-standard-time-zone-name)) ! (24-hours (truncate time)) ! (minutes (round (* 60 (- time 24-hours)))) ! (24-hours (if (= minutes 60) (1+ 24-hours) 24-hours)) ! (minutes (if (= minutes 60) 0 minutes)) ! (minutes (format "%02d" minutes)) ! (12-hours (format "%d" (if (> 24-hours 12) ! (- 24-hours 12) ! (if (= 24-hours 0) 12 24-hours)))) (am-pm (if (>= 24-hours 12) "pm" "am")) (24-hours (format "%02d" 24-hours))) (mapconcat 'eval calendar-time-display-form ""))) --- 311,323 ---- (<= dst-starts rounded-abs-date)) (and dst-ends (not dst-starts) (< rounded-abs-date dst-ends))))) (time-zone (if dst calendar-daylight-time-zone-name calendar-standard-time-zone-name)) ! (time (+ time (if dst calendar-daylight-time-offset 0))) ! (24-hours (/ time 60)) ! (minutes (format "%02d" (% time 60))) ! (12-hours (format "%d" (1+ (% (+ 24-hours 11) 12)))) (am-pm (if (>= 24-hours 12) "pm" "am")) (24-hours (format "%02d" 24-hours))) (mapconcat 'eval calendar-time-display-form ""))) *************** Value is only an approximation." *** 335,340 **** --- 376,382 ---- solstice; K=2, fall equinox; K=3, winter solstice. Accurate to within several minutes." (let ((date (list (+ 3 (* k 3)) 21 year)) + app (correction 1000)) (while (> correction 0.00001) (setq app (solar-mod (solar-apparent-longitude-of-sun date) 360.0)) *************** This function is suitable for execution *** 382,391 **** (if (> calendar-longitude 0) "E" "W"))))) (calendar-standard-time-zone-name (if (< arg 16) calendar-standard-time-zone-name ! (cond ((= calendar-time-zone 0) "UT") ((< calendar-time-zone 0) ! (format "UT%dmin" calendar-time-zone)) ! (t (format "UT+%dmin" calendar-time-zone))))) (calendar-daylight-savings-starts (if (< arg 16) calendar-daylight-savings-starts)) (calendar-daylight-savings-ends --- 424,433 ---- (if (> calendar-longitude 0) "E" "W"))))) (calendar-standard-time-zone-name (if (< arg 16) calendar-standard-time-zone-name ! (cond ((= calendar-time-zone 0) "UTC") ((< calendar-time-zone 0) ! (format "UTC%dmin" calendar-time-zone)) ! (t (format "UTC+%dmin" calendar-time-zone))))) (calendar-daylight-savings-starts (if (< arg 16) calendar-daylight-savings-starts)) (calendar-daylight-savings-ends *************** No diary entry if there is no sunset on *** 435,450 **** (if light (format "%s Sabbath candle lighting" (solar-time-string light date)))))) ! (defun calendar-holiday-function-solar-equinoxes-solstices () "Date and time of equinoxes and solstices, if visible in the calendar window. Requires floating point." ! (let* ((m displayed-month) ! (y displayed-year)) (increment-calendar-month m y (cond ((= 1 (% m 3)) -1) ((= 2 (% m 3)) 1) (t 0))) (let* ((calendar-standard-time-zone-name ! (if calendar-time-zone calendar-standard-time-zone-name "UT")) (calendar-daylight-savings-starts (if calendar-time-zone calendar-daylight-savings-starts)) (calendar-daylight-savings-ends --- 477,492 ---- (if light (format "%s Sabbath candle lighting" (solar-time-string light date)))))) ! (defun solar-equinoxes-solstices () "Date and time of equinoxes and solstices, if visible in the calendar window. Requires floating point." ! (let ((m displayed-month) ! (y displayed-year)) (increment-calendar-month m y (cond ((= 1 (% m 3)) -1) ((= 2 (% m 3)) 1) (t 0))) (let* ((calendar-standard-time-zone-name ! (if calendar-time-zone calendar-standard-time-zone-name "UTC")) (calendar-daylight-savings-starts (if calendar-time-zone calendar-daylight-savings-starts)) (calendar-daylight-savings-ends diff -cprP --exclude=*.elc emacs-19.15/lisp/subr.el emacs-19.16/lisp/subr.el *** emacs-19.15/lisp/subr.el Wed Jun 16 20:16:02 1993 --- emacs-19.16/lisp/subr.el Mon Jul 5 00:33:20 1993 *************** *** 181,186 **** --- 181,218 ---- (setq i (1+ i)))))) (setq scan (cdr scan))))) + (defun define-key-after (keymap key definition after) + "Add binding in KEYMAP for KEY => DEFINITION, right after AFTER's binding. + This is like `define-key' except that the binding for KEY is placed + just after the binding for the event AFTER, instead of at the beginning + of the map. + The order matters when the keymap is used as a menu." + (or (keymapp keymap) + (signal 'wrong-type-argument (list 'keymapp keymap))) + (let ((tail keymap) done inserted + (first (aref key 0))) + (while (and (not done) tail) + ;; Delete any earlier bindings for the same key. + (if (eq (car-safe (car (cdr tail))) first) + (setcdr tail (cdr (cdr tail)))) + ;; When we reach AFTER's binding, insert the new binding after. + ;; If we reach an inherited keymap, insert just before that. + ;; If we reach the end of this keymap, insert at the end. + (if (or (eq (car-safe (car tail)) after) + (eq (car (cdr tail)) 'keymap) + (null (cdr tail))) + (progn + ;; Stop the scan only if we find a parent keymap. + ;; Keep going past the inserted element + ;; so we can delete any duplications that come later. + (if (eq (car (cdr tail)) 'keymap) + (setq done t)) + ;; Don't insert more than once. + (or inserted + (setcdr tail (cons (cons (aref key 0) definition) (cdr tail)))) + (setq inserted t))) + (setq tail (cdr tail))))) + (defun keyboard-translate (from to) "Translate character FROM to TO at a low level. This function creates a `keyboard-translate-table' if necessary *************** If EVENT is a click event, this function *** 313,319 **** The return value is of the form (WINDOW BUFFER-POSITION (COL . ROW) TIMESTAMP) The `posn-' functions access elements of such lists." ! (nth (1- (length event)) event)) (defsubst posn-window (position) "Return the window in POSITION. --- 345,351 ---- The return value is of the form (WINDOW BUFFER-POSITION (COL . ROW) TIMESTAMP) The `posn-' functions access elements of such lists." ! (nth (if (consp (nth 2 event)) 2 1) event)) (defsubst posn-window (position) "Return the window in POSITION. *************** as returned by the `event-start' and `ev *** 327,333 **** POSITION should be a list of the form (WINDOW BUFFER-POSITION (COL . ROW) TIMESTAMP) as returned by the `event-start' and `event-end' functions." ! (nth 1 position)) (defsubst posn-col-row (position) "Return the row and column in POSITION. --- 359,367 ---- POSITION should be a list of the form (WINDOW BUFFER-POSITION (COL . ROW) TIMESTAMP) as returned by the `event-start' and `event-end' functions." ! (if (consp (nth 1 position)) ! (car (nth 1 position)) ! (nth 1 position))) (defsubst posn-col-row (position) "Return the row and column in POSITION. diff -cprP --exclude=*.elc emacs-19.15/lisp/term/x-win.el emacs-19.16/lisp/term/x-win.el *** emacs-19.15/lisp/term/x-win.el Wed Jun 16 13:29:40 1993 --- emacs-19.16/lisp/term/x-win.el Sat Jul 3 05:41:03 1993 *************** *** 89,95 **** ("-reverse" . x-handle-switch) ("-fn" . x-handle-switch) ("-font" . x-handle-switch) ! ("-ib" . x-handle-switch) ("-g" . x-handle-geometry) ("-geometry" . x-handle-geometry) ("-fg" . x-handle-switch) --- 89,95 ---- ("-reverse" . x-handle-switch) ("-fn" . x-handle-switch) ("-font" . x-handle-switch) ! ("-ib" . x-handle-numeric-switch) ("-g" . x-handle-geometry) ("-geometry" . x-handle-geometry) ("-fg" . x-handle-switch) *************** This returns ARGS with the arguments tha *** 528,533 **** --- 528,540 ---- (if res-geometry (setq initial-frame-alist (append initial-frame-alist (x-parse-geometry res-geometry))))) + + ;; Check the reverseVideo resource. + (if (assoc + (x-get-resource "reverseVideo" + "ReverseVideo") + '("True" "true" "Yes" "yes")) + (setq default-frame-alist (cons '(reverse . t) default-frame-alist))) ;; Set x-selection-timeout, measured in milliseconds. (let ((res-selection-timeout diff -cprP --exclude=*.elc emacs-19.15/lisp/texinfo.el emacs-19.16/lisp/texinfo.el *** emacs-19.15/lisp/texinfo.el Mon Jun 7 19:34:43 1993 --- emacs-19.16/lisp/texinfo.el Mon Jun 21 02:46:49 1993 *************** *** 1,13 **** ! ;;; texinfo.el --- major mode for editing Texinfo files. ! ;; Copyright (C) 1985, 1988, 1989, 1990, 1993 Free Software Foundation, Inc. ! ;; Author: Bob Chassell ! ;; Version: 2.00 ! ;; Keywords: maint, tex, doc, wp - ;; This file is part of GNU Emacs. - ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) --- 1,12 ---- ! ;;;; texinfo.el--major mode for editing Texinfo files. ! ;; Copyright (C) 1985, '88, '89, ! ;; '90, '91, '92, '93 Free Software Foundation, Inc. ! ;;; Author: Robert J. Chassell ! ;;; Maintainer: FSF ! ;;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) *************** *** 22,34 **** ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Code: ;;; Don't you dare insert any `require' calls at top level in this file--rms. ! (defvar texinfo-chapter-level-regexp ! "chapter\\|unnumbered \\|appendix \\|majorheading\\|chapheading" ! "Regular expression matching just the Texinfo chapter level headings.") (defvar texinfo-mode-syntax-table nil) --- 21,185 ---- ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + ;;; Autoloads: + + (autoload 'makeinfo-region + "makeinfo" + "Make Info file from region of current Texinfo file, and switch to it. + + This command does not offer the `next-error' feature since it would + apply to a temporary file, not the original; use the `makeinfo-buffer' + command to gain use of `next-error'." + t nil) + + (autoload 'makeinfo-buffer + "makeinfo" + "Make Info file from current buffer. + + Use the \\[next-error] command to move to the next error + \(if there are errors\)." + t nil) + + (autoload 'kill-compilation + "compile" + "Kill the process made by the \\[compile] command." + t nil) + + (autoload 'makeinfo-recenter-compilation-buffer + "makeinfo" + "Redisplay `*compilation*' buffer so most recent output can be seen. + The last line of the buffer is displayed on + line LINE of the window, or centered if LINE is nil." + t nil) + + (autoload 'texinfo-make-menu + "texnfo-upd" + "Without any prefix argument, make or update a menu. + Make the menu for the section enclosing the node found following point. + + Non-nil argument (prefix, if interactive) means make or update menus + for nodes within or part of the marked region. + + Whenever a menu exists, and is being updated, the descriptions that + are associated with node names in the pre-existing menu are + incorporated into the new menu. Otherwise, the nodes' section titles + are inserted as descriptions." + t nil) + + (autoload 'texinfo-all-menus-update + "texnfo-upd" + "Update every regular menu in a Texinfo file. + Remove pre-existing master menu, if there is one. + + If called with a non-nil argument, this function first updates all the + nodes in the buffer before updating the menus." + t nil) + + (autoload 'texinfo-master-menu + "texnfo-upd" + "Make a master menu for a whole Texinfo file. + Non-nil argument (prefix, if interactive) means first update all + existing nodes and menus. Remove pre-existing master menu, if there is one. + + This function creates a master menu that follows the top node. The + master menu includes every entry from all the other menus. It + replaces any existing ordinary menu that follows the top node. + + If called with a non-nil argument, this function first updates all the + menus in the buffer (incorporating descriptions from pre-existing + menus) before it constructs the master menu. + + The function removes the detailed part of an already existing master + menu. This action depends on the pre-exisitng master menu using the + standard `texinfo-master-menu-header'. + + The master menu has the following format, which is adapted from the + recommendation in the Texinfo Manual: + + * The first part contains the major nodes in the Texinfo file: the + nodes for the chapters, chapter-like sections, and the major + appendices. This includes the indices, so long as they are in + chapter-like sections, such as unnumbered sections. + + * The second and subsequent parts contain a listing of the other, + lower level menus, in order. This way, an inquirer can go + directly to a particular node if he or she is searching for + specific information. + + Each of the menus in the detailed node listing is introduced by the + title of the section containing the menu." + t nil) + + (autoload 'texinfo-indent-menu-description + "texnfo-upd" + "Indent every description in menu following point to COLUMN. + Non-nil argument (prefix, if interactive) means indent every + description in every menu in the region. Does not indent second and + subsequent lines of a multi-line description." + t nil) + + (autoload 'texinfo-insert-node-lines + "texnfo-upd" + "Insert missing `@node' lines in region of Texinfo file. + Non-nil argument (prefix, if interactive) means also to insert the + section titles as node names; and also to insert the section titles as + node names in pre-existing @node lines that lack names." + t nil) + + (autoload 'texinfo-start-menu-description + "texnfo-upd" + "In this menu entry, insert the node's section title as a description. + Position point at beginning of description ready for editing. + Do not insert a title if the line contains an existing description. + + You will need to edit the inserted text since a useful description + complements the node name rather than repeats it as a title does." + t nil) + + (autoload 'texinfo-multiple-files-update + "texnfo-upd" + "Update first node pointers in each file included in OUTER-FILE; + create or update main menu in the outer file that refers to such nodes. + This does not create or update menus or pointers within the included files. + + With optional MAKE-MASTER-MENU argument (prefix arg, if interactive), + insert a master menu in OUTER-FILE. This does not create or update + menus or pointers within the included files. + + With optional UPDATE-EVERYTHING argument (numeric prefix arg, if + interactive), update all the menus and all the `Next', `Previous', and + `Up' pointers of all the files included in OUTER-FILE before inserting + a master menu in OUTER-FILE. + + The command also updates the `Top' level node pointers of OUTER-FILE. + + Notes: + + * this command does NOT save any files--you must save the + outer file and any modified, included files. + + * except for the `Top' node, this command does NOT handle any + pre-existing nodes in the outer file; hence, indices must be + enclosed in an included file. + + Requirements: + + * each of the included files must contain exactly one highest + hierarchical level node, + * this highest node must be the first node in the included file, + * each highest hierarchical level node must be of the same type. + + Thus, normally, each included file contains one, and only one, + chapter." + t nil) + + ;;; Code: ;;; Don't you dare insert any `require' calls at top level in this file--rms. ! ;;; Syntax table (defvar texinfo-mode-syntax-table nil) *************** *** 45,69 **** (modify-syntax-entry ?} "){" texinfo-mode-syntax-table) (modify-syntax-entry ?\' "w" texinfo-mode-syntax-table)) (defvar texinfo-mode-map nil) ;; Mode documentation displays commands in reverse order ;; from how they are listed in the texinfo-mode-map. (if texinfo-mode-map nil (setq texinfo-mode-map (make-sparse-keymap)) ! (define-key texinfo-mode-map "\C-c\C-t\C-k" 'tex-kill-job) ! (define-key texinfo-mode-map "\C-c\C-t\C-l" 'tex-recenter-output-buffer) ! (define-key texinfo-mode-map "\C-c\C-t\C-q" 'tex-show-print-queue) ! (define-key texinfo-mode-map "\C-c\C-t\C-p" 'texinfo-tex-print) ! ;; (define-key texinfo-mode-map "\C-c\C-t\C-i" 'texinfo-texindex) ! (define-key texinfo-mode-map "\C-c\C-t\C-t" 'texinfo-tex-buffer) ! (define-key texinfo-mode-map "\C-c\C-t\C-r" 'texinfo-tex-region) ! (define-key texinfo-mode-map "\C-c\C-i\C-r" 'texinfo-format-region) ! (define-key texinfo-mode-map "\C-c\C-i\C-b" 'texinfo-format-buffer) (define-key texinfo-mode-map "\C-c\C-u\C-m" 'texinfo-make-menu) (define-key texinfo-mode-map "\C-c\C-u\C-n" 'texinfo-update-node) (define-key texinfo-mode-map "\C-c\C-u\C-e" 'texinfo-every-node-update) --- 196,241 ---- (modify-syntax-entry ?} "){" texinfo-mode-syntax-table) (modify-syntax-entry ?\' "w" texinfo-mode-syntax-table)) + + ;;; Keybindings (defvar texinfo-mode-map nil) + ;;; Keys common both to Texinfo mode and to TeX shell. + + (defun texinfo-define-common-keys (keymap) + "Define the keys both in Texinfo mode and in the texinfo-tex-shell." + (define-key keymap "\C-c\C-t\C-k" 'tex-kill-job) + (define-key keymap "\C-c\C-t\C-x" 'texinfo-quit-job) + (define-key keymap "\C-c\C-t\C-l" 'tex-recenter-output-buffer) + (define-key keymap "\C-c\C-t\C-d" 'texinfo-delete-from-print-queue) + (define-key keymap "\C-c\C-t\C-q" 'tex-show-print-queue) + (define-key keymap "\C-c\C-t\C-p" 'texinfo-tex-print) + (define-key keymap "\C-c\C-t\C-i" 'texinfo-texindex) + + (define-key keymap "\C-c\C-t\C-r" 'texinfo-tex-region) + (define-key keymap "\C-c\C-t\C-b" 'texinfo-tex-buffer)) + ;; Mode documentation displays commands in reverse order ;; from how they are listed in the texinfo-mode-map. + (if texinfo-mode-map nil (setq texinfo-mode-map (make-sparse-keymap)) ! ;; bindings for `texnfo-tex.el' ! (texinfo-define-common-keys texinfo-mode-map) ! ! ;; bindings for `makeinfo.el' ! (define-key texinfo-mode-map "\C-c\C-m\C-k" 'kill-compilation) ! (define-key texinfo-mode-map "\C-c\C-m\C-l" ! 'makeinfo-recenter-compilation-buffer) ! (define-key texinfo-mode-map "\C-c\C-m\C-r" 'makeinfo-region) ! (define-key texinfo-mode-map "\C-c\C-m\C-b" 'makeinfo-buffer) ! ;; bindings for updating nodes and menus + (define-key texinfo-mode-map "\C-c\C-um" 'texinfo-master-menu) + (define-key texinfo-mode-map "\C-c\C-u\C-m" 'texinfo-make-menu) (define-key texinfo-mode-map "\C-c\C-u\C-n" 'texinfo-update-node) (define-key texinfo-mode-map "\C-c\C-u\C-e" 'texinfo-every-node-update) *************** *** 71,177 **** (define-key texinfo-mode-map "\C-c\C-s" 'texinfo-show-structure) ! ;;; (define-key texinfo-mode-map "\"" 'texinfo-insert-quote) ! (define-key texinfo-mode-map "\C-c}" 'up-list) ! (define-key texinfo-mode-map "\C-c{" 'texinfo-insert-braces) (define-key texinfo-mode-map "\C-c\C-cv" 'texinfo-insert-@var) (define-key texinfo-mode-map "\C-c\C-cs" 'texinfo-insert-@samp) (define-key texinfo-mode-map "\C-c\C-co" 'texinfo-insert-@noindent) (define-key texinfo-mode-map "\C-c\C-cn" 'texinfo-insert-@node) (define-key texinfo-mode-map "\C-c\C-ck" 'texinfo-insert-@kbd) (define-key texinfo-mode-map "\C-c\C-ci" 'texinfo-insert-@item) (define-key texinfo-mode-map "\C-c\C-cx" 'texinfo-insert-@example) ! (define-key texinfo-mode-map "\C-c\C-ce" 'texinfo-insert-@end-example) (define-key texinfo-mode-map "\C-c\C-cd" 'texinfo-insert-@dfn) (define-key texinfo-mode-map "\C-c\C-cc" 'texinfo-insert-@code)) ! ;;; I turned this off because it is inconvenient. ! ;;; The real " character is used often in texinfo files. --rms. ! ;;;(defun texinfo-insert-quote (arg) ! ;;; "Insert the appropriate quote marks for TeX. ! ;;;Inserts the value of `tex-open-quote' (normally ``) or `tex-close-quote' ! ;;;\(normally '') depending on the context. With prefix argument, always ! ;;;inserts \" characters." ! ;;; (interactive "*P") ! ;;; (if arg ! ;;; (self-insert-command (prefix-numeric-value arg)) ! ;;; (insert ! ;;; (cond ((or (bobp) ! ;;; (save-excursion ! ;;; (forward-char -1) ! ;;; (looking-at "\\s(\\|\\s \\|\\s>"))) ! ;;; tex-open-quote) ! ;;; ((= (preceding-char) ?\\) ! ;;; ?\") ! ;;; (t ! ;;; tex-close-quote))))) ! ! (defun texinfo-insert-@var () ! "Insert the string @var in a texinfo buffer." ! (interactive) ! (insert "@var{}") ! (backward-char)) ! ! (defun texinfo-insert-@samp () ! "Insert the string @samp in a texinfo buffer." ! (interactive) ! (insert "@samp{}") ! (backward-char)) ! ! (defun texinfo-insert-@noindent () ! "Insert the string @noindent in a texinfo buffer." ! (interactive) ! (insert "@noindent\n")) ! ! (defun texinfo-insert-@node () ! "Insert the string @node in a texinfo buffer, ! along with a comment indicating the arguments to @node." ! (interactive) ! (insert "@node \n@comment node-name, next, previous, up") ! (forward-line -1) ! (forward-char 6)) ! ! (defun texinfo-insert-@kbd () ! "Insert the string @kbd in a texinfo buffer." ! (interactive) ! (insert "@kbd{}") ! (backward-char)) ! ! (defun texinfo-insert-@item () ! "Insert the string @item in a texinfo buffer." ! (interactive) ! (insert "@item") ! (newline)) ! ! (defun texinfo-insert-@example () ! "Insert the string @example in a texinfo buffer." ! (interactive) ! (insert "@example\n")) ! ! (defun texinfo-insert-@end-example () ! "Insert the string @end example in a texinfo buffer." ! (interactive) ! (insert "@end example\n")) ! ! (defun texinfo-insert-@dfn () ! "Insert the string @dfn in a texinfo buffer." ! (interactive) ! (insert "@dfn{}") ! (backward-char)) ! ! (defun texinfo-insert-@code () ! "Insert the string @code in a texinfo buffer." ! (interactive) ! (insert "@code{}") ! (backward-char)) ! (defun texinfo-insert-braces () ! "Make a pair of braces and be poised to type inside of them. ! Use \\[up-list] to move forward out of the braces." ! (interactive) ! (insert "{}") ! (backward-char)) ;;;###autoload (defun texinfo-mode () --- 243,276 ---- (define-key texinfo-mode-map "\C-c\C-s" 'texinfo-show-structure) ! (define-key texinfo-mode-map "\C-c}" 'up-list) ! (define-key texinfo-mode-map "\C-c]" 'up-list) ! (define-key texinfo-mode-map "\C-c{" 'texinfo-insert-braces) ! ! ;; bindings for inserting strings + (define-key texinfo-mode-map "\C-c\C-c\C-d" 'texinfo-start-menu-description) + (define-key texinfo-mode-map "\C-c\C-cv" 'texinfo-insert-@var) + (define-key texinfo-mode-map "\C-c\C-ct" 'texinfo-insert-@table) (define-key texinfo-mode-map "\C-c\C-cs" 'texinfo-insert-@samp) (define-key texinfo-mode-map "\C-c\C-co" 'texinfo-insert-@noindent) (define-key texinfo-mode-map "\C-c\C-cn" 'texinfo-insert-@node) (define-key texinfo-mode-map "\C-c\C-ck" 'texinfo-insert-@kbd) (define-key texinfo-mode-map "\C-c\C-ci" 'texinfo-insert-@item) + (define-key texinfo-mode-map "\C-c\C-cf" 'texinfo-insert-@file) (define-key texinfo-mode-map "\C-c\C-cx" 'texinfo-insert-@example) ! (define-key texinfo-mode-map "\C-c\C-ce" 'texinfo-insert-@end) (define-key texinfo-mode-map "\C-c\C-cd" 'texinfo-insert-@dfn) (define-key texinfo-mode-map "\C-c\C-cc" 'texinfo-insert-@code)) ! ! ;;; Texinfo mode ! (defvar texinfo-chapter-level-regexp ! "chapter\\|unnumbered \\|appendix \\|majorheading\\|chapheading" ! "Regular expression matching Texinfo chapter-level headings. ! This does not match `@node' and does not match the `@top' command.") ;;;###autoload (defun texinfo-mode () *************** Use \\[up-list] to move forward out of t *** 181,195 **** \\{texinfo-mode-map} These are files that are used as input for TeX to make printed manuals ! and also to be turned into Info files by \\[texinfo-format-buffer] or ! `makeinfo'. These files must be written in a very restricted and modified version of TeX input format. Editing commands are like text-mode except that the syntax table is set up so expression commands skip Texinfo bracket groups. To see what the Info version of a region of the Texinfo file will look like, ! use \\[texinfo-format-region]. This command runs Info on the current region ! of the Texinfo file and formats it properly. You can show the structure of a Texinfo file with \\[texinfo-show-structure]. This command shows the structure of a Texinfo file by listing the --- 280,293 ---- \\{texinfo-mode-map} These are files that are used as input for TeX to make printed manuals ! and also to be turned into Info files with \\[makeinfo-buffer] or ! the `makeinfo' program. These files must be written in a very restricted and modified version of TeX input format. Editing commands are like text-mode except that the syntax table is set up so expression commands skip Texinfo bracket groups. To see what the Info version of a region of the Texinfo file will look like, ! use \\[makeinfo-region], which runs `makeinfo' on the current region. You can show the structure of a Texinfo file with \\[texinfo-show-structure]. This command shows the structure of a Texinfo file by listing the *************** value of texinfo-mode-hook." *** 247,256 **** (setq major-mode 'texinfo-mode) (use-local-map texinfo-mode-map) (set-syntax-table texinfo-mode-syntax-table) (make-local-variable 'require-final-newline) (setq require-final-newline t) ! (make-local-variable 'page-delimiter) ! (setq page-delimiter texinfo-chapter-level-regexp) (make-local-variable 'paragraph-separate) (setq paragraph-separate (concat "^\b\\|^@[a-zA-Z]*[ \n]\\|" paragraph-separate)) (make-local-variable 'paragraph-start) --- 345,360 ---- (setq major-mode 'texinfo-mode) (use-local-map texinfo-mode-map) (set-syntax-table texinfo-mode-syntax-table) + (make-local-variable 'page-delimiter) + (setq page-delimiter + (concat + "^@node [ \t]*[Tt]op\\|^@\\(" + texinfo-chapter-level-regexp + "\\)")) (make-local-variable 'require-final-newline) (setq require-final-newline t) ! (make-local-variable 'indent-tabs-mode) ! (setq indent-tabs-mode nil) (make-local-variable 'paragraph-separate) (setq paragraph-separate (concat "^\b\\|^@[a-zA-Z]*[ \n]\\|" paragraph-separate)) (make-local-variable 'paragraph-start) *************** value of texinfo-mode-hook." *** 263,283 **** (setq comment-start-skip "@c +") (make-local-variable 'words-include-escapes) (setq words-include-escapes t) ! (make-local-variable 'tex-start-of-header) ! (setq tex-start-of-header "%**start of header") ! (make-local-variable 'tex-end-of-header) ! (setq tex-end-of-header "%**end of header") ! (make-local-variable 'tex-trailer) ! (setq tex-trailer "@bye\n") (run-hooks 'text-mode-hook 'texinfo-mode-hook)) ! ;;; Texinfo file structure ! ;; This is also defined in `texnfo-upd.el'. ! (defvar texinfo-section-types-regexp ! "^@\\(chapter \\|sect\\|sub\\|unnum\\|major\\|chapheading \\|heading \\|appendix\\)" ! "Regexp matching chapter, section, other headings (but not the top node).") (defun texinfo-show-structure (&optional nodes-too) "Show the structure of a Texinfo file. --- 367,513 ---- (setq comment-start-skip "@c +") (make-local-variable 'words-include-escapes) (setq words-include-escapes t) ! (make-local-variable 'texinfo-start-of-header) ! (setq tex-start-of-header "%**start") ! (make-local-variable 'texinfo-end-of-header) ! (setq tex-end-of-header "%**end") (run-hooks 'text-mode-hook 'texinfo-mode-hook)) ! ;;; Insert string commands ! ! (defconst texinfo-environment-regexp ! "^@\\(f?table\\|enumerate\\|itemize\\|ifinfo\\|iftex\\|example\\|quotation\\|lisp\\|smallexample\\|smalllisp\\|display\\|format\\|flushleft\\|flushright\\|ignore\\|group\\|tex\\|end\\)" ! "Regexp for environment-like TexInfo list commands. ! Subexpression 1 is what goes into the corresponding `@end' statement.") ! ! ;; The following texinfo-insert-@end command not only inserts a SPC ! ;; after the @end, but tries to find out what belongs there. It is ! ;; not very smart: it does not understand nested lists. ! ! (defun texinfo-insert-@end () ! "Insert the matching `@end' for the last Texinfo command that needs one." ! (interactive) ! (let ((depth 1) string) ! (save-excursion ! (while (and (> depth 0) ! (re-search-backward texinfo-environment-regexp nil t) ! (if (looking-at "@end") ! (setq depth (1+ depth)) ! (setq depth (1- depth))))) ! (looking-at texinfo-environment-regexp) ! (setq string ! (buffer-substring (match-beginning 1) ! (match-end 1)))) ! (insert "@end ") ! (if string (insert string "\n")))) ! ! ;; The following insert commands accept a prefix arg N, which is the ! ;; number of words (actually s-exprs) that should be surrounded by ! ;; braces. Thus you can first paste a variable name into a .texinfo ! ;; buffer, then say C-u 1 C-c C-c v at the beginning of the just ! ;; pasted variable name to put @var{...} *around* the variable name. ! ;; Operate on previous word or words with negative arg. ! ! ;; These commands use texinfo-insert-@-with-arg ! (defun texinfo-insert-@-with-arg (string &optional arg) ! (if arg ! (progn ! (setq arg (prefix-numeric-value arg)) ! (if (< arg 0) ! (progn ! (skip-chars-backward " \t\n\r\f") ! (save-excursion ! (forward-sexp arg) ! (insert "@" string "{")) ! (insert "}")) ! (skip-chars-forward " \t\n\r\f") ! (insert "@" string "{") ! (forward-sexp arg) ! (insert "}"))) ! (insert "@" string "{}") ! (backward-char))) ! ! (defun texinfo-insert-braces () ! "Make a pair of braces and be poised to type inside of them. ! Use \\[up-list] to move forward out of the braces." ! (interactive) ! (insert "{}") ! (backward-char)) ! ! (defun texinfo-insert-@code (&optional arg) ! "Insert a `@code{...}' command in a Texinfo buffer. ! A numeric argument says how many words the braces should surround. ! The default is not to surround any existing words with the braces." ! (interactive "P") ! (texinfo-insert-@-with-arg "code" arg)) ! ! (defun texinfo-insert-@dfn (&optional arg) ! "Insert a `@dfn{...}' command in a Texinfo buffer. ! A numeric argument says how many words the braces should surround. ! The default is not to surround any existing words with the braces." ! (interactive "P") ! (texinfo-insert-@-with-arg "dfn" arg)) ! ! (defun texinfo-insert-@example () ! "Insert the string `@example' in a Texinfo buffer." ! (interactive) ! (insert "@example\n")) ! ! (defun texinfo-insert-@file (&optional arg) ! "Insert a `@file{...}' command in a Texinfo buffer. ! A numeric argument says how many words the braces should surround. ! The default is not to surround any existing words with the braces." ! (interactive "P") ! (texinfo-insert-@-with-arg "file" arg)) ! ! (defun texinfo-insert-@item () ! "Insert the string `@item' in a Texinfo buffer." ! (interactive) ! (insert "@item") ! (newline)) ! (defun texinfo-insert-@kbd (&optional arg) ! "Insert a `@kbd{...}' command in a Texinfo buffer. ! A numeric argument says how many words the braces should surround. ! The default is not to surround any existing words with the braces." ! (interactive "P") ! (texinfo-insert-@-with-arg "kbd" arg)) ! ! (defun texinfo-insert-@node () ! "Insert the string `@node' in a Texinfo buffer. ! This also inserts on the following line a comment indicating ! the order of arguments to @node." ! (interactive) ! (insert "@node \n@comment node-name, next, previous, up") ! (forward-line -1) ! (forward-char 6)) ! ! (defun texinfo-insert-@noindent () ! "Insert the string `@noindent' in a Texinfo buffer." ! (interactive) ! (insert "@noindent\n")) ! ! (defun texinfo-insert-@samp (&optional arg) ! "Insert a `@samp{...}' command in a Texinfo buffer. ! A numeric argument says how many words the braces should surround. ! The default is not to surround any existing words with the braces." ! (interactive "P") ! (texinfo-insert-@-with-arg "samp" arg)) ! ! (defun texinfo-insert-@table (&optional arg) ! "Insert the string `@table' in a Texinfo buffer." ! (interactive "P") ! (insert "@table ")) ! ! (defun texinfo-insert-@var (&optional arg) ! "Insert a `@var{}' command in a Texinfo buffer. ! A numeric argument says how many words the braces should surround. ! The default is not to surround any existing words with the braces." ! (interactive "P") ! (texinfo-insert-@-with-arg "var" arg)) ! ! ;;; Texinfo file structure (defun texinfo-show-structure (&optional nodes-too) "Show the structure of a Texinfo file. *************** with @-sign commands for @chapter, @sect *** 289,300 **** @node lines. Lines with structuring commands beginning in them are displayed in ! another window called the *Occur* window. In that window, you can ! position the cursor over one of the lines and use ! \\[occur-mode-goto-occurrence], ! to jump to the corresponding spot in the Texinfo file." (interactive "P") (save-excursion (goto-char (point-min)) (if nodes-too --- 519,530 ---- @node lines. Lines with structuring commands beginning in them are displayed in ! another buffer named `*Occur*'. In that buffer, you can move point to ! one of those lines and then use \\\\[occur-mode-goto-occurrence], ! to jump to the corresponding spot in the Texinfo source file." (interactive "P") + (require 'texnfo-upd) (save-excursion (goto-char (point-min)) (if nodes-too *************** to jump to the corresponding spot in the *** 302,357 **** (occur texinfo-section-types-regexp))) (pop-to-buffer "*Occur*") (goto-char (point-min)) ! (flush-lines "-----")) ! ! ! ;;; texinfo mode tex and hardcopy printing commands. ! ! ;; These commands are for running tex on a region of a texinfo file in ! ;; GNU Emacs, or on the whole buffer, and for printing the resulting ! ;; .dvi file. The three commands are: ! ! ; texinfo-tex-region to run tex on the current region. ! ; texinfo-tex-buffer to run tex on the current buffer. ! ; texinfo-tex-print to print the .dvi file made by tex ! ! ;;; Other useful functions ! ! ; These functions are provided by `tex-mode.el' but are bound to keys ! ; in texinfo mode. ! ! ; tex-kill-job to kill the currently running tex job ! ; tex-recenter-output-buffer to redisplay tex job output buffer ! ; tex-show-print-queue to show the print queue ! ! ; Various variables are provided by `tex-mode.el' ! ! ; tex mode variable Default Value ! ! ; tex-dvi-print-command "lpr -d" ! ; tex-directory "/tmp/" ! ; tex-show-queue-command "lpq" ! ; tex-shell-cd-command "cd" ! ; tex-zap-file nil (created as needed) ! ;;; The tex and print function definitions: (defvar texinfo-tex-command "texi2dvi" ! "*Command used by texinfo-tex-region to run tex on a region.") ! ;;(defvar texinfo-texindex-command "texindex" ! ;; "*Command used by texinfo-texindex to sort unsorted index files.") (defun texinfo-tex-region (beg end) ! "Run tex on the current region. ! A temporary file (`tex-zap-file') is written in directory `tex-directory', and ! tex is run in that directory. The first line of the file is copied to the temporary file; and if the buffer has a header, it is written to the temporary file before the region itself. The buffer's header is all lines between the strings defined by `tex-start-of-header' and `tex-end-of-header' ! inclusive. The header must start in the first 100 lines. The value of ! tex-trailer is appended to the temporary file after the region." (interactive "r") (require 'tex-mode) (if (get-buffer "*tex-shell*") --- 532,603 ---- (occur texinfo-section-types-regexp))) (pop-to-buffer "*Occur*") (goto-char (point-min)) ! (flush-lines "-----") ! ;; Now format the "*Occur*" buffer to show the structure. ! ;; Thanks to ceder@signum.se (Per Cederqvist) ! (goto-char (point-max)) ! (let ((margin 5)) ! (while (re-search-backward "^ *[0-9]*:" nil 0) ! (re-search-forward ":") ! (setq margin ! (cond ! ((looking-at (concat "@" texinfo-chapter-level-regexp)) 5) ! ;; ((looking-at "@chapter ") 5) ! ;; ((looking-at "@unnumbered ") 5) ! ;; ((looking-at "@appendix ") 5) ! ;; ((looking-at "@majorheading ") 5) ! ;; ((looking-at "@chapheading ") 5) ! ! ((looking-at (concat "@" texinfo-section-level-regexp)) 9) ! ;; ((looking-at "@section ") 9) ! ;; ((looking-at "@unnumberedsec ") 9) ! ;; ((looking-at "@appendixsec ") 9) ! ;; ((looking-at "@heading ") 9) ! ! ((looking-at (concat "@" texinfo-subsection-level-regexp)) 13) ! ;; ((looking-at "@subsection ") 13) ! ;; ((looking-at "@unnumberedsubsec ") 13) ! ;; ((looking-at "@appendixsubsec ") 13) ! ;; ((looking-at "@subheading ") 13) ! ! ((looking-at (concat "@" texinfo-subsubsection-level-regexp)) 17) ! ;; ((looking-at "@subsubsection ") 17) ! ;; ((looking-at "@unnumberedsubsubsec ") 17) ! ;; ((looking-at "@appendixsubsubsec ") 17) ! ;; ((looking-at "@subsubheading ") 17) ! (t margin))) ! (indent-to-column margin) ! (beginning-of-line)))) ;;; The tex and print function definitions: (defvar texinfo-tex-command "texi2dvi" ! "*Command used by `texinfo-tex-region' to run TeX on a region.") ! ! (defvar texinfo-texindex-command "texindex" ! "*Command used by `texinfo-texindex' to sort unsorted index files.") ! ! (defvar texinfo-delete-from-print-queue-command "lprm" ! "*Command string used to delete a job from the line printer queue. ! Command is used by \\[texinfo-delete-from-print-queue] based on ! number provided by a previous \\[tex-show-print-queue] ! command.") ! (defvar texinfo-tex-trailer "@bye" ! "String appended after a region sent to TeX by `texinfo-tex-region'.") (defun texinfo-tex-region (beg end) ! "Run TeX on the current region. ! This works by writing a temporary file (`tex-zap-file') in the directory ! that is the value of `tex-directory', then running TeX on that file. ! ! The first line of the buffer is copied to the temporary file; and if the buffer has a header, it is written to the temporary file before the region itself. The buffer's header is all lines between the strings defined by `tex-start-of-header' and `tex-end-of-header' ! inclusive. The header must start in the first 100 lines. ! ! The value of `texinfo-tex-trailer' is appended to the temporary file after the region." (interactive "r") (require 'tex-mode) (if (get-buffer "*tex-shell*") *************** tex-trailer is appended to the temporary *** 401,407 **** ;; We have to create a special buffer in which to insert ;; the tex-trailer first because there is no function with ;; which to append a literal string directly to a file. ! (let ((local-tex-trailer tex-trailer)) (set-buffer temp-buffer) (erase-buffer) ;; make sure trailer isn't hidden by a comment --- 647,653 ---- ;; We have to create a special buffer in which to insert ;; the tex-trailer first because there is no function with ;; which to append a literal string directly to a file. ! (let ((local-tex-trailer texinfo-tex-trailer)) (set-buffer temp-buffer) (erase-buffer) ;; make sure trailer isn't hidden by a comment *************** tex-trailer is appended to the temporary *** 408,414 **** (insert-string "\n") (if local-tex-trailer (insert-string local-tex-trailer)) (tex-set-buffer-directory temp-buffer zap-directory) ! (write-region (point-min) (point-max) tex-out-file t nil)))) (tex-set-buffer-directory "*tex-shell*" zap-directory) (send-string "tex-shell" (concat tex-shell-cd-command " " --- 654,665 ---- (insert-string "\n") (if local-tex-trailer (insert-string local-tex-trailer)) (tex-set-buffer-directory temp-buffer zap-directory) ! (write-region (point-min) (point-max) tex-out-file t nil)) ! ! ;;; The following is sufficient in Emacs 19. ! ;;; (write-region (concat "\n" texinfo-tex-trailer) nil ! ;;; tex-out-file t nil) ! )) (tex-set-buffer-directory "*tex-shell*" zap-directory) (send-string "tex-shell" (concat tex-shell-cd-command " " *************** tex-trailer is appended to the temporary *** 418,446 **** (tex-recenter-output-buffer 0)) (defun texinfo-tex-buffer () ! "Run tex on current buffer. ! See \\[texinfo-tex-region] for more information." (interactive) ! (texinfo-tex-region (point-min) (point-max))) ! ;;(defun texinfo-texindex () ! ;; "Run texindex on unsorted index files. ! ;;The index files are made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer]. ! ;;Runs the shell command defined by `texinfo-texindex-command'." ! ;; (interactive) ! ;; (send-string "tex-shell" ! ;; (concat texinfo-texindex-command ! ;; " " tex-zap-file ".??" "\n")) ! ;; (tex-recenter-output-buffer nil)) (defun texinfo-tex-print () ! "Print .dvi file made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer]. ! Runs the shell command defined by `tex-dvi-print-command'." (interactive) (require 'tex-mode) (send-string "tex-shell" (concat tex-dvi-print-command " " tex-zap-file ".dvi" "\n")) (tex-recenter-output-buffer nil)) (provide 'texinfo) --- 669,743 ---- (tex-recenter-output-buffer 0)) (defun texinfo-tex-buffer () ! "Run TeX on visited file, once or twice, to make a correct `.dvi' file." (interactive) ! ! ;; Make sure TeX shell is running. ! (if (get-buffer "*tex-shell*") ! (quit-process (get-process "tex-shell") t) ! (tex-start-shell)) ! ! (cond ((null buffer-file-name) ! (error "Buffer not visiting any file!")) ! ((buffer-modified-p) ! (error "Buffer has been modified since last saved!"))) ! ! (setq tex-zap-file buffer-file-name) ! ! (send-string "tex-shell" ! (concat tex-shell-cd-command ! " " (file-name-directory tex-zap-file) "\n")) ! ! (send-string "tex-shell" ! (concat texinfo-tex-command " " tex-zap-file "\n")) ! ! (tex-recenter-output-buffer 0)) ! (defun texinfo-texindex () ! "Run `texindex' on unsorted index files. ! The index files are made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer]. ! This runs the shell command defined by `texinfo-texindex-command'." ! (interactive) ! (require 'tex-mode) ! (send-string "tex-shell" ! (concat texinfo-texindex-command ! " " tex-zap-file ".??" "\n")) ! (tex-recenter-output-buffer nil)) (defun texinfo-tex-print () ! "Print `.dvi' file made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer]. ! This runs the shell command defined by `tex-dvi-print-command'." (interactive) (require 'tex-mode) (send-string "tex-shell" (concat tex-dvi-print-command " " tex-zap-file ".dvi" "\n")) + (tex-recenter-output-buffer nil)) + + (defun texinfo-quit-job () + "Quit currently running TeX job, by sending an `x' to it." + (interactive) + (if (not (get-process "tex-shell")) + (error "No TeX shell running")) + (save-excursion + (set-buffer (get-buffer "*tex-shell*")) + (goto-char (point-max)) + (insert "x") + (shell-send-input))) + + (defun texinfo-delete-from-print-queue (job-number) + "Delete job from the line printer spooling queue. + You are prompted for the job number (use a number shown by a previous + \\[texinfo-show-tex-print-queue] command)." + (interactive "nPrinter job number for deletion: ") + (if (tex-shell-running) + (tex-kill-job) + (tex-start-shell)) + (send-string "tex-shell" + (concat + texinfo-delete-from-print-queue-command + " " + job-number"\n")) (tex-recenter-output-buffer nil)) (provide 'texinfo) diff -cprP --exclude=*.elc emacs-19.15/lisp/time-stamp.el emacs-19.16/lisp/time-stamp.el *** emacs-19.15/lisp/time-stamp.el --- emacs-19.16/lisp/time-stamp.el Mon Jun 21 01:06:06 1993 *************** *** 0 **** --- 1,271 ---- + ;;; time-stamp.el --- Maintain last change time stamps in files edited by Emacs + ;;; Copyright 1989, 1993 Free Software Foundation, Inc. + + ;; Maintainer: Stephen Gildea + ;; Time-stamp: <93/06/20 17:36:04 gildea> + ;; Keywords: tools + + ;; This file is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + + ;; This file is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU Emacs; see the file COPYING. If not, write to + ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + ;;; Commentary: + + ;;; If you put a time stamp template anywhere in the first 8 lines of a file, + ;;; it can be updated every time you save the file. See the top of + ;;; time-stamp.el for a sample. The template looks like one of the following: + ;;; Time-stamp: <> + ;;; Time-stamp: "" + ;;; The time stamp is written between the brackets or quotes, resulting in + ;;; Time-stamp: <93/06/18 10:26:51 gildea> + ;;; Here is an example which puts the file name and time stamp in the binary: + ;;; static char *time_stamp = "sdmain.c Time-stamp: <>"; + + ;;; To activate automatic time stamping, add this code to your .emacs file: + ;;; + ;;; (autoload 'time-stamp "time-stamp" "Update the time stamp in a buffer." t) + ;;; (if (not (memq 'time-stamp write-file-hooks)) + ;;; (setq write-file-hooks + ;;; (cons 'time-stamp write-file-hooks))) + + ;;; Change Log: + + ;;; Originally based on the 19 Dec 88 version of + ;;; date.el by John Sturdy + + ;;; Code: + + (defvar time-stamp-active t + "*Non-nil to enable time-stamping of files. See the function time-stamp.") + + (defvar time-stamp-format + '(time-stamp-yy/mm/dd time-stamp-hh:mm:ss user-login-name) + "*A list of functions to call to generate the time stamp string. + Each element of the list is called as a function and the results are + concatenated together separated by spaces. Elements may also be strings, + which are included verbatim. Spaces are not inserted around literal strings.") + + ;;; Do not change time-stamp-line-limit, time-stamp-start, or + ;;; time-stamp-end in your .emacs or you will be incompatible + ;;; with other people's files! If you must change them, + ;;; do so only in the local variables section of the file itself. + + (defvar time-stamp-line-limit 8 ;Do not change! See comment above. + "Number of lines at the beginning of a file that are searched. + The patterns time-stamp-start and time-stamp-end must be found on one + of the first time-stamp-line-limit lines of the file for the file to + be time-stamped.") + + (defvar time-stamp-start "Time-stamp: \\\\?[\"<]+" ;Do not change! + "Regexp after which the time stamp is written by \\[time-stamp]. + See also the variables time-stamp-end and time-stamp-line-limit. + + Do not change time-stamp-line-limit, time-stamp-start, or + time-stamp-end for yourself or you will be incompatible + with other people's files! If you must change them for some application, + do so in the local variables section of the time-stamped file itself.") + + + (defvar time-stamp-end "\\\\?[\">]" ;Do not change! See comment above. + "Regexp marking the text after the time stamp. + \\[time-stamp] deletes the text between the first match of time-stamp-start + \(which see) and the following match of time-stamp-end on the same line, + then writes the time stamp specified by time-stamp-format between them.") + + (defun time-stamp () + "Update the time stamp string in the buffer. + Only does its thing if the variable time-stamp-active is non-nil. + Typically used on write-file-hooks for automatic time-stamping. + The format of the time stamp is determined by the variable + time-stamp-format. The first time-stamp-line-limit lines of the + buffer (normally 8) are searched for the time stamp template, + and if it is found, a new time stamp is written into it." + (interactive) + (if time-stamp-active + (let ((case-fold-search nil)) + (if (and (stringp time-stamp-start) + (stringp time-stamp-end)) + (save-excursion + (goto-char (point-min)) + (if (re-search-forward time-stamp-start + (save-excursion + (forward-line time-stamp-line-limit) + (point)) + t) + (let ((start (point))) + (if (re-search-forward time-stamp-end + (save-excursion (end-of-line) (point)) + t) + (let ((end (match-beginning 0))) + (delete-region start end) + (goto-char start) + (insert (time-stamp-string)) + (setq end (point)) + ;; remove any tabs used to format the time stamp + (goto-char start) + (if (search-forward "\t" end t) + (untabify start end))))))) + ;; don't signal an error in a write-file-hook + (message "time-stamp-start or time-stamp-end is not a string")))) + ;; be sure to return nil so can be used on write-file-hooks + nil) + + (defun time-stamp-string () + "Generate the new string to be inserted by \\[time-stamp]." + (time-stamp-fconcat time-stamp-format " ")) + + (defun time-stamp-fconcat (list sep) + "Similar to (mapconcat 'funcall LIST SEP) but LIST can have literals. + If an element of LIST is a symbol, it is funcalled to get the string to use; + the separator SEP is used between two strings obtained by funcalling a + symbol. Otherwise the element itself is inserted; no separator is used + around literals." + (let ((return-string "") + (insert-sep-p nil)) + (while list + (cond ((symbolp (car list)) + (if insert-sep-p + (setq return-string (concat return-string sep))) + (setq return-string (concat return-string (funcall (car list)))) + (setq insert-sep-p t)) + (t + (setq return-string (concat return-string (car list))) + (setq insert-sep-p nil))) + (setq list (cdr list))) + return-string)) + + + (defconst time-stamp-month-numbers + '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6) + ("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12)) + "Assoc list of months and their number.") + + (defconst time-stamp-month-full-names + ["(zero)" "January" "February" "March" "April" "May" "June" + "July" "August" "September" "October" "November" "December"]) + + (defvar time-stamp-mail-host nil + "Name of the host where the user receives mail. + See the function time-stamp-mail-host-name.") + + ;;; Some useful functions to use in time-stamp-format + + ;;; Could generate most of a message-id with + ;;; '(yymmdd "" hhmm "@" mail-host-name) + + (defun time-stamp-mail-host-name () + "Return the name of the host where the user receives mail. + This is the value of time-stamp-mail-host if bound and a string, + otherwise the value of the function system-name." + (or (and (boundp 'time-stamp-mail-host) + (stringp time-stamp-mail-host) + time-stamp-mail-host) + (system-name))) + + (defun time-stamp-current-year () + "Return the current year as a four-character string." + (substring (current-time-string) -4)) + + ;;; pretty form, suitable for a title page + + (defun time-stamp-month-dd-yyyy () + "Return the current date as a string in \"Month dd, yyyy\" form." + (let ((date (current-time-string))) + (format "%s %02d, %s" + (aref time-stamp-month-full-names + (cdr (assoc (substring date 4 7) time-stamp-month-numbers))) + (string-to-int (substring date 8 10)) + (substring date -4)))) + + ;;; same as __DATE__ in ANSI C + + (defun time-stamp-mon-dd-yyyy () + "Return the current date as a string in \"Mon dd yyyy\" form. + The first character of dd is Space if the value is less than 10." + (let ((date (current-time-string))) + (format "%s %2d %s" + (substring date 4 7) + (string-to-int (substring date 8 10)) + (substring date -4)))) + + ;;; RFC 822 date + + (defun time-stamp-dd-mon-yy () + "Return the current date as a string in \"dd Mon yy\" form." + (let ((date (current-time-string))) + (format "%02d %s %s" + (string-to-int (substring date 8 10)) + (substring date 4 7) + (substring date -2)))) + + ;;; RCS 3 date + + (defun time-stamp-yy/mm/dd () + "Return the current date as a string in \"yy/mm/dd\" form." + (let ((date (current-time-string))) + (format "%s/%02d/%02d" + (substring date -2) + (cdr (assoc (substring date 4 7) time-stamp-month-numbers)) + (string-to-int (substring date 8 10))))) + + ;;; RCS 5 date + + (defun time-stamp-yyyy/mm/dd () + "Return the current date as a string in \"yyyy/mm/dd\" form." + (let ((date (current-time-string))) + (format "%s/%02d/%02d" + (substring date -4) + (cdr (assoc (substring date 4 7) time-stamp-month-numbers)) + (string-to-int (substring date 8 10))))) + + (defun time-stamp-yymmdd () + "Return the current date as a string in \"yymmdd\" form." + (let ((date (current-time-string))) + (format "%s%02d%02d" + (substring date -2) + (cdr (assoc (substring date 4 7) time-stamp-month-numbers)) + (string-to-int (substring date 8 10))))) + + (defun time-stamp-dd/mm/yy () + "Return the current date as a string in \"dd/mm/yy\" form." + (let ((date (current-time-string))) + (format "%02d/%02d/%s" + (string-to-int (substring date 8 10)) + (cdr (assoc (substring date 4 7) time-stamp-month-numbers)) + (substring date -2)))) + + (defun time-stamp-mm/dd/yy () + "Return the current date as a string in \"mm/dd/yy\" form." + (let ((date (current-time-string))) + (format "%02d/%02d/%s" + (cdr (assoc (substring date 4 7) time-stamp-month-numbers)) + (string-to-int (substring date 8 10)) + (substring date -2)))) + + (defun time-stamp-hh:mm:ss () + "Return the current time as a string in \"hh:mm:ss\" form." + (substring (current-time-string) 11 19)) + + (defun time-stamp-hh:mm () + "Return the current time as a string in \"hh:mm\" form." + (substring (current-time-string) 11 16)) + + (defun time-stamp-hhmm () + "Return the current time as a string in \"hhmm\" form." + (let ((date (current-time-string))) + (concat (substring date 11 13) + (substring date 14 16)))) + + (provide 'time-stamp) + + ;;; time-stamp.el ends here diff -cprP --exclude=*.elc emacs-19.15/lisp/vc-hooks.el emacs-19.16/lisp/vc-hooks.el *** emacs-19.15/lisp/vc-hooks.el Thu Jun 3 16:29:18 1993 --- emacs-19.16/lisp/vc-hooks.el Tue Jul 6 02:18:31 1993 *************** *** 38,43 **** --- 38,47 ---- "*If non-nil, backups of registered files are made according to the make-backup-files variable. Otherwise, prevents backups being made.") + (defvar vc-rcs-status t + "*If non-nil, revision and locks on RCS working file displayed in modeline. + Otherwise, not displayed.") + ;; Tell Emacs about this new kind of minor mode (if (not (assoc 'vc-mode minor-mode-alist)) (setq minor-mode-alist (cons '(vc-mode vc-mode) *************** the make-backup-files variable. Otherwi *** 102,112 **** vc-master-templates) nil))))) (defun vc-backend-deduce (file) ! "Return the version-control type of a file, nil if it is not registered" (and file (or (vc-file-getprop file 'vc-backend) ! (vc-file-setprop file 'vc-backend (cdr (vc-registered file)))))) (defun vc-toggle-read-only () "Change read-only status of current buffer, perhaps via version control. --- 106,129 ---- vc-master-templates) nil))))) + (defun vc-name (file) + "Return the master name of a file, nil if it is not registered." + (or (vc-file-getprop file 'vc-name) + (let ((name-and-type (vc-registered file))) + (if name-and-type + (progn + (vc-file-setprop file 'vc-backend (cdr name-and-type)) + (vc-file-setprop file 'vc-name (car name-and-type))))))) + (defun vc-backend-deduce (file) ! "Return the version-control type of a file, nil if it is not registered." (and file (or (vc-file-getprop file 'vc-backend) ! (let ((name-and-type (vc-registered file))) ! (if name-and-type ! (progn ! (vc-file-setprop file 'vc-name (car name-and-type)) ! (vc-file-setprop file 'vc-backend (cdr name-and-type)))))))) (defun vc-toggle-read-only () "Change read-only status of current buffer, perhaps via version control. *************** visiting FILE." *** 126,137 **** (interactive (list buffer-file-name nil)) (let ((vc-type (vc-backend-deduce file))) (if vc-type ! (progn ! (setq vc-mode ! (concat " " (or label (symbol-name vc-type)))))) ;; force update of mode line (set-buffer-modified-p (buffer-modified-p)) vc-type)) ;;; install a call to the above as a find-file hook (defun vc-find-file-hook () --- 143,223 ---- (interactive (list buffer-file-name nil)) (let ((vc-type (vc-backend-deduce file))) (if vc-type ! (setq vc-mode ! (concat " " (or label (symbol-name vc-type)) ! (if (and vc-rcs-status (eq vc-type 'RCS)) ! (vc-rcs-status file))))) ;; force update of mode line (set-buffer-modified-p (buffer-modified-p)) vc-type)) + + (defun vc-rcs-status (file) + ;; Return string " [LOCKER:REV]" if FILE under RCS control, otherwise nil, + ;; for placement in modeline by `vc-mode-line'. + + ;; If FILE is not locked then return just "". If the FILE is locked + ;; then return *all* the locks currently set, in a single string of the + ;; form " LOCKER1:REV1 LOCKER2:REV2 ...". + + ;; Algorithm: + + ;; 1. Check for master file corresponding to FILE being visited. + ;; + ;; 2. Insert the first few characters of the master file into a work + ;; buffer. + ;; + ;; 3. Search work buffer for line starting with "date" indicating enough + ;; of header was included; if not found, then keep inserting characters + ;; until "date" is located. + ;; + ;; 4. Search work buffer for line starting with "locks", extract + ;; all the locks currently enabled, and remove control characters + ;; separating them, like newlines; the string " user1:revision1 + ;; user2:revision2 ..." is returned. + + ;; Limitations: + + ;; The output doesn't show which version you are actually looking at. + ;; The modeline can get quite cluttered when there are multiple locks. + + (let ((master (vc-name file)) + found status) + + ;; If master file exists, then parse its contents, otherwise we return the + ;; nil value of this if form. + (if master + (save-excursion + + ;; Create work buffer. + (set-buffer (get-buffer-create "*vc-rcs-status*")) + (setq buffer-read-only nil + default-directory (file-name-directory master)) + (erase-buffer) + + ;; Check if we have enough of the header. + ;; If not, then keep including more. + (while + (not (or found + (let ((s (buffer-size))) + (goto-char (1+ s)) + (zerop (car (cdr (insert-file-contents + master nil s (+ s 8192)))))))) + (beginning-of-line) + (setq found (re-search-forward "^locks\\([^;]*\\);" nil t))) + + (if found + ;; Clean control characters from text. + (let ((status + (save-restriction + (narrow-to-region (match-beginning 1) (match-end 1)) + (goto-char (point-min)) + (while (re-search-forward "[ \b\t\n\v\f\r]+" nil t) + (replace-match " " t t)) + (buffer-string)))) + ;; Clean work buffer. + (erase-buffer) + (set-buffer-modified-p nil) + status)))))) ;;; install a call to the above as a find-file hook (defun vc-find-file-hook () diff -cprP --exclude=*.elc emacs-19.15/lisp/vc.el emacs-19.16/lisp/vc.el *** emacs-19.15/lisp/vc.el Fri Jun 18 22:05:03 1993 --- emacs-19.16/lisp/vc.el Tue Jul 6 02:15:26 1993 *************** *** 83,88 **** --- 83,92 ---- "*Don't assume that permissions and ownership track version-control status.") (defvar vc-checkin-switches nil "*Extra switches passed to the checkin program by \\[vc-checkin].") + (defvar vc-path + (if (file-exists-p "/usr/sccs") + '("/usr/sccs") nil) + "*List of extra directories to search for version control commands.") (defconst vc-maximum-comment-ring-size 32 "Maximum number of saved comments in the comment ring.") *************** is sensitive to blank lines.") *** 150,162 **** ;; Random helper functions - (defun vc-name (file) - "Return the master name of a file, nil if it is not registered." - (or (vc-file-getprop file 'vc-name) - (vc-file-setprop file 'vc-name - (let ((name-and-type (vc-registered file))) - (and name-and-type (car name-and-type)))))) - (defun vc-registration-error (file) (if file (error "File %s is not under version control" file) --- 154,159 ---- *************** the master name of FILE; this is appende *** 206,212 **** flags) (if vc-file (setq squeezed (append squeezed (list vc-file)))) ! (let ((default-directory (file-name-directory (or file "./")))) (setq status (apply 'call-process command nil t nil squeezed))) (goto-char (point-max)) (previous-line 1) --- 203,210 ---- flags) (if vc-file (setq squeezed (append squeezed (list vc-file)))) ! (let ((default-directory (file-name-directory (or file "./"))) ! (exec-path (if vc-path (append exec-path vc-path) exec-path))) (setq status (apply 'call-process command nil t nil squeezed))) (goto-char (point-max)) (previous-line 1) *************** lock steals will raise an error." *** 515,521 **** (set (make-local-variable 'vc-parent-buffer) parent) (set (make-local-variable 'vc-parent-buffer-name) (concat " from " (buffer-name vc-parent-buffer))) ! (vc-mode-line (if file (file-name-nondirectory file) " (no file)")) (vc-log-mode) (setq vc-log-operation action) (setq vc-log-file file) --- 513,519 ---- (set (make-local-variable 'vc-parent-buffer) parent) (set (make-local-variable 'vc-parent-buffer-name) (concat " from " (buffer-name vc-parent-buffer))) ! (vc-mode-line (or file " (no file)")) (vc-log-mode) (setq vc-log-operation action) (setq vc-log-file file) *************** and two version designators specifying w *** 726,733 **** ;; visited. This plays hell with numerous assumptions in ;; the diff.el and compile.el machinery. (pop-to-buffer "*vc*") ! (vc-shrink-to-fit) ! (goto-char (point-min)) ) (not unchanged) ) --- 724,737 ---- ;; visited. This plays hell with numerous assumptions in ;; the diff.el and compile.el machinery. (pop-to-buffer "*vc*") ! (pop-to-buffer "*vc*") ! (if (= 0 (buffer-size)) ! (progn ! (setq unchanged t) ! (message "No changes to %s since latest version." file)) ! (vc-shrink-to-fit) ! (goto-char (point-min))) ! ) (not unchanged) ) *************** A prefix argument means do not revert th *** 1109,1114 **** --- 1113,1119 ---- The mark is left at the end of the text prepended to the change log. With prefix arg of C-u, only find log entries for the current buffer's file. With any numeric prefix arg, find log entries for all files currently visited. + Otherwise, find log entries for all registered files in the default directory. From a program, any arguments are passed to the `rcs2log' script." (interactive (cond ((consp current-prefix-arg) ;C-u *************** From a program, any arguments are passed *** 1120,1138 **** (while buffers (setq file (buffer-file-name (car buffers))) (and file (vc-backend-deduce file) ! (setq files (cons (file-relative-name file) files))) (setq buffers (cdr buffers))) ! files)))) ! (find-file-other-window (find-change-log)) ! (barf-if-buffer-read-only) ! (vc-buffer-sync) ! (undo-boundary) ! (goto-char (point-min)) ! (push-mark) ! (message "Computing change log entries...") ! (message "Computing change log entries... %s" ! (if (eq 0 (apply 'call-process "rcs2log" nil t nil args)) ! "done" "failed"))) ;; Functions for querying the master and lock files. --- 1125,1161 ---- (while buffers (setq file (buffer-file-name (car buffers))) (and file (vc-backend-deduce file) ! (setq files (cons file files))) (setq buffers (cdr buffers))) ! files)) ! (t ! (let ((RCS (concat default-directory "RCS"))) ! (and (file-directory-p RCS) ! (mapcar (function ! (lambda (f) ! (if (string-match "\\(.*\\),v$" f) ! (substring f 0 (match-end 1)) ! f))) ! (directory-files RCS nil "...\\|^[^.]\\|^.[^.]"))))))) ! (let ((odefault default-directory)) ! (find-file-other-window (find-change-log)) ! (barf-if-buffer-read-only) ! (vc-buffer-sync) ! (undo-boundary) ! (goto-char (point-min)) ! (push-mark) ! (message "Computing change log entries...") ! (message "Computing change log entries... %s" ! (if (or (null args) ! (eq 0 (apply 'call-process "rcs2log" nil t nil ! (mapcar (function ! (lambda (f) ! (file-relative-name ! (if (file-name-absolute-p f) ! f ! (concat odefault f))))) ! args)))) ! "done" "failed")))) ;; Functions for querying the master and lock files. diff -cprP --exclude=*.elc emacs-19.15/man/ChangeLog emacs-19.16/man/ChangeLog *** emacs-19.15/man/ChangeLog Sat Jun 19 17:57:31 1993 --- emacs-19.16/man/ChangeLog Tue Jul 6 11:08:01 1993 *************** *** 1,3 **** --- 1,7 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. diff -cprP --exclude=*.elc emacs-19.15/man/building.texi emacs-19.16/man/building.texi *** emacs-19.15/man/building.texi Thu Jun 17 15:44:13 1993 --- emacs-19.16/man/building.texi Tue Jun 29 18:48:51 1993 *************** *** 152,157 **** --- 152,158 ---- @cindex GDB @cindex DBX @cindex SDB + @cindex XDB @c Do you believe in GUD? The GUD (Grand Unified Debugger) library provides an interface to various *************** If you have not visited a tags table or *** 193,198 **** --- 194,203 ---- of the functions, you get a message saying @samp{The sdb support requires a valid tags table to work}. If this happens, generate a valid tags table in the working directory and try again. + + @item M-x xdb + @findex xdb + Similar, but run XDB instead of GDB. @end table You can only run one debugger process at a time. *************** makes sense. *** 339,349 **** @vindex gdb-mode-hook @vindex dbx-mode-hook @vindex sdb-mode-hook ! On startup, GUD runs one of the following hooks: ! @code{gdb-mode-hook}, if you are using GDB; @code{dbx-mode-hook}, if you ! are using DBX; and @code{sdb-mode-hook}, if you are using SDB. You can ! use these hooks to define custom keybindings for the debugger ! interaction buffer. @xref{Hooks}. Here is a convenient way to define a command that sends a particular command string to the debugger, and set up a key binding for it in the --- 344,355 ---- @vindex gdb-mode-hook @vindex dbx-mode-hook @vindex sdb-mode-hook ! @vindex xdb-mode-hook ! On startup, GUD runs one of the following hooks: @code{gdb-mode-hook}, ! if you are using GDB; @code{dbx-mode-hook}, if you are using DBX; ! @code{sdb-mode-hook}, if you are using SDB; and @code{xdb-mode-hook}, if ! you are using XDB. You can use these hooks to define custom keybindings ! for the debugger interaction buffer. @xref{Hooks}. Here is a convenient way to define a command that sends a particular command string to the debugger, and set up a key binding for it in the diff -cprP --exclude=*.elc emacs-19.15/man/emacs.texi emacs-19.16/man/emacs.texi *** emacs-19.15/man/emacs.texi Sat Jun 19 17:55:26 1993 --- emacs-19.16/man/emacs.texi Tue Jul 6 11:09:59 1993 *************** *** 110,116 **** Emacs is the extensible, customizable, self-documenting real-time display editor. This Info file describes how to edit with Emacs and some of how to customize it, but not how to extend it. It ! corresponds to GNU Emacs version 19.15. @end ifinfo @menu --- 110,116 ---- Emacs is the extensible, customizable, self-documenting real-time display editor. This Info file describes how to edit with Emacs and some of how to customize it, but not how to extend it. It ! corresponds to GNU Emacs version 19.16. @end ifinfo @menu diff -cprP --exclude=*.elc emacs-19.15/man/help.texi emacs-19.16/man/help.texi *** emacs-19.15/man/help.texi Tue Jun 1 00:33:53 1993 --- emacs-19.16/man/help.texi Sun Jul 4 13:54:40 1993 *************** *** 247,252 **** --- 247,254 ---- Emulations of other editors. @item extensions Emacs Lisp language extensions. + @item faces + Support for using faces (fonts and colors; @pxref{Faces}). @item games Games, jokes and amusements. @item hardware *************** Maintenance aids for the Emacs developme *** 269,274 **** --- 271,278 ---- Modes for electronic-mail handling. @item news Support for netnews reading and posting. + @item non-text + Support for editing files that are not ordinary text. @item processes Process, subshell, compilation, and job control support. @item terminals diff -cprP --exclude=*.elc emacs-19.15/man/split-man emacs-19.16/man/split-man *** emacs-19.15/man/split-man Sat Feb 22 16:06:57 1986 --- emacs-19.16/man/split-man Sun Jun 27 17:10:56 1993 *************** *** 10,14 **** dviselect -i emacs.dvi -o emacs181.dvi 181-200 dviselect -i emacs.dvi -o emacs201.dvi 201-220 dviselect -i emacs.dvi -o emacs221.dvi 221-240 ! dviselect -i emacs.dvi -o emacs241.dvi 241- dviselect -i emacs.dvi -o emacs0.dvi _20-0 --- 10,22 ---- dviselect -i emacs.dvi -o emacs181.dvi 181-200 dviselect -i emacs.dvi -o emacs201.dvi 201-220 dviselect -i emacs.dvi -o emacs221.dvi 221-240 ! dviselect -i emacs.dvi -o emacs241.dvi 241-260 ! dviselect -i emacs.dvi -o emacs241.dvi 261-280 ! dviselect -i emacs.dvi -o emacs241.dvi 281-300 ! dviselect -i emacs.dvi -o emacs241.dvi 301-320 ! dviselect -i emacs.dvi -o emacs241.dvi 321-340 ! dviselect -i emacs.dvi -o emacs241.dvi 341-360 ! dviselect -i emacs.dvi -o emacs241.dvi 361-380 ! dviselect -i emacs.dvi -o emacs241.dvi 381-400 ! dviselect -i emacs.dvi -o emacs241.dvi 401- dviselect -i emacs.dvi -o emacs0.dvi _20-0 diff -cprP --exclude=*.elc emacs-19.15/oldXMenu/ChangeLog emacs-19.16/oldXMenu/ChangeLog *** emacs-19.15/oldXMenu/ChangeLog Sat Jun 19 17:57:33 1993 --- emacs-19.16/oldXMenu/ChangeLog Tue Jul 6 11:08:02 1993 *************** *** 1,3 **** --- 1,7 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. diff -cprP --exclude=*.elc emacs-19.15/src/.gdbinit emacs-19.16/src/.gdbinit *** emacs-19.15/src/.gdbinit Fri Jun 11 09:26:23 1993 --- emacs-19.16/src/.gdbinit Fri Jul 2 18:51:20 1993 *************** *** 162,168 **** unset environment TERM echo TERMCAP and TERM environment variables unset.\n show environment DISPLAY ! set args -q -geometry +0+0 # Don't let abort actually run, as it will make # stdio stop working and therefore the `pr' command above as well. --- 162,168 ---- unset environment TERM echo TERMCAP and TERM environment variables unset.\n show environment DISPLAY ! set args -q -geometry 80x40+0+0 # Don't let abort actually run, as it will make # stdio stop working and therefore the `pr' command above as well. diff -cprP --exclude=*.elc emacs-19.15/src/ChangeLog emacs-19.16/src/ChangeLog *** emacs-19.15/src/ChangeLog Sat Jun 19 18:53:55 1993 --- emacs-19.16/src/ChangeLog Tue Jul 6 12:28:41 1993 *************** *** 1,3 **** --- 1,340 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + + * ymakefile [not ORDINARY_LINK && __GNUC__ && __GNUC__ > 1 && not + LIB_GCC] (LIB_GCC): Use "$(CC)" instead of "gcc". + + Tue Jul 6 01:58:20 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * textprop.c (copy_text_properties): Pass a copy of POS to + validate_interval_range; that function increments its arguments, + which isn't what we want. + + * fns.c (Fsubstring, concat): Pass all six arguments to + copy_text_properties. + + * intervals.c (find_interval): Doc fixes, computation of + tree->position rearranged for clarity. + + * intervals.c (find_interval): Consistently treat POSITION as an + actual buffer position, i.e. origin 1. The old code seemed + undecided on this point. Treat the end of the buffer as being + part of the rightmost interval. + (adjust_intervals_for_insertion): Consistently treat POSITION as + origin 1. + (interval_deletion_adjustment): The exception: FROM should be + origin zero here. Consistently treat it as such. Simplify code + which shrinks and possibly deletes intervals. + (adjust_intervals_for_deletion): Treat start as origin 1; our + caller does. + (set_point): Use buffer positions throughout, not a mix of buffer + posns and origin zero posns. + (get_local_map): Remove special case for POSITION at end of buffer; + find_interval handles that case correctly. + (verify_interval_modification): Remove special case for START at + end of buffer. + * textprop.c (validate_interval_range): End-of-buffer/string + positions no longer need special handling. + + * intervals.c (make_new_interval): #if 0 this out. Nobody calls it. + + * textprop.c (copy_text_properties): New function, from David + Gillespie. + * intervals.h: Declare copy_text_properties. + * fns.c: #include "intervals.h". + (Fsubstring): Copy text properties to result string. + (concat): Copy text properties to result string. + * ymakefile (fns.o): Note that this depends on INTERVAL_SRC. + + * print.c: Get rid of extra space at the end of print syntax for + strings with intervals. + [USE_TEXT_PROPERTIES] (print): Don't print a space before the + interval property lists. + [USE_TEXT_PROPERTIES] (print_interval): Print a space before this + internal's properties, not after. + + * m/pmax.h (C_SWITCH_X_MACHINE): Set this to + "-DNeedFunctionPrototypes=0", to avoid lossage in DEC X11 header + files. + * ymakefile (really-oldXMenu): Pass C_SWITCH_X_MACHINE to the + oldXMenu make. + + * doc.c (Fsubstitute_command_keys): Pass all five arguments to + describe_map_tree. + + Mon Jul 5 03:15:17 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + Compare the values of text properties using EQ, not Fequal. + * intervals.c (intervals_equal): Call EQ, not Fequal. + * textprop.c (interval_has_all_properties, add_properties): Same. + + * textprop.c (validate_interval_range): Don't increment both + *begin and *end if they point to the same thing. + (validate_plist): Call QUIT while scanning LIST. + + * intervals.c (intervals_equal): Test the return value of Fequal + against Qnil, not 0. + + * keyboard.c (Vdouble_click_time): Renamed from double_click_time, + and made a Lisp_Object instead of an int. + (make_lispy_event): If Vdouble_click_time is t, impose no time + limit on double-clicks. + (syms_of_keyboard): DEFVAR_LISP (not DEFVAR_INT) + Vdouble_click_time (not double_click_time), and adjust doc string + to say that `nil' means no double clicks, and `t' means no time + limit. + + Sun Jul 4 16:00:40 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * keyboard.h (EVENT_CLICK_COUNT, POSN_SCROLLBAR_PART): New + accessors. + + * s/sunos4-1.h (LIBS_SYSTEM): Don't link against -lresolv; that's + only needed for misconfigured systems. + + Sun Jul 4 00:51:00 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * keymap.c (describe_map_tree): When inserting TITLE, mention PREFIX. + Insert newline at end, if inserted anything else. + (describe_buffer_bindings): Corresponding changes. + For minor mode maps, build up a title string, + then let describe_map_tree insert it. + + * eval.c (Fsignal): Clarify error message. + + Sat Jul 3 22:19:19 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * keyboard.c (read_char): After Fgarbage_collect, call redisplay. + + Sat Jul 3 17:11:19 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * frame.c (Fredirect_frame_focus): Allow redirection of focus of + dead frames. + + * s/sunos4-1.h (LIBS_SYSTEM): Make this be -lresolv, so we get the + versions of gethostbyname and such that use the DNS. + + Sat Jul 3 02:58:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * fileio.c (Frename_file): + After prompting for ok-if-already-exists, pass only nil or + t to copy-file, never an integer. + + Fri Jul 2 23:57:42 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * keymap.c (Faccessible_keymaps): Doc fix. + + Fri Jul 2 18:48:58 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * textprop.c (set_properties): Don't try to make undo records if + OBJECT is a string. + + Fri Jul 2 01:42:41 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * keyboard.c (read_key_sequence): When inserting `menu-bar' prefix, + modify the position field to prevent doing so twice. + Do all these forms of event expansion after replayed events also. + Set last_real_key_start before each key. + Use last_real_key_start in criterion for being the first event. + + * process.c (wait_reading_process_input): Do include the keyboard + in the select, if read_kbd was a cons cell. + + Thu Jul 1 22:25:05 1993 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) + + * xterm.c (XTread_socket): When handing non-synthetic + ConfigureNotify events, don't refer to the parent window + descriptor. + + * textprop.c (set_properties): Add undo records to remove entirely + new properties. Only record old property values for those + properties whose values have changed. + + Thu Jul 1 19:56:28 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * callint.c (Vmark_even_if_inactive): New var, with Lisp variable. + (check_mark): Use it. + + Thu Jul 1 00:03:50 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * xfaces.c [XOS_NEEDS_TIME_H]: #undef USG while #including + , so that file doesn't try to define struct timeval and + struct timezone. + + * xterm.c (frame_highlight, frame_unhighlight): Don't test + Vx_no_window_manager. BLOCK_INPUT around the border manipulation + calls. + + Wed Jun 30 16:12:09 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * xterm.c (XTread_socket): Initialize event_found to zero, and + pass a zeroed timeout to select, not a null pointer; the latter + means "wait forever". + + * s/hpux8.h (random, srandom): No need to define these to be + foo_random and foo_srandom; autoconf should autodetect when the + real random functions are available. + + * xdisp.c (redisplay): If we're not already showing the region, + then don't disable the single-line optimizations just because the + mark isn't where we last displayed it. + + Wed Jun 30 13:50:08 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * keyboard.c (syms_of_keyboard): Doc fix. + (Vhelp_char): Renamed from help_char. + (Vprefix_help_command): New Lisp variable. + (read_key_sequence): Use that, for help char after prefix key. + + * keyboard.c (kbd_buffer_get_event): + Clear f before calling mouse_position_hook. + + * emacs.c, callproc.c (PRIO_PROCESS): Definition deleted. + + * vm-limit.c (check_memory_limits): Make data_size and five_percent + unsigned long. + + Wed Jun 30 00:55:41 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * keyboard.c (kbd_buffer_get_event): Correctly generate + switch-frame events when reading mouse motion events. + + Tue Jun 29 19:05:54 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * xterm.c: Add CPP tangle from process.c to get definitions for + FD_SET, etcetera. + (XTread_socket): Use those macros when testing for dropped connection. + + Tue Jun 29 01:27:22 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloc.c (mark_object): Add aborts in Lisp_Symbol case. + + * keymap.c (describe_map_tree): Insert key_heading here. + New arg TITLE. + (describe_buffer_bindings): Corresponding changes. + + * process.c (wait_reading_process_input): Use SIGIO only if defined. + + * keymap.c (shadow_lookup): New function. + (describe_map_2): Call it. SHADOW is now a list of maps. + (describe_vector): Likewise. + (describe_map): SHADOW is now a list of maps. + (describe_map_tree): Likewise. + (describe_buffer_bindings): Build suitable list to pass as SHADOW. + (Faccessible_keymaps): New arg PREFIX. Callers changed. + (describe_map_tree): New arg PREFIX. + (Fdescribe_bindings): New arg PREFIX. + Pass to describe_buffer_bindings along with buffer. + (describe_buffer_bindings): Extract PREFIX and pass along. + + Mon Jun 28 15:18:53 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * keymap.c (describe_map_2): Cleanups. + Check there's no previous definition in same keymap. + + Thu Jun 24 00:15:54 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * keyboard.c (read_char): Don't do idle autosaves if we're not + interactive. + + Wed Jun 23 21:32:25 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * xfns.c (Fx_create_frame): Check for internalBorder resource, as + well as internalBorderWidth. + + * xterm.c (XTread_socket): Remove #if 0''s around code which tests + for dropped connection (i.e. sigio but no events). + + Tue Jun 22 02:58:40 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * keyboard.c (menu_bar_items, read_key_sequence): Use + current_global_map, not global_map; the latter is only meant to be + used for initial_define_key. + * commands.h: Doc fix. + + * commands.h (Vglobal_mouse_map): Removed; unused. + * xfns.c (Vglobal_mouse_map): Same. + + * buffer.c (list_buffers_1): Make desired_point a lisp object; set + it to nil, unless we find the current buffer. + (Flist_buffers): Don't try to set point in the buffer list unless + list_buffers_1 actually returns an integer. Don't use a full + save_excursion; just save and restore the buffer. + + Separate parameter faces (those created and modified by the user) + from the computed faces (the combinations created by + compute_char_face), so that we don't waste global face id's. + * xterm.h (struct x_display): Replace the fields faces and n_faces + with fields param_faces, n_param_faces, computed_faces, + n_computed_faces, and size_computed_faces. + (FRAME_FACES, FRAME_N_FACES): Replaced by... + (FRAME_COMPUTED_FACES, FRAME_N_COMPUTED_FACES, FRAME_PARAM_FACES, + FRAME_N_PARAM_FACES): New macros. + * xfaces.c: Doc fixes. + (init_frame_faces): Call new_computed_face to create entries for + the default and mode line faces. Use the FRAME...PARAM_FACES + macros. + (free_frame_faces): Use the FRAME...PARAM_FACES and + FRAME...COMPUTED_FACES macros. Don't use the copy flag; all + parameter faces have real X resources, and all computed faces just + have copies. Free both the parameter and computed face arrays. + (new_computed_face): New function. + (intern_computed_face): Renamed from intern_frame_face; callers + changed. Call new_computed_face. + (ensure_face_ready, compute_char_face, compute_glyph_face): Use the + FRAME...PARAM_FACES macros. + (recompute_basic_faces): Use the FRAME...PARAM_FACES and + FRAME...COMPUTED_FACES macros. Produce the computed faces by + starting with the base faces and merging in the parameter faces. + (Fset_face_attribute_internal): Use the FRAME...PARAM_FACES + macros. Just call recompute_basic_faces if the default or mode + line faces have changed. + * xfns.c (Fx_list_fonts): Use the FRAME...PARAM_FACES macros. + * xterm.c (dumpglyphs): Use the FRAME...COMPUTED_FACES macros. + * dispextern.h (struct face): Remove the copy member. This is no + longer necessary; all computed faces are copies, and no parameter + faces are. + + * xfaces.c (face_vector, nfaces, nfaces_allocated): Make these + static. + + * xdisp.c (redisplay_window): Remember to compute end relative to + the start of the visible region, too. + + Mon Jun 21 22:02:48 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * xrdb.c (get_user_db): Remember to free the screen-local resource + string after we've merged its data into db. + + * keyboard.c (make_lispy_event): Added detection of double-click + and triple-click events. + (parse_modifiers_uncached, apply_modifiers_uncached): Same. + (read_key_sequence): Coerce double-clicks to clicks, and triple-clicks + to double-clicks or clicks, by analogy with drag events. + (double_click_time): Added variable. + * termhooks.h: Added multi-click event modifier bits. + + Mon Jun 21 15:37:06 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * textprop.c (Fremove_text_properties, Fadd_text_properties): + Really do next_interval when skipping the first interval. + + Sun Jun 20 16:01:51 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * xfns.c (Fx_open_connection): Remember to block input while + calling x_load_resources. + * xrdb.c: Undo change of June 19th; it was a BLOCK_INPUT problem, + not a server-specific bug. + + * alloc.c (Fgarbage_collect): If the minibuffer is active, don't + display the "...done" message; allow the minibuffer to show again. + + * config.h.in (HAVE_LONG_FILE_NAMES): Add an #undef, for autoconf + to chew on. Re-arrange macros to reflect the ordering of the + corresponding macros in configure.in, to facilitate this kind of + checking. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. *************** Sat Jun 19 17:14:27 1993 Jim Blandy (j *** 4,10 **** Sat Jun 19 16:24:58 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) ! * puresize.h (PURESIZE): Up this to 20500 for MULTI_FRAME Emaces, and 190000 for non-MULTI_FRAME Emaces. * xfaces.c (recompute_basic_faces): This shouldn't be declared static. --- 341,347 ---- Sat Jun 19 16:24:58 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) ! * puresize.h (PURESIZE): Up this to 205000 for MULTI_FRAME Emaces, and 190000 for non-MULTI_FRAME Emaces. * xfaces.c (recompute_basic_faces): This shouldn't be declared static. *************** Wed Jun 2 16:12:30 1993 Richard Stallm *** 687,693 **** * sysdep.c (init_sys_modes): Disable VLNEXT char. Also VWERASE, VREPRINT, VDISCARD. ! * xfaces.c: Test XOS_NEEDS_TIME_H, not HPUX, for including time.hj. * s/sol2.h, s/hpux.h (XOS_NEEDS_TIME_H): Defined. Wed Jun 2 20:11:29 1993 Francesco Potorti` (pot@cnuce.cnr.it) --- 1024,1030 ---- * sysdep.c (init_sys_modes): Disable VLNEXT char. Also VWERASE, VREPRINT, VDISCARD. ! * xfaces.c: Test XOS_NEEDS_TIME_H, not HPUX, for including time.h. * s/sol2.h, s/hpux.h (XOS_NEEDS_TIME_H): Defined. Wed Jun 2 20:11:29 1993 Francesco Potorti` (pot@cnuce.cnr.it) diff -cprP --exclude=*.elc emacs-19.15/src/alloc.c emacs-19.16/src/alloc.c *** emacs-19.15/src/alloc.c Thu Jun 17 01:01:50 1993 --- emacs-19.16/src/alloc.c Tue Jun 29 17:07:47 1993 *************** *** 1358,1364 **** if (gc_cons_threshold < 10000) gc_cons_threshold = 10000; ! if (omessage) message1 (omessage); else if (!noninteractive) message1 ("Garbage collecting...done"); --- 1358,1364 ---- if (gc_cons_threshold < 10000) gc_cons_threshold = 10000; ! if (omessage || minibuf_level > 0) message1 (omessage); else if (!noninteractive) message1 ("Garbage collecting...done"); *************** mark_object (objptr) *** 1587,1596 **** --- 1587,1604 ---- if (XMARKBIT (ptr->plist)) break; XMARK (ptr->plist); mark_object ((Lisp_Object *) &ptr->value); + if ((unsigned int) ptr <= 4) + abort (); mark_object (&ptr->function); + if ((unsigned int) ptr <= 4) + abort (); mark_object (&ptr->plist); + if ((unsigned int) ptr <= 4) + abort (); XSETTYPE (*(Lisp_Object *) &ptr->name, Lisp_String); mark_object (&ptr->name); + if ((unsigned int) ptr <= 4) + abort (); ptr = ptr->next; if (ptr) { diff -cprP --exclude=*.elc emacs-19.15/src/buffer.c emacs-19.16/src/buffer.c *** emacs-19.15/src/buffer.c Thu Jun 17 00:12:23 1993 --- emacs-19.16/src/buffer.c Tue Jun 22 03:37:04 1993 *************** *** 1035,1043 **** register Lisp_Object tail, tem, buf; Lisp_Object col1, col2, col3, minspace; register struct buffer *old = current_buffer, *b; ! int desired_point = 0; Lisp_Object other_file_symbol; other_file_symbol = intern ("list-buffers-directory"); XFASTINT (col1) = 19; --- 1035,1044 ---- register Lisp_Object tail, tem, buf; Lisp_Object col1, col2, col3, minspace; register struct buffer *old = current_buffer, *b; ! Lisp_Object desired_point; Lisp_Object other_file_symbol; + desired_point = Qnil; other_file_symbol = intern ("list-buffers-directory"); XFASTINT (col1) = 19; *************** *** 1070,1076 **** continue; /* Identify the current buffer. */ if (b == old) ! desired_point = point; write_string (b == old ? "." : " ", -1); /* Identify modified buffers */ write_string (BUF_MODIFF (b) > b->save_modified ? "*" : " ", -1); --- 1071,1077 ---- continue; /* Identify the current buffer. */ if (b == old) ! XFASTINT (desired_point) = point; write_string (b == old ? "." : " ", -1); /* Identify modified buffers */ write_string (BUF_MODIFF (b) > b->save_modified ? "*" : " ", -1); *************** *** 1106,1112 **** current_buffer->read_only = Qt; set_buffer_internal (old); ! return make_number (desired_point); } DEFUN ("list-buffers", Flist_buffers, Slist_buffers, 0, 1, "P", --- 1107,1113 ---- current_buffer->read_only = Qt; set_buffer_internal (old); ! return desired_point; } DEFUN ("list-buffers", Flist_buffers, Slist_buffers, 0, 1, "P", *************** The R column contains a % for buffers th *** 1120,1126 **** (files) Lisp_Object files; { - int count = specpdl_ptr - specpdl; Lisp_Object desired_point; desired_point = --- 1121,1126 ---- *************** The R column contains a % for buffers th *** 1127,1137 **** internal_with_output_to_temp_buffer ("*Buffer List*", list_buffers_1, files); ! record_unwind_protect (save_excursion_restore, save_excursion_save ()); ! Fset_buffer (build_string ("*Buffer List*")); ! SET_PT (XINT (desired_point)); ! ! return unbind_to (count, Qnil); } DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, --- 1127,1140 ---- internal_with_output_to_temp_buffer ("*Buffer List*", list_buffers_1, files); ! if (NUMBERP (desired_point)) ! { ! int count = specpdl_ptr - specpdl; ! record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); ! Fset_buffer (build_string ("*Buffer List*")); ! SET_PT (XINT (desired_point)); ! return unbind_to (count, Qnil); ! } } DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, diff -cprP --exclude=*.elc emacs-19.15/src/callint.c emacs-19.16/src/callint.c *** emacs-19.15/src/callint.c Sun Mar 7 04:31:27 1993 --- emacs-19.16/src/callint.c Thu Jul 1 19:56:57 1993 *************** *** 35,40 **** --- 35,44 ---- Lisp_Object Vcommand_debug_status, Qcommand_debug_status; Lisp_Object Qenable_recursive_minibuffers; + /* Non-nil means treat the mark as active + even if mark_active is 0. */ + Lisp_Object Vmark_even_if_inactive; + Lisp_Object Qlist; Lisp_Object preserved_fns; *************** check_mark () *** 141,147 **** Lisp_Object tem = Fmarker_buffer (current_buffer->mark); if (NILP (tem) || (XBUFFER (tem) != current_buffer)) error ("The mark is not set now"); ! if (NILP (current_buffer->mark_active)) error ("The mark is not active now"); } --- 145,151 ---- Lisp_Object tem = Fmarker_buffer (current_buffer->mark); if (NILP (tem) || (XBUFFER (tem) != current_buffer)) error ("The mark is not set now"); ! if (NILP (current_buffer->mark_active) && NILP (Vmark_even_if_inactive)) error ("The mark is not active now"); } *************** Each command is represented as a form to *** 656,661 **** --- 660,673 ---- Bound each time `call-interactively' is called;\n\ may be set by the debugger as a reminder for itself."); Vcommand_debug_status = Qnil; + + DEFVAR_LISP ("Vmark-even-if-inactive", &Vmark_even_if_inactive, + "*Non-nil means you can use the mark even when inactive.\n\ + This option makes a difference in Transient Mark mode.\n\ + When the option is non-nil, deactivation of the mark\n\ + turns off region highlighting, but commands that use the mark\n\ + behave as if the mark were still active."); + Vmark_even_if_inactive = Qnil; defsubr (&Sinteractive); defsubr (&Scall_interactively); diff -cprP --exclude=*.elc emacs-19.15/src/callproc.c emacs-19.16/src/callproc.c *** emacs-19.15/src/callproc.c Fri Jun 18 18:17:00 1993 --- emacs-19.16/src/callproc.c Wed Jun 30 13:50:39 1993 *************** *** 35,41 **** #endif /* SIGCLD */ #include ! #define PRIO_PROCESS 0 #include #ifdef USG5 #include --- 35,41 ---- #endif /* SIGCLD */ #include ! #include #ifdef USG5 #include diff -cprP --exclude=*.elc emacs-19.15/src/commands.h emacs-19.16/src/commands.h *** emacs-19.15/src/commands.h Mon Jan 25 19:45:26 1993 --- emacs-19.16/src/commands.h Tue Jun 22 04:17:22 1993 *************** *** 20,36 **** #define Ctl(c) ((c)&037) ! /* Define the names of keymaps, just so people can refer to ! them in calls to initial_define_key */ ! extern Lisp_Object global_map; - extern Lisp_Object meta_map; - extern Lisp_Object control_x_map; - - /* Keymap for mouse commands. */ - extern Lisp_Object Vglobal_mouse_map; extern Lisp_Object Vminibuffer_local_map; --- 20,32 ---- #define Ctl(c) ((c)&037) ! /* Define the names of keymaps, just so people can refer to them in ! calls to initial_define_key. These should *not* be used after ! initialization; use-global-map doesn't affect these; it sets ! current_global_map instead. */ extern Lisp_Object global_map; extern Lisp_Object meta_map; extern Lisp_Object control_x_map; extern Lisp_Object Vminibuffer_local_map; diff -cprP --exclude=*.elc emacs-19.15/src/config.h.in emacs-19.16/src/config.h.in *** emacs-19.15/src/config.h.in Thu Jun 17 00:44:16 1993 --- emacs-19.16/src/config.h.in Wed Jun 23 23:32:56 1993 *************** *** 79,106 **** that & in the full name stands for the login id. */ #undef AMPERSAND_FULL_NAME ! /* Some things figured out by the configure script. */ #undef HAVE_SYS_TIMEB_H #undef HAVE_SYS_TIME_H #undef HAVE_ALLOCA_H #undef HAVE_GETTIMEOFDAY #undef HAVE_GETHOSTNAME #undef HAVE_DUP2 #undef HAVE_RENAME #undef HAVE_TM_ZONE #undef HAVE_TZNAME ! #undef TM_IN_SYS_TIME ! #undef STDC_HEADERS ! #undef TIME_WITH_SYS_TIME #undef CRAY_STACKSEG_END #undef STACK_DIRECTION ! #undef const #undef UNEXEC_SRC ! #undef HAVE_LIBDNET #undef HAVE_XRMSETDATABASE #undef HAVE_RANDOM - #undef HAVE_LIBXBSD - #undef HAVE_CLOSEDIR /* If using GNU, then support inline function declarations. */ #ifdef __GNUC__ --- 79,117 ---- that & in the full name stands for the login id. */ #undef AMPERSAND_FULL_NAME ! /* Some things figured out by the configure script, grouped as they are in ! configure.in. */ #undef HAVE_SYS_TIMEB_H #undef HAVE_SYS_TIME_H + #undef STDC_HEADERS + #undef TIME_WITH_SYS_TIME + + #undef HAVE_LIBDNET + #undef HAVE_ALLOCA_H + #undef HAVE_GETTIMEOFDAY #undef HAVE_GETHOSTNAME #undef HAVE_DUP2 #undef HAVE_RENAME + #undef HAVE_CLOSEDIR + + #undef TM_IN_SYS_TIME #undef HAVE_TM_ZONE #undef HAVE_TZNAME ! ! #undef const ! ! #undef HAVE_LONG_FILE_NAMES ! #undef CRAY_STACKSEG_END #undef STACK_DIRECTION ! #undef UNEXEC_SRC ! ! #undef HAVE_LIBXBSD #undef HAVE_XRMSETDATABASE #undef HAVE_RANDOM /* If using GNU, then support inline function declarations. */ #ifdef __GNUC__ diff -cprP --exclude=*.elc emacs-19.15/src/dispextern.h emacs-19.16/src/dispextern.h *** emacs-19.15/src/dispextern.h Tue May 25 08:35:03 1993 --- emacs-19.16/src/dispextern.h Sun Jun 20 19:49:35 1993 *************** *** 54,68 **** /* Whether or not to underline text in this face. */ char underline; - - /* Does this face own its resources? (color, font, etcetera) - If this is a face which we computed by combining other faces, - then this is true, and we shouldn't free any of the resources - it refers to; the faces from which it was constructed own it. - On the other hand, if this is a face the user created and - filled in directly, then this is false, and we should free the - resources when we free it. */ - char copy; }; /* Let's stop using this and get rid of it. */ --- 54,59 ---- diff -cprP --exclude=*.elc emacs-19.15/src/doc.c emacs-19.16/src/doc.c *** emacs-19.15/src/doc.c Sat May 22 14:50:12 1993 --- emacs-19.16/src/doc.c Tue Jul 6 01:58:16 1993 *************** *** 487,493 **** else if (start[-1] == '<') keymap = tem; else ! describe_map_tree (tem, 1, Qnil); tem = Fbuffer_string (); Ferase_buffer (); set_buffer_internal (oldbuf); --- 487,493 ---- else if (start[-1] == '<') keymap = tem; else ! describe_map_tree (tem, 1, Qnil, Qnil, 0); tem = Fbuffer_string (); Ferase_buffer (); set_buffer_internal (oldbuf); diff -cprP --exclude=*.elc emacs-19.15/src/emacs.c emacs-19.16/src/emacs.c *** emacs-19.15/src/emacs.c Sat Jun 19 16:24:10 1993 --- emacs-19.16/src/emacs.c Wed Jun 30 13:50:02 1993 *************** *** 52,59 **** #define O_RDWR 2 #endif - #define PRIO_PROCESS 0 - /* Command line args from shell, as list of strings */ Lisp_Object Vcommand_line_args; --- 52,57 ---- diff -cprP --exclude=*.elc emacs-19.15/src/eval.c emacs-19.16/src/eval.c *** emacs-19.15/src/eval.c Sat Jun 12 20:00:50 1993 --- emacs-19.16/src/eval.c Sun Jul 4 00:50:56 1993 *************** *** 1145,1151 **** if (EQ (sig, Qquit)) return Qnil; else ! error ("Returning a value from an error is no longer supported"); } #endif --- 1145,1151 ---- if (EQ (sig, Qquit)) return Qnil; else ! error ("Cannot return from the debugger in an error"); } #endif diff -cprP --exclude=*.elc emacs-19.15/src/fileio.c emacs-19.16/src/fileio.c *** emacs-19.15/src/fileio.c Fri Jun 18 21:04:25 1993 --- emacs-19.16/src/fileio.c Sat Jul 3 02:57:10 1993 *************** *** 1767,1773 **** { if (errno == EXDEV) { ! Fcopy_file (filename, newname, ok_if_already_exists, Qt); Fdelete_file (filename); } else --- 1767,1776 ---- { if (errno == EXDEV) { ! Fcopy_file (filename, newname, ! /* We have already prompted if it was an integer, ! so don't have copy-file prompt again. */ ! NILP (ok_if_already_exists) ? Qnil : Qt, Qt); Fdelete_file (filename); } else diff -cprP --exclude=*.elc emacs-19.15/src/filelock.cpp.c emacs-19.16/src/filelock.cpp.c *** emacs-19.15/src/filelock.cpp.c --- emacs-19.16/src/filelock.cpp.c Sun Jun 20 16:27:05 1993 *************** *** 0 **** --- 1,2976 ---- + # 1 "filelock.c" + + + + + + + + + + + + + + + + + + + + # 1 "/usr/local/lib/gcc-lib/m68k-hp-bsd/2.4.3/include/sys/types.h" 1 3 + + + + + + + + + + + + + + + + + + + + + + + + + typedef unsigned char u_char; + typedef unsigned short u_short; + typedef unsigned int u_int; + typedef unsigned long u_long; + typedef unsigned short ushort; + + + + + + + + + + + + typedef struct _physadr { int r[1]; } *physadr; + typedef struct label_t { + int val[15]; + } label_t; + + typedef struct _quad { long val[2]; } quad; + typedef long daddr_t; + typedef char * caddr_t; + typedef u_long ino_t; + typedef long swblk_t; + + + typedef unsigned long int size_t; + + typedef long time_t; + typedef short dev_t; + typedef long off_t; + typedef u_short uid_t; + typedef u_short gid_t; + typedef u_long fixpt_t; + typedef long key_t; + typedef long paddr_t; + + + + + + + + + + + + + typedef long fd_mask; + + + + + + typedef struct fd_set { + fd_mask fds_bits[((( 256 )+(( (sizeof(fd_mask) * 8 ) )-1))/( (sizeof(fd_mask) * 8 ) )) ]; + } fd_set; + + + + + + + + + + + + + + # 20 "filelock.c" 2 + + # 1 "/usr/include/sys/stat.h" 1 3 + + + + + + + + + + struct stat + { + dev_t st_dev; + ino_t st_ino; + unsigned short st_mode; + short st_nlink; + uid_t st_uid; + gid_t st_gid; + dev_t st_rdev; + off_t st_size; + time_t st_atime; + int st_spare1; + time_t st_mtime; + int st_spare2; + time_t st_ctime; + int st_spare3; + long st_blksize; + long st_blocks; + long st_spare4[2]; + }; + + + + + + + + + + + + + + + + # 21 "filelock.c" 2 + + # 1 "config.h" 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 1 "s/bsd4-3.h" 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 122 "config.h" 2 + + + + + + + + + + + + # 1 "m/hp9000s300.h" 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 49 "m/hp9000s300.h" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 232 "m/hp9000s300.h" + + # 133 "config.h" 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 205 "config.h" + + + + + + + + + + extern char *getenv (); + + + + # 22 "filelock.c" 2 + + + + + + # 1 "/usr/include/pwd.h" 1 3 + + + struct passwd { + char *pw_name; + char *pw_passwd; + int pw_uid; + int pw_gid; + int pw_quota; + char *pw_comment; + char *pw_gecos; + char *pw_dir; + char *pw_shell; + }; + + struct passwd *getpwent(), *getpwuid(), *getpwnam(); + # 27 "filelock.c" 2 + + + + # 1 "/usr/include/errno.h" 1 3 + + + + + + # 1 "/usr/include/sys/errno.h" 1 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 6 "/usr/include/errno.h" 2 3 + + + extern int errno; + # 30 "filelock.c" 2 + + # 1 "/usr/local/lib/gcc-lib/m68k-hp-bsd/2.4.3/include/sys/file.h" 1 3 + + + + + + + + + + + # 38 "/usr/local/lib/gcc-lib/m68k-hp-bsd/2.4.3/include/sys/file.h" 3 + + # 1 "/usr/local/lib/gcc-lib/m68k-hp-bsd/2.4.3/include/sys/fcntl.h" 1 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct flock { + short l_type; + short l_whence; + long l_start; + long l_len; + short l_pid; + short l_xxx; + }; + + + # 39 "/usr/local/lib/gcc-lib/m68k-hp-bsd/2.4.3/include/sys/file.h" 2 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 93 "/usr/local/lib/gcc-lib/m68k-hp-bsd/2.4.3/include/sys/file.h" 3 + + # 31 "filelock.c" 2 + + + + + + # 1 "lisp.h" 1 + + + + + + + + + + + + + + + + + + + + + + + + + enum Lisp_Type + { + + Lisp_Int, + + + Lisp_Symbol, + + + Lisp_Marker, + + + + Lisp_String, + + + + Lisp_Vector, + + + Lisp_Cons, + + + + + Lisp_Compiled, + + + Lisp_Buffer, + + + + + Lisp_Subr, + + + + + Lisp_Internal, + + + + + + + Lisp_Intfwd, + + + + + + Lisp_Boolfwd, + + + + Lisp_Process, + + + + + + + Lisp_Objfwd, + + + + + + + Lisp_Frame, + + + + + + + Lisp_Internal_Stream, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lisp_Buffer_Local_Value, + + + + + + Lisp_Some_Buffer_Local_Value, + + + + + Lisp_Buffer_Objfwd, + + + + Lisp_Void, + + + + Lisp_Window, + + + Lisp_Window_Configuration, + + + Lisp_Float, + + + + + + + + + Lisp_Overlay + }; + + # 237 "lisp.h" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 408 "lisp.h" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct interval + { + + + unsigned int total_length; + unsigned int position; + struct interval *left; + struct interval *right; + struct interval *parent; + + + + + + + unsigned char write_protect; + unsigned char visible; + unsigned char front_sticky; + + unsigned char rear_sticky; + + int plist; + }; + + typedef struct interval *INTERVAL; + + + + + + + + + + + + + + + # 491 "lisp.h" + + + + + struct Lisp_Cons + { + int car, cdr; + }; + + + + + struct Lisp_Buffer_Cons + { + int car, cdr; + struct buffer *buffer; + int bufpos; + }; + + + + struct Lisp_String + { + int size; + INTERVAL intervals; + unsigned char data[1]; + }; + + struct Lisp_Vector + { + int size; + struct Lisp_Vector *next; + int contents[1]; + }; + + + + struct Lisp_Symbol + { + struct Lisp_String *name; + int value; + int function; + int plist; + struct Lisp_Symbol *next; + }; + + struct Lisp_Subr + { + int (*function) (); + short min_args, max_args; + char *symbol_name; + char *prompt; + char *doc; + }; + + + + struct Lisp_Marker + { + struct buffer *buffer; + int chain; + int bufpos; + int modified; + }; + + + + struct Lisp_Float + { + int type; + + double data; + }; + + + + + + + typedef unsigned char UCHAR; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + extern void defsubr (); + + + + + extern void defvar_lisp (); + extern void defvar_bool (); + extern void defvar_int (); + + + + + + + + + + + + + + + + + + + + + + + + + + struct specbinding + { + int symbol, old_value; + int (*func) (); + int unused; + }; + + extern struct specbinding *specpdl; + extern struct specbinding *specpdl_ptr; + extern int specpdl_size; + + + struct handler + { + + int handler; + int var; + + + struct catchtag *tag; + + + struct handler *next; + }; + + extern struct handler *handlerlist; + + extern struct catchtag *catchlist; + extern struct backtrace *backtrace_list; + + + + extern char *stack_bottom; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + extern int Vascii_downcase_table, Vascii_upcase_table; + + + + extern int consing_since_gc; + + + + extern int gc_cons_threshold; + + + + + + + + + + + + + + extern struct gcpro *gcprolist; + + struct gcpro + { + struct gcpro *next; + int *var; + int nvars; + }; + + + + + + + + + + + + + + + + + + + + + + + + + + void staticpro(); + + + + + + + + + + + + + + + + + extern int Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; + extern int Qerror_conditions, Qerror_message, Qtop_level; + extern int Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; + extern int Qvoid_variable, Qvoid_function; + extern int Qsetting_constant, Qinvalid_read_syntax; + extern int Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; + extern int Qend_of_file, Qarith_error; + extern int Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; + + extern int Qrange_error, Qdomain_error, Qsingularity_error; + extern int Qoverflow_error, Qunderflow_error; + + extern int Qintegerp, Qnumberp, Qnatnump, Qsymbolp, Qlistp, Qconsp; + extern int Qstringp, Qarrayp, Qsequencep, Qbufferp; + extern int Qchar_or_string_p, Qmarkerp, Qvectorp; + extern int Qinteger_or_marker_p, Qnumber_or_marker_p; + extern int Qboundp, Qfboundp; + extern int Qbuffer_or_string_p; + extern int Qcdr; + + + extern int Qfloatp, Qinteger_or_floatp, Qinteger_or_float_or_marker_p; + + + extern int Qframep; + + extern int Feq (), Fnull (), Flistp (), Fconsp (), Fatom (), Fnlistp (); + extern int Fintegerp (), Fnatnump (), Fsymbolp (); + extern int Fvectorp (), Fstringp (), Farrayp (), Fsequencep (); + extern int Fbufferp (), Fmarkerp (), Fsubrp (), Fchar_or_string_p (); + extern int Finteger_or_marker_p (); + + extern int Ffloatp(), Finteger_or_floatp(); + extern int Finteger_or_float_or_marker_p(), Ftruncate(); + + + extern int Fcar (), Fcar_safe(), Fcdr (), Fcdr_safe(); + extern int Fsetcar (), Fsetcdr (); + extern int Fboundp (), Ffboundp (), Fmakunbound (), Ffmakunbound (); + extern int Fsymbol_function (), Fsymbol_plist (), Fsymbol_name (); + extern int indirect_function (), Findirect_function (); + extern int Ffset (), Fsetplist (); + extern int Fsymbol_value (), find_symbol_value (), Fset (); + extern int Fdefault_value (), Fset_default (), Fdefault_boundp (); + + extern int Faref (), Faset (), Farray_length (); + + extern int Fstring_to_number (), Fnumber_to_string (); + extern int Feqlsign (), Fgtr (), Flss (), Fgeq (), Fleq (); + extern int Fneq (), Fzerop (); + extern int Fplus (), Fminus (), Ftimes (), Fquo (), Frem (); + extern int Fmax (), Fmin (); + extern int Flogand (), Flogior (), Flogxor (), Flognot (); + extern int Flsh (), Fash (); + + extern int Fadd1 (), Fsub1 (); + + extern int make_number (); + extern int long_to_cons (); + extern unsigned long cons_to_long (); + extern void args_out_of_range (); + extern void args_out_of_range_3 (); + extern int wrong_type_argument (); + + extern int Ffloat_to_int(), Fint_to_float(); + extern double extract_float(); + extern int make_float (); + extern int Ffloat (); + + + + extern int Qstring_lessp; + extern int Vfeatures; + extern int Fidentity (), Frandom (); + extern int Flength (); + extern int Fappend (), Fconcat (), Fvconcat (), Fcopy_sequence (); + extern int Fsubstring (); + extern int Fnth (), Fnthcdr (), Fmemq (), Fassq (), Fassoc (); + extern int Frassq (), Fdelq (), Fsort (); + extern int Freverse (), Fnreverse (), Fget (), Fput (), Fequal (); + extern int Ffillarray (), Fnconc (), Fmapcar (), Fmapconcat (); + extern int Fy_or_n_p (), do_yes_or_no_p (); + extern int Ffeaturep (), Frequire () , Fprovide (); + extern int concat2 (), nconc2 (); + extern int assq_no_quit (); + extern int Fcopy_alist (); + + + extern int Vpurify_flag; + extern int Fcons (), Flist(), Fmake_list (); + extern int Fmake_vector (), Fvector (), Fmake_symbol (), Fmake_marker (); + extern int Fmake_string (), build_string (), make_string (); + extern int make_event_array (), make_uninit_string (); + extern int Fpurecopy (), make_pure_string (); + extern int pure_cons (), make_pure_vector (); + extern int Fgarbage_collect (); + extern int Fmake_byte_code (); + + + extern int Vprin1_to_string_buffer; + extern int Fprin1 (), Fprin1_to_string (), Fprinc (); + extern int Fterpri (), Fprint (); + extern int Vstandard_output, Qstandard_output; + extern int Qexternal_debugging_output; + extern void temp_output_buffer_setup (), temp_output_buffer_show (); + extern int print_level, print_escape_newlines; + extern int Qprint_escape_newlines; + + + extern int Qvariable_documentation, Qstandard_input; + extern int Vobarray, Vstandard_input; + extern int Fread (), Fread_from_string (); + extern int Fintern (), Fintern_soft (), Fload (); + extern int Fget_file_char (), Fread_char (); + extern int read_filtered_event (); + extern int Feval_current_buffer (), Feval_region (); + extern int intern (), oblookup (); + + + extern int Vcurrent_load_list; + extern int Vload_history; + + + extern int Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; + extern int Vinhibit_quit, Qinhibit_quit, Vquit_flag; + extern int Vmocklisp_arguments, Qmocklisp, Qmocklisp_arguments; + extern int Vautoload_queue; + extern int Vrun_hooks; + extern int Fand (), For (), Fif (), Fprogn (), Fprog1 (), Fprog2 (); + extern int Fsetq (), Fquote (); + extern int Fuser_variable_p (), Finteractive_p (); + extern int Fdefun (), Flet (), FletX (), Fwhile (); + extern int Fcatch (), Fthrow (), Funwind_protect (); + extern int Fcondition_case (), Fsignal (); + extern int Ffunction_type (), Fautoload (), Fcommandp (); + extern int Feval (), Fapply (), Ffuncall (); + extern int Fglobal_set (), Fglobal_value (), Fbacktrace (); + extern int apply1 (), call0 (), call1 (), call2 (), call3 (); + extern int apply_lambda (); + extern int internal_catch (); + extern int internal_condition_case (); + extern int unbind_to (); + extern void error (); + extern int un_autoload (); + + + extern int Vprefix_arg, Qminus, Vcurrent_prefix_arg; + extern int Fgoto_char (); + extern int Fpoint_min_marker (), Fpoint_max_marker (); + extern int Fpoint_min (), Fpoint_max (); + extern int Fpoint (), Fpoint_marker (), Fmark_marker (); + extern int Ffollowing_char (), Fprevious_char (), Fchar_after (); + extern int Finsert (); + extern int Feolp (), Feobp (), Fbolp (), Fbobp (); + extern int Fformat (), format1 (); + extern int make_buffer_string (), Fbuffer_substring (); + extern int Fbuffer_string (); + extern int Fstring_equal (), Fstring_lessp (), Fbuffer_substring_lessp (); + extern int save_excursion_save (), save_restriction_save (); + extern int save_excursion_restore (), save_restriction_restore (); + extern int Fchar_to_string (); + + + extern int Vbuffer_alist, Vinhibit_read_only; + extern int Fget_buffer (), Fget_buffer_create (), Fset_buffer (); + extern int Fbarf_if_buffer_read_only (); + extern int Fcurrent_buffer (), Fswitch_to_buffer (), Fpop_to_buffer (); + extern int Fother_buffer (); + extern int Qoverlayp; + extern struct buffer *all_buffers; + + + + extern int Fmarker_position (), Fmarker_buffer (); + extern int Fcopy_marker (); + + + + extern int Qfile_error; + extern int Ffind_file_name_handler (); + extern int Ffile_name_as_directory (); + extern int Fexpand_file_name (), Ffile_name_nondirectory (); + extern int Fsubstitute_in_file_name (); + extern int Ffile_symlink_p (); + extern int Fverify_visited_file_modtime (); + extern int Ffile_exists_p (); + extern int Fdirectory_file_name (); + extern int Ffile_name_directory (); + extern int expand_and_dir_to_file (); + extern int Ffile_accessible_directory_p (); + + + + extern int Vfundamental_mode_abbrev_table; + + + extern int Fstring_match (); + extern int Fscan_buffer (); + + + + extern int last_minibuf_string; + extern int read_minibuf (), Fcompleting_read (); + extern int Fread_from_minibuffer (); + extern int Fread_variable (), Fread_buffer (), Fread_key_sequence (); + extern int Fread_minibuffer (), Feval_minibuffer (); + extern int Fread_string (), Fread_file_name (); + extern int Fread_no_blanks_input (); + + + + extern int Vcommand_history; + extern int Qcall_interactively; + extern int Fcall_interactively (); + extern int Fprefix_numeric_value (); + + + + extern int Fdowncase (), Fupcase (), Fcapitalize (); + + + + extern int Qdisabled; + extern int Vhelp_form, Vtop_level; + extern int Fdiscard_input (), Frecursive_edit (); + extern int Fcommand_execute (), Finput_pending_p (); + extern int Qvertical_scroll_bar; + + + + extern int Qkeymap; + extern int current_global_map; + extern int Fkey_description (), Fsingle_key_description (); + extern int Fwhere_is_internal (); + extern int access_keymap (), store_in_keymap (); + extern int get_keyelt (), get_keymap(); + + + extern int Fvertical_motion (), Findent_to (), Fcurrent_column (); + + + extern int Qwindowp, Qwindow_live_p; + extern int Fget_buffer_window (); + extern int Fsave_window_excursion (); + extern int Fset_window_configuration (), Fcurrent_window_configuration (); + extern int Fcoordinates_in_window_p (); + extern int Fwindow_at (); + extern int window_internal_height (), window_internal_width (); + + + extern int Fframep (); + extern int Fselect_frame (); + extern int Ffocus_frame (); + extern int Funfocus_frame (); + extern int Fselected_frame (); + extern int Fwindow_frame (); + extern int Fframe_root_window (); + extern int Fframe_selected_window (); + extern int Fframe_list (); + extern int Fnext_frame (); + extern int Fdelete_frame (); + extern int Fread_mouse_position (); + extern int Fset_mouse_position (); + extern int Fmake_frame_visible (); + extern int Fmake_frame_invisible (); + extern int Ficonify_frame (); + extern int Fdeiconify_frame (); + extern int Fframe_visible_p (); + extern int Fvisible_frame_list (); + extern int Fframe_parameters (); + extern int Fmodify_frame_parameters (); + extern int Fframe_pixel_size (); + extern int Fframe_height (); + extern int Fframe_width (); + extern int Fset_frame_height (); + extern int Fset_frame_width (); + extern int Fset_frame_size (); + extern int Fset_frame_position (); + + + + + + extern int decode_env_path (); + extern int Vinvocation_name; + void shut_down_emacs ( ); + + extern int noninteractive; + + extern int inhibit_window_system; + + + extern int Fget_process (), Fget_buffer_process (), Fprocessp (); + extern int Fprocess_status (), Fkill_process (); + + + extern int Vexec_path, Vexec_directory, Vdata_directory; + + + extern int Vdoc_file_name; + extern int Fsubstitute_command_keys (); + extern int Fdocumentation (), Fdocumentation_property (); + + + extern int Qbytecode; + extern int Fbyte_code (); + + + extern int Qexecute_kbd_macro; + extern int Fexecute_kbd_macro (); + + + extern int Fundo_boundary (); + extern int truncate_undo_list (); + + + + extern int initialized; + + extern int immediate_quit; + + extern void debugger (); + + extern char *getenv (), *ctime (), *getwd (); + extern long *xmalloc (), *xrealloc (); + extern void xfree (); + + extern char *egetenv (); + + # 36 "filelock.c" 2 + + # 1 "paths.h" 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 37 "filelock.c" 2 + + # 1 "buffer.h" 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct buffer_text + { + unsigned char *beg; + int begv; + int pt; + int gpt; + int zv; + int z; + int gap_size; + int modiff; + + + + }; + + struct buffer + { + + + + + + + + struct buffer_text text; + + + + struct buffer *next; + + + int local_var_flags; + + int save_modified; + + + + + int modtime; + + int auto_save_modified; + + + int last_window_start; + + + INTERVAL intervals; + + + + + + + + + + + int markers; + + + + + + + int name; + + + int filename; + + int directory; + + + + + + int backed_up; + + int save_length; + + int auto_save_file_name; + + int read_only; + + int mark; + + + + int local_var_alist; + + + + int major_mode; + + int mode_name; + + int mode_line_format; + + + int keymap; + + int abbrev_table; + + int syntax_table; + + + + + int case_fold_search; + int tab_width; + int fill_column; + int left_margin; + + int auto_fill_function; + + + int downcase_table; + + int upcase_table; + + + int truncate_lines; + + int ctl_arrow; + + + int selective_display; + + + int selective_display_ellipses; + + + int minor_modes; + + + int overwrite_mode; + + int abbrev_mode; + + int display_table; + + int case_canon_table; + + int case_eqv_table; + + + int undo_list; + + int mark_active; + + + + int overlays_before; + + + + int overlays_after; + + + int overlay_center; + }; + + + + extern struct buffer *current_buffer; + + + + + + + + + extern struct buffer buffer_defaults; + + + + + + + + + + + + + + + extern struct buffer buffer_local_flags; + + + + + + extern struct buffer buffer_local_symbols; + + + + + + + + + extern struct buffer buffer_local_types; + + + + + + + + + + + + + + + + + extern void reset_buffer (); + + extern int Fbuffer_name (); + extern int Fget_file_buffer (); + + + extern int Vbefore_change_function; + extern int Vafter_change_function; + extern int Vfirst_change_hook; + extern int Qfirst_change_hook; + + extern int Vdeactivate_mark; + extern int Vtransient_mark_mode; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # 38 "filelock.c" 2 + + + extern int errno; + + extern char *egetenv (); + extern char *strcpy (); + + + + + + + + + + + + + + char *lock_path; + + + + + + + + char *superlock_path; + + + + + + + + + + + + fill_in_lock_short_file_name (lockfile, fn) + register char *lockfile; + register int fn; + { + register union + { + unsigned int word [2]; + unsigned char byte [8]; + } crc; + register unsigned char *p, new; + + + + + crc.word[0] = crc.word[1] = 0; + + for (p = ((struct Lisp_String *) (( fn ) & ((1<<24 ) - 1) ) ) ->data; new = *p++; ) + { + new += crc.byte[7]; + crc.byte[7] = crc.byte[6]; + crc.byte[6] = crc.byte[5] + new; + crc.byte[5] = crc.byte[4]; + crc.byte[4] = crc.byte[3]; + crc.byte[3] = crc.byte[2] + new; + crc.byte[2] = crc.byte[1]; + crc.byte[1] = crc.byte[0]; + crc.byte[0] = new; + } + sprintf (lockfile, "%s%.2x%.2x%.2x%.2x%.2x%.2x%.2x", lock_path, + crc.byte[0], crc.byte[1], crc.byte[2], crc.byte[3], + crc.byte[4], crc.byte[5], crc.byte[6]); + } + + # 135 "filelock.c" + + + static int + lock_file_owner_name (lfname) + char *lfname; + { + struct stat s; + struct passwd *the_pw; + extern struct passwd *getpwuid (); + + if (lstat (lfname, &s) == 0) + the_pw = getpwuid (s.st_uid); + return (the_pw == 0 ? Qnil : build_string (the_pw->pw_name)); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + void + lock_file (fn) + register int fn; + { + register int attack; + register char *lfname; + + ( lfname = (char *) alloca (14 + strlen (lock_path) + 1), fill_in_lock_short_file_name ( lfname , ( fn ))) ; + + + + { + register int subject_buf = Fget_file_buffer (fn); + if (! (( subject_buf ) == ( Qnil ) ) + && (( Fverify_visited_file_modtime (subject_buf) ) == ( Qnil ) ) + && ! (( Ffile_exists_p (fn) ) == ( Qnil ) ) ) + call1 (intern ("ask-user-about-supersession-threat"), fn); + } + + + if (lock_if_free (lfname) <= 0) + + return; + + + attack = call2 (intern ("ask-user-about-lock"), fn, + lock_file_owner_name (lfname)); + if (! (( attack ) == ( Qnil ) ) ) + + { + lock_superlock (lfname); + lock_file_1 (lfname, 1 ) ; + unlink (superlock_path); + return; + } + + } + + + + + + + int + lock_file_1 (lfname, mode) + int mode; char *lfname; + { + register int fd; + char buf[20]; + + if ((fd = open (lfname, mode, 0666)) >= 0) + { + + + + fchmod (fd, 0666); + + sprintf (buf, "%d ", getpid ()); + write (fd, buf, strlen (buf)); + close (fd); + return 1; + } + else + return 0; + } + + + + + + + int + lock_if_free (lfname) + register char *lfname; + { + register int clasher; + + while (lock_file_1 (lfname, 1 | 04000 | 01000 ) == 0) + { + if (errno != 17 ) + return -1; + clasher = current_lock_owner (lfname); + if (clasher != 0) + if (clasher != getpid ()) + return (clasher); + else return (0); + + } + return 0; + } + + + + + + int + current_lock_owner (lfname) + char *lfname; + { + int owner = current_lock_owner_1 (lfname); + if (owner == 0 && errno == 2 ) + return (0); + + if (owner != 0 && (kill (owner, 0) >= 0 || errno == 1 )) + return (owner); + if (unlink (lfname) < 0) + return (-1); + return (0); + } + + int + current_lock_owner_1 (lfname) + char *lfname; + { + register int fd; + char buf[20]; + int tem; + + fd = open (lfname, 0 , 0666); + if (fd < 0) + return 0; + tem = read (fd, buf, sizeof buf); + close (fd); + return (tem <= 0 ? 0 : atoi (buf)); + } + + + void + unlock_file (fn) + register int fn; + { + register char *lfname; + + ( lfname = (char *) alloca (14 + strlen (lock_path) + 1), fill_in_lock_short_file_name ( lfname , ( fn ))) ; + + lock_superlock (lfname); + + if (current_lock_owner_1 (lfname) == getpid ()) + unlink (lfname); + + unlink (superlock_path); + } + + lock_superlock (lfname) + char *lfname; + { + register int i, fd; + + for (i = -20; i < 0 && (fd = open (superlock_path, + 1 | 04000 | 01000 , 0666)) < 0; + i++) + { + if (errno != 17 ) + return; + sleep (1); + } + if (fd >= 0) + { + + + + fchmod (fd, 0666); + + write (fd, lfname, strlen (lfname)); + close (fd); + } + } + + void + unlock_all_files () + { + register int tail; + register struct buffer *b; + + for (tail = Vbuffer_alist; ((enum Lisp_Type) ((( tail ) >> 24 ) & ((1<<7 ) - 1) )) == Lisp_Cons; + tail = ((struct Lisp_Cons *) (( tail ) & ((1<<24 ) - 1) ) ) ->cdr) + { + b = ((struct buffer *) (( ((struct Lisp_Cons *) (( ((struct Lisp_Cons *) (( tail ) & ((1<<24 ) - 1) ) ) ->car ) & ((1<<24 ) - 1) ) ) ->cdr ) & ((1<<24 ) - 1) ) ) ; + if (((enum Lisp_Type) (( b->filename ) >> 24 )) == Lisp_String && + b->save_modified < (( b )->text.modiff) ) + unlock_file (b->filename); + } + } + + + int Flock_buffer (); struct Lisp_Subr Slock_buffer = { Flock_buffer , + 0 , 1 , "lock-buffer" , 0 , 0}; int Flock_buffer + + + + (fn) + int fn; + { + if ( (( fn ) == ( Qnil ) ) ) + fn = current_buffer->filename; + else + do { if (((enum Lisp_Type) (( ( fn ) ) >> 24 )) != Lisp_String) fn = wrong_type_argument (Qstringp, ( fn )); } while (0) ; + if (current_buffer->save_modified < (current_buffer->text.modiff) + && ! (( fn ) == ( Qnil ) ) ) + lock_file (fn); + return Qnil; + } + + int Funlock_buffer (); struct Lisp_Subr Sunlock_buffer = { Funlock_buffer , + 0 , 0 , "unlock-buffer" , 0 , 0}; int Funlock_buffer + + + () + { + if (current_buffer->save_modified < (current_buffer->text.modiff) && + ((enum Lisp_Type) (( current_buffer->filename ) >> 24 )) == Lisp_String) + unlock_file (current_buffer->filename); + return Qnil; + } + + + + + unlock_buffer (buffer) + struct buffer *buffer; + { + if (buffer->save_modified < (( buffer )->text.modiff) && + ((enum Lisp_Type) (( buffer->filename ) >> 24 )) == Lisp_String) + unlock_file (buffer->filename); + } + + int Ffile_locked_p (); struct Lisp_Subr Sfile_locked_p = { Ffile_locked_p , 0 , 1 , "file-locked-p" , 0 , 0}; int Ffile_locked_p + + + (fn) + int fn; + { + register char *lfname; + int owner; + + fn = Fexpand_file_name (fn, Qnil); + + ( lfname = (char *) alloca (14 + strlen (lock_path) + 1), fill_in_lock_short_file_name ( lfname , ( fn ))) ; + + owner = current_lock_owner (lfname); + if (owner <= 0) + return (Qnil); + else if (owner == getpid ()) + return (Qt); + + return (lock_file_owner_name (lfname)); + } + + + + + init_filelock () + { + lock_path = egetenv ("EMACSLOCKDIR"); + if (! lock_path) + lock_path = "/home/gd/gnu/emacs/19.0/lock/" ; + + + if (lock_path[strlen (lock_path) - 1] != '/') + { + lock_path = strcpy ((char *) xmalloc (strlen (lock_path) + 2), + lock_path); + strcat (lock_path, "/"); + } + + superlock_path = (char *) xmalloc ((strlen (lock_path) + + sizeof ("!!!SuperLock!!!" ))); + strcpy (superlock_path, lock_path); + strcat (superlock_path, "!!!SuperLock!!!" ); + } + + syms_of_filelock () + { + defsubr (&Sunlock_buffer); + defsubr (&Slock_buffer); + defsubr (&Sfile_locked_p); + } + + diff -cprP --exclude=*.elc emacs-19.15/src/fns.c emacs-19.16/src/fns.c *** emacs-19.15/src/fns.c Mon May 31 23:38:15 1993 --- emacs-19.16/src/fns.c Tue Jul 6 10:13:25 1993 *************** *** 30,35 **** --- 30,36 ---- #include "buffer.h" #include "keyboard.h" + #include "intervals.h" Lisp_Object Qstring_lessp, Qprovide, Qrequire; *************** concat (nargs, args, target_type, last_s *** 305,315 **** if (!CONSP (this)) thislen = Flength (this), thisleni = XINT (thislen); while (1) { register Lisp_Object elt; ! /* Fetch next element of `this' arg into `elt', or break if `this' is exhausted. */ if (NILP (this)) break; if (CONSP (this)) elt = Fcar (this), this = Fcdr (this); --- 306,324 ---- if (!CONSP (this)) thislen = Flength (this), thisleni = XINT (thislen); + if (XTYPE (this) == Lisp_String && XTYPE (val) == Lisp_String + && ! NULL_INTERVAL_P (XSTRING (this)->intervals)) + { + copy_text_properties (make_number (0), thislen, this, + make_number (toindex), val, Qnil); + } + while (1) { register Lisp_Object elt; ! /* Fetch next element of `this' arg into `elt', or break if ! `this' is exhausted. */ if (NILP (this)) break; if (CONSP (this)) elt = Fcar (this), this = Fcdr (this); *************** If FROM or TO is negative, it counts fro *** 389,394 **** --- 398,405 ---- Lisp_Object string; register Lisp_Object from, to; { + Lisp_Object res; + CHECK_STRING (string, 0); CHECK_NUMBER (from, 1); if (NILP (to)) *************** If FROM or TO is negative, it counts fro *** 404,411 **** && XINT (to) <= XSTRING (string)->size)) args_out_of_range_3 (string, from, to); ! return make_string (XSTRING (string)->data + XINT (from), ! XINT (to) - XINT (from)); } DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, --- 415,424 ---- && XINT (to) <= XSTRING (string)->size)) args_out_of_range_3 (string, from, to); ! res = make_string (XSTRING (string)->data + XINT (from), ! XINT (to) - XINT (from)); ! copy_text_properties (from, to, string, make_number (0), res, Qnil); ! return res; } DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, diff -cprP --exclude=*.elc emacs-19.15/src/frame.c emacs-19.16/src/frame.c *** emacs-19.15/src/frame.c Fri Jun 18 21:47:06 1993 --- emacs-19.16/src/frame.c Mon Jul 5 05:30:07 1993 *************** *** 980,986 **** (frame, focus_frame) Lisp_Object frame, focus_frame; { ! CHECK_LIVE_FRAME (frame, 0); if (! NILP (focus_frame)) CHECK_LIVE_FRAME (focus_frame, 1); --- 980,989 ---- (frame, focus_frame) Lisp_Object frame, focus_frame; { ! /* Note that we don't check for a live frame here. It's reasonable ! to redirect the focus of a frame you're about to delete, if you ! know what other frame should receive those keystrokes. */ ! CHECK_FRAME (frame, 0); if (! NILP (focus_frame)) CHECK_LIVE_FRAME (focus_frame, 1); diff -cprP --exclude=*.elc emacs-19.15/src/gmalloc.c emacs-19.16/src/gmalloc.c *** emacs-19.15/src/gmalloc.c Sat Jun 19 19:14:40 1993 --- emacs-19.16/src/gmalloc.c Tue Jul 6 12:35:49 1993 *************** *** 45,54 **** #ifndef memcpy #define memcpy(d, s, n) bcopy ((s), (d), (n)) #endif - #ifndef memmove - #define memmove(d, s, n) bcopy ((s), (d), (n)) #endif - #endif #if defined(__GNU_LIBRARY__) || defined(__STDC__) #include --- 45,51 ---- *************** malloc (size) *** 583,588 **** --- 580,614 ---- return result; } + + #ifndef _LIBC + + /* On some ANSI C systems, some libc functions call _malloc, _free + and _realloc. Make them use the GNU functions. */ + + __ptr_t + _malloc (size) + size_t size; + { + return malloc (size); + } + + void + _free (ptr) + __ptr_t ptr; + { + free (ptr); + } + + __ptr_t + _realloc (ptr, size) + __ptr_t ptr; + size_t size; + { + return realloc (ptr, size); + } + + #endif /* Free a block of memory allocated by `malloc'. Copyright 1990, 1991, 1992 Free Software Foundation Written May 1989 by Mike Haertel. *************** Cambridge, MA 02139, USA. *** 862,867 **** --- 888,958 ---- #define _MALLOC_INTERNAL #include #endif + + #if !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG) + + /* Snarfed directly from Emacs src/dispnew.c: + XXX Should use system bcopy if it handles overlap. */ + + /* Like bcopy except never gets confused by overlap. */ + + static void + safe_bcopy (from, to, size) + char *from, *to; + int size; + { + if (size <= 0 || from == to) + return; + + /* If the source and destination don't overlap, then bcopy can + handle it. If they do overlap, but the destination is lower in + memory than the source, we'll assume bcopy can handle that. */ + if (to < from || from + size <= to) + bcopy (from, to, size); + + /* Otherwise, we'll copy from the end. */ + else + { + register char *endf = from + size; + register char *endt = to + size; + + /* If TO - FROM is large, then we should break the copy into + nonoverlapping chunks of TO - FROM bytes each. However, if + TO - FROM is small, then the bcopy function call overhead + makes this not worth it. The crossover point could be about + anywhere. Since I don't think the obvious copy loop is too + bad, I'm trying to err in its favor. */ + if (to - from < 64) + { + do + *--endt = *--endf; + while (endf != from); + } + else + { + for (;;) + { + endt -= (to - from); + endf -= (to - from); + + if (endt < to) + break; + + bcopy (endf, endt, to - from); + } + + /* If SIZE wasn't a multiple of TO - FROM, there will be a + little left over. The amount left over is + (endt + (to - from)) - to, which is endt - from. */ + bcopy (from, to, endt - from); + } + } + } + + #define memmove(to, from, size) safe_bcopy ((from), (to), (size)) + + #endif + #define min(A, B) ((A) < (B) ? (A) : (B)) diff -cprP --exclude=*.elc emacs-19.15/src/intervals.c emacs-19.16/src/intervals.c *** emacs-19.15/src/intervals.c Thu Jun 17 01:20:50 1993 --- emacs-19.16/src/intervals.c Tue Jul 6 09:53:07 1993 *************** *** 159,165 **** /* i0 and i1 both have sym, but it has different values in each */ i0_cdr = Fcdr (i0_cdr); ! if (! Fequal (i1_val, Fcar (i0_cdr))) return 0; i0_cdr = Fcdr (i0_cdr); --- 159,165 ---- /* i0 and i1 both have sym, but it has different values in each */ i0_cdr = Fcdr (i0_cdr); ! if (! EQ (i1_val, Fcar (i0_cdr))) return 0; i0_cdr = Fcdr (i0_cdr); *************** split_interval_left (interval, offset) *** 432,439 **** } /* Find the interval containing text position POSITION in the text ! represented by the interval tree TREE. POSITION is relative to ! the beginning of that text. The `position' field, which is a cache of an interval's position, is updated in the interval found. Other functions (e.g., next_interval) --- 432,440 ---- } /* Find the interval containing text position POSITION in the text ! represented by the interval tree TREE. POSITION is a buffer ! position; the earliest position is 1. If POSITION is at the end of ! the buffer, return the interval containing the last character. The `position' field, which is a cache of an interval's position, is updated in the interval found. Other functions (e.g., next_interval) *************** find_interval (tree, position) *** 444,468 **** register INTERVAL tree; register int position; { ! register int relative_position = position; if (NULL_INTERVAL_P (tree)) return NULL_INTERVAL; ! if (position > TOTAL_LENGTH (tree)) abort (); /* Paranoia */ - #if 0 - position = TOTAL_LENGTH (tree); - #endif while (1) { ! if (relative_position <= LEFT_TOTAL_LENGTH (tree)) { tree = tree->left; } ! else if (relative_position > (TOTAL_LENGTH (tree) ! - RIGHT_TOTAL_LENGTH (tree))) { relative_position -= (TOTAL_LENGTH (tree) - RIGHT_TOTAL_LENGTH (tree)); --- 445,469 ---- register INTERVAL tree; register int position; { ! /* The distance from the left edge of the subtree at TREE ! to POSITION. */ ! register int relative_position = position - BEG; if (NULL_INTERVAL_P (tree)) return NULL_INTERVAL; ! if (relative_position > TOTAL_LENGTH (tree)) abort (); /* Paranoia */ while (1) { ! if (relative_position < LEFT_TOTAL_LENGTH (tree)) { tree = tree->left; } ! else if (! NULL_RIGHT_CHILD (tree) ! && relative_position >= (TOTAL_LENGTH (tree) ! - RIGHT_TOTAL_LENGTH (tree))) { relative_position -= (TOTAL_LENGTH (tree) - RIGHT_TOTAL_LENGTH (tree)); *************** find_interval (tree, position) *** 470,477 **** } else { ! tree->position = LEFT_TOTAL_LENGTH (tree) ! + position - relative_position + 1; return tree; } } --- 471,480 ---- } else { ! tree->position = ! (position - relative_position /* the left edge of *tree */ ! + LEFT_TOTAL_LENGTH (tree)); /* the left edge of this interval */ ! return tree; } } *************** adjust_intervals_for_insertion (tree, po *** 639,654 **** if (TOTAL_LENGTH (tree) == 0) /* Paranoia */ abort (); ! /* If inserting at point-max of a buffer, that position ! will be out of range. */ ! if (position > TOTAL_LENGTH (tree)) ! position = TOTAL_LENGTH (tree); i = find_interval (tree, position); /* If we are positioned between intervals, check the stickiness of both of them. */ if (position == i->position ! && position != 1) { register INTERVAL prev = previous_interval (i); --- 642,657 ---- if (TOTAL_LENGTH (tree) == 0) /* Paranoia */ abort (); ! /* If inserting at point-max of a buffer, that position will be out ! of range. Remember that buffer positions are 1-based. */ ! if (position > BEG + TOTAL_LENGTH (tree)) ! position = BEG + TOTAL_LENGTH (tree); i = find_interval (tree, position); /* If we are positioned between intervals, check the stickiness of both of them. */ if (position == i->position ! && position != BEG) { register INTERVAL prev = previous_interval (i); *************** delete_interval (i) *** 747,757 **** } } ! /* Find the interval in TREE corresponding to the character position FROM ! and delete as much as possible of AMOUNT from that interval, starting ! after the relative position of FROM within it. Return the amount ! actually deleted, and if the interval was zeroed-out, delete that ! interval node from the tree. Do this by recursing down TREE to the interval in question, and deleting the appropriate amount of text. */ --- 750,763 ---- } } ! /* Find the interval in TREE corresponding to the relative position ! FROM and delete as much as possible of AMOUNT from that interval. ! Return the amount actually deleted, and if the interval was ! zeroed-out, delete that interval node from the tree. ! ! Note that FROM is actually origin zero, aka relative to the ! leftmost edge of tree. This is appropriate since we call ourselves ! recursively on subtrees. Do this by recursing down TREE to the interval in question, and deleting the appropriate amount of text. */ *************** interval_deletion_adjustment (tree, from *** 767,773 **** return 0; /* Left branch */ ! if (relative_position <= LEFT_TOTAL_LENGTH (tree)) { int subtract = interval_deletion_adjustment (tree->left, relative_position, --- 773,779 ---- return 0; /* Left branch */ ! if (relative_position < LEFT_TOTAL_LENGTH (tree)) { int subtract = interval_deletion_adjustment (tree->left, relative_position, *************** interval_deletion_adjustment (tree, from *** 776,783 **** return subtract; } /* Right branch */ ! else if (relative_position > (TOTAL_LENGTH (tree) ! - RIGHT_TOTAL_LENGTH (tree))) { int subtract; --- 782,789 ---- return subtract; } /* Right branch */ ! else if (relative_position >= (TOTAL_LENGTH (tree) ! - RIGHT_TOTAL_LENGTH (tree))) { int subtract; *************** interval_deletion_adjustment (tree, from *** 792,846 **** /* Here -- this node */ else { ! /* If this is a zero-length, marker interval, then ! we must skip it. */ ! ! if (relative_position == LEFT_TOTAL_LENGTH (tree) + 1) ! { ! /* This means we're deleting from the beginning of this interval. */ ! register int my_amount = LENGTH (tree); ! ! if (amount < my_amount) ! { ! tree->total_length -= amount; ! return amount; ! } ! else ! { ! tree->total_length -= my_amount; ! if (LENGTH (tree) != 0) ! abort (); /* Paranoia */ ! ! delete_interval (tree); ! return my_amount; ! } ! } ! else /* Deleting starting in the middle. */ ! { ! register int my_amount = ((tree->total_length ! - RIGHT_TOTAL_LENGTH (tree)) ! - relative_position + 1); ! ! if (amount <= my_amount) ! { ! tree->total_length -= amount; ! return amount; ! } ! else ! { ! tree->total_length -= my_amount; ! return my_amount; ! } ! } } /* Never reach here */ } ! /* Effect the adjustments necessary to the interval tree of BUFFER ! to correspond to the deletion of LENGTH characters from that buffer ! text. The deletion is effected at position START (relative to the ! buffer). */ static void adjust_intervals_for_deletion (buffer, start, length) --- 798,825 ---- /* Here -- this node */ else { ! /* How much can we delete from this interval? */ ! int my_amount = ((tree->total_length ! - RIGHT_TOTAL_LENGTH (tree)) ! - relative_position); ! ! if (amount > my_amount) ! amount = my_amount; ! ! tree->total_length -= amount; ! if (LENGTH (tree) == 0) ! delete_interval (tree); ! ! return amount; } /* Never reach here */ } ! /* Effect the adjustments necessary to the interval tree of BUFFER to ! correspond to the deletion of LENGTH characters from that buffer ! text. The deletion is effected at position START (which is a ! buffer position, i.e. origin 1). */ static void adjust_intervals_for_deletion (buffer, start, length) *************** adjust_intervals_for_deletion (buffer, s *** 854,859 **** --- 833,842 ---- if (NULL_INTERVAL_P (tree)) return; + if (start > BEG + TOTAL_LENGTH (tree) + || start + length > BEG + TOTAL_LENGTH (tree)) + abort (); + if (length == TOTAL_LENGTH (tree)) { buffer->intervals = NULL_INTERVAL; *************** adjust_intervals_for_deletion (buffer, s *** 866,876 **** return; } ! if (start > TOTAL_LENGTH (tree)) ! start = TOTAL_LENGTH (tree); while (left_to_delete > 0) { ! left_to_delete -= interval_deletion_adjustment (tree, start, left_to_delete); tree = buffer->intervals; if (left_to_delete == tree->total_length) --- 849,859 ---- return; } ! if (start > BEG + TOTAL_LENGTH (tree)) ! start = BEG + TOTAL_LENGTH (tree); while (left_to_delete > 0) { ! left_to_delete -= interval_deletion_adjustment (tree, start - 1, left_to_delete); tree = buffer->intervals; if (left_to_delete == tree->total_length) *************** reproduce_tree (source, parent) *** 1030,1035 **** --- 1013,1021 ---- return t; } + #if 0 + /* Nobody calls this. Perhaps it's a vestige of an earlier design. */ + /* Make a new interval of length LENGTH starting at START in the group of intervals INTERVALS, which is actually an interval tree. Returns the new interval. *************** make_new_interval (intervals, start, len *** 1070,1075 **** --- 1056,1062 ---- split_interval_right (slot, length + 1); return slot; } + #endif /* Insert the intervals of SOURCE into BUFFER at POSITION. *************** set_point (position, buffer) *** 1244,1250 **** register struct buffer *buffer; { register INTERVAL to, from, toprev, fromprev, target; - register int iposition = position; int buffer_point; register Lisp_Object obj; int backwards = (position < BUF_PT (buffer)) ? 1 : 0; --- 1231,1236 ---- *************** set_point (position, buffer) *** 1265,1284 **** return; } - /* Position Z is really one past the last char in the buffer. */ - if (position == BUF_ZV (buffer)) - iposition = position - 1; - /* Set TO to the interval containing the char after POSITION, and TOPREV to the interval containing the char before POSITION. Either one may be null. They may be equal. */ ! to = find_interval (buffer->intervals, iposition); if (position == BUF_BEGV (buffer)) toprev = 0; else if (to->position == position) toprev = previous_interval (to); - else if (iposition != position) - toprev = to, to = 0; else toprev = to; --- 1251,1264 ---- return; } /* Set TO to the interval containing the char after POSITION, and TOPREV to the interval containing the char before POSITION. Either one may be null. They may be equal. */ ! to = find_interval (buffer->intervals, position); if (position == BUF_BEGV (buffer)) toprev = 0; else if (to->position == position) toprev = previous_interval (to); else toprev = to; *************** get_local_map (position, buffer) *** 1390,1399 **** if (position > BUF_Z (buffer) || position < BUF_BEG (buffer)) abort (); - /* Position Z is really one past the last char in the buffer. */ - if (position == BUF_ZV (buffer)) - return current_buffer->keymap; - interval = find_interval (buffer->intervals, position); prop = textget (interval->plist, Qlocal_map); if (NILP (prop)) --- 1370,1375 ---- *************** verify_interval_modification (buf, start *** 1465,1472 **** /* Set I to the interval containing the char after START, and PREV to the interval containing the char before START. Either one may be null. They may be equal. */ ! i = find_interval (intervals, ! (start == BUF_ZV (buf) ? start - 1 : start)); if (start == BUF_BEGV (buf)) prev = 0; --- 1441,1447 ---- /* Set I to the interval containing the char after START, and PREV to the interval containing the char before START. Either one may be null. They may be equal. */ ! i = find_interval (intervals, start); if (start == BUF_BEGV (buf)) prev = 0; diff -cprP --exclude=*.elc emacs-19.15/src/intervals.h emacs-19.16/src/intervals.h *** emacs-19.15/src/intervals.h Tue Jun 8 17:07:39 1993 --- emacs-19.16/src/intervals.h Tue Jul 6 05:25:32 1993 *************** *** 201,206 **** --- 201,207 ---- extern Lisp_Object Fnext_property_change (), Fprevious_property_change (); extern Lisp_Object Fadd_text_properties (), Fset_text_properties (); extern Lisp_Object Fremove_text_properties (), Ferase_text_properties (); + extern Lisp_Object copy_text_properties (); extern void syms_of_textprop (); diff -cprP --exclude=*.elc emacs-19.15/src/keyboard.c emacs-19.16/src/keyboard.c *** emacs-19.15/src/keyboard.c Thu Jun 17 16:53:12 1993 --- emacs-19.16/src/keyboard.c Mon Jul 5 03:45:07 1993 *************** *** 122,132 **** int immediate_quit; /* Character to recognize as the help char. */ ! Lisp_Object help_char; /* Form to execute when help char is typed. */ Lisp_Object Vhelp_form; /* Character that causes a quit. Normally C-g. If we are running on an ordinary terminal, this must be an ordinary --- 122,135 ---- int immediate_quit; /* Character to recognize as the help char. */ ! Lisp_Object Vhelp_char; /* Form to execute when help char is typed. */ Lisp_Object Vhelp_form; + /* Command to run when the help character follows a prefix key. */ + Lisp_Object Vprefix_help_command; + /* Character that causes a quit. Normally C-g. If we are running on an ordinary terminal, this must be an ordinary *************** echo_char (c) *** 505,511 **** ptr += name->size; } ! if (echoptr == echobuf && EQ (c, help_char)) { strcpy (ptr, " (Type ? for further options)"); ptr += strlen (ptr); --- 508,514 ---- ptr += name->size; } ! if (echoptr == echobuf && EQ (c, Vhelp_char)) { strcpy (ptr, " (Type ? for further options)"); ptr += strlen (ptr); *************** read_char (commandflag, nmaps, maps, pre *** 1445,1451 **** /* Slow down auto saves logarithmically in size of current buffer, and garbage collect while we're at it. */ ! if (NILP (c)) { int delay_level, buffer_size; --- 1448,1454 ---- /* Slow down auto saves logarithmically in size of current buffer, and garbage collect while we're at it. */ ! if (INTERACTIVE && NILP (c)) { int delay_level, buffer_size; *************** read_char (commandflag, nmaps, maps, pre *** 1480,1486 **** consing going on to make it worthwhile. */ if (!detect_input_pending () && consing_since_gc > gc_cons_threshold / 2) ! Fgarbage_collect (); } } } --- 1483,1492 ---- consing going on to make it worthwhile. */ if (!detect_input_pending () && consing_since_gc > gc_cons_threshold / 2) ! { ! Fgarbage_collect (); ! redisplay (); ! } } } } *************** read_char (commandflag, nmaps, maps, pre *** 1587,1593 **** num_input_chars++; /* Process the help character specially if enabled */ ! if (EQ (c, help_char) && !NILP (Vhelp_form)) { Lisp_Object tem0; count = specpdl_ptr - specpdl; --- 1593,1599 ---- num_input_chars++; /* Process the help character specially if enabled */ ! if (EQ (c, Vhelp_char) && !NILP (Vhelp_form)) { Lisp_Object tem0; count = specpdl_ptr - specpdl; *************** kbd_buffer_get_event () *** 1914,1920 **** } else if (do_mouse_tracking && mouse_moved) { ! FRAME_PTR f; Lisp_Object bar_window; enum scroll_bar_part part; Lisp_Object x, y; --- 1920,1926 ---- } else if (do_mouse_tracking && mouse_moved) { ! FRAME_PTR f = 0; Lisp_Object bar_window; enum scroll_bar_part part; Lisp_Object x, y; *************** kbd_buffer_get_event () *** 1937,1943 **** if (! EQ (frame, internal_last_event_frame) && XFRAME (frame) != selected_frame) ! obj = make_lispy_switch_frame (internal_last_event_frame); internal_last_event_frame = frame; } #endif --- 1943,1949 ---- if (! EQ (frame, internal_last_event_frame) && XFRAME (frame) != selected_frame) ! obj = make_lispy_switch_frame (frame); internal_last_event_frame = frame; } #endif *************** Lisp_Object *scroll_bar_parts[] = { *** 2143,2148 **** --- 2149,2171 ---- static Lisp_Object button_down_location; + /* Information about the most recent up-going button event: Which + button, what location, and what time. */ + + static int button_up_button; + static int button_up_x; + static int button_up_y; + static unsigned long button_up_time; + + /* The maximum time between clicks to make a double-click, + or Qnil to disable double-click detection, + or Qt for no time limit. */ + Lisp_Object Vdouble_click_time; + + /* The number of clicks in this multiple-click. */ + + int double_click_count; + /* Given a struct input_event, build the lisp event which represents it. If EVENT is 0, build a mouse movement event from the mouse movement buffer, which should have a movement event in it. *************** make_lispy_event (event) *** 2176,2181 **** --- 2199,2205 ---- c |= (event->modifiers & (meta_modifier | alt_modifier | hyper_modifier | super_modifier)); + button_up_time = 0; return c; } *************** make_lispy_event (event) *** 2182,2187 **** --- 2206,2212 ---- /* A function key. The symbol may need to have modifier prefixes tacked onto it. */ case non_ascii_keystroke: + button_up_time = 0; return modify_event_symbol (XFASTINT (event->code), event->modifiers, Qfunction_key, lispy_function_keys, &func_key_syms, *************** make_lispy_event (event) *** 2316,2325 **** pair. */ Lisp_Object down = Fnth (make_number (2), start_pos); ! event->modifiers |= ((EQ (event->x, XCONS (down)->car) ! && EQ (event->y, XCONS (down)->cdr)) ! ? click_modifier ! : drag_modifier); } } else --- 2341,2378 ---- pair. */ Lisp_Object down = Fnth (make_number (2), start_pos); ! if (EQ (event->x, XCONS (down)->car) ! && EQ (event->y, XCONS (down)->cdr)) ! { ! if (button == button_up_button ! && XINT (event->x) == button_up_x ! && XINT (event->y) == button_up_y ! && button_up_time != 0 ! && (EQ (Vdouble_click_time, Qt) ! || (INTEGERP (Vdouble_click_time) ! && ((int)(event->timestamp - button_up_time) ! < XINT (Vdouble_click_time))))) ! { ! double_click_count++; ! event->modifiers |= ((double_click_count > 2) ! ? triple_modifier ! : double_modifier); ! } ! else ! { ! double_click_count = 1; ! event->modifiers |= click_modifier; ! } ! button_up_button = button; ! button_up_x = XINT (event->x); ! button_up_y = XINT (event->y); ! button_up_time = event->timestamp; ! } ! else ! { ! button_up_time = 0; ! event->modifiers |= drag_modifier; ! } } } else *************** make_lispy_event (event) *** 2342,2347 **** --- 2395,2405 ---- Fcons (start_pos, Fcons (position, Qnil))); + else if (event->modifiers & (double_modifier | triple_modifier)) + return Fcons (head, + Fcons (position, + Fcons (make_number (double_click_count), + Qnil))); else return Fcons (head, Fcons (position, *************** parse_modifiers_uncached (symbol, modifi *** 2498,2503 **** --- 2556,2579 ---- modifiers |= down_modifier; i += 5; } + else if (i + 7 <= name->size + && ! strncmp (name->data + i, "double-", 7)) + { + modifiers |= double_modifier; + i += 7; + } + else + goto no_more_modifiers; + break; + + case 't': + if (i + 7 > name->size) + goto no_more_modifiers; + if (! strncmp (name->data + i, "triple-", 7)) + { + modifiers |= triple_modifier; + i += 7; + } else goto no_more_modifiers; break; *************** parse_modifiers_uncached (symbol, modifi *** 2510,2516 **** no_more_modifiers: /* Should we include the `click' modifier? */ ! if (! (modifiers & (down_modifier | drag_modifier)) && i + 7 == name->size && strncmp (name->data + i, "mouse-", 6) == 0 && ('0' <= name->data[i + 6] && name->data[i + 6] <= '9')) --- 2586,2593 ---- no_more_modifiers: /* Should we include the `click' modifier? */ ! if (! (modifiers & (down_modifier | drag_modifier ! | double_modifier | triple_modifier)) && i + 7 == name->size && strncmp (name->data + i, "mouse-", 6) == 0 && ('0' <= name->data[i + 6] && name->data[i + 6] <= '9')) *************** apply_modifiers_uncached (modifiers, bas *** 2536,2542 **** to use Fintern, which expects a genuine Lisp_String, and keeps a reference to it. */ char *new_mods = ! (char *) alloca (sizeof ("A-C-H-M-S-s-down-drag-")); int mod_len; { --- 2613,2619 ---- to use Fintern, which expects a genuine Lisp_String, and keeps a reference to it. */ char *new_mods = ! (char *) alloca (sizeof ("A-C-H-M-S-s-down-drag-double-triple-")); int mod_len; { *************** apply_modifiers_uncached (modifiers, bas *** 2555,2560 **** --- 2632,2639 ---- if (modifiers & super_modifier) { *p++ = 's'; *p++ = '-'; } if (modifiers & down_modifier) { strcpy (p, "down-"); p += 5; } if (modifiers & drag_modifier) { strcpy (p, "drag-"); p += 5; } + if (modifiers & double_modifier) { strcpy (p, "double-"); p += 7; } + if (modifiers & triple_modifier) { strcpy (p, "triple-"); p += 7; } /* The click modifier is denoted by the absence of other modifiers. */ *p = '\0'; *************** apply_modifiers_uncached (modifiers, bas *** 2575,2581 **** static char *modifier_names[] = { ! "up", "down", "drag", "click", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "alt", "super", "hyper", "shift", "control", "meta" }; --- 2654,2660 ---- static char *modifier_names[] = { ! "up", "down", "drag", "click", "double", "triple", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "alt", "super", "hyper", "shift", "control", "meta" }; *************** menu_bar_items () *** 3100,3106 **** #else maps[nmaps-2] = current_buffer->keymap; #endif ! maps[nmaps-1] = global_map; } /* Look up in each map the dummy prefix key `menu-bar'. */ --- 3179,3185 ---- #else maps[nmaps-2] = current_buffer->keymap; #endif ! maps[nmaps-1] = current_global_map; } /* Look up in each map the dummy prefix key `menu-bar'. */ *************** follow_key (key, nmaps, current, defs, n *** 3525,3532 **** function key's sequence. If so, we try to read the whole function key, and substitute its symbolic name into the key sequence. ! We ignore unbound `down-' mouse clicks. We turn unbound `drag-' ! events into similar click events, if that would make them bound. If we get a mouse click in a mode line, vertical divider, or other non-text area, we treat the click as if it were prefixed by the --- 3604,3613 ---- function key's sequence. If so, we try to read the whole function key, and substitute its symbolic name into the key sequence. ! We ignore unbound `down-' mouse clicks. We turn unbound `drag-' and ! `double-' events into similar click events, if that would make them ! bound. We try to turn `triple-' events first into `double-' events, ! then into clicks. If we get a mouse click in a mode line, vertical divider, or other non-text area, we treat the click as if it were prefixed by the *************** read_key_sequence (keybuf, bufsize, prom *** 3668,3674 **** #else submaps[nmaps-2] = current_buffer->keymap; #endif ! submaps[nmaps-1] = global_map; } /* Find an accurate initial value for first_binding. */ --- 3749,3755 ---- #else submaps[nmaps-2] = current_buffer->keymap; #endif ! submaps[nmaps-1] = current_global_map; } /* Find an accurate initial value for first_binding. */ *************** read_key_sequence (keybuf, bufsize, prom *** 3730,3735 **** --- 3811,3819 ---- this_command_key_count = keys_local_start; first_binding = local_first_binding; + /* By default, assume each event is "real". */ + last_real_key_start = t; + /* Does mock_input indicate that we are re-reading a key sequence? */ if (t < mock_input) { *************** read_key_sequence (keybuf, bufsize, prom *** 3743,3750 **** { struct buffer *buf = current_buffer; - last_real_key_start = t; - key = read_char (!prompt, nmaps, submaps, last_nonmenu_event, &used_mouse_menu); --- 3827,3832 ---- *************** read_key_sequence (keybuf, bufsize, prom *** 3758,3882 **** } Vquit_flag = Qnil; ! /* Clicks in non-text areas get prefixed by the symbol ! in their CHAR-ADDRESS field. For example, a click on ! the mode line is prefixed by the symbol `mode-line'. ! ! Furthermore, key sequences beginning with mouse clicks ! are read using the keymaps of the buffer clicked on, not ! the current buffer. So we may have to switch the buffer ! here. ! ! If the event was obtained from the unread_command_events ! queue, then don't expand it; we did that the first time ! we read it. */ ! if (EVENT_HAS_PARAMETERS (key)) { ! Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (key)); ! if (EQ (kind, Qmouse_click)) { ! Lisp_Object window = POSN_WINDOW (EVENT_START (key)); ! Lisp_Object posn = POSN_BUFFER_POSN (EVENT_START (key)); ! /* Key sequences beginning with mouse clicks are ! read using the keymaps in the buffer clicked on, ! not the current buffer. If we're at the ! beginning of a key sequence, switch buffers. */ ! if (t == 0 ! && XTYPE (window) == Lisp_Window ! && XTYPE (XWINDOW (window)->buffer) == Lisp_Buffer ! && XBUFFER (XWINDOW (window)->buffer) != current_buffer) ! { ! keybuf[t] = key; ! mock_input = t + 1; ! /* Arrange to go back to the original buffer once we're ! done reading the key sequence. Note that we can't ! use save_excursion_{save,restore} here, because they ! save point as well as the current buffer; we don't ! want to save point, because redisplay may change it, ! to accommodate a Fset_window_start or something. We ! don't want to do this at the top of the function, ! because we may get input from a subprocess which ! wants to change the selected window and stuff (say, ! emacsclient). */ ! record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); ! ! set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); ! goto replay_sequence; ! } ! else if (XTYPE (posn) == Lisp_Symbol) ! { ! if (t + 1 >= bufsize) ! error ("key sequence too long"); ! keybuf[t] = posn; ! keybuf[t+1] = key; ! mock_input = t + 2; ! ! /* Zap the position in key, so we know that we've ! expanded it, and don't try to do so again. */ ! POSN_BUFFER_POSN (EVENT_START (key)) ! = Fcons (posn, Qnil); ! ! /* If we switched buffers while reading the first event, ! replay in case we switched keymaps too. */ ! if (buf != current_buffer && t == 0) ! goto replay_sequence; ! goto replay_key; ! } ! else if (XTYPE (posn) == Lisp_Cons) ! { ! /* We're looking at the second event of a ! sequence which we expanded before. Set ! last_real_key_start appropriately. */ ! if (last_real_key_start == t && t > 0) ! last_real_key_start = t - 1; ! } } ! else if (EQ (kind, Qswitch_frame)) { ! /* If we're at the beginning of a key sequence, go ! ahead and return this event. If we're in the ! midst of a key sequence, delay it until the end. */ ! if (t > 0) ! { ! delayed_switch_frame = key; ! goto replay_key; ! } } ! else { ! Lisp_Object posn = POSN_BUFFER_POSN (EVENT_START (key)); ! ! /* Handle menu-bar events: ! insert the dummy prefix char `menu-bar'. */ ! if (EQ (posn, Qmenu_bar)) ! { ! if (t + 1 >= bufsize) ! error ("key sequence too long"); ! /* Run the Lucid hook. */ ! call1 (Vrun_hooks, Qactivate_menubar_hook); ! /* If it has changed current-menubar from previous value, ! really recompute the menubar from the value. */ ! if (! NILP (Vlucid_menu_bar_dirty_flag)) ! call0 (Qrecompute_lucid_menubar); ! keybuf[t] = posn; ! keybuf[t+1] = key; ! mock_input = t + 2; ! goto replay_sequence; ! } } } ! ! /* If we switched buffers while reading the first event, ! replay in case we switched keymaps too. */ ! if (buf != current_buffer && t == 0) { ! keybuf[t++] = key; ! mock_input = t; ! goto replay_sequence; } } --- 3840,3970 ---- } Vquit_flag = Qnil; + } + + /* Clicks in non-text areas get prefixed by the symbol + in their CHAR-ADDRESS field. For example, a click on + the mode line is prefixed by the symbol `mode-line'. + + Furthermore, key sequences beginning with mouse clicks + are read using the keymaps of the buffer clicked on, not + the current buffer. So we may have to switch the buffer + here. + + When we turn one event into two events, we must make sure + that neither of the two looks like the original--so that, + if we replay the events, they won't be expanded again. + If not for this, such reexpansion could happen either here + or when user programs play with this-command-keys. */ + if (EVENT_HAS_PARAMETERS (key)) + { + Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (key)); ! if (EQ (kind, Qmouse_click)) { ! Lisp_Object window = POSN_WINDOW (EVENT_START (key)); ! Lisp_Object posn = POSN_BUFFER_POSN (EVENT_START (key)); ! if (XTYPE (posn) == Lisp_Cons) { ! /* We're looking at the second event of a ! sequence which we expanded before. Set ! last_real_key_start appropriately. */ ! if (t > 0) ! last_real_key_start = t - 1; ! } ! /* Key sequences beginning with mouse clicks are ! read using the keymaps in the buffer clicked on, ! not the current buffer. If we're at the ! beginning of a key sequence, switch buffers. */ ! if (last_real_key_start == 0 ! && XTYPE (window) == Lisp_Window ! && XTYPE (XWINDOW (window)->buffer) == Lisp_Buffer ! && XBUFFER (XWINDOW (window)->buffer) != current_buffer) ! { ! keybuf[t] = key; ! mock_input = t + 1; ! /* Arrange to go back to the original buffer once we're ! done reading the key sequence. Note that we can't ! use save_excursion_{save,restore} here, because they ! save point as well as the current buffer; we don't ! want to save point, because redisplay may change it, ! to accommodate a Fset_window_start or something. We ! don't want to do this at the top of the function, ! because we may get input from a subprocess which ! wants to change the selected window and stuff (say, ! emacsclient). */ ! record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); ! ! set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); ! goto replay_sequence; } ! else if (XTYPE (posn) == Lisp_Symbol) { ! /* Expand mode-line and scroll-bar events into two events: ! use posn as a fake prefix key. */ ! ! if (t + 1 >= bufsize) ! error ("key sequence too long"); ! keybuf[t] = posn; ! keybuf[t+1] = key; ! mock_input = t + 2; ! ! /* Zap the position in key, so we know that we've ! expanded it, and don't try to do so again. */ ! POSN_BUFFER_POSN (EVENT_START (key)) ! = Fcons (posn, Qnil); ! goto replay_key; } ! } ! else if (EQ (kind, Qswitch_frame)) ! { ! /* If we're at the beginning of a key sequence, go ! ahead and return this event. If we're in the ! midst of a key sequence, delay it until the end. */ ! if (t > 0) { ! delayed_switch_frame = key; ! goto replay_key; } } ! else { ! Lisp_Object posn = POSN_BUFFER_POSN (EVENT_START (key)); ! ! /* Handle menu-bar events: ! insert the dummy prefix event `menu-bar'. */ ! if (EQ (posn, Qmenu_bar)) ! { ! if (t + 1 >= bufsize) ! error ("key sequence too long"); ! /* Run the Lucid hook. */ ! call1 (Vrun_hooks, Qactivate_menubar_hook); ! /* If it has changed current-menubar from previous value, ! really recompute the menubar from the value. */ ! if (! NILP (Vlucid_menu_bar_dirty_flag)) ! call0 (Qrecompute_lucid_menubar); ! keybuf[t] = posn; ! keybuf[t+1] = key; ! ! /* Zap the position in key, so we know that we've ! expanded it, and don't try to do so again. */ ! POSN_BUFFER_POSN (EVENT_START (key)) ! = Fcons (posn, Qnil); ! ! mock_input = t + 2; ! goto replay_sequence; ! } ! else if (XTYPE (posn) == Lisp_Cons) ! { ! /* We're looking at the second event of a ! sequence which we expanded before. Set ! last_real_key_start appropriately. */ ! if (last_real_key_start == t && t > 0) ! last_real_key_start = t - 1; ! } } } *************** read_key_sequence (keybuf, bufsize, prom *** 3894,3899 **** --- 3982,3995 ---- { Lisp_Object head = EVENT_HEAD (key); + if (EQ (head, Vhelp_char)) + { + read_key_sequence_cmd = Vprefix_help_command; + keybuf[t++] = key; + last_nonmenu_event = key; + goto done; + } + if (XTYPE (head) == Lisp_Symbol) { Lisp_Object breakdown = parse_modifiers (head); *************** read_key_sequence (keybuf, bufsize, prom *** 3947,3975 **** /* We turn unbound `drag-' events into `click-' events, if the click would be bound. */ ! else if (modifiers & drag_modifier) { ! Lisp_Object new_head = ! apply_modifiers (modifiers & ~drag_modifier, ! XCONS (breakdown)->car); ! Lisp_Object new_click = ! Fcons (new_head, Fcons (EVENT_START (key), Qnil)); ! ! /* Look for a binding for this new key. follow_key ! promises that it didn't munge submaps the ! last time we called it, since key was unbound. */ ! first_binding = ! (follow_key (new_click, ! nmaps - local_first_binding, ! submaps + local_first_binding, ! defs + local_first_binding, ! submaps + local_first_binding) ! + local_first_binding); ! ! /* If that click is bound, go for it. */ ! if (first_binding < nmaps) ! key = new_click; ! /* Otherwise, we'll leave key set to the drag event. */ } } } --- 4043,4083 ---- /* We turn unbound `drag-' events into `click-' events, if the click would be bound. */ ! else if (modifiers & (drag_modifier | double_modifier ! | triple_modifier)) { ! while (modifiers & (drag_modifier | double_modifier ! | triple_modifier)) ! { ! Lisp_Object new_head, new_click; ! if (modifiers & triple_modifier) ! modifiers ^= (double_modifier | triple_modifier); ! else ! modifiers &= ~(drag_modifier | double_modifier); ! new_head = ! apply_modifiers (modifiers, XCONS (breakdown)->car); ! new_click = ! Fcons (new_head, Fcons (EVENT_START (key), Qnil)); ! ! /* Look for a binding for this new key. follow_key ! promises that it didn't munge submaps the ! last time we called it, since key was unbound. */ ! first_binding = ! (follow_key (new_click, ! nmaps - local_first_binding, ! submaps + local_first_binding, ! defs + local_first_binding, ! submaps + local_first_binding) ! + local_first_binding); ! ! /* If that click is bound, go for it. */ ! if (first_binding < nmaps) ! { ! key = new_click; ! break; ! } ! /* Otherwise, we'll leave key set to the drag event. */ ! } } } } *************** of the selected window as normal.\n\ *** 4093,4102 **** \n\ `read-key-sequence' drops unbound button-down events, since you normally\n\ only care about the click or drag events which follow them. If a drag\n\ ! event is unbound, but the corresponding click event would be bound,\n\ ! `read-key-sequence' turns the drag event into a click event at the\n\ drag's starting position. This means that you don't have to distinguish\n\ ! between click and drag events unless you want to.\n\ \n\ `read-key-sequence' prefixes mouse events on mode lines, the vertical\n\ lines separating windows, and scroll bars with imaginary keys\n\ --- 4201,4210 ---- \n\ `read-key-sequence' drops unbound button-down events, since you normally\n\ only care about the click or drag events which follow them. If a drag\n\ ! or multi-click event is unbound, but the corresponding click event would\n\ ! be bound, `read-key-sequence' turns the event into a click event at the\n\ drag's starting position. This means that you don't have to distinguish\n\ ! between click and drag, double, or triple events unless you want to.\n\ \n\ `read-key-sequence' prefixes mouse events on mode lines, the vertical\n\ lines separating windows, and scroll bars with imaginary keys\n\ *************** Polling is needed only when using X wind *** 4979,4984 **** --- 5087,5099 ---- Polling is automatically disabled in all other cases."); polling_period = 2; + DEFVAR_LISP ("double-click-time", &Vdouble_click_time, + "*Maximum time between mouse clicks to make a double-click.\n\ + Measured in milliseconds. nil means disable double-click recognition;\n\ + t means double-clicks have no time limit and are detected\n\ + by position only."); + Vdouble_click_time = make_number (500); + DEFVAR_INT ("num-input-keys", &num_input_keys, "*Number of complete keys read from the keyboard so far."); num_input_keys = 0; *************** If the last event came from a keyboard m *** 4990,5007 **** Vlast_event_frame = Qnil; #endif ! DEFVAR_LISP ("help-char", &help_char, "Character to recognize as meaning Help.\n\ When it is read, do `(eval help-form)', and display result if it's a string.\n\ If the value of `help-form' is nil, this char can be read normally."); ! XSET (help_char, Lisp_Int, Ctl ('H')); DEFVAR_LISP ("help-form", &Vhelp_form, ! "Form to execute when character help-char is read.\n\ If the form returns a string, that string is displayed.\n\ If `help-form' is nil, the help char is not recognized."); Vhelp_form = Qnil; DEFVAR_LISP ("top-level", &Vtop_level, "Form to evaluate when Emacs starts up.\n\ Useful to set before you dump a modified Emacs."); --- 5105,5128 ---- Vlast_event_frame = Qnil; #endif ! DEFVAR_LISP ("help-char", &Vhelp_char, "Character to recognize as meaning Help.\n\ When it is read, do `(eval help-form)', and display result if it's a string.\n\ If the value of `help-form' is nil, this char can be read normally."); ! XSET (Vhelp_char, Lisp_Int, Ctl ('H')); DEFVAR_LISP ("help-form", &Vhelp_form, ! "Form to execute when character `help-char' is read.\n\ If the form returns a string, that string is displayed.\n\ If `help-form' is nil, the help char is not recognized."); Vhelp_form = Qnil; + DEFVAR_LISP ("prefix-help-command", &Vprefix_help_command, + "Command to run when `help-char' character follows a prefix key.\n\ + This command is used only when there is no actual binding\n\ + for that character after that prefix key."); + Vprefix_help_command = Qnil; + DEFVAR_LISP ("top-level", &Vtop_level, "Form to evaluate when Emacs starts up.\n\ Useful to set before you dump a modified Emacs."); *************** Buffer modification stores t in this var *** 5053,5059 **** Vpre_command_hook = Qnil; DEFVAR_LISP ("post-command-hook", &Vpost_command_hook, ! "Normal hook run before each command is executed."); Vpost_command_hook = Qnil; DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag, --- 5174,5180 ---- Vpre_command_hook = Qnil; DEFVAR_LISP ("post-command-hook", &Vpost_command_hook, ! "Normal hook run after each command is executed."); Vpost_command_hook = Qnil; DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag, diff -cprP --exclude=*.elc emacs-19.15/src/keyboard.h emacs-19.16/src/keyboard.h *** emacs-19.15/src/keyboard.h Wed Jun 9 07:31:29 1993 --- emacs-19.16/src/keyboard.h Mon Jul 5 00:25:43 1993 *************** *** 62,67 **** --- 62,70 ---- #define EVENT_START(event) (XCONS (XCONS (event)->cdr)->car) #define EVENT_END(event) (XCONS (XCONS (XCONS (event)->cdr)->cdr)->car) + /* Extract the click count from a multi-click event. */ + #define EVENT_CLICK_COUNT(event) (Fnth ((event), make_number (2))) + /* Extract the fields of a position. */ #define POSN_WINDOW(posn) (XCONS (posn)->car) #define POSN_BUFFER_POSN(posn) (XCONS (XCONS (posn)->cdr)->car) *************** *** 68,73 **** --- 71,77 ---- #define POSN_WINDOW_POSN(posn) (XCONS (XCONS (XCONS (posn)->cdr)->cdr)->car) #define POSN_TIMESTAMP(posn) \ (XCONS (XCONS (XCONS (XCONS (posn)->cdr)->cdr)->cdr)->car) + #define POSN_SCROLLBAR_PART(posn) (Fnth ((posn), make_number (4))) /* Some of the event heads. */ extern Lisp_Object Qswitch_frame; diff -cprP --exclude=*.elc emacs-19.15/src/keymap.c emacs-19.16/src/keymap.c *** emacs-19.15/src/keymap.c Tue Jun 15 01:35:02 1993 --- emacs-19.16/src/keymap.c Sun Jul 4 15:04:01 1993 *************** *** 1044,1059 **** /* Help functions for describing and documenting keymaps. */ DEFUN ("accessible-keymaps", Faccessible_keymaps, Saccessible_keymaps, ! 1, 1, 0, "Find all keymaps accessible via prefix characters from KEYMAP.\n\ Returns a list of elements of the form (KEYS . MAP), where the sequence\n\ KEYS starting from KEYMAP gets you to MAP. These elements are ordered\n\ ! so that the KEYS increase in length. The first element is (\"\" . KEYMAP).") ! (startmap) ! Lisp_Object startmap; { ! Lisp_Object maps, tail; maps = Fcons (Fcons (Fmake_vector (make_number (0), Qnil), get_keymap (startmap)), Qnil); --- 1044,1065 ---- /* Help functions for describing and documenting keymaps. */ DEFUN ("accessible-keymaps", Faccessible_keymaps, Saccessible_keymaps, ! 1, 2, 0, "Find all keymaps accessible via prefix characters from KEYMAP.\n\ Returns a list of elements of the form (KEYS . MAP), where the sequence\n\ KEYS starting from KEYMAP gets you to MAP. These elements are ordered\n\ ! so that the KEYS increase in length. The first element is (\"\" . KEYMAP).\n\ ! An optional argument PREFIX, if non-nil, should be a key sequence;\n\ ! then the value includes only maps for prefixes that start with PREFIX.") ! (startmap, prefix) ! Lisp_Object startmap, prefix; { ! Lisp_Object maps, good_maps, tail; ! int prefixlen = 0; + if (!NILP (prefix)) + prefixlen = XINT (Flength (prefix)); + maps = Fcons (Fcons (Fmake_vector (make_number (0), Qnil), get_keymap (startmap)), Qnil); *************** so that the KEYS increase in length. Th *** 1131,1137 **** else if (CONSP (elt)) { register Lisp_Object cmd = get_keyelt (XCONS (elt)->cdr); ! register Lisp_Object tem; /* Ignore definitions that aren't keymaps themselves. */ tem = Fkeymapp (cmd); --- 1137,1143 ---- else if (CONSP (elt)) { register Lisp_Object cmd = get_keyelt (XCONS (elt)->cdr); ! register Lisp_Object tem, filter; /* Ignore definitions that aren't keymaps themselves. */ tem = Fkeymapp (cmd); *************** so that the KEYS increase in length. Th *** 1142,1148 **** tem = Frassq (cmd, maps); if (NILP (tem)) { ! /* let elt be the event defined by this map entry. */ elt = XCONS (elt)->car; /* If the last key in thisseq is meta-prefix-char, and --- 1148,1154 ---- tem = Frassq (cmd, maps); if (NILP (tem)) { ! /* Let elt be the event defined by this map entry. */ elt = XCONS (elt)->car; /* If the last key in thisseq is meta-prefix-char, and *************** so that the KEYS increase in length. Th *** 1157,1164 **** /* This new sequence is the same length as thisseq, so stick it in the list right after this one. */ ! XCONS (tail)->cdr = ! Fcons (Fcons (tem, cmd), XCONS (tail)->cdr); } else nconc2 (tail, --- 1163,1170 ---- /* This new sequence is the same length as thisseq, so stick it in the list right after this one. */ ! XCONS (tail)->cdr ! = Fcons (Fcons (tem, cmd), XCONS (tail)->cdr); } else nconc2 (tail, *************** so that the KEYS increase in length. Th *** 1170,1176 **** } } ! return maps; } Lisp_Object Qsingle_key_description, Qkey_description; --- 1176,1210 ---- } } ! if (NILP (prefix)) ! return maps; ! ! /* Now find just the maps whose access prefixes start with PREFIX. */ ! ! good_maps = Qnil; ! for (; CONSP (maps); maps = XCONS (maps)->cdr) ! { ! Lisp_Object elt, thisseq; ! elt = XCONS (maps)->car; ! thisseq = XCONS (elt)->car; ! /* The access prefix must be at least as long as PREFIX, ! and the first elements must match those of PREFIX. */ ! if (XINT (Flength (thisseq)) >= prefixlen) ! { ! int i; ! for (i = 0; i < prefixlen; i++) ! { ! Lisp_Object i1; ! XFASTINT (i1) = i; ! if (!EQ (Faref (thisseq, i1), Faref (prefix, i1))) ! break; ! } ! if (i == prefixlen) ! good_maps = Fcons (elt, good_maps); ! } ! } ! ! return Fnreverse (good_maps); } Lisp_Object Qsingle_key_description, Qkey_description; *************** indirect definition itself.") *** 1424,1433 **** global_keymap = current_global_map; if (!NILP (local_keymap)) ! maps = nconc2 (Faccessible_keymaps (get_keymap (local_keymap)), ! Faccessible_keymaps (get_keymap (global_keymap))); else ! maps = Faccessible_keymaps (get_keymap (global_keymap)); found = Qnil; --- 1458,1467 ---- global_keymap = current_global_map; if (!NILP (local_keymap)) ! maps = nconc2 (Faccessible_keymaps (get_keymap (local_keymap), Qnil), ! Faccessible_keymaps (get_keymap (global_keymap), Qnil)); else ! maps = Faccessible_keymaps (get_keymap (global_keymap), Qnil); found = Qnil; *************** Argument is a command definition, usuall *** 1616,1644 **** /* describe-bindings - summarizing all the bindings in a set of keymaps. */ ! DEFUN ("describe-bindings", Fdescribe_bindings, Sdescribe_bindings, 0, 0, "", "Show a list of all defined keys, and their definitions.\n\ ! The list is put in a buffer, which is displayed.") ! () { register Lisp_Object thisbuf; XSET (thisbuf, Lisp_Buffer, current_buffer); internal_with_output_to_temp_buffer ("*Help*", describe_buffer_bindings, ! thisbuf); return Qnil; } static Lisp_Object ! describe_buffer_bindings (descbuf) ! Lisp_Object descbuf; { register Lisp_Object start1, start2; - char *key_heading - = "\ - key binding\n\ - --- -------\n"; char *alternate_heading = "\ Alternate Characters (use anywhere the nominal character is listed):\n\ --- 1650,1680 ---- /* describe-bindings - summarizing all the bindings in a set of keymaps. */ ! DEFUN ("describe-bindings", Fdescribe_bindings, Sdescribe_bindings, 0, 1, "", "Show a list of all defined keys, and their definitions.\n\ ! The list is put in a buffer, which is displayed.\n\ ! An optional argument PREFIX, if non-nil, should be a key sequence;\n\ ! then we display only bindings that start with that prefix.") ! (prefix) ! Lisp_Object prefix; { register Lisp_Object thisbuf; XSET (thisbuf, Lisp_Buffer, current_buffer); internal_with_output_to_temp_buffer ("*Help*", describe_buffer_bindings, ! Fcons (thisbuf, prefix)); return Qnil; } + /* ARG is (BUFFER . PREFIX). */ + static Lisp_Object ! describe_buffer_bindings (arg) ! Lisp_Object arg; { + Lisp_Object descbuf, prefix, shadow; register Lisp_Object start1, start2; char *alternate_heading = "\ Alternate Characters (use anywhere the nominal character is listed):\n\ *************** Alternate Characters (use anywhere the n *** 1645,1650 **** --- 1681,1689 ---- nominal alternate\n\ ------- ---------\n"; + descbuf = XCONS (arg)->car; + prefix = XCONS (arg)->cdr; + Fset_buffer (Vstandard_output); /* Report on alternates for keys. */ *************** nominal alternate\n\ *** 1681,1687 **** --- 1720,1729 ---- { int i, nmaps; Lisp_Object *modes, *maps; + Lisp_Object shadow; + shadow = Qnil; + /* Temporarily switch to descbuf, so that we can get that buffer's minor modes correctly. */ Fset_buffer (descbuf); *************** nominal alternate\n\ *** 1688,1725 **** nmaps = current_minor_maps (&modes, &maps); Fset_buffer (Vstandard_output); for (i = 0; i < nmaps; i++) { if (XTYPE (modes[i]) == Lisp_Symbol) { ! insert_char ('`'); ! insert_string (XSYMBOL (modes[i])->name->data); ! insert_char ('\''); } else ! insert_string ("Strangely Named"); ! insert_string (" Minor Mode Bindings:\n"); ! insert_string (key_heading); ! describe_map_tree (maps[i], 0, Qnil); ! insert_char ('\n'); } } start1 = XBUFFER (descbuf)->keymap; if (!NILP (start1)) { ! insert_string ("Local Bindings:\n"); ! insert_string (key_heading); ! describe_map_tree (start1, 0, Qnil); ! insert_string ("\n"); } ! insert_string ("Global Bindings:\n"); ! if (NILP (start1)) ! insert_string (key_heading); - describe_map_tree (current_global_map, 0, XBUFFER (descbuf)->keymap); - Fset_buffer (descbuf); return Qnil; } --- 1730,1781 ---- nmaps = current_minor_maps (&modes, &maps); Fset_buffer (Vstandard_output); + shadow = Qnil; + + /* Print the minor mode maps. */ for (i = 0; i < nmaps; i++) { + /* Tht title for a minor mode keymap + is constructed at run time. + We let describe_map_tree do the actual insertion + because it takes care of other features when doing so. */ + char *title = (char *) alloca (40 + XSYMBOL (modes[i])->name->size); + char *p = title; + if (XTYPE (modes[i]) == Lisp_Symbol) { ! *p++ = '`'; ! bcopy (XSYMBOL (modes[i])->name->data, p, ! XSYMBOL (modes[i])->name->size); ! p += XSYMBOL (modes[i])->name->size; ! *p++ = '\''; } else ! { ! bcopy ("Strangely Named", p, sizeof ("Strangely Named")); ! p += sizeof ("Strangely Named"); ! } ! bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings")); ! p += sizeof (" Minor Mode Bindings"); ! *p = 0; ! ! describe_map_tree (maps[i], 0, shadow, prefix, title); ! shadow = Fcons (maps[i], shadow); } } + /* Print the (major mode) local map. */ start1 = XBUFFER (descbuf)->keymap; if (!NILP (start1)) { ! describe_map_tree (start1, 0, shadow, prefix, ! "Major Mode Bindings"); ! shadow = Fcons (start1, shadow); } ! describe_map_tree (current_global_map, 0, shadow, prefix, ! "Global Bindings"); Fset_buffer (descbuf); return Qnil; } *************** nominal alternate\n\ *** 1728,1784 **** followed by those of all maps reachable through STARTMAP. If PARTIAL is nonzero, omit certain "uninteresting" commands (such as `undefined'). ! If SHADOW is non-nil, it is another map; ! don't mention keys which would be shadowed by it. */ void ! describe_map_tree (startmap, partial, shadow) ! Lisp_Object startmap, shadow; int partial; { - register Lisp_Object elt, sh; Lisp_Object maps; struct gcpro gcpro1; ! maps = Faccessible_keymaps (startmap); GCPRO1 (maps); for (; !NILP (maps); maps = Fcdr (maps)) { elt = Fcar (maps); ! sh = Fcar (elt); ! /* If there is no shadow keymap given, don't shadow. */ ! if (NILP (shadow)) ! sh = Qnil; ! ! /* If the sequence by which we reach this keymap is zero-length, ! then the shadow map for this keymap is just SHADOW. */ ! else if ((XTYPE (sh) == Lisp_String ! && XSTRING (sh)->size == 0) ! || (XTYPE (sh) == Lisp_Vector ! && XVECTOR (sh)->size == 0)) ! sh = shadow; ! ! /* If the sequence by which we reach this keymap actually has ! some elements, then the sequence's definition in SHADOW is ! what we should use. */ ! else { ! sh = Flookup_key (shadow, Fcar (elt), Qt); ! if (XTYPE (sh) == Lisp_Int) ! sh = Qnil; } ! /* If sh is null (meaning that the current map is not shadowed), ! or a keymap (meaning that bindings from the current map might ! show through), describe the map. Otherwise, sh is a command ! that completely shadows the current map, and we shouldn't ! bother. */ ! if (NILP (sh) || !NILP (Fkeymapp (sh))) ! describe_map (Fcdr (elt), Fcar (elt), partial, sh); } UNGCPRO; } --- 1784,1878 ---- followed by those of all maps reachable through STARTMAP. If PARTIAL is nonzero, omit certain "uninteresting" commands (such as `undefined'). ! If SHADOW is non-nil, it is a list of maps; ! don't mention keys which would be shadowed by any of them. ! PREFIX, if non-nil, says mention only keys that start with PREFIX. ! TITLE, if not 0, is a string to insert at the beginning. ! TITLE should not end with a colon or a newline; we supply that. */ void ! describe_map_tree (startmap, partial, shadow, prefix, title) ! Lisp_Object startmap, shadow, prefix; int partial; + char *title; { Lisp_Object maps; struct gcpro gcpro1; + int something = 0; + char *key_heading + = "\ + key binding\n\ + --- -------\n"; ! maps = Faccessible_keymaps (startmap, prefix); GCPRO1 (maps); + if (!NILP (maps)) + { + if (title) + { + insert_string (title); + if (!NILP (prefix)) + { + insert_string (" Starting With "); + insert1 (Fkey_description (prefix)); + } + insert_string (":\n"); + } + insert_string (key_heading); + something = 1; + } + for (; !NILP (maps); maps = Fcdr (maps)) { + register Lisp_Object elt, prefix, sub_shadows, tail; + elt = Fcar (maps); ! prefix = Fcar (elt); ! sub_shadows = Qnil; ! ! for (tail = shadow; CONSP (tail); tail = XCONS (tail)->cdr) { ! Lisp_Object shmap; ! ! shmap = XCONS (tail)->car; ! ! /* If the sequence by which we reach this keymap is zero-length, ! then the shadow map for this keymap is just SHADOW. */ ! if ((XTYPE (prefix) == Lisp_String ! && XSTRING (prefix)->size == 0) ! || (XTYPE (prefix) == Lisp_Vector ! && XVECTOR (prefix)->size == 0)) ! ; ! /* If the sequence by which we reach this keymap actually has ! some elements, then the sequence's definition in SHADOW is ! what we should use. */ ! else ! { ! shmap = Flookup_key (shadow, Fcar (elt), Qt); ! if (XTYPE (shmap) == Lisp_Int) ! shmap = Qnil; ! } ! ! /* If shmap is not nil and not a keymap, ! it completely shadows this map, so don't ! describe this map at all. */ ! if (!NILP (shmap) && NILP (Fkeymapp (shmap))) ! goto skip; ! ! if (!NILP (shmap)) ! sub_shadows = Fcons (shmap, sub_shadows); } ! describe_map (Fcdr (elt), Fcar (elt), partial, sub_shadows); ! ! skip: ; } + if (something) + insert_string ("\n"); + UNGCPRO; } *************** describe_map (map, keys, partial, shadow *** 1831,1836 **** --- 1925,1948 ---- describe_map_2 (map, keysdesc, describe_command, partial, shadow); } + /* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map. + Returns the first non-nil binding found in any of those maps. */ + + static Lisp_Object + shadow_lookup (shadow, key, flag) + Lisp_Object shadow, key, flag; + { + Lisp_Object tail, value; + + for (tail = shadow; CONSP (tail); tail = XCONS (tail)->cdr) + { + value = Flookup_key (XCONS (tail)->car, key, flag); + if (!NILP (value)) + return value; + } + return Qnil; + } + /* Insert a description of KEYMAP into the current buffer. */ static void *************** describe_map_2 (keymap, elt_prefix, elt_ *** 1841,1848 **** int partial; Lisp_Object shadow; { ! Lisp_Object this; ! Lisp_Object tem1, tem2 = Qnil; Lisp_Object suppress; Lisp_Object kludge; int first = 1; --- 1953,1960 ---- int partial; Lisp_Object shadow; { ! Lisp_Object tail, definition, event; ! Lisp_Object tem; Lisp_Object suppress; Lisp_Object kludge; int first = 1; *************** describe_map_2 (keymap, elt_prefix, elt_ *** 1855,1881 **** that is done once per keymap element, we don't want to cons up a fresh vector every time. */ kludge = Fmake_vector (make_number (1), Qnil); ! GCPRO3 (elt_prefix, tem2, kludge); ! for (; CONSP (keymap); keymap = Fcdr (keymap)) { QUIT; ! if (XTYPE (XCONS (keymap)->car) == Lisp_Vector) ! describe_vector (XCONS (keymap)->car, elt_prefix, elt_describer, partial, shadow); else { ! tem1 = Fcar_safe (Fcar (keymap)); ! tem2 = get_keyelt (Fcdr_safe (Fcar (keymap))); /* Don't show undefined commands or suppressed commands. */ ! if (NILP (tem2)) continue; ! if (XTYPE (tem2) == Lisp_Symbol && partial) { ! this = Fget (tem2, suppress); ! if (!NILP (this)) continue; } --- 1967,1994 ---- that is done once per keymap element, we don't want to cons up a fresh vector every time. */ kludge = Fmake_vector (make_number (1), Qnil); + definition = Qnil; ! GCPRO3 (elt_prefix, definition, kludge); ! for (tail = XCONS (keymap)->cdr; CONSP (tail); tail = Fcdr (tail)) { QUIT; ! if (XTYPE (XCONS (tail)->car) == Lisp_Vector) ! describe_vector (XCONS (tail)->car, elt_prefix, elt_describer, partial, shadow); else { ! event = Fcar_safe (Fcar (tail)); ! definition = get_keyelt (Fcdr_safe (Fcar (tail))); /* Don't show undefined commands or suppressed commands. */ ! if (NILP (definition)) continue; ! if (XTYPE (definition) == Lisp_Symbol && partial) { ! tem = Fget (definition, suppress); ! if (!NILP (tem)) continue; } *************** describe_map_2 (keymap, elt_prefix, elt_ *** 1882,1896 **** /* Don't show a command that isn't really visible because a local definition of the same key shadows it. */ if (!NILP (shadow)) { ! Lisp_Object tem; ! ! XVECTOR (kludge)->contents[0] = tem1; ! tem = Flookup_key (shadow, kludge, Qt); if (!NILP (tem)) continue; } if (first) { insert ("\n", 1); --- 1995,2010 ---- /* Don't show a command that isn't really visible because a local definition of the same key shadows it. */ + XVECTOR (kludge)->contents[0] = event; if (!NILP (shadow)) { ! tem = shadow_lookup (shadow, kludge, Qt); if (!NILP (tem)) continue; } + tem = Flookup_key (keymap, kludge, Qt); + if (! EQ (tem, definition)) continue; + if (first) { insert ("\n", 1); *************** describe_map_2 (keymap, elt_prefix, elt_ *** 1900,1913 **** if (!NILP (elt_prefix)) insert1 (elt_prefix); ! /* THIS gets the string to describe the character TEM1. */ ! this = Fsingle_key_description (tem1); ! insert1 (this); /* Print a description of the definition of this character. elt_describer will take care of spacing out far enough for alignment purposes. */ ! (*elt_describer) (tem2); } } --- 2014,2026 ---- if (!NILP (elt_prefix)) insert1 (elt_prefix); ! /* THIS gets the string to describe the character EVENT. */ ! insert1 (Fsingle_key_description (event)); /* Print a description of the definition of this character. elt_describer will take care of spacing out far enough for alignment purposes. */ ! (*elt_describer) (definition); } } *************** describe_vector (vector, elt_prefix, elt *** 1987,1993 **** Lisp_Object tem; XVECTOR (kludge)->contents[0] = make_number (i); ! tem = Flookup_key (shadow, kludge, Qt); if (!NILP (tem)) continue; } --- 2100,2106 ---- Lisp_Object tem; XVECTOR (kludge)->contents[0] = make_number (i); ! tem = shadow_lookup (shadow, kludge, Qt); if (!NILP (tem)) continue; } diff -cprP --exclude=*.elc emacs-19.15/src/m/pmax.h emacs-19.16/src/m/pmax.h *** emacs-19.15/src/m/pmax.h Tue Jun 8 02:57:51 1993 --- emacs-19.16/src/m/pmax.h Tue Jul 6 02:55:48 1993 *************** *** 58,60 **** --- 58,81 ---- /* mcc@timessqr.gc.cuny.edu says it is /vmunix on Ultrix 4.2a. */ #undef KERNEL_FILE #define KERNEL_FILE "/vmunix" + + /* Jim Wilson writes: + [...] The X11 include files that Dec distributes with Ultrix + are bogus. + + When __STDC__ is defined (which is true with gcc), the X11 include files + try to define prototypes. The prototypes however use types which haven't + been defined yet, and thus we get syntax/parse errors. + + You can not fix this by changing the include files, because the prototypes + create circular dependencies, in particular Xutil.h depends on types defined + in Xlib.h, and Xlib.h depends on types defined in Xutil.h. So, no matter + which order you try to include them in, it will still fail. + + Compiling with -DNeedFunctionPrototypes=0 will solve the problem by + directly inhibiting the bad prototypes. This could perhaps just be put in + an a Ultrix configuration file. + + Using the MIT X11 distribution instead of the one provided by Dec will + also solve the problem, but I doubt you can convince everyone to do this. */ + #define C_SWITCH_X_MACHINE -DNeedFunctionPrototypes=0 diff -cprP --exclude=*.elc emacs-19.15/src/print.c emacs-19.16/src/print.c *** emacs-19.15/src/print.c Wed Jun 9 07:33:19 1993 --- emacs-19.16/src/print.c Tue Jul 6 03:33:02 1993 *************** *** 784,790 **** #ifdef USE_TEXT_PROPERTIES if (!NULL_INTERVAL_P (XSTRING (obj)->intervals)) { - PRINTCHAR (' '); traverse_intervals (XSTRING (obj)->intervals, 0, 0, print_interval, printcharfun); PRINTCHAR (')'); --- 784,789 ---- *************** print_interval (interval, printcharfun) *** 991,996 **** --- 990,996 ---- INTERVAL interval; Lisp_Object printcharfun; { + PRINTCHAR (' '); print (make_number (interval->position), printcharfun, 1); PRINTCHAR (' '); print (make_number (interval->position + LENGTH (interval)), *************** print_interval (interval, printcharfun) *** 997,1003 **** printcharfun, 1); PRINTCHAR (' '); print (interval->plist, printcharfun, 1); - PRINTCHAR (' '); } #endif /* USE_TEXT_PROPERTIES */ --- 997,1002 ---- diff -cprP --exclude=*.elc emacs-19.15/src/process.c emacs-19.16/src/process.c *** emacs-19.15/src/process.c Fri Jun 18 19:32:14 1993 --- emacs-19.16/src/process.c Fri Jul 2 01:38:54 1993 *************** *** 1658,1686 **** /* Read and dispose of subprocess output while waiting for timeout to elapse and/or keyboard input to be available. ! time_limit is: timeout in seconds, or zero for no limit, or -1 means gobble data immediately available but don't wait for any. ! microsecs is: ! an additional duration to wait (if time_limit is greater than ! zero), specified in millisec. ! read_kbd is a lisp value: 0 to ignore keyboard input, or 1 to return when input is available, or -1 meaning caller will actually read the input, so don't throw to the quit handler, or ! a cons cell, meaning wait wait until its car is non-nil, or a process object, meaning wait until something arrives from that process. The return value is true iff we read some input from that process. ! do_display != 0 means redisplay should be done to show subprocess output that arrives. ! If read_kbd is a pointer to a struct Lisp_Process, then the function returns true iff we received input from that process before the timeout elapsed. Otherwise, return true iff we received input from any process. */ --- 1658,1688 ---- /* Read and dispose of subprocess output while waiting for timeout to elapse and/or keyboard input to be available. ! TIME_LIMIT is: timeout in seconds, or zero for no limit, or -1 means gobble data immediately available but don't wait for any. ! MICROSECS is: ! an additional duration to wait, measured in microseconds. ! If this is nonzero and time_limit is 0, then the timeout ! consists of MICROSECS only. ! READ_KBD is a lisp value: 0 to ignore keyboard input, or 1 to return when input is available, or -1 meaning caller will actually read the input, so don't throw to the quit handler, or ! a cons cell, meaning wait wait until its car is non-nil ! (and gobble terminal input into the buffer if any arrives), or a process object, meaning wait until something arrives from that process. The return value is true iff we read some input from that process. ! DO_DISPLAY != 0 means redisplay should be done to show subprocess output that arrives. ! If READ_KBD is a pointer to a struct Lisp_Process, then the function returns true iff we received input from that process before the timeout elapsed. Otherwise, return true iff we received input from any process. */ *************** wait_reading_process_input (time_limit, *** 1799,1805 **** /* Wait till there is something to do */ Available = input_wait_mask; ! if (! XINT (read_kbd)) FD_CLR (0, &Available); /* If frame size has changed or the window is newly mapped, --- 1801,1807 ---- /* Wait till there is something to do */ Available = input_wait_mask; ! if (! XINT (read_kbd) && wait_for_cell == 0) FD_CLR (0, &Available); /* If frame size has changed or the window is newly mapped, *************** wait_reading_process_input (time_limit, *** 3190,3197 **** --- 3192,3201 ---- /* System sometimes fails to deliver SIGIO. */ kill (getpid (), SIGIO); #endif + #ifdef SIGIO if (XINT (read_kbd) && interrupt_input && (waitchannels & 1)) kill (0, SIGIO); + #endif /* If we have timed out (nfds == 0) or found some input (nfds > 0), we should exit. */ diff -cprP --exclude=*.elc emacs-19.15/src/s/hpux8.h emacs-19.16/src/s/hpux8.h *** emacs-19.15/src/s/hpux8.h Wed Jun 2 23:45:56 1993 --- emacs-19.16/src/s/hpux8.h Wed Jun 30 17:03:12 1993 *************** *** 33,43 **** --- 33,46 ---- and none have sioctl.h, so might as well define this. */ #define NO_SIOCTL_H + #if 0 /* autoconf should be detecting the presence or absence of + random and srandom now. */ /* If you use X11R4 you must define this. If you use X11R5 you must comment this out */ /* #define HAVE_RANDOM */ #define random foo_random #define srandom foo_srandom + #endif #if 0 /* This seems to be spurious. */ /* "X11R5" on hpux8 doesn't have this function, which is supposed to exist diff -cprP --exclude=*.elc emacs-19.15/src/s/sunos4-1.h emacs-19.16/src/s/sunos4-1.h *** emacs-19.15/src/s/sunos4-1.h Wed Jun 9 07:34:13 1993 --- emacs-19.16/src/s/sunos4-1.h Sun Jul 4 16:02:47 1993 *************** *** 13,15 **** --- 13,22 ---- /* Cause the compilation of oldxmenu to use the right -I option. */ #define OLDXMENU_OPTIONS CFLAGS=C_SWITCH_SYSTEM + + /* Some systems do not run the Network Information Service, but have + modified the shared C library to include resolver support without + also changing the C archive library (/usr/lib/libc.a). To deal + with this, you may need to link with the resolver library; to do + that, copy the following definition to config.h. */ + /* #define LIBS_SYSTEM -lresolv */ diff -cprP --exclude=*.elc emacs-19.15/src/termhooks.h emacs-19.16/src/termhooks.h *** emacs-19.15/src/termhooks.h Tue May 4 09:12:28 1993 --- emacs-19.16/src/termhooks.h Mon Jun 21 22:02:22 1993 *************** *** 286,295 **** is a mouse click lacking the click and drag modifiers. The window-system independent code turns all up_modifier events ! bits into either drag_modifier or click_modifier events. The ! click_modifier has no written representation in the names of the ! symbols used as event heads, but it does appear in the ! Qevent_symbol_components property of the event heads. */ enum { up_modifier = 1, /* Only used on mouse buttons - always turned into a click or a drag modifier --- 286,296 ---- is a mouse click lacking the click and drag modifiers. The window-system independent code turns all up_modifier events ! bits into drag_modifier, click_modifier, double_modifier, or ! triple_modifier events. The click_modifier has no written ! representation in the names of the symbols used as event heads, ! but it does appear in the Qevent_symbol_components property of the ! event heads. */ enum { up_modifier = 1, /* Only used on mouse buttons - always turned into a click or a drag modifier *************** enum { *** 299,304 **** --- 300,307 ---- queue; it's only used internally by the window-system-independent code. */ click_modifier= 8, /* See drag_modifier. */ + double_modifier= 16, /* See drag_modifier. */ + triple_modifier= 32, /* See drag_modifier. */ /* The next four modifier bits are used also in keyboard events at the Lisp level. diff -cprP --exclude=*.elc emacs-19.15/src/textprop.c emacs-19.16/src/textprop.c *** emacs-19.15/src/textprop.c Sat Jun 12 17:38:06 1993 --- emacs-19.16/src/textprop.c Tue Jul 6 10:32:49 1993 *************** *** 50,55 **** --- 50,61 ---- /* Visual properties text (including strings) may have. */ Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; Lisp_Object Qinvisible, Qread_only; + + /* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to + the o1's cdr. Otherwise, return zero. This is handy for + traversing plists. */ + #define PLIST_ELT_P(o1, o2) (CONSP (o1) && CONSP ((o2) = XCONS (o1)->cdr)) + /* Extract the interval at the position pointed to by BEGIN from OBJECT, a string or buffer. Additionally, check that the positions *************** validate_interval_range (object, begin, *** 116,129 **** return NULL_INTERVAL; searchpos = XINT (*begin); - if (searchpos == BUF_Z (b)) - searchpos--; - #if 0 - /* Special case for point-max: return the interval for the - last character. */ - if (*begin == *end && *begin == BUF_Z (b)) - *begin -= 1; - #endif } else { --- 122,127 ---- *************** validate_interval_range (object, begin, *** 135,141 **** /* User-level Positions in strings start with 0, but the interval code always wants positions starting with 1. */ XFASTINT (*begin) += 1; ! XFASTINT (*end) += 1; i = s->intervals; if (s->size == 0) --- 133,140 ---- /* User-level Positions in strings start with 0, but the interval code always wants positions starting with 1. */ XFASTINT (*begin) += 1; ! if (begin != end) ! XFASTINT (*end) += 1; i = s->intervals; if (s->size == 0) *************** validate_interval_range (object, begin, *** 142,149 **** return NULL_INTERVAL; searchpos = XINT (*begin); - if (searchpos > s->size) - searchpos--; } if (NULL_INTERVAL_P (i)) --- 141,146 ---- *************** validate_plist (list) *** 167,173 **** register int i; register Lisp_Object tail; for (i = 0, tail = list; !NILP (tail); i++) ! tail = Fcdr (tail); if (i & 1) error ("Odd length text property list"); return list; --- 164,173 ---- register int i; register Lisp_Object tail; for (i = 0, tail = list; !NILP (tail); i++) ! { ! tail = Fcdr (tail); ! QUIT; ! } if (i & 1) error ("Odd length text property list"); return list; *************** interval_has_all_properties (plist, i) *** 199,206 **** { /* Found the same property on both lists. If the values are unequal, return zero. */ ! if (! EQ (Fequal (Fcar (Fcdr (tail1)), Fcar (Fcdr (tail2))), ! Qt)) return 0; /* Property has same value on both lists; go to next one. */ --- 199,205 ---- { /* Found the same property on both lists. If the values are unequal, return zero. */ ! if (! EQ (Fcar (Fcdr (tail1)), Fcar (Fcdr (tail2)))) return 0; /* Property has same value on both lists; go to next one. */ *************** interval_has_some_properties (plist, i) *** 239,244 **** --- 238,261 ---- return 0; } + /* Changing the plists of individual intervals. */ + + /* Return the value of PROP in property-list PLIST, or Qunbound if it + has none. */ + static int + property_value (plist, prop) + { + Lisp_Object value; + + while (PLIST_ELT_P (plist, value)) + if (EQ (XCONS (plist)->car, prop)) + return XCONS (value)->car; + else + plist = XCONS (value)->cdr; + + return Qunbound; + } + /* Set the properties of INTERVAL to PROPERTIES, and record undo info for the previous values. OBJECT is the string or buffer that INTERVAL belongs to. */ *************** set_properties (properties, interval, ob *** 248,266 **** Lisp_Object properties, object; INTERVAL interval; { ! Lisp_Object oldprops; ! oldprops = interval->plist; ! /* Record undo for old properties. */ ! while (XTYPE (oldprops) == Lisp_Cons) { ! Lisp_Object sym; ! sym = Fcar (oldprops); ! record_property_change (interval->position, LENGTH (interval), ! sym, Fcar_safe (Fcdr (oldprops)), ! object); ! ! oldprops = Fcdr_safe (Fcdr (oldprops)); } /* Store new properties. */ --- 265,294 ---- Lisp_Object properties, object; INTERVAL interval; { ! Lisp_Object sym, value; ! if (BUFFERP (object)) { ! /* For each property in the old plist which is missing from PROPERTIES, ! or has a different value in PROPERTIES, make an undo record. */ ! for (sym = interval->plist; ! PLIST_ELT_P (sym, value); ! sym = XCONS (value)->cdr) ! if (! EQ (property_value (properties, XCONS (sym)->car), ! XCONS (value)->car)) ! record_property_change (interval->position, LENGTH (interval), ! XCONS (sym)->car, XCONS (value)->car, ! object); ! ! /* For each new property that has no value at all in the old plist, ! make an undo record binding it to nil, so it will be removed. */ ! for (sym = properties; ! PLIST_ELT_P (sym, value); ! sym = XCONS (value)->cdr) ! if (EQ (property_value (interval->plist, XCONS (sym)->car), Qunbound)) ! record_property_change (interval->position, LENGTH (interval), ! XCONS (sym)->car, Qnil, ! object); } /* Store new properties. */ *************** add_properties (plist, i, object) *** 304,310 **** /* The properties have the same value on both lists. Continue to the next property. */ ! if (!NILP (Fequal (val1, Fcar (this_cdr)))) break; /* Record this change in the buffer, for undo purposes. */ --- 332,338 ---- /* The properties have the same value on both lists. Continue to the next property. */ ! if (EQ (val1, Fcar (this_cdr))) break; /* Record this change in the buffer, for undo purposes. */ *************** Return t if any property value actually *** 643,648 **** --- 671,677 ---- if (got >= len) return Qnil; len -= got; + i = next_interval (i); } else { *************** Return t if any property was actually re *** 815,820 **** --- 844,850 ---- if (got >= len) return Qnil; len -= got; + i = next_interval (i); } /* Split away the beginning of this interval; what we don't want to modify. */ *************** is the string or buffer containing the t *** 965,970 **** --- 995,1096 ---- } #endif /* 0 */ + /* I don't think this is the right interface to export; how often do you + want to do something like this, other than when you're copying objects + around? + + I think it would be better to have a pair of functions, one which + returns the text properties of a region as a list of ranges and + plists, and another which applies such a list to another object. */ + + /* DEFUN ("copy-text-properties", Fcopy_text_properties, + Scopy_text_properties, 5, 6, 0, + "Add properties from SRC-START to SRC-END of SRC at DEST-POS of DEST.\n\ + SRC and DEST may each refer to strings or buffers.\n\ + Optional sixth argument PROP causes only that property to be copied.\n\ + Properties are copied to DEST as if by `add-text-properties'.\n\ + Return t if any property value actually changed, nil otherwise.") */ + + Lisp_Object + copy_text_properties (start, end, src, pos, dest, prop) + Lisp_Object start, end, src, pos, dest, prop; + { + INTERVAL i; + Lisp_Object res; + Lisp_Object stuff; + Lisp_Object plist; + int s, e, e2, p, len, modified = 0; + + i = validate_interval_range (src, &start, &end, soft); + if (NULL_INTERVAL_P (i)) + return Qnil; + + CHECK_NUMBER_COERCE_MARKER (pos, 0); + { + Lisp_Object dest_start, dest_end; + + dest_start = pos; + XFASTINT (dest_end) = XINT (dest_start) + (XINT (end) - XINT (start)); + /* Apply this to a copy of pos; it will try to increment its arguments, + which we don't want. */ + validate_interval_range (dest, &dest_start, &dest_end, soft); + } + + s = XINT (start); + e = XINT (end); + p = XINT (pos); + + stuff = Qnil; + + while (s < e) + { + e2 = i->position + LENGTH (i); + if (e2 > e) + e2 = e; + len = e2 - s; + + plist = i->plist; + if (! NILP (prop)) + while (! NILP (plist)) + { + if (EQ (Fcar (plist), prop)) + { + plist = Fcons (prop, Fcons (Fcar (Fcdr (plist)), Qnil)); + break; + } + plist = Fcdr (Fcdr (plist)); + } + if (! NILP (plist)) + { + /* Must defer modifications to the interval tree in case src + and dest refer to the same string or buffer. */ + stuff = Fcons (Fcons (make_number (p), + Fcons (make_number (p + len), + Fcons (plist, Qnil))), + stuff); + } + + i = next_interval (i); + if (NULL_INTERVAL_P (i)) + break; + + p += len; + s = i->position; + } + + while (! NILP (stuff)) + { + res = Fcar (stuff); + res = Fadd_text_properties (Fcar (res), Fcar (Fcdr (res)), + Fcar (Fcdr (Fcdr (res))), dest); + if (! NILP (res)) + modified++; + stuff = Fcdr (stuff); + } + + return modified ? Qt : Qnil; + } + void syms_of_textprop () { *************** percentage by which the left interval tr *** 1018,1023 **** --- 1144,1150 ---- defsubr (&Sset_text_properties); defsubr (&Sremove_text_properties); /* defsubr (&Serase_text_properties); */ + /* defsubr (&Scopy_text_properties); */ } #else diff -cprP --exclude=*.elc emacs-19.15/src/vm-limit.c emacs-19.16/src/vm-limit.c *** emacs-19.15/src/vm-limit.c Tue Oct 20 01:03:36 1992 --- emacs-19.16/src/vm-limit.c Wed Jun 30 15:43:00 1993 *************** *** 52,59 **** extern POINTER (*__morecore) (); register POINTER cp; ! int five_percent; ! int data_size; if (lim_data == 0) get_lim_data (); --- 52,59 ---- extern POINTER (*__morecore) (); register POINTER cp; ! unsigned long five_percent; ! unsigned long data_size; if (lim_data == 0) get_lim_data (); diff -cprP --exclude=*.elc emacs-19.15/src/xdisp.c emacs-19.16/src/xdisp.c *** emacs-19.15/src/xdisp.c Fri Jun 18 21:10:38 1993 --- emacs-19.16/src/xdisp.c Wed Jun 30 16:14:56 1993 *************** *** 435,442 **** if (((!NILP (Vtransient_mark_mode) && !NILP (XBUFFER (w->buffer)->mark_active)) != !NILP (w->region_showing)) ! || !EQ (w->region_showing, ! Fmarker_position (XBUFFER (w->buffer)->mark))) this_line_bufpos = -1; tlbufpos = this_line_bufpos; --- 435,443 ---- if (((!NILP (Vtransient_mark_mode) && !NILP (XBUFFER (w->buffer)->mark_active)) != !NILP (w->region_showing)) ! || (!NILP (w->region_showing) ! && !EQ (w->region_showing, ! Fmarker_position (XBUFFER (w->buffer)->mark)))) this_line_bufpos = -1; tlbufpos = this_line_bufpos; *************** done: *** 1079,1085 **** start = startp - BEGV; /* I don't think this is guaranteed to be right. For the moment, we'll pretend it is. */ ! end = (Z - XINT (w->window_end_pos)); if (end < start) end = start; if (whole < (end - start)) whole = end - start; --- 1080,1086 ---- start = startp - BEGV; /* I don't think this is guaranteed to be right. For the moment, we'll pretend it is. */ ! end = (Z - XINT (w->window_end_pos)) - BEGV; if (end < start) end = start; if (whole < (end - start)) whole = end - start; diff -cprP --exclude=*.elc emacs-19.15/src/xfaces.c emacs-19.16/src/xfaces.c *** emacs-19.15/src/xfaces.c Sat Jun 19 17:28:07 1993 --- emacs-19.16/src/xfaces.c Thu Jul 1 18:05:47 1993 *************** *** 34,65 **** #include "blockinput.h" #include "window.h" ! /* Compensate for bug in Xos.h on some systems. */ #ifdef XOS_NEEDS_TIME_H #include #define __TIMEVAL__ - #endif ! /* These don't seem to be used. */ ! #if 0 ! /* Display Context for the icons */ ! #include ! #include ! #include ! #endif #include /* An explanation of the face data structures. */ /* ========================= Face Data Structures ========================= ! All lisp code uses symbols as face names. ! Each frame has a face_alist member (with the frame-face-alist and ! set-frame-face-alist accessors), associating the face names with ! vectors of the form [face NAME ID FONT FOREGROUND BACKGROUND BACKGROUND-PIXMAP UNDERLINE-P] where face is the symbol `face', --- 34,66 ---- #include "blockinput.h" #include "window.h" ! /* Compensate for bug in Xos.h on some systems, on which it requires ! time.h. On some such systems, Xos.h tries to redefine struct ! timeval and struct timezone if USG is #defined while it is ! #included. */ #ifdef XOS_NEEDS_TIME_H + #include + #undef USG + #include + #define USG #define __TIMEVAL__ ! #else #include + #endif + /* An explanation of the face data structures. */ /* ========================= Face Data Structures ========================= ! Let FACE-NAME be a symbol naming a face. ! Let FACE-VECTOR be (assq FACE-NAME (frame-face-alist FRAME)) ! FACE-VECTOR is either nil, or a vector of the form [face NAME ID FONT FOREGROUND BACKGROUND BACKGROUND-PIXMAP UNDERLINE-P] where face is the symbol `face', *************** *** 71,123 **** BACKGROUND-PIXMAP is the name of an x bitmap filename, which we don't use right now, and UNDERLINE-P is non-nil if the face should be underlined. ! If any of these elements are nil, that allows the frame's parameters to ! show through. ! (lisp/faces.el maintains these association lists.) ! ! The frames' private alists hold the frame-local definitions for the ! faces. The lisp variable global-face-data contains the global ! defaults for faces. (See lisp/faces.el for this too.) ! ! In the C code, we also have a `struct face' with the elements ! `foreground', `background', `font', and `underline', ! which specify its visual appearance, and elements ! `gc' and `cached_index'; ! `gc' may be an X GC which has been built for the given display ! parameters. Faces with GC's are called `display faces'. Whether ! or not a face has a GC depends on what data structure the face is ! in; we explain these more below. (See src/dispextern.h.) ! ! Each frame also has members called `faces' and `n_faces' (with the ! accessors FRAME_FACES and FRAME_N_FACES), which define an array of ! struct face pointers, indexed by face ID (element 2 of the ! vector). These are called "frame faces". ! Element 0 is the default face --- the one used for normal text. ! Element 1 is the modeline face. ! These faces have their GC's set; the rest do not. ! If faces[i] is filled in (i.e. non-zero) on one frame, then it must ! be filled in on all frames. Code assumes that face ID's can be ! used on any frame. (See src/xterm.h.) ! ! The global variables `face_vector' and `nfaces' define another ! array of struct face pointers, with their GC's set. This array ! acts as a cache of GC's to be used by all frames. The function ! `intern_face', passed a struct face *, searches face_vector for a ! struct face with the same parameters, adds a new one with a GC if ! it doesn't find one, and returns it. If you have a `struct face', ! and you want a GC for it, call intern_face on that struct, and it ! will return a `struct face *' with its GC set. The faces in ! face_vector are called `cached faces.' (See src/xfaces.c.) ! ! The `GLYPH' data type is an unsigned integer type; the bottom byte ! is a character code, and the byte above that is a face id. The ! `struct frame_glyphs' structure, used to describe frames' current ! or desired contents, is essentially a matrix of GLYPHs; the face ! ID's in a struct frame_glyphs are indices into FRAME_FACES. (See ! src/dispextern.h.) Some subtleties: Since face_vector is just a cache --- there are no pointers into it from the rest of the code, and everyone accesses it through intern_face --- we could just free its GC's and throw the whole --- 72,138 ---- BACKGROUND-PIXMAP is the name of an x bitmap filename, which we don't use right now, and UNDERLINE-P is non-nil if the face should be underlined. ! If any of these elements are nil, that parameter is considered ! unspecified; parameters from faces specified by lower-priority ! overlays or text properties, or the parameters of the frame itself, ! can show through. (lisp/faces.el maintains these lists.) ! ! (assq FACE-NAME global-face-data) returns a vector describing the ! global parameters for that face. ! ! Let PARAM-FACE be FRAME->display.x->param_faces[Faref (FACE-VECTOR, 2)]. ! PARAM_FACE is a struct face whose members are the Xlib analogues of ! the parameters in FACE-VECTOR. If an element of FACE-VECTOR is ! nil, then the corresponding member of PARAM_FACE is FACE_DEFAULT. ! These faces are called "parameter faces", because they're the ones ! lisp manipulates to control what gets displayed. Elements 0 and 1 ! of FRAME->display.x->param_faces are special - they describe the ! default and mode line faces. None of the faces in param_faces have ! GC's. (See src/dispextern.h for the definiton of struct face. ! lisp/faces.el maintains the isomorphism between face_alist and ! param_faces.) ! ! The functions compute_char_face and compute_glyph_face find and ! combine the parameter faces associated with overlays and text ! properties. The resulting faces are called "computed faces"; none ! of their members are FACE_DEFAULT; they are completely specified. ! They then call intern_compute_face to search ! FRAME->display.x->computed_faces for a matching face, add one if ! none is found, and return the index into ! FRAME->display.x->computed_faces. FRAME's glyph matrices use these ! indices to record the faces of the matrix characters, and the X ! display hooks consult compute_faces to decide how to display these ! characters. Elements 0 and 1 of computed_faces always describe the ! default and mode-line faces. ! ! Elements 0 and 1 of computed_faces have GC's; all the other faces ! in computed_faces do not. The global array face_vector contains ! faces with their GC's set. Given a computed_face, the function ! intern_face finds (or adds) an element of face_vector with ! equivalent parameters, and returns a pointer to that face, whose GC ! can then be used for display. ! ! Constraints: ! ! Symbols naming faces must have associations on all frames; for any ! FRAME, for all FACE-NAME, if (assq FACE-NAME (frame-face-alist ! FRAME)) is non-nil, it must be non-nil for all frames. ! ! Analogously, indices into param_faces must be valid on all frames; ! if param_faces[i] is a non-zero face pointer on one frame, then it ! must be filled in on all frames. Code assumes that face ID's can ! be used on any frame. Some subtleties: + Why do we keep param_faces and computed_faces separate? + computed_faces contains an element for every combination of facial + parameters we have ever displayed. indices into param_faces have + to be valid on all frames. If they were the same array, then that + array would grow very large on all frames, because any facial + combination displayed on any frame would need to be a valid entry + on all frames. + Since face_vector is just a cache --- there are no pointers into it from the rest of the code, and everyone accesses it through intern_face --- we could just free its GC's and throw the whole *************** *** 127,133 **** refill it as needed. The function clear_face_vector performs this purge. ! We're often applying intern_face to faces in frames' local arrays - for example, we do this while sending GLYPHs from a struct frame_glyphs to X during redisplay. It would be nice to avoid searching all of face_vector every time we intern a frame's face. --- 142,148 ---- refill it as needed. The function clear_face_vector performs this purge. ! We're often applying intern_face to faces in computed_faces - for example, we do this while sending GLYPHs from a struct frame_glyphs to X during redisplay. It would be nice to avoid searching all of face_vector every time we intern a frame's face. *************** *** 139,149 **** /* Definitions and declarations. */ /* A table of display faces. */ ! struct face **face_vector; /* The length in use of the table. */ ! int nfaces; /* The allocated length of the table. */ ! int nfaces_allocated; /* The number of face-id's in use (same for all frames). */ int next_face_id; --- 154,164 ---- /* Definitions and declarations. */ /* A table of display faces. */ ! static struct face **face_vector; /* The length in use of the table. */ ! static int nfaces; /* The allocated length of the table. */ ! static int nfaces_allocated; /* The number of face-id's in use (same for all frames). */ int next_face_id; *************** static void build_face ( /* FRAME_PTR, s *** 161,166 **** --- 176,183 ---- int face_name_id_number ( /* FRAME_PTR, Lisp_Object name */ ); struct face *intern_face ( /* FRAME_PTR, struct face * */ ); + static int new_computed_face ( /* FRAME_PTR, struct face * */ ); + static int intern_computed_face ( /* FRAME_PTR, struct face * */ ); static void ensure_face_ready ( /* FRAME_PTR, int id */ ); void recompute_basic_faces ( /* FRAME_PTR f */ ); *************** get_cached_face (f, face) *** 259,265 **** return result; } ! /* Given a frame face, return an equivalent display face (one which has a graphics context). */ struct face * --- 276,282 ---- return result; } ! /* Given a computed face, return an equivalent display face (one which has a graphics context). */ struct face * *************** unload_color (f, pixel) *** 455,461 **** #endif } ! /* Initializing face arrays for frames. */ void init_frame_faces (f) --- 472,478 ---- #endif } ! /* Managing parameter face arrays for frames. */ void init_frame_faces (f) *************** init_frame_faces (f) *** 464,469 **** --- 481,488 ---- ensure_face_ready (f, 0); ensure_face_ready (f, 1); + new_computed_face (f, FRAME_PARAM_FACES (f)[0]); + new_computed_face (f, FRAME_PARAM_FACES (f)[1]); recompute_basic_faces (f); /* Find another X frame. */ *************** init_frame_faces (f) *** 486,493 **** if (FRAMEP (result)) { int i; ! int n_faces = XFRAME (result)->display.x->n_faces; ! struct face **faces = XFRAME (result)->display.x->faces; for (i = 2; i < n_faces; i++) if (faces[i]) --- 505,512 ---- if (FRAMEP (result)) { int i; ! int n_faces = FRAME_N_PARAM_FACES (XFRAME (result)); ! struct face **faces = FRAME_PARAM_FACES (XFRAME (result)); for (i = 2; i < n_faces; i++) if (faces[i]) *************** free_frame_faces (f) *** 507,534 **** BLOCK_INPUT; ! for (i = 0; i < FRAME_N_FACES (f); i++) { ! struct face *face = FRAME_FACES (f) [i]; if (face) { if (face->gc) XFreeGC (dpy, face->gc); ! if (! face->copy) ! { ! unload_font (f, face->font); ! unload_color (f, face->foreground); ! unload_color (f, face->background); #if 0 ! unload_pixmap (f, face->stipple); #endif - } xfree (face); } } ! xfree (FRAME_FACES (f)); ! FRAME_FACES (f) = 0; ! FRAME_N_FACES (f) = 0; UNBLOCK_INPUT; } --- 526,556 ---- BLOCK_INPUT; ! for (i = 0; i < FRAME_N_PARAM_FACES (f); i++) { ! struct face *face = FRAME_PARAM_FACES (f) [i]; if (face) { if (face->gc) XFreeGC (dpy, face->gc); ! unload_font (f, face->font); ! unload_color (f, face->foreground); ! unload_color (f, face->background); #if 0 ! unload_pixmap (f, face->stipple); #endif xfree (face); } } ! xfree (FRAME_PARAM_FACES (f)); ! FRAME_PARAM_FACES (f) = 0; ! FRAME_N_PARAM_FACES (f) = 0; ! ! /* All faces in FRAME_COMPUTED_FACES use resources copied from ! FRAME_PARAM_FACES; we can free them without fuss. */ ! xfree (FRAME_COMPUTED_FACES (f)); ! FRAME_COMPUTED_FACES (f) = 0; ! FRAME_N_COMPUTED_FACES (f) = 0; UNBLOCK_INPUT; } *************** free_frame_faces (f) *** 535,570 **** /* Interning faces in a frame's face array. */ ! /* Find a match for NEW_FACE in a FRAME's face array, and add it if we don't ! find one. */ static int ! intern_frame_face (frame, new_face) ! struct frame *frame; struct face *new_face; { ! int len = FRAME_N_FACES (frame); int i; ! /* Search for a face already on FRAME equivalent to FACE. */ for (i = 0; i < len; i++) { ! struct face *frame_face = FRAME_FACES (frame)[i]; ! ! if (frame_face && face_eql (new_face, frame_face)) return i; } /* We didn't find one; add a new one. */ ! i = next_face_id++; ! ! ensure_face_ready (frame, i); ! bcopy (new_face, FRAME_FACES (frame)[i], sizeof (*new_face)); ! FRAME_FACES (frame)[i]->copy = 1; ! ! return i; } ! /* Make face id ID valid on frame F. */ static void ensure_face_ready (f, id) --- 557,612 ---- /* Interning faces in a frame's face array. */ ! static int ! new_computed_face (f, new_face) ! struct frame *f; ! struct face *new_face; ! { ! int i = FRAME_N_COMPUTED_FACES (f); ! ! if (i >= FRAME_SIZE_COMPUTED_FACES (f)) ! { ! int new_size = i + 32; ! ! FRAME_COMPUTED_FACES (f) ! = (struct face **) ! (FRAME_SIZE_COMPUTED_FACES (f) == 0 ! ? xmalloc (new_size * sizeof (struct face *)) ! : xrealloc (FRAME_COMPUTED_FACES (f), ! new_size * sizeof (struct face *))); ! FRAME_SIZE_COMPUTED_FACES (f) = new_size; ! } ! ! i = FRAME_N_COMPUTED_FACES (f)++; ! FRAME_COMPUTED_FACES (f)[i] = copy_face (new_face); ! return i; ! } ! ! ! /* Find a match for NEW_FACE in a FRAME's computed face array, and add ! it if we don't find one. */ static int ! intern_computed_face (f, new_face) ! struct frame *f; struct face *new_face; { ! int len = FRAME_N_COMPUTED_FACES (f); int i; ! /* Search for a computed face already on F equivalent to FACE. */ for (i = 0; i < len; i++) { ! if (! FRAME_COMPUTED_FACES (f)[i]) ! abort (); ! if (face_eql (new_face, FRAME_COMPUTED_FACES (f)[i])) return i; } /* We didn't find one; add a new one. */ ! return new_computed_face (f, new_face); } ! /* Make parameter face id ID valid on frame F. */ static void ensure_face_ready (f, id) *************** ensure_face_ready (f, id) *** 571,595 **** struct frame *f; int id; { ! if (FRAME_N_FACES (f) <= id) { int n = id + 10; int i; ! if (!FRAME_N_FACES (f)) ! FRAME_FACES (f) = (struct face **) xmalloc (sizeof (struct face *) * n); else ! FRAME_FACES (f) ! = (struct face **) xrealloc (FRAME_FACES (f), sizeof (struct face *) * n); ! bzero (FRAME_FACES (f) + FRAME_N_FACES (f), ! (n - FRAME_N_FACES (f)) * sizeof (struct face *)); ! FRAME_N_FACES (f) = n; } ! if (FRAME_FACES (f) [id] == 0) ! FRAME_FACES (f) [id] = allocate_face (); } /* Computing faces appropriate for a given piece of text in a buffer. */ --- 613,637 ---- struct frame *f; int id; { ! if (FRAME_N_PARAM_FACES (f) <= id) { int n = id + 10; int i; ! if (!FRAME_N_PARAM_FACES (f)) ! FRAME_PARAM_FACES (f) = (struct face **) xmalloc (sizeof (struct face *) * n); else ! FRAME_PARAM_FACES (f) ! = (struct face **) xrealloc (FRAME_PARAM_FACES (f), sizeof (struct face *) * n); ! bzero (FRAME_PARAM_FACES (f) + FRAME_N_PARAM_FACES (f), ! (n - FRAME_N_PARAM_FACES (f)) * sizeof (struct face *)); ! FRAME_N_PARAM_FACES (f) = n; } ! if (FRAME_PARAM_FACES (f) [id] == 0) ! FRAME_PARAM_FACES (f) [id] = allocate_face (); } /* Computing faces appropriate for a given piece of text in a buffer. */ *************** compute_char_face (f, w, pos, region_beg *** 757,765 **** if (!NILP (prop)) { facecode = face_name_id_number (f, prop); ! if (facecode >= 0 && facecode < FRAME_N_FACES (f) ! && FRAME_FACES (f) [facecode] != 0) ! merge_faces (FRAME_FACES (f) [facecode], &face); } /* Put the valid and relevant overlays into sortvec. */ --- 799,807 ---- if (!NILP (prop)) { facecode = face_name_id_number (f, prop); ! if (facecode >= 0 && facecode < FRAME_N_PARAM_FACES (f) ! && FRAME_PARAM_FACES (f) [facecode] != 0) ! merge_faces (FRAME_PARAM_FACES (f) [facecode], &face); } /* Put the valid and relevant overlays into sortvec. */ *************** compute_char_face (f, w, pos, region_beg *** 814,822 **** int oendpos; facecode = face_name_id_number (f, prop); ! if (facecode >= 0 && facecode < FRAME_N_FACES (f) ! && FRAME_FACES (f) [facecode] != 0) ! merge_faces (FRAME_FACES (f) [facecode], &face); oend = OVERLAY_END (sortvec[i].overlay); oendpos = OVERLAY_POSITION (oend); --- 856,864 ---- int oendpos; facecode = face_name_id_number (f, prop); ! if (facecode >= 0 && facecode < FRAME_N_PARAM_FACES (f) ! && FRAME_PARAM_FACES (f) [facecode] != 0) ! merge_faces (FRAME_PARAM_FACES (f) [facecode], &face); oend = OVERLAY_END (sortvec[i].overlay); oendpos = OVERLAY_POSITION (oend); *************** compute_char_face (f, w, pos, region_beg *** 830,841 **** if (region_end < endpos) endpos = region_end; if (region_face >= 0 && region_face < next_face_id) ! merge_faces (FRAME_FACES (f) [region_face], &face); } *endptr = endpos; ! return intern_frame_face (f, &face); } /* Return the face ID to use to display a special glyph which selects --- 872,883 ---- if (region_end < endpos) endpos = region_end; if (region_face >= 0 && region_face < next_face_id) ! merge_faces (FRAME_PARAM_FACES (f) [region_face], &face); } *endptr = endpos; ! return intern_computed_face (f, &face); } /* Return the face ID to use to display a special glyph which selects *************** compute_glyph_face (f, face_code) *** 850,860 **** compute_base_face (f, &face); ! if (face_code >= 0 && face_code < FRAME_N_FACES (f) ! && FRAME_FACES (f) [face_code] != 0) ! merge_faces (FRAME_FACES (f) [face_code], &face); ! return intern_frame_face (f, &face); } --- 892,902 ---- compute_base_face (f, &face); ! if (face_code >= 0 && face_code < FRAME_N_PARAM_FACES (f) ! && FRAME_PARAM_FACES (f) [face_code] != 0) ! merge_faces (FRAME_PARAM_FACES (f) [face_code], &face); ! return intern_computed_face (f, &face); } *************** recompute_basic_faces (f) *** 867,873 **** { /* If the frame's faces haven't been initialized yet, don't worry about this stuff. */ ! if (FRAME_N_FACES (f) < 2) return; BLOCK_INPUT; --- 909,915 ---- { /* If the frame's faces haven't been initialized yet, don't worry about this stuff. */ ! if (FRAME_N_PARAM_FACES (f) < 2) return; BLOCK_INPUT; *************** recompute_basic_faces (f) *** 874,883 **** if (FRAME_DEFAULT_FACE (f)->gc) XFreeGC (x_current_display, FRAME_DEFAULT_FACE (f)->gc); - build_face (f, FRAME_DEFAULT_FACE (f)); - if (FRAME_MODE_LINE_FACE (f)->gc) XFreeGC (x_current_display, FRAME_MODE_LINE_FACE (f)->gc); build_face (f, FRAME_MODE_LINE_FACE (f)); UNBLOCK_INPUT; --- 916,931 ---- if (FRAME_DEFAULT_FACE (f)->gc) XFreeGC (x_current_display, FRAME_DEFAULT_FACE (f)->gc); if (FRAME_MODE_LINE_FACE (f)->gc) XFreeGC (x_current_display, FRAME_MODE_LINE_FACE (f)->gc); + + compute_base_face (f, FRAME_DEFAULT_FACE (f)); + compute_base_face (f, FRAME_MODE_LINE_FACE (f)); + + merge_faces (FRAME_DEFAULT_PARAM_FACE (f), FRAME_DEFAULT_FACE (f)); + merge_faces (FRAME_MODE_LINE_PARAM_FACE (f), FRAME_MODE_LINE_FACE (f)); + + build_face (f, FRAME_DEFAULT_FACE (f)); build_face (f, FRAME_MODE_LINE_FACE (f)); UNBLOCK_INPUT; *************** DEFUN ("set-face-attribute-internal", Fs *** 952,958 **** return; ensure_face_ready (f, id); ! face = FRAME_FACES (f) [XFASTINT (face_id)]; if (EQ (attr_name, intern ("font"))) { --- 1000,1006 ---- return; ensure_face_ready (f, id); ! face = FRAME_PARAM_FACES (f) [XFASTINT (face_id)]; if (EQ (attr_name, intern ("font"))) { *************** DEFUN ("set-face-attribute-internal", Fs *** 995,1017 **** else error ("unknown face attribute"); ! if (id == 0) ! { ! BLOCK_INPUT; ! if (FRAME_DEFAULT_FACE (f)->gc != 0) ! XFreeGC (x_current_display, FRAME_DEFAULT_FACE (f)->gc); ! build_face (f, FRAME_DEFAULT_FACE (f)); ! UNBLOCK_INPUT; ! } ! ! if (id == 1) ! { ! BLOCK_INPUT; ! if (FRAME_MODE_LINE_FACE (f)->gc != 0) ! XFreeGC (x_current_display, FRAME_MODE_LINE_FACE (f)->gc); ! build_face (f, FRAME_MODE_LINE_FACE (f)); ! UNBLOCK_INPUT; ! } /* If we're modifying either of the frame's display faces, that means that we're changing the parameters of a fixed face code; --- 1043,1050 ---- else error ("unknown face attribute"); ! if (id == 0 || id == 1) ! recompute_basic_faces (f); /* If we're modifying either of the frame's display faces, that means that we're changing the parameters of a fixed face code; diff -cprP --exclude=*.elc emacs-19.15/src/xfns.c emacs-19.16/src/xfns.c *** emacs-19.15/src/xfns.c Fri Jun 18 12:31:53 1993 --- emacs-19.16/src/xfns.c Wed Jun 30 16:51:46 1993 *************** *** 196,204 **** extern Lisp_Object Vwindow_system_version; - /* Mouse map for clicks in windows. */ - extern Lisp_Object Vglobal_mouse_map; - /* Error if we are not connected to X. */ static void --- 196,201 ---- *************** be shared by the new frame.") *** 1745,1751 **** "font", "Font", string); x_default_parameter (f, parms, Qborder_width, make_number (2), "borderwidth", "BorderWidth", number); ! /* This defaults to 2 in order to match xterm. */ x_default_parameter (f, parms, Qinternal_border_width, make_number (2), "internalBorderWidth", "BorderWidth", number); x_default_parameter (f, parms, Qvertical_scroll_bars, Qt, --- 1742,1760 ---- "font", "Font", string); x_default_parameter (f, parms, Qborder_width, make_number (2), "borderwidth", "BorderWidth", number); ! /* This defaults to 2 in order to match xterm. We recognize either ! internalBorderWidth or internalBorder (which is what xterm calls ! it). */ ! if (NILP (Fassq (Qinternal_border_width, parms))) ! { ! Lisp_Object value; ! ! value = x_get_arg (parms, Qinternal_border_width, ! "internalBorder", "BorderWidth", number); ! if (! EQ (value, Qunbound)) ! parms = Fcons (Fcons (Qinternal_border_width, value), ! parms); ! } x_default_parameter (f, parms, Qinternal_border_width, make_number (2), "internalBorderWidth", "BorderWidth", number); x_default_parameter (f, parms, Qvertical_scroll_bars, Qt, *************** fonts), even if they match PATTERN and F *** 2208,2219 **** FRAME_PTR f = NILP (frame) ? selected_frame : XFRAME (frame); int face_id = face_name_id_number (f, face); ! if (face_id < 0 || face_id >= FRAME_N_FACES (f) ! || FRAME_FACES (f) [face_id] == 0) size_ref = f->display.x->font; else { ! size_ref = FRAME_FACES (f) [face_id]->font; if (size_ref == (XFontStruct *) (~0)) size_ref = f->display.x->font; } --- 2217,2228 ---- FRAME_PTR f = NILP (frame) ? selected_frame : XFRAME (frame); int face_id = face_name_id_number (f, face); ! if (face_id < 0 || face_id >= FRAME_N_PARAM_FACES (f) ! || FRAME_PARAM_FACES (f) [face_id] == 0) size_ref = f->display.x->font; else { ! size_ref = FRAME_PARAM_FACES (f) [face_id]->font; if (size_ref == (XFontStruct *) (~0)) size_ref = f->display.x->font; } *************** arg XRM_STRING is a string of resources *** 3483,3489 **** --- 3492,3500 ---- } else xrm_option = (unsigned char *) 0; + BLOCK_INPUT; xrdb = x_load_resources (x_current_display, xrm_option, EMACS_CLASS); + UNBLOCK_INPUT; #if defined (HAVE_X11R5) || defined (HAVE_XRMSETDATABASE) XrmSetDatabase (x_current_display, xrdb); #else diff -cprP --exclude=*.elc emacs-19.15/src/xrdb.c emacs-19.16/src/xrdb.c *** emacs-19.15/src/xrdb.c Sat Jun 19 16:18:50 1993 --- emacs-19.16/src/xrdb.c Mon Jun 21 23:43:12 1993 *************** *** 316,330 **** #ifdef XlibSpecificationRelease #if XlibSpecificationRelease >= 5 ! /* Some NCD xterms seem to hang on InternAtom. Problem has been ! verified on machines with a VendorRelease value of 2000. */ ! if (strcmp(ServerVendor(display), "Network Computing Devices Inc.") || ! VendorRelease(display) > 2000) { ! /* Get the screen-specific resources too. */ ! xdefs = XScreenResourceString (DefaultScreenOfDisplay (display)); ! if (xdefs != NULL) ! XrmMergeDatabases (XrmGetStringDatabase (xdefs), &db); } #endif #endif --- 316,327 ---- #ifdef XlibSpecificationRelease #if XlibSpecificationRelease >= 5 ! /* Get the screen-specific resources too. */ ! xdefs = XScreenResourceString (DefaultScreenOfDisplay (display)); ! if (xdefs != NULL) { ! XrmMergeDatabases (XrmGetStringDatabase (xdefs), &db); ! XFree (xdefs); } #endif #endif diff -cprP --exclude=*.elc emacs-19.15/src/xterm.c emacs-19.16/src/xterm.c *** emacs-19.15/src/xterm.c Sat Jun 19 17:01:00 1993 --- emacs-19.16/src/xterm.c Fri Jul 2 00:00:29 1993 *************** *** 93,98 **** --- 93,119 ---- /*#include */ #endif /* ! defined (HAVE_X11) */ + #ifdef FD_SET + /* We could get this from param.h, but better not to depend on finding that. + And better not to risk that it might define other symbols used in this + file. */ + #ifdef FD_SETSIZE + #define MAXDESC FD_SETSIZE + #else + #define MAXDESC 64 + #endif + #define SELECT_TYPE fd_set + #else /* no FD_SET */ + #define MAXDESC 32 + #define SELECT_TYPE int + + /* Define the macros to access a single-int bitmap of descriptors. */ + #define FD_SET(n, p) (*(p) |= (1 << (n))) + #define FD_CLR(n, p) (*(p) &= ~(1 << (n))) + #define FD_ISSET(n, p) (*(p) & (1 << (n))) + #define FD_ZERO(p) (*(p) = 0) + #endif /* no FD_SET */ + /* For sending Meta-characters. Do we need this? */ #define METABIT 0200 *************** XTcursor_to (row, col) *** 389,396 **** Since the display generation code is responsible for calling compute_char_face and compute_glyph_face on everything it puts in the display structure, we can assume that the face code on each ! glyph is a valid index into FRAME_FACES (f), and the one to which ! we can actually apply intern_face. */ #if 1 /* This is the multi-face code. */ --- 410,417 ---- Since the display generation code is responsible for calling compute_char_face and compute_glyph_face on everything it puts in the display structure, we can assume that the face code on each ! glyph is a valid index into FRAME_COMPUTED_FACES (f), and the one ! to which we can actually apply intern_face. */ #if 1 /* This is the multi-face code. */ *************** dumpglyphs (f, left, top, gp, n, hl) *** 451,463 **** { /* The face codes on the glyphs must be valid indices into the frame's face table. */ ! if (cf < 0 || cf >= FRAME_N_FACES (f)) abort (); if (cf == 1) face = FRAME_MODE_LINE_FACE (f); else ! face = intern_face (f, FRAME_FACES (f) [cf]); font = FACE_FONT (face); gc = FACE_GC (face); defaulted = 0; --- 472,485 ---- { /* The face codes on the glyphs must be valid indices into the frame's face table. */ ! if (cf < 0 || cf >= FRAME_N_COMPUTED_FACES (f) ! || FRAME_COMPUTED_FACES (f) [cf] == 0) abort (); if (cf == 1) face = FRAME_MODE_LINE_FACE (f); else ! face = intern_face (f, FRAME_COMPUTED_FACES (f) [cf]); font = FACE_FONT (face); gc = FACE_GC (face); defaulted = 0; *************** static void *** 1223,1231 **** frame_highlight (frame) struct frame *frame; { ! if (! EQ (Vx_no_window_manager, Qnil)) ! XSetWindowBorder (x_current_display, FRAME_X_WINDOW (frame), ! frame->display.x->border_pixel); x_display_cursor (frame, 1); } --- 1245,1258 ---- frame_highlight (frame) struct frame *frame; { ! /* We used to only do this if Vx_no_window_manager was non-nil, but ! the ICCCM (section 4.1.6) says that the window's border pixmap ! and border pixel are window attributes which are "private to the ! client", so we can always change it to whatever we want. */ ! BLOCK_INPUT; ! XSetWindowBorder (x_current_display, FRAME_X_WINDOW (frame), ! frame->display.x->border_pixel); ! UNBLOCK_INPUT; x_display_cursor (frame, 1); } *************** static void *** 1233,1241 **** frame_unhighlight (frame) struct frame *frame; { ! if (! EQ (Vx_no_window_manager, Qnil)) ! XSetWindowBorderPixmap (x_current_display, FRAME_X_WINDOW (frame), ! frame->display.x->border_tile); x_display_cursor (frame, 1); } #else /* ! defined (HAVE_X11) */ --- 1260,1273 ---- frame_unhighlight (frame) struct frame *frame; { ! /* We used to only do this if Vx_no_window_manager was non-nil, but ! the ICCCM (section 4.1.6) says that the window's border pixmap ! and border pixel are window attributes which are "private to the ! client", so we can always change it to whatever we want. */ ! BLOCK_INPUT; ! XSetWindowBorderPixmap (x_current_display, FRAME_X_WINDOW (frame), ! frame->display.x->border_tile); ! UNBLOCK_INPUT; x_display_cursor (frame, 1); } #else /* ! defined (HAVE_X11) */ *************** XTread_socket (sd, bufp, numchars, waitp *** 2553,2559 **** int items_pending; /* How many items are in the X queue. */ XEvent event; struct frame *f; ! int event_found; int prefix; Lisp_Object part; --- 2585,2591 ---- int items_pending; /* How many items are in the X queue. */ XEvent event; struct frame *f; ! int event_found = 0; int prefix; Lisp_Object part; *************** XTread_socket (sd, bufp, numchars, waitp *** 3139,3155 **** Window win, child; int win_x, win_y; ! /* Coords are relative to the parent. ! Convert them to root-relative. */ XTranslateCoordinates (x_current_display, /* From-window, to-window. */ ! f->display.x->parent_desc, ROOT_WINDOW, /* From-position, to-position. */ ! event.xconfigure.x, ! event.xconfigure.y, &win_x, &win_y, /* Child of win. */ --- 3171,3190 ---- Window win, child; int win_x, win_y; ! /* Find the position of the outside upper-left corner of ! the window, in the root coordinate system. Don't ! refer to the parent window here; we may be processing ! this event after the window manager has changed our ! parent, but before we have reached the ReparentNotify. */ XTranslateCoordinates (x_current_display, /* From-window, to-window. */ ! f->display.x->window_desc, ROOT_WINDOW, /* From-position, to-position. */ ! -event.xconfigure.border_width, ! -event.xconfigure.border_width, &win_x, &win_y, /* Child of win. */ *************** XTread_socket (sd, bufp, numchars, waitp *** 3267,3273 **** } } - #if 0 #ifdef HAVE_SELECT if (expected && ! event_found) { --- 3302,3307 ---- *************** XTread_socket (sd, bufp, numchars, waitp *** 3274,3290 **** /* AOJ 880406: if select returns true but XPending doesn't, it means that there is an EOF condition; in other words, that X has died. Act as if there had been a hangup. */ - int fd = ConnectionNumber (x_current_display); ! int mask = 1 << fd; ! if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, ! (EMACS_TIME) 0) && !XStuffPending ()) kill (getpid (), SIGHUP); } #endif /* ! defined (HAVE_SELECT) */ - #endif /* ! 0 */ #ifndef HAVE_X11 if (updating_frame == 0) --- 3308,3324 ---- /* AOJ 880406: if select returns true but XPending doesn't, it means that there is an EOF condition; in other words, that X has died. Act as if there had been a hangup. */ int fd = ConnectionNumber (x_current_display); ! SELECT_TYPE mask; ! EMACS_TIME timeout; ! FD_SET(fd, &mask); ! EMACS_SET_SECS_USECS (timeout, 0, 0); ! if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, &timeout) && !XStuffPending ()) kill (getpid (), SIGHUP); } #endif /* ! defined (HAVE_SELECT) */ #ifndef HAVE_X11 if (updating_frame == 0) *************** x_calc_absolute_position (f) *** 4082,4093 **** { #ifdef HAVE_X11 if (f->display.x->left_pos < 0) ! f->display.x->left_pos ! = x_screen_width - PIXEL_WIDTH (f) + f->display.x->left_pos; if (f->display.x->top_pos < 0) ! f->display.x->top_pos ! = x_screen_height - PIXEL_HEIGHT (f) + f->display.x->top_pos; #else /* ! defined (HAVE_X11) */ WINDOWINFO_TYPE parentinfo; --- 4116,4131 ---- { #ifdef HAVE_X11 if (f->display.x->left_pos < 0) ! f->display.x->left_pos = (x_screen_width ! - 2 * f->display.x->border_width ! - PIXEL_WIDTH (f) ! + f->display.x->left_pos); if (f->display.x->top_pos < 0) ! f->display.x->top_pos = (x_screen_height ! - 2 * f->display.x->border_width ! - PIXEL_HEIGHT (f) ! + f->display.x->top_pos); #else /* ! defined (HAVE_X11) */ WINDOWINFO_TYPE parentinfo; diff -cprP --exclude=*.elc emacs-19.15/src/xterm.h emacs-19.16/src/xterm.h *** emacs-19.15/src/xterm.h Wed Jun 9 07:38:06 1993 --- emacs-19.16/src/xterm.h Mon Jul 5 05:31:57 1993 *************** *** 324,340 **** scroll bars, in pixels. */ int vertical_scroll_bar_extra; ! /* Table of faces for this frame. */ ! struct face **faces; ! /* Length of that table. */ ! int n_faces; }; ! /* Get at the faces of an X window frame. */ ! #define FRAME_FACES(f) ((f)->display.x->faces) ! #define FRAME_N_FACES(f) ((f)->display.x->n_faces) ! #define FRAME_DEFAULT_FACE(f) ((f)->display.x->faces[0]) ! #define FRAME_MODE_LINE_FACE(f) ((f)->display.x->faces[1]) /* Return the window associated with the frame F. */ #define FRAME_X_WINDOW(f) ((f)->display.x->window_desc) --- 324,356 ---- scroll bars, in pixels. */ int vertical_scroll_bar_extra; ! /* Table of parameter faces for this frame. Any X resources (pixel ! values, fonts) referred to here have been allocated explicitly ! for this face, and should be freed if we change the face. */ ! struct face **param_faces; ! int n_param_faces; ! ! /* Table of computed faces for this frame. These are the faces ! whose indexes go into the upper bits of a glyph, computed by ! combining the parameter faces specified by overlays, text ! properties, and what have you. The X resources mentioned here ! are all shared with parameter faces. */ ! struct face **computed_faces; ! int n_computed_faces; /* How many are valid */ ! int size_computed_faces; /* How many are allocated */ }; ! /* Get at the computed faces of an X window frame. */ ! #define FRAME_PARAM_FACES(f) ((f)->display.x->param_faces) ! #define FRAME_N_PARAM_FACES(f) ((f)->display.x->n_param_faces) ! #define FRAME_DEFAULT_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[0]) ! #define FRAME_MODE_LINE_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[1]) ! ! #define FRAME_COMPUTED_FACES(f) ((f)->display.x->computed_faces) ! #define FRAME_N_COMPUTED_FACES(f) ((f)->display.x->n_computed_faces) ! #define FRAME_SIZE_COMPUTED_FACES(f) ((f)->display.x->size_computed_faces) ! #define FRAME_DEFAULT_FACE(f) ((f)->display.x->computed_faces[0]) ! #define FRAME_MODE_LINE_FACE(f) ((f)->display.x->computed_faces[1]) /* Return the window associated with the frame F. */ #define FRAME_X_WINDOW(f) ((f)->display.x->window_desc) *************** struct selection_input_event *** 574,586 **** /* Interface to the face code functions. */ ! /* Create the first two faces for a frame -- the ones that have GC's. */ extern void init_frame_faces (/* FRAME_PTR */); /* Free the resources for the faces associated with a frame. */ extern void free_frame_faces (/* FRAME_PTR */); ! /* Given a non-display face, find or make an equivalent display face in face_vector, and return a pointer to it. */ extern struct face *intern_face (/* FRAME_PTR, struct face * */); --- 590,603 ---- /* Interface to the face code functions. */ ! /* Create the first two computed faces for a frame -- the ones that ! have GC's. */ extern void init_frame_faces (/* FRAME_PTR */); /* Free the resources for the faces associated with a frame. */ extern void free_frame_faces (/* FRAME_PTR */); ! /* Given a computed face, find or make an equivalent display face in face_vector, and return a pointer to it. */ extern struct face *intern_face (/* FRAME_PTR, struct face * */); *************** extern int same_size_fonts (/* XFontStru *** 597,607 **** depend. */ extern void recompute_basic_faces (/* FRAME_PTR */); ! /* Return the face ID associated with a buffer position POS. ! Store into *ENDPTR the position at which a different face is needed. ! This does not take account of glyphs that specify their own face codes. ! F is the frame in use for display, and W is a window displaying ! the current buffer. REGION_BEG, REGION_END delimit the region, so it can be highlighted. */ extern int compute_char_face (/* FRAME_PTR frame, --- 614,624 ---- depend. */ extern void recompute_basic_faces (/* FRAME_PTR */); ! /* Return the face ID associated with a buffer position POS. Store ! into *ENDPTR the next position at which a different face is ! needed. This does not take account of glyphs that specify their ! own face codes. F is the frame in use for display, and W is a ! window displaying the current buffer. REGION_BEG, REGION_END delimit the region, so it can be highlighted. */ extern int compute_char_face (/* FRAME_PTR frame, diff -cprP --exclude=*.elc emacs-19.15/src/ymakefile emacs-19.16/src/ymakefile *** emacs-19.15/src/ymakefile Fri Jun 18 18:20:46 1993 --- emacs-19.16/src/ymakefile Tue Jul 6 12:26:33 1993 *************** *** 287,293 **** #ifndef LIB_GCC /* Ask GCC where to find libgcc.a. */ ! #define LIB_GCC `gcc -print-libgcc-file-name` #endif /* LIB_GCC */ GNULIB_VAR = LIB_GCC --- 287,293 ---- #ifndef LIB_GCC /* Ask GCC where to find libgcc.a. */ ! #define LIB_GCC `$(CC) -print-libgcc-file-name` #endif /* LIB_GCC */ GNULIB_VAR = LIB_GCC *************** C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE *** 581,591 **** --- 581,593 ---- C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM C_SWITCH_SITE_1 = C_SWITCH_SITE C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE + C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE really-oldXMenu: cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \ CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \ "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \ + "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \ "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \ "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)" @true /* make -t should not create really-oldXMenu. */ *************** bytecode.o : bytecode.c buffer.h $(confi *** 725,733 **** data.o : data.c buffer.h puresize.h syssignal.h $(config_h) eval.o : eval.c commands.h keyboard.h blockinput.h $(config_h) floatfns.o : floatfns.c $(config_h) ! fns.o : fns.c commands.h $(config_h) frame.h buffer.h keyboard.h print.o : print.c process.h frame.h window.h buffer.h $(config_h) ! lread.o : lread.c commands.h keyboard.h buffer.h paths.h $(config_h) termhooks.h /* Text properties support */ textprop.o : textprop.c buffer.h intervals.h $(config_h) --- 727,736 ---- data.o : data.c buffer.h puresize.h syssignal.h $(config_h) eval.o : eval.c commands.h keyboard.h blockinput.h $(config_h) floatfns.o : floatfns.c $(config_h) ! fns.o : fns.c commands.h $(config_h) frame.h buffer.h keyboard.h INTERVAL_SRC print.o : print.c process.h frame.h window.h buffer.h $(config_h) ! lread.o : lread.c commands.h keyboard.h buffer.h paths.h $(config_h) \ ! termhooks.h /* Text properties support */ textprop.o : textprop.c buffer.h intervals.h $(config_h) diff -cprP --exclude=*.elc emacs-19.15/vms/ChangeLog emacs-19.16/vms/ChangeLog *** emacs-19.15/vms/ChangeLog Sat Jun 19 17:57:45 1993 --- emacs-19.16/vms/ChangeLog Tue Jul 6 11:08:14 1993 *************** *** 1,3 **** --- 1,7 ---- + Tue Jul 6 11:05:14 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * Version 19.16 released. + Sat Jun 19 17:14:27 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * version 19.15 released. \end-of-emacs-patch-kit