aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2007-01-26 06:16:11 +0000
committerMiles Bader2007-01-26 06:16:11 +0000
commitc0466914ba3ad88c402b0301646b4b5db8aeb913 (patch)
tree964d8df324ab5f46872dfedc92ccea9fe50a1441 /src
parentc97a3f22ed5841f1c8bcdbb80df2bd49635c6a56 (diff)
parent58f8a3f97bd49484d0eb4f83a70662ded0daf9cc (diff)
downloademacs-c0466914ba3ad88c402b0301646b4b5db8aeb913.tar.gz
emacs-c0466914ba3ad88c402b0301646b4b5db8aeb913.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 586-614) - Update from CVS - Update from erc--emacs--22 - Merge from gnus--rel--5.10 - Merge from erc--main--0 - Make byte compiler correctly write circular constants * gnus--rel--5.10 (patch 186-196) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-162
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit78
-rw-r--r--src/ChangeLog268
-rw-r--r--src/ChangeLog.13
-rw-r--r--src/ChangeLog.23
-rw-r--r--src/ChangeLog.33
-rw-r--r--src/ChangeLog.43
-rw-r--r--src/ChangeLog.53
-rw-r--r--src/ChangeLog.63
-rw-r--r--src/ChangeLog.73
-rw-r--r--src/ChangeLog.83
-rw-r--r--src/ChangeLog.93
-rw-r--r--src/Makefile.in2
-rw-r--r--src/abbrev.c2
-rw-r--r--src/alloc.c30
-rw-r--r--src/atimer.c4
-rw-r--r--src/atimer.h4
-rw-r--r--src/blockinput.h4
-rw-r--r--src/buffer.c2
-rw-r--r--src/buffer.h2
-rw-r--r--src/bytecode.c2
-rw-r--r--src/callint.c4
-rw-r--r--src/callproc.c8
-rw-r--r--src/casefiddle.c2
-rw-r--r--src/casetab.c4
-rw-r--r--src/category.c5
-rw-r--r--src/category.h2
-rw-r--r--src/ccl.c4
-rw-r--r--src/ccl.h2
-rw-r--r--src/charset.c5
-rw-r--r--src/charset.h5
-rw-r--r--src/cm.c4
-rw-r--r--src/cm.h4
-rw-r--r--src/cmds.c2
-rw-r--r--src/coding.c4
-rw-r--r--src/coding.h6
-rw-r--r--src/commands.h4
-rw-r--r--src/composite.c4
-rw-r--r--src/composite.h4
-rw-r--r--src/config.in2
-rw-r--r--src/cxux-crt0.s2
-rw-r--r--src/data.c2
-rw-r--r--src/dired.c37
-rw-r--r--src/dispextern.h2
-rw-r--r--src/dispnew.c14
-rw-r--r--src/disptab.h4
-rw-r--r--src/doc.c2
-rw-r--r--src/doprnt.c4
-rw-r--r--src/dosfns.c2
-rw-r--r--src/dosfns.h4
-rw-r--r--src/ecrt0.c4
-rw-r--r--src/editfns.c79
-rw-r--r--src/emacs.c7
-rw-r--r--src/epaths.in4
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c2
-rw-r--r--src/filelock.c2
-rw-r--r--src/filemode.c4
-rw-r--r--src/firstfile.c4
-rw-r--r--src/floatfns.c4
-rw-r--r--src/fns.c8
-rw-r--r--src/fontset.c5
-rw-r--r--src/fontset.h6
-rw-r--r--src/frame.c4
-rw-r--r--src/frame.h2
-rw-r--r--src/fringe.c4
-rw-r--r--src/getloadavg.c3
-rw-r--r--src/getpagesize.h2
-rw-r--r--src/gmalloc.c2
-rw-r--r--src/gtkutil.c82
-rw-r--r--src/gtkutil.h4
-rw-r--r--src/image.c10
-rw-r--r--src/indent.c21
-rw-r--r--src/indent.h4
-rw-r--r--src/insdel.c2
-rw-r--r--src/intervals.c4
-rw-r--r--src/intervals.h4
-rw-r--r--src/keyboard.c7
-rw-r--r--src/keyboard.h4
-rw-r--r--src/keymap.c10
-rw-r--r--src/keymap.h2
-rw-r--r--src/lastfile.c4
-rw-r--r--src/lisp.h2
-rw-r--r--src/lread.c2
-rw-r--r--src/m/7300.h4
-rw-r--r--src/m/acorn.h4
-rw-r--r--src/m/alliant-2800.h4
-rw-r--r--src/m/alliant.h4
-rw-r--r--src/m/alpha.h4
-rw-r--r--src/m/altos.h4
-rw-r--r--src/m/amdahl.h4
-rw-r--r--src/m/amdx86-64.h2
-rw-r--r--src/m/apollo.h4
-rw-r--r--src/m/arm.h4
-rw-r--r--src/m/att3b.h4
-rw-r--r--src/m/aviion.h4
-rw-r--r--src/m/celerity.h4
-rw-r--r--src/m/clipper.h4
-rw-r--r--src/m/cnvrgnt.h4
-rw-r--r--src/m/convex.h4
-rw-r--r--src/m/cydra5.h4
-rw-r--r--src/m/delta88k.h4
-rw-r--r--src/m/dpx2.h4
-rw-r--r--src/m/dual.h4
-rw-r--r--src/m/elxsi.h4
-rw-r--r--src/m/ews4800.h2
-rw-r--r--src/m/gould-np1.h4
-rw-r--r--src/m/gould.h2
-rw-r--r--src/m/hp800.h4
-rw-r--r--src/m/hp9000s300.h4
-rw-r--r--src/m/i860.h4
-rw-r--r--src/m/ia64.h4
-rw-r--r--src/m/ibm370aix.h2
-rw-r--r--src/m/ibmps2-aix.h4
-rw-r--r--src/m/ibmrs6000.h4
-rw-r--r--src/m/ibmrt-aix.h4
-rw-r--r--src/m/ibmrt.h4
-rw-r--r--src/m/ibms390.h2
-rw-r--r--src/m/ibms390x.h2
-rw-r--r--src/m/intel386.h4
-rw-r--r--src/m/iris4d.h4
-rw-r--r--src/m/irist.h4
-rw-r--r--src/m/isi-ov.h4
-rw-r--r--src/m/m68k.h4
-rw-r--r--src/m/macppc.h2
-rw-r--r--src/m/masscomp.h4
-rw-r--r--src/m/mega68.h4
-rw-r--r--src/m/mg1.h4
-rw-r--r--src/m/mips-siemens.h4
-rw-r--r--src/m/mips.h4
-rw-r--r--src/m/news.h4
-rw-r--r--src/m/next.h4
-rw-r--r--src/m/nh3000.h4
-rw-r--r--src/m/nh4000.h4
-rw-r--r--src/m/ns16000.h4
-rw-r--r--src/m/ns32000.h4
-rw-r--r--src/m/nu.h4
-rw-r--r--src/m/orion.h4
-rw-r--r--src/m/orion105.h4
-rw-r--r--src/m/pfa50.h4
-rw-r--r--src/m/plexus.h4
-rw-r--r--src/m/powermac.h2
-rw-r--r--src/m/powerpcle.h4
-rw-r--r--src/m/pyramid.h4
-rw-r--r--src/m/sequent-ptx.h4
-rw-r--r--src/m/sequent.h4
-rw-r--r--src/m/sh3el.h2
-rw-r--r--src/m/sparc.h4
-rw-r--r--src/m/sps7.h4
-rw-r--r--src/m/sr2k.h4
-rw-r--r--src/m/stride.h4
-rw-r--r--src/m/sun1.h4
-rw-r--r--src/m/sun2.h4
-rw-r--r--src/m/sun386.h4
-rw-r--r--src/m/symmetry.h4
-rw-r--r--src/m/tad68k.h4
-rw-r--r--src/m/tahoe.h4
-rw-r--r--src/m/targon31.h4
-rw-r--r--src/m/tek4300.h4
-rw-r--r--src/m/tekxd88.h4
-rw-r--r--src/m/template.h4
-rw-r--r--src/m/tower32.h4
-rw-r--r--src/m/tower32v3.h4
-rw-r--r--src/m/ustation.h4
-rw-r--r--src/m/vax.h4
-rw-r--r--src/m/wicat.h4
-rw-r--r--src/m/windowsnt.h4
-rw-r--r--src/m/xps100.h4
-rw-r--r--src/mac.c10
-rw-r--r--src/macfns.c2
-rw-r--r--src/macgui.h12
-rw-r--r--src/macmenu.c595
-rw-r--r--src/macros.c2
-rw-r--r--src/macros.h4
-rw-r--r--src/macselect.c13
-rw-r--r--src/macterm.c335
-rw-r--r--src/macterm.h19
-rw-r--r--src/makefile.w32-in2
-rw-r--r--src/marker.c4
-rw-r--r--src/md5.c4
-rw-r--r--src/md5.h4
-rw-r--r--src/mem-limits.h4
-rw-r--r--src/minibuf.c4
-rw-r--r--src/mktime.c4
-rw-r--r--src/msdos.c2
-rw-r--r--src/msdos.h2
-rw-r--r--src/prefix-args.c4
-rw-r--r--src/print.c2
-rw-r--r--src/process.c20
-rw-r--r--src/process.h4
-rw-r--r--src/puresize.h4
-rw-r--r--src/ralloc.c4
-rw-r--r--src/regex.c2
-rw-r--r--src/regex.h5
-rw-r--r--src/region-cache.c4
-rw-r--r--src/region-cache.h4
-rw-r--r--src/s/aix3-1.h4
-rw-r--r--src/s/bsd4-1.h4
-rw-r--r--src/s/bsd4-2.h4
-rw-r--r--src/s/bsd4-3.h4
-rw-r--r--src/s/cxux.h4
-rw-r--r--src/s/cygwin.h2
-rw-r--r--src/s/darwin.h2
-rw-r--r--src/s/dgux.h4
-rw-r--r--src/s/dgux4.h4
-rw-r--r--src/s/dgux5-4-3.h4
-rw-r--r--src/s/dgux5-4r2.h4
-rw-r--r--src/s/freebsd.h2
-rw-r--r--src/s/gnu-linux.h4
-rw-r--r--src/s/gnu.h4
-rw-r--r--src/s/hpux.h4
-rw-r--r--src/s/iris3-5.h4
-rw-r--r--src/s/iris3-6.h4
-rw-r--r--src/s/irix3-3.h4
-rw-r--r--src/s/lynxos.h2
-rw-r--r--src/s/ms-w32.h4
-rw-r--r--src/s/msdos.h2
-rw-r--r--src/s/newsos5.h4
-rw-r--r--src/s/nextstep.h4
-rw-r--r--src/s/ptx.h4
-rw-r--r--src/s/riscix1-1.h4
-rw-r--r--src/s/riscix12.h4
-rw-r--r--src/s/rtu.h4
-rw-r--r--src/s/sco4.h4
-rw-r--r--src/s/sco5.h3
-rw-r--r--src/s/template.h4
-rw-r--r--src/s/umax.h4
-rw-r--r--src/s/unipl5-2.h4
-rw-r--r--src/s/usg5-0.h4
-rw-r--r--src/s/usg5-2-2.h4
-rw-r--r--src/s/usg5-2.h4
-rw-r--r--src/s/usg5-3.h4
-rw-r--r--src/s/usg5-4.h4
-rw-r--r--src/s/vms.h4
-rw-r--r--src/s/xenix.h4
-rw-r--r--src/scroll.c4
-rw-r--r--src/search.c4
-rw-r--r--src/sheap.c2
-rw-r--r--src/sound.c2
-rw-r--r--src/strftime.c3
-rw-r--r--src/sunfns.c2
-rw-r--r--src/syntax.c5
-rw-r--r--src/syntax.h4
-rw-r--r--src/sysdep.c2
-rw-r--r--src/sysselect.h4
-rw-r--r--src/syssignal.h4
-rw-r--r--src/systime.h2
-rw-r--r--src/systty.h4
-rw-r--r--src/syswait.h4
-rw-r--r--src/term.c2
-rw-r--r--src/termcap.c2
-rw-r--r--src/termchar.h4
-rw-r--r--src/termhooks.h4
-rw-r--r--src/terminfo.c4
-rw-r--r--src/termopts.h4
-rw-r--r--src/textprop.c2
-rw-r--r--src/tparam.c4
-rw-r--r--src/uaf.h4
-rw-r--r--src/undo.c4
-rw-r--r--src/unexaix.c4
-rw-r--r--src/unexalpha.c4
-rw-r--r--src/unexapollo.c4
-rw-r--r--src/unexconvex.c4
-rw-r--r--src/unexcw.c2
-rw-r--r--src/unexec.c4
-rw-r--r--src/unexelf.c2
-rw-r--r--src/unexenix.c4
-rw-r--r--src/unexmacosx.c2
-rw-r--r--src/unexmips.c4
-rw-r--r--src/unexnext.c4
-rw-r--r--src/unexsni.c5
-rw-r--r--src/unexsunos4.c4
-rw-r--r--src/unexw32.c4
-rw-r--r--src/vm-limit.c4
-rw-r--r--src/w16select.c2
-rw-r--r--src/w32.c2
-rw-r--r--src/w32.h4
-rw-r--r--src/w32bdf.c4
-rw-r--r--src/w32bdf.h4
-rw-r--r--src/w32console.c4
-rw-r--r--src/w32fns.c2
-rw-r--r--src/w32gui.h4
-rw-r--r--src/w32heap.c4
-rw-r--r--src/w32heap.h4
-rw-r--r--src/w32inevt.c4
-rw-r--r--src/w32inevt.h4
-rw-r--r--src/w32menu.c4
-rw-r--r--src/w32proc.c2
-rw-r--r--src/w32reg.c4
-rw-r--r--src/w32select.c4
-rw-r--r--src/w32term.c2
-rw-r--r--src/w32term.h2
-rw-r--r--src/w32xfns.c4
-rw-r--r--src/widget.c4
-rw-r--r--src/widget.h4
-rw-r--r--src/widgetprv.h4
-rw-r--r--src/window.c18
-rw-r--r--src/window.h2
-rw-r--r--src/xdisp.c3
-rw-r--r--src/xfaces.c2
-rw-r--r--src/xfns.c2
-rw-r--r--src/xmenu.c2
-rw-r--r--src/xrdb.c2
-rw-r--r--src/xselect.c2
-rw-r--r--src/xsmfns.c2
-rw-r--r--src/xterm.c175
-rw-r--r--src/xterm.h7
306 files changed, 1995 insertions, 854 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index aa6ec1bfe59..723f8f6b21c 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -1,5 +1,5 @@
1# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 1# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
2# 2004, 2005, 2006 Free Software Foundation, Inc. 2# 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3# 3#
4# This file is part of GNU Emacs. 4# This file is part of GNU Emacs.
5# 5#
@@ -158,7 +158,8 @@ define ppt
158 printf " SZ=%d\n", $t->gap_size 158 printf " SZ=%d\n", $t->gap_size
159end 159end
160document ppt 160document ppt
161Print point, beg, end, narrow, and gap for current buffer. 161Print current buffer's point and boundaries.
162Prints values of point, beg, end, narrow, and gap for current buffer.
162end 163end
163 164
164# Print out iterator given as first arg 165# Print out iterator given as first arg
@@ -312,7 +313,7 @@ define pcursorx
312 printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos 313 printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos
313end 314end
314document pcursorx 315document pcursorx
315Pretty print a window cursor 316Pretty print a window cursor.
316end 317end
317 318
318define pcursor 319define pcursor
@@ -321,7 +322,7 @@ define pcursor
321 printf "\n" 322 printf "\n"
322end 323end
323document pcursor 324document pcursor
324Pretty print the output_cursor 325Pretty print the output_cursor.
325end 326end
326 327
327define pwinx 328define pwinx
@@ -381,7 +382,7 @@ define pwinx
381end 382end
382document pwinx 383document pwinx
383Pretty print a window structure. 384Pretty print a window structure.
384Takes one argument, a pointer to a window structure 385Takes one argument, a pointer to a window structure.
385end 386end
386 387
387define pwin 388define pwin
@@ -447,7 +448,7 @@ define pgx
447end 448end
448document pgx 449document pgx
449Pretty print a glyph structure. 450Pretty print a glyph structure.
450Takes one argument, a pointer to a glyph structure 451Takes one argument, a pointer to a glyph structure.
451end 452end
452 453
453define pg 454define pg
@@ -532,7 +533,8 @@ define xvectype
532 echo \n 533 echo \n
533end 534end
534document xvectype 535document xvectype
535Print the size or vector subtype of $, assuming it is a vector or pseudovector. 536Print the size or vector subtype of $.
537This command assumes that $ is a vector or pseudovector.
536end 538end
537 539
538define xmisctype 540define xmisctype
@@ -541,7 +543,7 @@ define xmisctype
541 echo \n 543 echo \n
542end 544end
543document xmisctype 545document xmisctype
544Print the specific type of $, assuming it is some misc type. 546Assume that $ is some misc type and print its specific type.
545end 547end
546 548
547define xint 549define xint
@@ -549,7 +551,7 @@ define xint
549 print $int 551 print $int
550end 552end
551document xint 553document xint
552Print $, assuming it is an Emacs Lisp integer. This gets the sign right. 554Print $ as an Emacs Lisp integer. This gets the sign right.
553end 555end
554 556
555define xptr 557define xptr
@@ -557,7 +559,7 @@ define xptr
557 print (void *) $ptr 559 print (void *) $ptr
558end 560end
559document xptr 561document xptr
560Print the pointer portion of $, assuming it is an Emacs Lisp value. 562Print the pointer portion of an Emacs Lisp value in $.
561end 563end
562 564
563define xmarker 565define xmarker
@@ -565,7 +567,8 @@ define xmarker
565 print (struct Lisp_Marker *) $ptr 567 print (struct Lisp_Marker *) $ptr
566end 568end
567document xmarker 569document xmarker
568Print $ as a marker pointer, assuming it is an Emacs Lisp marker value. 570Print $ as a marker pointer.
571This command assumes that $ is an Emacs Lisp marker value.
569end 572end
570 573
571define xoverlay 574define xoverlay
@@ -573,7 +576,8 @@ define xoverlay
573 print (struct Lisp_Overlay *) $ptr 576 print (struct Lisp_Overlay *) $ptr
574end 577end
575document xoverlay 578document xoverlay
576Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value. 579Print $ as a overlay pointer.
580This command assumes that $ is an Emacs Lisp overlay value.
577end 581end
578 582
579define xmiscfree 583define xmiscfree
@@ -581,7 +585,8 @@ define xmiscfree
581 print (struct Lisp_Free *) $ptr 585 print (struct Lisp_Free *) $ptr
582end 586end
583document xmiscfree 587document xmiscfree
584Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value. 588Print $ as a misc free-cell pointer.
589This command assumes that $ is an Emacs Lisp Misc value.
585end 590end
586 591
587define xintfwd 592define xintfwd
@@ -589,7 +594,8 @@ define xintfwd
589 print (struct Lisp_Intfwd *) $ptr 594 print (struct Lisp_Intfwd *) $ptr
590end 595end
591document xintfwd 596document xintfwd
592Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value. 597Print $ as an integer forwarding pointer.
598This command assumes that $ is an Emacs Lisp Misc value.
593end 599end
594 600
595define xboolfwd 601define xboolfwd
@@ -597,7 +603,8 @@ define xboolfwd
597 print (struct Lisp_Boolfwd *) $ptr 603 print (struct Lisp_Boolfwd *) $ptr
598end 604end
599document xboolfwd 605document xboolfwd
600Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value. 606Print $ as a boolean forwarding pointer.
607This command assumes that $ is an Emacs Lisp Misc value.
601end 608end
602 609
603define xobjfwd 610define xobjfwd
@@ -605,7 +612,8 @@ define xobjfwd
605 print (struct Lisp_Objfwd *) $ptr 612 print (struct Lisp_Objfwd *) $ptr
606end 613end
607document xobjfwd 614document xobjfwd
608Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value. 615Print $ as an object forwarding pointer.
616This command assumes that $ is an Emacs Lisp Misc value.
609end 617end
610 618
611define xbufobjfwd 619define xbufobjfwd
@@ -613,7 +621,8 @@ define xbufobjfwd
613 print (struct Lisp_Buffer_Objfwd *) $ptr 621 print (struct Lisp_Buffer_Objfwd *) $ptr
614end 622end
615document xbufobjfwd 623document xbufobjfwd
616Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. 624Print $ as a buffer-local object forwarding pointer.
625This command assumes that $ is an Emacs Lisp Misc value.
617end 626end
618 627
619define xkbobjfwd 628define xkbobjfwd
@@ -621,7 +630,8 @@ define xkbobjfwd
621 print (struct Lisp_Kboard_Objfwd *) $ptr 630 print (struct Lisp_Kboard_Objfwd *) $ptr
622end 631end
623document xkbobjfwd 632document xkbobjfwd
624Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. 633Print $ as a kboard-local object forwarding pointer.
634This command assumes that $ is an Emacs Lisp Misc value.
625end 635end
626 636
627define xbuflocal 637define xbuflocal
@@ -629,7 +639,8 @@ define xbuflocal
629 print (struct Lisp_Buffer_Local_Value *) $ptr 639 print (struct Lisp_Buffer_Local_Value *) $ptr
630end 640end
631document xbuflocal 641document xbuflocal
632Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. 642Print $ as a buffer-local-value pointer.
643This command assumes that $ is an Emacs Lisp Misc value.
633end 644end
634 645
635define xsymbol 646define xsymbol
@@ -673,7 +684,8 @@ define xprocess
673 echo \n 684 echo \n
674end 685end
675document xprocess 686document xprocess
676Print the address of the struct Lisp_process which the Lisp_Object $ points to. 687Print the address of the struct Lisp_process to which $ points.
688This command assumes that $ is a Lisp_Object.
677end 689end
678 690
679define xframe 691define xframe
@@ -685,7 +697,8 @@ define xframe
685 echo \n 697 echo \n
686end 698end
687document xframe 699document xframe
688Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. 700Print $ as a frame pointer.
701This command assumes $ is an Emacs Lisp frame value.
689end 702end
690 703
691define xcompiled 704define xcompiled
@@ -694,7 +707,8 @@ define xcompiled
694 output ($->contents[0])@($->size & 0xff) 707 output ($->contents[0])@($->size & 0xff)
695end 708end
696document xcompiled 709document xcompiled
697Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. 710Print $ as a compiled function pointer.
711This command assumes that $ is an Emacs Lisp compiled value.
698end 712end
699 713
700define xwindow 714define xwindow
@@ -721,7 +735,8 @@ define xwinconfig
721 print (struct save_window_data *) $ptr 735 print (struct save_window_data *) $ptr
722end 736end
723document xwinconfig 737document xwinconfig
724Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. 738Print $ as a window configuration pointer.
739This command assumes that $ is an Emacs Lisp window configuration value.
725end 740end
726 741
727define xsubr 742define xsubr
@@ -766,8 +781,8 @@ define xbuffer
766 echo \n 781 echo \n
767end 782end
768document xbuffer 783document xbuffer
769Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. 784Set $ as a buffer pointer and the name of the buffer.
770Print the name of the buffer. 785This command assumes $ is an Emacs Lisp buffer value.
771end 786end
772 787
773define xhashtable 788define xhashtable
@@ -775,7 +790,8 @@ define xhashtable
775 print (struct Lisp_Hash_Table *) $ptr 790 print (struct Lisp_Hash_Table *) $ptr
776end 791end
777document xhashtable 792document xhashtable
778Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value. 793Set $ as a hash table pointer.
794This command assumes that $ is an Emacs Lisp hash table value.
779end 795end
780 796
781define xcons 797define xcons
@@ -785,7 +801,7 @@ define xcons
785 echo \n 801 echo \n
786end 802end
787document xcons 803document xcons
788Print the contents of $, assuming it is an Emacs Lisp cons. 804Print the contents of $ as an Emacs Lisp cons.
789end 805end
790 806
791define nextcons 807define nextcons
@@ -794,7 +810,7 @@ define nextcons
794end 810end
795document nextcons 811document nextcons
796Print the contents of the next cell in a list. 812Print the contents of the next cell in a list.
797This assumes that the last thing you printed was a cons cell contents 813This command assumes that the last thing you printed was a cons cell contents
798(type struct Lisp_Cons) or a pointer to one. 814(type struct Lisp_Cons) or a pointer to one.
799end 815end
800define xcar 816define xcar
@@ -803,7 +819,7 @@ define xcar
803 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0) 819 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0)
804end 820end
805document xcar 821document xcar
806Print the car of $, assuming it is an Emacs Lisp pair. 822Assume that $ is an Emacs Lisp pair and print its car.
807end 823end
808 824
809define xcdr 825define xcdr
@@ -812,7 +828,7 @@ define xcdr
812 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.cdr : 0) 828 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.cdr : 0)
813end 829end
814document xcdr 830document xcdr
815Print the cdr of $, assuming it is an Emacs Lisp pair. 831Assume that $ is an Emacs Lisp pair and print its cdr.
816end 832end
817 833
818define xlist 834define xlist
@@ -1030,7 +1046,7 @@ define which
1030 set debug_print (which_symbols ($arg0)) 1046 set debug_print (which_symbols ($arg0))
1031end 1047end
1032document which 1048document which
1033 Print symbols which references a given lisp object, 1049 Print symbols which references a given lisp object
1034 either as its symbol value or symbol function. 1050 either as its symbol value or symbol function.
1035end 1051end
1036 1052
diff --git a/src/ChangeLog b/src/ChangeLog
index 717e4cdf963..208084ff12a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,257 @@
12007-01-24 Kim F. Storm <storm@cua.dk>
2
3 * keymap.c (describe_map): Don't consider prefix keys to be shadowed.
4
52007-01-23 Juanma Barranquero <lekktu@gmail.com>
6
7 * editfns.c (Finsert_char): Doc fix.
8 (Fget_internal_run_time, Fdecode_time): Fix typos in docstrings.
9
102007-01-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11
12 * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Don't
13 pass keyboard modifiers to mac_store_drag_event, but put them as
14 kEventParamKeyModifiers Apple event parameter.
15
162007-01-21 Chong Yidong <cyd@stupidchicken.com>
17
18 * xdisp.c (try_window): Revert previous change.
19
20 * dispnew.c (update_text_area): Revert 2006-09-17 change.
21 Always redraw non-mode-line rows with mouse-face.
22
232007-01-20 Chong Yidong <cyd@stupidchicken.com>
24
25 * xdisp.c (try_window): Clear mouse-face highlights first.
26
27 * window.c (set_window_buffer): Revert 2006-11-22 change.
28
292007-01-20 Eli Zaretskii <eliz@gnu.org>
30
31 * .gdbinit (ppt, xtype, xmisctype, xint, xptr, xmarker, xframe)
32 (xbuffer, xcons, xcar, xcdr): Fix doc strings.
33
342007-01-20 Chong Yidong <cyd@stupidchicken.com>
35
36 * keyboard.c (read_key_sequence): Extract local map only if the
37 given position is in an accessible buffer region.
38
392007-01-19 Nick Roberts <nickrob@snap.net.nz>
40
41 * .gdbinit: Reformat documentation so that first sentence
42 displays properly with "help user-defined" (like apropos).
43
442007-01-18 Bruno Haible <bruno@clisp.org> (tiny change)
45
46 * epaths.in: Move PATH_DOC from local/info to local/share/info.
47
482007-01-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
49
50 * macmenu.c (create_and_show_dialog) [TARGET_API_MAC_CARBON]:
51 Create movable modal window instead of movable alert window.
52 (create_and_show_dialog) [!MAC_OSX]: Use DeactivateControl instead
53 of DisableControl.
54
55 * macselect.c (Fmac_resume_apple_event): Set error number when
56 descriptor type of reply is non-null.
57
582007-01-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
59
60 * macmenu.c (create_and_show_dialog) [TARGET_API_MAC_CARBON]: Use
61 DisableControl for disabled items. Set default button to first
62 enabled one. Use icon of application in execution.
63
642007-01-13 Eli Zaretskii <eliz@gnu.org>
65
66 * process.c (Fdelete_process, Fprocess_id, sigchld_handler):
67 Copy PID into EMACS_INT to avoid GCC warnings.
68
69 * fns.c (maybe_resize_hash_table): Copy new size of hash table
70 into EMACS_INT to avoid GCC warnings.
71
72 * editfns.c (Fuser_uid, Fuser_real_uid): Copy values returned by
73 geteuid and getuid into EMACS_INT to avoid GCC warnings.
74
75 * dired.c (Ffile_attributes): Fix last change.
76
772007-01-12 Eli Zaretskii <eliz@gnu.org>
78
79 * dired.c (Ffile_attributes): Copy some members of `struct stat'
80 into int's to avoid GCC warnings about limited range of short in
81 arguments to FIXNUM_OVERFLOW_P.
82
832007-01-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
84
85 * macmenu.c (HAVE_DIALOGS): Define if TARGET_API_MAC_CARBON.
86 (mac_handle_dialog_event, install_dialog_event_handler)
87 (create_and_show_dialog) [TARGET_API_MAC_CARBON]: New functions.
88 (DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN, DIALOG_RIGHT_MARGIN)
89 (DIALOG_BOTTOM_MARGIN, DIALOG_MIN_INNER_WIDTH)
90 (DIALOG_MAX_INNER_WIDTH, DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE)
91 (DIALOG_BUTTON_BUTTON_VERTICAL_SPACE, DIALOG_BUTTON_MIN_WIDTH)
92 (DIALOG_TEXT_MIN_HEIGHT, DIALOG_TEXT_BUTTONS_VERTICAL_SPACE)
93 (DIALOG_ICON_WIDTH, DIALOG_ICON_HEIGHT, DIALOG_ICON_LEFT_MARGIN)
94 (DIALOG_ICON_TOP_MARGIN) [TARGET_API_MAC_CARBON]: New macros.
95 (mac_dialog) [TARGET_API_MAC_CARBON]: Remove function.
96 (mac_dialog_show) [TARGET_API_MAC_CARBON]: Use create_and_show_dialog.
97
98 * macterm.c (x_free_frame_resources) [USE_CG_DRAWING]: Call
99 mac_prepare_for_quickdraw.
100 (quit_char, make_ctrl_char) [TARGET_API_MAC_CARBON]: Move externs
101 outside #ifdef MAC_OSX.
102 (mac_quit_char_key_p) [TARGET_API_MAC_CARBON]: Move function
103 outside #ifdef MAC_OSX.
104 (mac_check_bundle) [MAC_OSX]: Remove unused function.
105
106 * macterm.h (mac_quit_char_key_p): Move extern outside #ifdef MAC_OSX.
107 (HOURGLASS_WIDTH, HOURGLASS_HEIGHT): Parenthesize definitions.
108
1092007-01-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
110
111 * alloc.c (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Use pthread_equal,
112 block/unblock SIGIO.
113
1142007-01-10 Stefan Monnier <monnier@iro.umontreal.ca>
115
116 * editfns.c (Fformat): Allow integer-format to work with floats of size
117 larger than most-positive-fixnum (but still smaller than MAXINT).
118
119 * dired.c (Ffile_attributes): Use floats for large uids/gids.
120
1212007-01-09 Eli Zaretskii <eliz@gnu.org>
122
123 * emacs.c (syms_of_emacs) <path-separator>: Doc fix.
124
1252007-01-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
126
127 * callproc.c (Fcall_process_region) [HAVE_MKSTEMP]: Add BLOCK_INPUT
128 around mkstemp.
129
130 * image.c (XDrawLine) [MAC_OS]: Remove macro.
131 (XCreateGC_pixmap) [!HAVE_NTGUI]: Likewise.
132 (x_disable_image) [!HAVE_NTGUI]: Use XCreateGC instead of
133 XCreateGC_pixmap.
134
135 * macgui.h (Display): Typedef to opaque type.
136
137 * macmenu.c (mac_dialog_modal_filter) [MAC_OSX]: New function.
138 (Fx_popup_dialog) [MAC_OSX]: Use standard alert if called from
139 Fmessage_box, Fyes_or_no_p, or Fy_or_n_p.
140 [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030] (menu_quit_handler):
141 Use mac_quit_char_key_p.
142
143 * macterm.c (XDrawLine): Rename from mac_draw_line_to_pixmap.
144 (XCreateGC): Change type of 2nd argument to void *.
145 (XFreeGC) [USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
146 Fix last change.
147 (mac_to_emacs_modifiers): Change return type to int.
148 [USE_CARBON_EVENTS] (mac_event_to_emacs_modifiers): Likewise.
149 (mac_mapped_modifiers): New function.
150 (XTread_socket): Use it.
151 [USE_TSM] (mac_handle_text_input_event): Likewise.
152 (do_window_update) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw.
153 (mac_quit_char_modifiers, mac_quit_char_keycode) [MAC_OSX]:
154 Remove variables.
155 (mac_determine_quit_char_modifiers, init_quit_char_handler)
156 [MAC_OSX]: Remove functions.
157 (make_ctrl_char) [MAC_OSX]: Add extern.
158 (mac_quit_char_key_p) [MAC_OSX]: New function.
159 (mac_initialize) [MAC_OSX]: Don't call init_quit_char_handler.
160
161 * macterm.h (FONT_MAX_WIDTH): Remove unused macro.
162 (XCreateGC): Change type in extern.
163 (XDrawLine): Rename from mac_draw_line_to_pixmap.
164 (mac_quit_char_key_p) [MAC_OSX]: Add extern.
165
1662007-01-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
167
168 * keyboard.c (init_keyboard): Initialize interrupt_input_blocked and
169 interrupt_input_pending.
170
171 * xterm.h (x_display_info): New: net_supported_atoms,
172 nr_net_supported_atoms and net_supported_window.
173
174 * xterm.c (last_user_time): New variable.
175 (handle_one_xevent): Set last_user_time from events that have Time.
176 Set net_supported_window to 0 when reparented.
177 (wm_supports): New function.
178 (do_ewmh_fullscreen): Use wm_supports to check for _NET_WM_STATE.
179 (x_term_init): Initialize net_supported_atoms, nr_net_supported_atoms
180 and net_supported_window.
181
1822007-01-05 Kim F. Storm <storm@cua.dk>
183
184 * indent.c (Fvertical_motion): Fix it overshoot check for overlay
185 strings without embedded newlines immediately followed by newline.
186
1872007-01-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
188
189 * editfns.c (Fformat_time_string, Fdecode_time, Fencode_time)
190 (Fcurrent_time_string, Fcurrent_time_zone): Add BLOCK_INPUT around
191 gmtime/localtime/emacs_memftimeu/mktime.
192
193 * mac.c (Fmac_set_file_creator): Use MAC_EMACS_CREATOR_CODE
194 instead of 'EMAx'.
195 [!MAC_OSX] (sys_open, sys_creat, sys_fopen): Likewise.
196
197 * macgui.h (struct _XGC) [USE_CG_DRAWING
198 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: New members cg_fore_color
199 and cg_back_color.
200
201 * macmenu.c (Vshow_help_function) [TARGET_API_MAC_CARBON]: Add extern.
202 (restore_show_help_function, menu_target_item_handler)
203 [TARGET_API_MAC_CARBON]: New functions.
204 (install_menu_target_item_handler): New function.
205 (add_menu_item) [TARGET_API_MAC_CARBON]: Set help string as menu
206 item property.
207
208 * macterm.c (CG_SET_FILL_COLOR_MAYBE_WITH_CGCOLOR)
209 (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
210 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
211 (CG_SET_STROKE_COLOR_MAYBE_WITH_CGCOLOR)
212 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): New macros.
213 (mac_cg_color_space_rgb) [USE_CG_DRAWING]: New variable.
214 (mac_cg_color_black) [USE_CG_DRAWING
215 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: New variable.
216 (init_cg_color) [USE_CG_DRAWING]: New function.
217 (mac_draw_line, mac_draw_rectangle) [USE_CG_DRAWING]: Use
218 CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND instead of CG_SET_STROKE_COLOR.
219 (mac_erase_rectangle, mac_clear_window, mac_draw_cg_image)
220 (mac_fill_rectangle, mac_draw_image_string_cg) [USE_CG_DRAWING]:
221 Use CG_SET_FILL_COLOR_WITH_GC_FOREGROUND or
222 CG_SET_FILL_COLOR_WITH_GC_BACKGROUND instead of CG_SET_FILL_COLOR.
223 (mac_draw_string_common) [MAC_OSX && USE_ATSUI]: Likewise.
224 (XCreateGC, XFreeGC, XSetForeground, XSetBackground) [USE_CG_DRAWING
225 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: Use gc->cg_fore_color and/or
226 gc->cg_back_color.
227 (install_drag_handler, remove_drag_handler): Make extern.
228 (install_menu_target_item_handler): Add extern.
229 (install_window_handler): Call install_menu_target_item_handler.
230 [MAC_OS8] (main): Use MAC_EMACS_CREATOR_CODE instead of 'EMAx'.
231 (mac_initialize) [USE_CG_DRAWING]: Call init_cg_color.
232
233 * macterm.h (MAC_EMACS_CREATOR_CODE): New enumerator.
234
2352007-01-04 Juanma Barranquero <lekktu@gmail.com>
236
237 * window.c (Fwindow_end): Fix use of >= operator.
238
2392007-01-03 Richard Stallman <rms@gnu.org>
240
241 * window.c (Fwindow_end): Check BUF_OVERLAY_MODIFF like BUF_MODIFF.
242
2432007-01-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
244
245 * gtkutil.h (xg_menu_item_cb_data_): Remove highlight_id and
246 unhighlight_id.
247
248 * gtkutil.c (menuitem_highlight_callback): Invoked widget is the
249 parent of the menu item. Get menu item widget from event.
250 (xg_create_one_menuitem, xg_update_menu_item): highlight_id and
251 unhighlight_id has been removed.
252 (create_menus): Connect enter/leave-notify-event to the menu instead
253 of individual items.
254
12006-12-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 2552006-12-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 256
3 * gtkutil.c (update_frame_tool_bar): Connect create-menu-proxy with 257 * gtkutil.c (update_frame_tool_bar): Connect create-menu-proxy with
@@ -75,8 +329,8 @@
75 329
762006-12-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 3302006-12-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
77 331
78 * macfns.c (mac_update_title_bar) [TARGET_API_MAC_CARBON]: Call 332 * macfns.c (mac_update_title_bar) [TARGET_API_MAC_CARBON]:
79 mac_update_proxy_icon also when buffer modification flag changed. 333 Call mac_update_proxy_icon also when buffer modification flag changed.
80 [TARGET_API_MAC_CARBON] (mac_update_proxy_icon): Don't update alias, 334 [TARGET_API_MAC_CARBON] (mac_update_proxy_icon): Don't update alias,
81 but compare FSRef/FSSpec of resolved alias. 335 but compare FSRef/FSSpec of resolved alias.
82 336
@@ -169,8 +423,8 @@
169 (Fmac_atsu_font_face_attributes) [USE_ATSUI]: New function. 423 (Fmac_atsu_font_face_attributes) [USE_ATSUI]: New function.
170 (syms_of_macfns) [USE_ATSUI]: Defsubr it. 424 (syms_of_macfns) [USE_ATSUI]: Defsubr it.
171 425
172 * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Use 426 * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag):
173 mac_wakeup_from_rne instead of mac_post_mouse_moved_event. 427 Use mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
174 428
175 * macterm.c (mac_query_char_extents) [USE_ATSUI]: Don't call 429 * macterm.c (mac_query_char_extents) [USE_ATSUI]: Don't call
176 ATSUGetGlyphBounds if not necessary. 430 ATSUGetGlyphBounds if not necessary.
@@ -183,8 +437,8 @@
183 (mac_load_query_font) [USE_ATSUI]: Use atsu_find_font_from_family_name. 437 (mac_load_query_font) [USE_ATSUI]: Use atsu_find_font_from_family_name.
184 Don't get metrics for Latin-1 right half characters. 438 Don't get metrics for Latin-1 right half characters.
185 (mac_load_query_font): Don't load font if space width is not positive. 439 (mac_load_query_font): Don't load font if space width is not positive.
186 [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): Use 440 [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event):
187 mac_wakeup_from_rne instead of mac_post_mouse_moved_event. 441 Use mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
188 (XTread_socket): Call SelectWindow when unfocused frame is clicked. 442 (XTread_socket): Call SelectWindow when unfocused frame is clicked.
189 443
190 * macterm.h (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: Add extern. 444 * macterm.h (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: Add extern.
@@ -26933,7 +27187,7 @@ See ChangeLog.9 for earlier changes.
26933;; End: 27187;; End:
26934 27188
26935 Copyright (C) 2001, 2002, 2003, 2004, 2005, 27189 Copyright (C) 2001, 2002, 2003, 2004, 2005,
26936 2006 Free Software Foundation, Inc. 27190 2006, 2007 Free Software Foundation, Inc.
26937 Copying and distribution of this file, with or without modification, 27191 Copying and distribution of this file, with or without modification,
26938 are permitted provided the copyright notice and this notice are preserved. 27192 are permitted provided the copyright notice and this notice are preserved.
26939 27193
diff --git a/src/ChangeLog.1 b/src/ChangeLog.1
index 94f1039f71e..4aaa3202dd6 100644
--- a/src/ChangeLog.1
+++ b/src/ChangeLog.1
@@ -3522,7 +3522,8 @@
3522 * minibuf.c: Don't allow entry to minibuffer 3522 * minibuf.c: Don't allow entry to minibuffer
3523 while minibuffer is selected. 3523 while minibuffer is selected.
3524 3524
3525 Copyright (C) 1985, 1986 Free Software Foundation, Inc. 3525 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007
3526 Free Software Foundation, Inc.
3526 Copying and distribution of this file, with or without modification, 3527 Copying and distribution of this file, with or without modification,
3527 are permitted provided the copyright notice and this notice are preserved. 3528 are permitted provided the copyright notice and this notice are preserved.
3528 3529
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2
index 430cbc0f9da..75dd37940d0 100644
--- a/src/ChangeLog.2
+++ b/src/ChangeLog.2
@@ -4771,7 +4771,8 @@
4771 4771
4772See ChangeLog.1 for earlier changes. 4772See ChangeLog.1 for earlier changes.
4773 4773
4774 Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc. 4774 Copyright (C) 1986, 1987, 1988, 2001, 2002, 2003, 2004, 2005, 2006,
4775 2007 Free Software Foundation, Inc.
4775 Copying and distribution of this file, with or without modification, 4776 Copying and distribution of this file, with or without modification,
4776 are permitted provided the copyright notice and this notice are preserved. 4777 are permitted provided the copyright notice and this notice are preserved.
4777 4778
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index 73f87793541..bde54ff99f9 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -16531,7 +16531,8 @@
16531 16531
16532See ChangeLog.2 for earlier changes. 16532See ChangeLog.2 for earlier changes.
16533 16533
16534 Copyright (C) 1993 Free Software Foundation, Inc. 16534 Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007
16535 Free Software Foundation, Inc.
16535 Copying and distribution of this file, with or without modification, 16536 Copying and distribution of this file, with or without modification,
16536 are permitted provided the copyright notice and this notice are preserved. 16537 are permitted provided the copyright notice and this notice are preserved.
16537 16538
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4
index b3d40b96b6c..04310b34cad 100644
--- a/src/ChangeLog.4
+++ b/src/ChangeLog.4
@@ -6903,7 +6903,8 @@
6903 6903
6904See ChangeLog.3 for earlier changes. 6904See ChangeLog.3 for earlier changes.
6905 6905
6906 Copyright (C) 1993, 1994 Free Software Foundation, Inc. 6906 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007
6907 Free Software Foundation, Inc.
6907 Copying and distribution of this file, with or without modification, 6908 Copying and distribution of this file, with or without modification,
6908 are permitted provided the copyright notice and this notice are preserved. 6909 are permitted provided the copyright notice and this notice are preserved.
6909 6910
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5
index 5e50066bc78..893a6497996 100644
--- a/src/ChangeLog.5
+++ b/src/ChangeLog.5
@@ -7144,7 +7144,8 @@
7144 7144
7145See ChangeLog.4 for earlier changes. 7145See ChangeLog.4 for earlier changes.
7146 7146
7147 Copyright (C) 1994, 1995 Free Software Foundation, Inc. 7147 Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007
7148 Free Software Foundation, Inc.
7148 Copying and distribution of this file, with or without modification, 7149 Copying and distribution of this file, with or without modification,
7149 are permitted provided the copyright notice and this notice are preserved. 7150 are permitted provided the copyright notice and this notice are preserved.
7150 7151
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index 2da83619eb4..fb29238601a 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -5362,7 +5362,8 @@
5362 5362
5363See ChangeLog.5 for earlier changes. 5363See ChangeLog.5 for earlier changes.
5364 5364
5365 Copyright (C) 1995, 1996 Free Software Foundation, Inc. 5365 Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007
5366 Free Software Foundation, Inc.
5366 Copying and distribution of this file, with or without modification, 5367 Copying and distribution of this file, with or without modification,
5367 are permitted provided the copyright notice and this notice are preserved. 5368 are permitted provided the copyright notice and this notice are preserved.
5368 5369
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7
index f1a29903715..c38cb1fc9ca 100644
--- a/src/ChangeLog.7
+++ b/src/ChangeLog.7
@@ -11098,7 +11098,8 @@ Fri Sep 20 02:37:37 1996 Marcus Daniels <marcus@sayre.sysc.pdx.edu>
11098 11098
11099See ChangeLog.6 for earlier changes. 11099See ChangeLog.6 for earlier changes.
11100 11100
11101 Copyright (C) 1997, 1998 Free Software Foundation, Inc. 11101 Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007
11102 Free Software Foundation, Inc.
11102 Copying and distribution of this file, with or without modification, 11103 Copying and distribution of this file, with or without modification,
11103 are permitted provided the copyright notice and this notice are preserved. 11104 are permitted provided the copyright notice and this notice are preserved.
11104 11105
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8
index a9465058194..ff6b3b25461 100644
--- a/src/ChangeLog.8
+++ b/src/ChangeLog.8
@@ -13991,7 +13991,8 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org>
13991 13991
13992See ChangeLog.7 for earlier changes. 13992See ChangeLog.7 for earlier changes.
13993 13993
13994 Copyright (C) 1999 Free Software Foundation, Inc. 13994 Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
13995 Free Software Foundation, Inc.
13995 Copying and distribution of this file, with or without modification, 13996 Copying and distribution of this file, with or without modification,
13996 are permitted provided the copyright notice and this notice are preserved. 13997 are permitted provided the copyright notice and this notice are preserved.
13997 13998
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9
index 9ce75696f5a..2a644e13585 100644
--- a/src/ChangeLog.9
+++ b/src/ChangeLog.9
@@ -13294,7 +13294,8 @@ See ChangeLog.8 for earlier changes.
13294;; coding: iso-2022-7bit 13294;; coding: iso-2022-7bit
13295;; End: 13295;; End:
13296 13296
13297 Copyright (C) 2001, 2002 Free Software Foundation, Inc. 13297 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
13298 Free Software Foundation, Inc.
13298 Copying and distribution of this file, with or without modification, 13299 Copying and distribution of this file, with or without modification,
13299 are permitted provided the copyright notice and this notice are preserved. 13300 are permitted provided the copyright notice and this notice are preserved.
13300 13301
diff --git a/src/Makefile.in b/src/Makefile.in
index 87352d74830..3e6d39246f6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,6 +1,6 @@
1# Makefile for GNU Emacs. 1# Makefile for GNU Emacs.
2# Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2# Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
3# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6 6
diff --git a/src/abbrev.c b/src/abbrev.c
index 2d95b881bc5..8e9bd143089 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -1,6 +1,6 @@
1/* Primitives for word-abbrev mode. 1/* Primitives for word-abbrev mode.
2 Copyright (C) 1985, 1986, 1993, 1996, 1998, 2001, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1993, 1996, 1998, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/alloc.c b/src/alloc.c
index 8ebaac74c08..b6ad5545f34 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1,6 +1,6 @@
1/* Storage allocation and gc for GNU Emacs Lisp interpreter. 1/* Storage allocation and gc for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, 2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -127,21 +127,21 @@ extern __malloc_size_t __malloc_extra_blocks;
127 127
128static pthread_mutex_t alloc_mutex; 128static pthread_mutex_t alloc_mutex;
129 129
130#define BLOCK_INPUT_ALLOC \ 130#define BLOCK_INPUT_ALLOC \
131 do \ 131 do \
132 { \ 132 { \
133 if (pthread_self () == main_thread) \ 133 if (pthread_equal (pthread_self (), main_thread)) \
134 BLOCK_INPUT; \ 134 sigblock (sigmask (SIGIO)); \
135 pthread_mutex_lock (&alloc_mutex); \ 135 pthread_mutex_lock (&alloc_mutex); \
136 } \ 136 } \
137 while (0) 137 while (0)
138#define UNBLOCK_INPUT_ALLOC \ 138#define UNBLOCK_INPUT_ALLOC \
139 do \ 139 do \
140 { \ 140 { \
141 pthread_mutex_unlock (&alloc_mutex); \ 141 pthread_mutex_unlock (&alloc_mutex); \
142 if (pthread_self () == main_thread) \ 142 if (pthread_equal (pthread_self (), main_thread)) \
143 UNBLOCK_INPUT; \ 143 sigunblock (sigmask (SIGIO)); \
144 } \ 144 } \
145 while (0) 145 while (0)
146 146
147#else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */ 147#else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */
diff --git a/src/atimer.c b/src/atimer.c
index 8b092270d7b..41dd9e53a02 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -1,6 +1,6 @@
1/* Asynchronous timers. 1/* Asynchronous timers.
2 Copyright (C) 2000, 2002, 2003, 2004, 2005, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/atimer.h b/src/atimer.h
index 84b1383ffdf..8c3b388d012 100644
--- a/src/atimer.h
+++ b/src/atimer.h
@@ -1,6 +1,6 @@
1/* Asynchronous timers. 1/* Asynchronous timers.
2 Copyright (C) 2000, 2002, 2003, 2004, 2005, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/blockinput.h b/src/blockinput.h
index 78dce69fe1f..fcaa64723bc 100644
--- a/src/blockinput.h
+++ b/src/blockinput.h
@@ -1,6 +1,6 @@
1/* blockinput.h - interface to blocking complicated interrupt-driven input. 1/* blockinput.h - interface to blocking complicated interrupt-driven input.
2 Copyright (C) 1989, 1993, 2002, 2003, 2004, 2 Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/buffer.c b/src/buffer.c
index 6e3b39ad2bb..2361cce3882 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,7 +1,7 @@
1/* Buffer manipulation primitives for GNU Emacs. 1/* Buffer manipulation primitives for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994,
3 1995, 1997, 1998, 1999, 2000, 2001, 2002, 3 1995, 1997, 1998, 1999, 2000, 2001, 2002,
4 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 4 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/buffer.h b/src/buffer.h
index 96db95a57e4..7ee5d921419 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1,6 +1,6 @@
1/* Header file for the buffer manipulation primitives. 1/* Header file for the buffer manipulation primitives.
2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/bytecode.c b/src/bytecode.c
index 6476070be5d..999addc2f0a 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1,6 +1,6 @@
1/* Execution of byte code produced by bytecomp.el. 1/* Execution of byte code produced by bytecomp.el.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/callint.c b/src/callint.c
index 68cfdfc7aa6..39b2046e8fc 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -1,6 +1,6 @@
1/* Call a Lisp function interactively. 1/* Call a Lisp function interactively.
2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 2000, 2002, 2003, 2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/callproc.c b/src/callproc.c
index 819e7ff4a32..6af47f0ed3e 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1,6 +1,6 @@
1/* Synchronous subprocess invocation for GNU Emacs. 1/* Synchronous subprocess invocation for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -992,7 +992,11 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
992 992
993#ifdef HAVE_MKSTEMP 993#ifdef HAVE_MKSTEMP
994 { 994 {
995 int fd = mkstemp (tempfile); 995 int fd;
996
997 BLOCK_INPUT;
998 fd = mkstemp (tempfile);
999 UNBLOCK_INPUT;
996 if (fd == -1) 1000 if (fd == -1)
997 report_file_error ("Failed to open temporary file", 1001 report_file_error ("Failed to open temporary file",
998 Fcons (Vtemp_file_name_pattern, Qnil)); 1002 Fcons (Vtemp_file_name_pattern, Qnil));
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 104f7f97a41..56b21e738ce 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -1,6 +1,6 @@
1/* GNU Emacs case conversion functions. 1/* GNU Emacs case conversion functions.
2 Copyright (C) 1985, 1994, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2 Copyright (C) 1985, 1994, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/casetab.c b/src/casetab.c
index 517f24de014..2245e8e8b4a 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -1,6 +1,6 @@
1/* GNU Emacs routines to deal with case tables. 1/* GNU Emacs routines to deal with case tables.
2 Copyright (C) 1993, 1994, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/category.c b/src/category.c
index 4d19d4a6ccd..218d5f7f783 100644
--- a/src/category.c
+++ b/src/category.c
@@ -1,7 +1,8 @@
1/* GNU Emacs routines to deal with category tables. 1/* GNU Emacs routines to deal with category tables.
2 Copyright (C) 1998, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007
3 Free Software Foundation, Inc.
3 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 5 2005, 2006, 2007
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/category.h b/src/category.h
index 86257635226..3ce03a83de8 100644
--- a/src/category.h
+++ b/src/category.h
@@ -1,6 +1,6 @@
1/* Declarations having to do with Emacs category tables. 1/* Declarations having to do with Emacs category tables.
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 3 2005, 2006, 2007
4 National Institute of Advanced Industrial Science and Technology (AIST) 4 National Institute of Advanced Industrial Science and Technology (AIST)
5 Registration Number H14PRO021 5 Registration Number H14PRO021
6 Copyright (C) 2003 6 Copyright (C) 2003
diff --git a/src/ccl.c b/src/ccl.c
index 017c9ab4feb..c13f7c863b1 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -1,8 +1,8 @@
1/* CCL (Code Conversion Language) interpreter. 1/* CCL (Code Conversion Language) interpreter.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006 5 2005, 2006, 2007
6 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
7 Registration Number H14PRO021 7 Registration Number H14PRO021
8 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/ccl.h b/src/ccl.h
index 01d92b621eb..e1c14e71754 100644
--- a/src/ccl.h
+++ b/src/ccl.h
@@ -1,6 +1,6 @@
1/* Header for CCL (Code Conversion Language) interpreter. 1/* Header for CCL (Code Conversion Language) interpreter.
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 3 2005, 2006, 2007
4 National Institute of Advanced Industrial Science and Technology (AIST) 4 National Institute of Advanced Industrial Science and Technology (AIST)
5 Registration Number H14PRO021 5 Registration Number H14PRO021
6 Copyright (C) 2003 6 Copyright (C) 2003
diff --git a/src/charset.c b/src/charset.c
index 9fb7f641705..d5b15092b7b 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1,10 +1,11 @@
1/* Basic character set support. 1/* Basic character set support.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006 5 2005, 2006, 2007
6 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
7 Registration Number H14PRO021 7 Registration Number H14PRO021
8
8 Copyright (C) 2003, 2004 9 Copyright (C) 2003, 2004
9 National Institute of Advanced Industrial Science and Technology (AIST) 10 National Institute of Advanced Industrial Science and Technology (AIST)
10 Registration Number H13PRO009 11 Registration Number H13PRO009
diff --git a/src/charset.h b/src/charset.h
index e7aaf9d6194..8c76aa06071 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -1,10 +1,11 @@
1/* Header for charset handler. 1/* Header for charset handler.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006 5 2005, 2006, 2007
6 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
7 Registration Number H14PRO021 7 Registration Number H14PRO021
8
8 Copyright (C) 2003 9 Copyright (C) 2003
9 National Institute of Advanced Industrial Science and Technology (AIST) 10 National Institute of Advanced Industrial Science and Technology (AIST)
10 Registration Number H13PRO009 11 Registration Number H13PRO009
diff --git a/src/cm.c b/src/cm.c
index dd25c112630..da984f0b82d 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -1,6 +1,6 @@
1/* Cursor motion subroutines for GNU Emacs. 1/* Cursor motion subroutines for GNU Emacs.
2 Copyright (C) 1985, 1995, 2002, 2003, 2004, 2 Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 based primarily on public domain code written by Chris Torek 4 based primarily on public domain code written by Chris Torek
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
diff --git a/src/cm.h b/src/cm.h
index c94c0d43597..d77ba582f74 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -1,6 +1,6 @@
1/* Cursor motion calculation definitions for GNU Emacs 1/* Cursor motion calculation definitions for GNU Emacs
2 Copyright (C) 1985, 1989, 2002, 2003, 2004, 2 Copyright (C) 1985, 1989, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/cmds.c b/src/cmds.c
index 096b63dd453..e8f775d9c35 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -1,6 +1,6 @@
1/* Simple built-in editing commands. 1/* Simple built-in editing commands.
2 Copyright (C) 1985, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2 Copyright (C) 1985, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/coding.c b/src/coding.c
index 50c63b4beb8..aa58884fded 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1,8 +1,8 @@
1/* Coding system handler (conversion, detection, etc). 1/* Coding system handler (conversion, detection, etc).
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006 5 2005, 2006, 2007
6 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
7 Registration Number H14PRO021 7 Registration Number H14PRO021
8 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/coding.h b/src/coding.h
index 0f8d2b0ed7b..f33e8335752 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -1,8 +1,8 @@
1/* Header for coding system handler. 1/* Header for coding system handler.
2 Copyright (C) 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006 5 2005, 2006, 2007
6 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
7 Registration Number H14PRO021 7 Registration Number H14PRO021
8 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/commands.h b/src/commands.h
index 5c7cad37407..2d0db0ec13c 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -1,6 +1,6 @@
1/* Definitions needed by most editing commands. 1/* Definitions needed by most editing commands.
2 Copyright (C) 1985, 1994, 2002, 2003, 2004, 2 Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/composite.c b/src/composite.c
index 1ccd3af2515..d44acf24722 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1,7 +1,7 @@
1/* Composite sequence support. 1/* Composite sequence support.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 4 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
5 National Institute of Advanced Industrial Science and Technology (AIST) 5 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 6 Registration Number H14PRO021
7 Copyright (C) 2003, 2006 7 Copyright (C) 2003, 2006
diff --git a/src/composite.h b/src/composite.h
index 6e600e7a29b..5106fcc990f 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -1,7 +1,7 @@
1/* Header for composite sequence handler. 1/* Header for composite sequence handler.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 4 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
5 National Institute of Advanced Industrial Science and Technology (AIST) 5 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 6 Registration Number H14PRO021
7 Copyright (C) 2003, 2006 7 Copyright (C) 2003, 2006
diff --git a/src/config.in b/src/config.in
index 8ee525a611b..7c94952463b 100644
--- a/src/config.in
+++ b/src/config.in
@@ -1,7 +1,7 @@
1/* src/config.in. Generated from configure.in by autoheader. */ 1/* src/config.in. Generated from configure.in by autoheader. */
2 2
3/* GNU Emacs site configuration template file. 3/* GNU Emacs site configuration template file.
4 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006 4 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007
5 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
diff --git a/src/cxux-crt0.s b/src/cxux-crt0.s
index b05faf57b8e..9a359a44955 100644
--- a/src/cxux-crt0.s
+++ b/src/cxux-crt0.s
@@ -1,7 +1,7 @@
1/* 1/*
2 * External symbol setup file for GNU Emacs on CX/UX 2 * External symbol setup file for GNU Emacs on CX/UX
3 * Copyright (C) 1990, 2002, 2003, 2004, 2005, 3 * Copyright (C) 1990, 2002, 2003, 2004, 2005,
4 * 2006 Free Software Foundation, Inc. 4 * 2006, 2007 Free Software Foundation, Inc.
5 * 5 *
6 * This file is part of GNU Emacs. 6 * This file is part of GNU Emacs.
7 * 7 *
diff --git a/src/data.c b/src/data.c
index 120a92d66d7..af166329f81 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,6 +1,6 @@
1/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. 1/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/dired.c b/src/dired.c
index 3283d38eb4b..27f9f953eb6 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1,6 +1,6 @@
1/* Lisp functions for making directory listings. 1/* Lisp functions for making directory listings.
2 Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2 Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -931,6 +931,7 @@ Elements of the attribute list are:
931 char modes[10]; 931 char modes[10];
932 Lisp_Object handler; 932 Lisp_Object handler;
933 struct gcpro gcpro1; 933 struct gcpro gcpro1;
934 EMACS_INT uid, gid, ino;
934 935
935 filename = Fexpand_file_name (filename, Qnil); 936 filename = Fexpand_file_name (filename, Qnil);
936 937
@@ -965,18 +966,26 @@ Elements of the attribute list are:
965#endif 966#endif
966 } 967 }
967 values[1] = make_number (s.st_nlink); 968 values[1] = make_number (s.st_nlink);
969 /* When make_fixnum_or_float is called below with types that are
970 shorter than an int (e.g., `short'), GCC whines about comparison
971 being always false due to limited range of data type. Fix by
972 copying s.st_uid and s.st_gid into int variables. */
973 uid = s.st_uid;
974 gid = s.st_gid;
968 if (NILP (id_format) || EQ (id_format, Qinteger)) 975 if (NILP (id_format) || EQ (id_format, Qinteger))
969 { 976 {
970 values[2] = make_number (s.st_uid); 977 values[2] = make_fixnum_or_float (uid);
971 values[3] = make_number (s.st_gid); 978 values[3] = make_fixnum_or_float (gid);
972 } 979 }
973 else 980 else
974 { 981 {
975 BLOCK_INPUT; 982 BLOCK_INPUT;
976 pw = (struct passwd *) getpwuid (s.st_uid); 983 pw = (struct passwd *) getpwuid (uid);
977 values[2] = (pw ? build_string (pw->pw_name) : make_number (s.st_uid)); 984 values[2] = (pw ? build_string (pw->pw_name)
978 gr = (struct group *) getgrgid (s.st_gid); 985 : make_fixnum_or_float (uid));
979 values[3] = (gr ? build_string (gr->gr_name) : make_number (s.st_gid)); 986 gr = (struct group *) getgrgid (gid);
987 values[3] = (gr ? build_string (gr->gr_name)
988 : make_fixnum_or_float (gid));
980 UNBLOCK_INPUT; 989 UNBLOCK_INPUT;
981 } 990 }
982 values[4] = make_time (s.st_atime); 991 values[4] = make_time (s.st_atime);
@@ -998,20 +1007,22 @@ Elements of the attribute list are:
998 if (! NILP (dirname)) 1007 if (! NILP (dirname))
999 encoded = ENCODE_FILE (dirname); 1008 encoded = ENCODE_FILE (dirname);
1000 if (! NILP (dirname) && stat (SDATA (encoded), &sdir) == 0) 1009 if (! NILP (dirname) && stat (SDATA (encoded), &sdir) == 0)
1001 values[9] = (sdir.st_gid != s.st_gid) ? Qt : Qnil; 1010 values[9] = (sdir.st_gid != gid) ? Qt : Qnil;
1002 else /* if we can't tell, assume worst */ 1011 else /* if we can't tell, assume worst */
1003 values[9] = Qt; 1012 values[9] = Qt;
1004#else /* file gid will be egid */ 1013#else /* file gid will be egid */
1005 values[9] = (s.st_gid != getegid ()) ? Qt : Qnil; 1014 values[9] = (gid != getegid ()) ? Qt : Qnil;
1006#endif /* BSD4_2 (or BSD4_3) */ 1015#endif /* BSD4_2 (or BSD4_3) */
1007 if (FIXNUM_OVERFLOW_P (s.st_ino)) 1016 /* Shut up GCC warnings in FIXNUM_OVERFLOW_P below. */
1017 ino = s.st_ino;
1018 if (FIXNUM_OVERFLOW_P (ino))
1008 /* To allow inode numbers larger than VALBITS, separate the bottom 1019 /* To allow inode numbers larger than VALBITS, separate the bottom
1009 16 bits. */ 1020 16 bits. */
1010 values[10] = Fcons (make_number (s.st_ino >> 16), 1021 values[10] = Fcons (make_number (ino >> 16),
1011 make_number (s.st_ino & 0xffff)); 1022 make_number (ino & 0xffff));
1012 else 1023 else
1013 /* But keep the most common cases as integers. */ 1024 /* But keep the most common cases as integers. */
1014 values[10] = make_number (s.st_ino); 1025 values[10] = make_number (ino);
1015 1026
1016 /* Likewise for device. */ 1027 /* Likewise for device. */
1017 if (FIXNUM_OVERFLOW_P (s.st_dev)) 1028 if (FIXNUM_OVERFLOW_P (s.st_dev))
diff --git a/src/dispextern.h b/src/dispextern.h
index 5eb7ee11dea..e2ad4b73e5a 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1,6 +1,6 @@
1/* Interface definitions for display code. 1/* Interface definitions for display code.
2 Copyright (C) 1985, 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2 Copyright (C) 1985, 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/dispnew.c b/src/dispnew.c
index e554eb1cd7e..ccda3eca550 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1,7 +1,7 @@
1/* Updating of data structures for redisplay. 1/* Updating of data structures for redisplay.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 3 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 2004, 2005, 2006 Free Software Foundation, Inc. 4 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -4391,12 +4391,12 @@ update_text_area (w, vpos)
4391 || desired_row->phys_height != current_row->phys_height 4391 || desired_row->phys_height != current_row->phys_height
4392 || desired_row->visible_height != current_row->visible_height 4392 || desired_row->visible_height != current_row->visible_height
4393 || current_row->overlapped_p 4393 || current_row->overlapped_p
4394#if 0 4394 /* This next line is necessary for correctly redrawing
4395 /* This causes excessive flickering when mouse is moved across 4395 mouse-face areas after scrolling and other operations.
4396 the mode line. Luckily everything seems to work just fine 4396 However, it causes excessive flickering when mouse is moved
4397 without doing this. KFS 2006-09-17. */ 4397 across the mode line. Luckily, turning it off for the mode
4398 || current_row->mouse_face_p 4398 line doesn't seem to hurt anything. -- cyd. */
4399#endif 4399 || (current_row->mouse_face_p && !current_row->mode_line_p)
4400 || current_row->x != desired_row->x) 4400 || current_row->x != desired_row->x)
4401 { 4401 {
4402 rif->cursor_to (vpos, 0, desired_row->y, desired_row->x); 4402 rif->cursor_to (vpos, 0, desired_row->y, desired_row->x);
diff --git a/src/disptab.h b/src/disptab.h
index 0d7a03c43ba..513150902ad 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -1,6 +1,6 @@
1/* Things for GLYPHS and glyph tables. 1/* Things for GLYPHS and glyph tables.
2 Copyright (C) 1993, 2002, 2003, 2004, 2005, 2 Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/doc.c b/src/doc.c
index ecb0197b3ca..df3ca94af1e 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -1,6 +1,6 @@
1/* Record indices of function doc strings stored in a file. 1/* Record indices of function doc strings stored in a file.
2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/doprnt.c b/src/doprnt.c
index 6e71e261788..d3c8557c251 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -1,8 +1,8 @@
1/* Output like sprintf to a buffer of specified size. 1/* Output like sprintf to a buffer of specified size.
2 Also takes args differently: pass one pointer to an array of strings 2 Also takes args differently: pass one pointer to an array of strings
3 in addition to the format string which is separate. 3 in addition to the format string which is separate.
4 Copyright (C) 1985, 2002, 2003, 2004, 2005, 4 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
5 2006 Free Software Foundation, Inc. 5 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/dosfns.c b/src/dosfns.c
index 37085ebeb5f..801df68ae7e 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -1,7 +1,7 @@
1/* MS-DOS specific Lisp utilities. Coded by Manabu Higashida, 1991. 1/* MS-DOS specific Lisp utilities. Coded by Manabu Higashida, 1991.
2 Major changes May-July 1993 Morten Welinder (only 10% original code left) 2 Major changes May-July 1993 Morten Welinder (only 10% original code left)
3 Copyright (C) 1991, 1993, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 3 Copyright (C) 1991, 1993, 1996, 1997, 1998, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/dosfns.h b/src/dosfns.h
index 4f1cfd83d22..622e7cb5335 100644
--- a/src/dosfns.h
+++ b/src/dosfns.h
@@ -2,8 +2,8 @@
2 Coded by Manabu Higashida, 1991. 2 Coded by Manabu Higashida, 1991.
3 Modified by Morten Welinder, 1993-1994. 3 Modified by Morten Welinder, 1993-1994.
4 4
5 Copyright (C) 1991, 1994, 1995, 1997, 1999, 2002, 2003, 2004, 5 Copyright (C) 1991, 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004,
6 2005, 2006 Free Software Foundation, Inc. 6 2005, 2006, 2007 Free Software Foundation, Inc.
7 7
8This file is part of GNU Emacs. 8This file is part of GNU Emacs.
9 9
diff --git a/src/ecrt0.c b/src/ecrt0.c
index a9b993d360e..7f94f07dc00 100644
--- a/src/ecrt0.c
+++ b/src/ecrt0.c
@@ -1,6 +1,6 @@
1/* C code startup routine. 1/* C code startup routine.
2 Copyright (C) 1985, 1986, 1992, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1992, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/editfns.c b/src/editfns.c
index 79a88604d8c..3e27ca0cf43 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1,7 +1,7 @@
1/* Lisp functions pertaining to editing. 1/* Lisp functions pertaining to editing.
2 Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996, 2 Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996,
3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -1312,7 +1312,10 @@ DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0,
1312Value is an integer or float, depending on the value. */) 1312Value is an integer or float, depending on the value. */)
1313 () 1313 ()
1314{ 1314{
1315 return make_fixnum_or_float (geteuid ()); 1315 /* Assignment to EMACS_INT stops GCC whining about limited range of
1316 data type. */
1317 EMACS_INT euid = geteuid ();
1318 return make_fixnum_or_float (euid);
1316} 1319}
1317 1320
1318DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, 1321DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0,
@@ -1320,7 +1323,10 @@ DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0,
1320Value is an integer or float, depending on the value. */) 1323Value is an integer or float, depending on the value. */)
1321 () 1324 ()
1322{ 1325{
1323 return make_fixnum_or_float (getuid ()); 1326 /* Assignment to EMACS_INT stops GCC whining about limited range of
1327 data type. */
1328 EMACS_INT uid = getuid ();
1329 return make_fixnum_or_float (uid);
1324} 1330}
1325 1331
1326DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, 1332DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0,
@@ -1448,9 +1454,9 @@ most significant 16 bits of the seconds, while the second has the
1448least significant 16 bits. The third integer gives the microsecond 1454least significant 16 bits. The third integer gives the microsecond
1449count. 1455count.
1450 1456
1451On systems that can't determine the run time, get-internal-run-time 1457On systems that can't determine the run time, `get-internal-run-time'
1452does the same thing as current-time. The microsecond count is zero on 1458does the same thing as `current-time'. The microsecond count is zero
1453systems that do not provide resolution finer than a second. */) 1459on systems that do not provide resolution finer than a second. */)
1454 () 1460 ()
1455{ 1461{
1456#ifdef HAVE_GETRUSAGE 1462#ifdef HAVE_GETRUSAGE
@@ -1676,7 +1682,9 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */)
1676 /* This is probably enough. */ 1682 /* This is probably enough. */
1677 size = SBYTES (format_string) * 6 + 50; 1683 size = SBYTES (format_string) * 6 + 50;
1678 1684
1685 BLOCK_INPUT;
1679 tm = ut ? gmtime (&value) : localtime (&value); 1686 tm = ut ? gmtime (&value) : localtime (&value);
1687 UNBLOCK_INPUT;
1680 if (! tm) 1688 if (! tm)
1681 error ("Specified time is not representable"); 1689 error ("Specified time is not representable");
1682 1690
@@ -1688,18 +1696,22 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */)
1688 int result; 1696 int result;
1689 1697
1690 buf[0] = '\1'; 1698 buf[0] = '\1';
1699 BLOCK_INPUT;
1691 result = emacs_memftimeu (buf, size, SDATA (format_string), 1700 result = emacs_memftimeu (buf, size, SDATA (format_string),
1692 SBYTES (format_string), 1701 SBYTES (format_string),
1693 tm, ut); 1702 tm, ut);
1703 UNBLOCK_INPUT;
1694 if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0')) 1704 if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0'))
1695 return code_convert_string_norecord (make_unibyte_string (buf, result), 1705 return code_convert_string_norecord (make_unibyte_string (buf, result),
1696 Vlocale_coding_system, 0); 1706 Vlocale_coding_system, 0);
1697 1707
1698 /* If buffer was too small, make it bigger and try again. */ 1708 /* If buffer was too small, make it bigger and try again. */
1709 BLOCK_INPUT;
1699 result = emacs_memftimeu (NULL, (size_t) -1, 1710 result = emacs_memftimeu (NULL, (size_t) -1,
1700 SDATA (format_string), 1711 SDATA (format_string),
1701 SBYTES (format_string), 1712 SBYTES (format_string),
1702 tm, ut); 1713 tm, ut);
1714 UNBLOCK_INPUT;
1703 size = result + 1; 1715 size = result + 1;
1704 } 1716 }
1705} 1717}
@@ -1707,7 +1719,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */)
1707DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, 1719DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0,
1708 doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). 1720 doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE).
1709The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED), 1721The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED),
1710as from `current-time' and `file-attributes', or `nil' to use the 1722as from `current-time' and `file-attributes', or nil to use the
1711current time. The obsolete form (HIGH . LOW) is also still accepted. 1723current time. The obsolete form (HIGH . LOW) is also still accepted.
1712The list has the following nine members: SEC is an integer between 0 1724The list has the following nine members: SEC is an integer between 0
1713and 60; SEC is 60 for a leap second, which only some operating systems 1725and 60; SEC is 60 for a leap second, which only some operating systems
@@ -1730,7 +1742,9 @@ DOW and ZONE.) */)
1730 if (! lisp_time_argument (specified_time, &time_spec, NULL)) 1742 if (! lisp_time_argument (specified_time, &time_spec, NULL))
1731 error ("Invalid time specification"); 1743 error ("Invalid time specification");
1732 1744
1745 BLOCK_INPUT;
1733 decoded_time = localtime (&time_spec); 1746 decoded_time = localtime (&time_spec);
1747 UNBLOCK_INPUT;
1734 if (! decoded_time) 1748 if (! decoded_time)
1735 error ("Specified time is not representable"); 1749 error ("Specified time is not representable");
1736 XSETFASTINT (list_args[0], decoded_time->tm_sec); 1750 XSETFASTINT (list_args[0], decoded_time->tm_sec);
@@ -1746,7 +1760,9 @@ DOW and ZONE.) */)
1746 1760
1747 /* Make a copy, in case gmtime modifies the struct. */ 1761 /* Make a copy, in case gmtime modifies the struct. */
1748 save_tm = *decoded_time; 1762 save_tm = *decoded_time;
1763 BLOCK_INPUT;
1749 decoded_time = gmtime (&time_spec); 1764 decoded_time = gmtime (&time_spec);
1765 UNBLOCK_INPUT;
1750 if (decoded_time == 0) 1766 if (decoded_time == 0)
1751 list_args[8] = Qnil; 1767 list_args[8] = Qnil;
1752 else 1768 else
@@ -1802,7 +1818,11 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
1802 if (CONSP (zone)) 1818 if (CONSP (zone))
1803 zone = Fcar (zone); 1819 zone = Fcar (zone);
1804 if (NILP (zone)) 1820 if (NILP (zone))
1805 time = mktime (&tm); 1821 {
1822 BLOCK_INPUT;
1823 time = mktime (&tm);
1824 UNBLOCK_INPUT;
1825 }
1806 else 1826 else
1807 { 1827 {
1808 char tzbuf[100]; 1828 char tzbuf[100];
@@ -1827,7 +1847,9 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
1827 value doesn't suffice, since that would mishandle leap seconds. */ 1847 value doesn't suffice, since that would mishandle leap seconds. */
1828 set_time_zone_rule (tzstring); 1848 set_time_zone_rule (tzstring);
1829 1849
1850 BLOCK_INPUT;
1830 time = mktime (&tm); 1851 time = mktime (&tm);
1852 UNBLOCK_INPUT;
1831 1853
1832 /* Restore TZ to previous value. */ 1854 /* Restore TZ to previous value. */
1833 newenv = environ; 1855 newenv = environ;
@@ -1871,7 +1893,9 @@ but this is considered obsolete. */)
1871 /* Convert to a string, checking for out-of-range time stamps. 1893 /* Convert to a string, checking for out-of-range time stamps.
1872 Don't use 'ctime', as that might dump core if VALUE is out of 1894 Don't use 'ctime', as that might dump core if VALUE is out of
1873 range. */ 1895 range. */
1896 BLOCK_INPUT;
1874 tm = localtime (&value); 1897 tm = localtime (&value);
1898 UNBLOCK_INPUT;
1875 if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) && (tem = asctime (tm)))) 1899 if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) && (tem = asctime (tm))))
1876 error ("Specified time is not representable"); 1900 error ("Specified time is not representable");
1877 1901
@@ -1927,9 +1951,21 @@ the data it can't find. */)
1927 struct tm *t; 1951 struct tm *t;
1928 struct tm gmt; 1952 struct tm gmt;
1929 1953
1930 if (lisp_time_argument (specified_time, &value, NULL) 1954 if (!lisp_time_argument (specified_time, &value, NULL))
1931 && (t = gmtime (&value)) != 0 1955 t = NULL;
1932 && (gmt = *t, t = localtime (&value)) != 0) 1956 else
1957 {
1958 BLOCK_INPUT;
1959 t = gmtime (&value);
1960 if (t)
1961 {
1962 gmt = *t;
1963 t = localtime (&value);
1964 }
1965 UNBLOCK_INPUT;
1966 }
1967
1968 if (t)
1933 { 1969 {
1934 int offset = tm_diff (t, &gmt); 1970 int offset = tm_diff (t, &gmt);
1935 char *s = 0; 1971 char *s = 0;
@@ -2247,8 +2283,7 @@ usage: (insert-before-markers-and-inherit &rest ARGS) */)
2247} 2283}
2248 2284
2249DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, 2285DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0,
2250 doc: /* Insert COUNT (second arg) copies of CHARACTER (first arg). 2286 doc: /* Insert COUNT copies of CHARACTER.
2251Both arguments are required.
2252Point, and before-insertion markers, are relocated as in the function `insert'. 2287Point, and before-insertion markers, are relocated as in the function `insert'.
2253The optional third arg INHERIT, if non-nil, says to inherit text properties 2288The optional third arg INHERIT, if non-nil, says to inherit text properties
2254from adjoining text, if those properties are sticky. */) 2289from adjoining text, if those properties are sticky. */)
@@ -3271,7 +3306,7 @@ save_restriction_restore (data)
3271DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0, 3306DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0,
3272 doc: /* Execute BODY, saving and restoring current buffer's restrictions. 3307 doc: /* Execute BODY, saving and restoring current buffer's restrictions.
3273The buffer's restrictions make parts of the beginning and end invisible. 3308The buffer's restrictions make parts of the beginning and end invisible.
3274(They are set up with `narrow-to-region' and eliminated with `widen'.) 3309\(They are set up with `narrow-to-region' and eliminated with `widen'.)
3275This special form, `save-restriction', saves the current buffer's restrictions 3310This special form, `save-restriction', saves the current buffer's restrictions
3276when it is entered, and restores them when it is exited. 3311when it is entered, and restores them when it is exited.
3277So any `narrow-to-region' within BODY lasts only until the end of the form. 3312So any `narrow-to-region' within BODY lasts only until the end of the form.
@@ -3733,7 +3768,12 @@ usage: (format STRING &rest OBJECTS) */)
3733 if (*format != 'd' && *format != 'o' && *format != 'x' 3768 if (*format != 'd' && *format != 'o' && *format != 'x'
3734 && *format != 'i' && *format != 'X' && *format != 'c') 3769 && *format != 'i' && *format != 'X' && *format != 'c')
3735 error ("Invalid format operation %%%c", *format); 3770 error ("Invalid format operation %%%c", *format);
3736 args[n] = Ftruncate (args[n], Qnil); 3771 /* This fails unnecessarily if args[n] is bigger than
3772 most-positive-fixnum but smaller than MAXINT.
3773 These cases are important because we sometimes use floats
3774 to represent such integer values (typically such values
3775 come from UIDs or PIDs). */
3776 /* args[n] = Ftruncate (args[n], Qnil); */
3737 } 3777 }
3738 3778
3739 /* Note that we're using sprintf to print floats, 3779 /* Note that we're using sprintf to print floats,
@@ -3901,8 +3941,15 @@ usage: (format STRING &rest OBJECTS) */)
3901 else 3941 else
3902 sprintf (p, this_format, XUINT (args[n])); 3942 sprintf (p, this_format, XUINT (args[n]));
3903 } 3943 }
3904 else 3944 else if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g')
3905 sprintf (p, this_format, XFLOAT_DATA (args[n])); 3945 sprintf (p, this_format, XFLOAT_DATA (args[n]));
3946 else if (format[-1] == 'd')
3947 /* Maybe we should use "%1.0f" instead so it also works
3948 for values larger than MAXINT. */
3949 sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n]));
3950 else
3951 /* Don't sign-extend for octal or hex printing. */
3952 sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n]));
3906 3953
3907 if (p > buf 3954 if (p > buf
3908 && multibyte 3955 && multibyte
diff --git a/src/emacs.c b/src/emacs.c
index 1db552c33e5..5219176eda9 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1,6 +1,6 @@
1/* Fully extensible Emacs, running on Unix, intended for GNU. 1/* Fully extensible Emacs, running on Unix, intended for GNU.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999,
3 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -869,7 +869,7 @@ main (argc, argv
869 else 869 else
870 { 870 {
871 printf ("GNU Emacs %s\n", SDATA (tem)); 871 printf ("GNU Emacs %s\n", SDATA (tem));
872 printf ("Copyright (C) 2006 Free Software Foundation, Inc.\n"); 872 printf ("Copyright (C) 2007 Free Software Foundation, Inc.\n");
873 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); 873 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n");
874 printf ("You may redistribute copies of Emacs\n"); 874 printf ("You may redistribute copies of Emacs\n");
875 printf ("under the terms of the GNU General Public License.\n"); 875 printf ("under the terms of the GNU General Public License.\n");
@@ -2501,7 +2501,8 @@ before you compile Emacs, to enable the code for this feature. */);
2501 emacs_priority = 0; 2501 emacs_priority = 0;
2502 2502
2503 DEFVAR_LISP ("path-separator", &Vpath_separator, 2503 DEFVAR_LISP ("path-separator", &Vpath_separator,
2504 doc: /* The directory separator in search paths, as a string. */); 2504 doc: /* String containing the character that separates directories in
2505search paths, such as PATH and other similar environment variables. */);
2505 { 2506 {
2506 char c = SEPCHAR; 2507 char c = SEPCHAR;
2507 Vpath_separator = make_string (&c, 1); 2508 Vpath_separator = make_string (&c, 1);
diff --git a/src/epaths.in b/src/epaths.in
index d494d85139c..34d97897c7d 100644
--- a/src/epaths.in
+++ b/src/epaths.in
@@ -1,6 +1,6 @@
1/* Hey Emacs, this is -*- C -*- code! */ 1/* Hey Emacs, this is -*- C -*- code! */
2/* Copyright (C) 1993, 1995, 1997, 1999, 2001, 2002, 2003, 2004, 2/* Copyright (C) 1993, 1995, 1997, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -52,7 +52,7 @@ Boston, MA 02110-1301, USA. */
52/* Where the configuration process believes the info tree lives. The 52/* Where the configuration process believes the info tree lives. The
53 lisp variable configure-info-directory gets its value from this 53 lisp variable configure-info-directory gets its value from this
54 macro, and is then used to set the Info-default-directory-list. */ 54 macro, and is then used to set the Info-default-directory-list. */
55#define PATH_INFO "/usr/local/info" 55#define PATH_INFO "/usr/local/share/info"
56 56
57/* Where Emacs should store game score files. */ 57/* Where Emacs should store game score files. */
58#define PATH_GAME "/usr/local/var/games/emacs" 58#define PATH_GAME "/usr/local/var/games/emacs"
diff --git a/src/eval.c b/src/eval.c
index 7e9b4b55d09..6707849a840 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,6 +1,6 @@
1/* Evaluator for GNU Emacs Lisp interpreter. 1/* Evaluator for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/fileio.c b/src/fileio.c
index e276426487e..c6589e989ec 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,7 +1,7 @@
1/* File IO for GNU Emacs. 1/* File IO for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996,
3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/filelock.c b/src/filelock.c
index 6a3972dad42..261a644ccde 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -1,6 +1,6 @@
1/* Lock files for editing. 1/* Lock files for editing.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1996, 1998, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1996, 1998, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/filemode.c b/src/filemode.c
index 835a8a3778e..b15f65c1647 100644
--- a/src/filemode.c
+++ b/src/filemode.c
@@ -1,6 +1,6 @@
1/* filemode.c -- make a string describing file modes 1/* filemode.c -- make a string describing file modes
2 Copyright (C) 1985, 1990, 1993, 2002, 2003, 2004, 2 Copyright (C) 1985, 1990, 1993, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
diff --git a/src/firstfile.c b/src/firstfile.c
index 06e7022d89a..8093f03efc3 100644
--- a/src/firstfile.c
+++ b/src/firstfile.c
@@ -1,6 +1,6 @@
1/* Mark beginning of data space to dump as pure, for GNU Emacs. 1/* Mark beginning of data space to dump as pure, for GNU Emacs.
2 Copyright (C) 1997, 2002, 2003, 2004, 2005, 2 Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/floatfns.c b/src/floatfns.c
index dd879de7eb8..e0ed9b625cd 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -1,6 +1,6 @@
1/* Primitive operations on floating point for GNU Emacs Lisp interpreter. 1/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
2 Copyright (C) 1988, 1993, 1994, 1999, 2002, 2003, 2004, 2 Copyright (C) 1988, 1993, 1994, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/fns.c b/src/fns.c
index da2c43fd6a9..86d9407db9a 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1,7 +1,7 @@
1/* Random utility Lisp functions. 1/* Random utility Lisp functions.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997,
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -4041,6 +4041,7 @@ maybe_resize_hash_table (h)
4041 { 4041 {
4042 int old_size = HASH_TABLE_SIZE (h); 4042 int old_size = HASH_TABLE_SIZE (h);
4043 int i, new_size, index_size; 4043 int i, new_size, index_size;
4044 EMACS_INT nsize;
4044 4045
4045 if (INTEGERP (h->rehash_size)) 4046 if (INTEGERP (h->rehash_size))
4046 new_size = old_size + XFASTINT (h->rehash_size); 4047 new_size = old_size + XFASTINT (h->rehash_size);
@@ -4050,7 +4051,10 @@ maybe_resize_hash_table (h)
4050 index_size = next_almost_prime ((int) 4051 index_size = next_almost_prime ((int)
4051 (new_size 4052 (new_size
4052 / XFLOATINT (h->rehash_threshold))); 4053 / XFLOATINT (h->rehash_threshold)));
4053 if (max (index_size, 2 * new_size) > MOST_POSITIVE_FIXNUM) 4054 /* Assignment to EMACS_INT stops GCC whining about limited range
4055 of data type. */
4056 nsize = max (index_size, 2 * new_size);
4057 if (nsize > MOST_POSITIVE_FIXNUM)
4054 error ("Hash table too large to resize"); 4058 error ("Hash table too large to resize");
4055 4059
4056 h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil); 4060 h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil);
diff --git a/src/fontset.c b/src/fontset.c
index 5a50012fef4..c92e05c3f02 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1,7 +1,8 @@
1/* Fontset handler. 1/* Fontset handler.
2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
3 Free Software Foundation, Inc.
3 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 5 2005, 2006, 2007
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003, 2006 8 Copyright (C) 2003, 2006
diff --git a/src/fontset.h b/src/fontset.h
index b86c26784c7..506b34a4dc7 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -1,8 +1,8 @@
1/* Header for fontset handler. 1/* Header for fontset handler.
2 Copyright (C) 1998, 2002, 2003, 2004, 2005, 2 Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006 5 2005, 2006, 2007
6 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
7 Registration Number H14PRO021 7 Registration Number H14PRO021
8 Copyright (C) 2003, 2006 8 Copyright (C) 2003, 2006
diff --git a/src/frame.c b/src/frame.c
index 18ed9e02c10..171cdcd49f0 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1,6 +1,6 @@
1/* Generic frame functions. 1/* Generic frame functions.
2 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2006, 2 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/frame.h b/src/frame.h
index 9c74a2d777c..db60700c5ad 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1,6 +1,6 @@
1/* Define frame-object for GNU Emacs. 1/* Define frame-object for GNU Emacs.
2 Copyright (C) 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/fringe.c b/src/fringe.c
index a42c2d70439..1688f68f231 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1,7 +1,7 @@
1/* Fringe handling (split from xdisp.c). 1/* Fringe handling (split from xdisp.c).
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997,
3 1998, 1999, 2000, 2000, 2001, 2002, 2003, 2004, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
4 2005, 2006 Free Software Foundation, Inc. 4 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/getloadavg.c b/src/getloadavg.c
index 3f616b47116..f40149a8c47 100644
--- a/src/getloadavg.c
+++ b/src/getloadavg.c
@@ -1,6 +1,7 @@
1/* Get the system load averages. 1/* Get the system load averages.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995,
3 1997, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
4 5
5 NOTE: The canonical source of this file is maintained with gnulib. 6 NOTE: The canonical source of this file is maintained with gnulib.
6 Bugs can be reported to bug-gnulib@gnu.org. 7 Bugs can be reported to bug-gnulib@gnu.org.
diff --git a/src/getpagesize.h b/src/getpagesize.h
index f38409da452..c4551677d16 100644
--- a/src/getpagesize.h
+++ b/src/getpagesize.h
@@ -1,6 +1,6 @@
1/* Emulate getpagesize on systems that lack it. 1/* Emulate getpagesize on systems that lack it.
2 Copyright (C) 1986, 1992, 1995, 2001, 2002, 2003, 2004, 2 Copyright (C) 1986, 1992, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 646fbbc4e4c..3f32617fc64 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -6,7 +6,7 @@
6 6
7/* Declarations for `malloc' and friends. 7/* Declarations for `malloc' and friends.
8 Copyright (C) 1990, 1991, 1992, 1993, 1995, 1996, 1999, 2002, 2003, 2004, 8 Copyright (C) 1990, 1991, 1992, 1993, 1995, 1996, 1999, 2002, 2003, 2004,
9 2005, 2006 Free Software Foundation, Inc. 9 2005, 2006, 2007 Free Software Foundation, Inc.
10 Written May 1989 by Mike Haertel. 10 Written May 1989 by Mike Haertel.
11 11
12This library is free software; you can redistribute it and/or 12This library is free software; you can redistribute it and/or
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 3dcdef2b0ae..dc81f016509 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1,5 +1,5 @@
1/* Functions for creating and updating GTK widgets. 1/* Functions for creating and updating GTK widgets.
2 Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -1718,9 +1718,9 @@ menuitem_destroy_callback (w, client_data)
1718} 1718}
1719 1719
1720/* Callback called when the pointer enters/leaves a menu item. 1720/* Callback called when the pointer enters/leaves a menu item.
1721 W is the menu item. 1721 W is the parent of the menu item.
1722 EVENT is either an enter event or leave event. 1722 EVENT is either an enter event or leave event.
1723 CLIENT_DATA points to the xg_menu_item_cb_data associated with the W. 1723 CLIENT_DATA is not used.
1724 1724
1725 Returns FALSE to tell GTK to keep processing this event. */ 1725 Returns FALSE to tell GTK to keep processing this event. */
1726 1726
@@ -1730,15 +1730,21 @@ menuitem_highlight_callback (w, event, client_data)
1730 GdkEventCrossing *event; 1730 GdkEventCrossing *event;
1731 gpointer client_data; 1731 gpointer client_data;
1732{ 1732{
1733 if (client_data) 1733 GdkEvent ev;
1734 { 1734 GtkWidget *subwidget;
1735 xg_menu_item_cb_data *data = (xg_menu_item_cb_data*) client_data; 1735 xg_menu_item_cb_data *data;
1736 gpointer call_data = event->type == GDK_LEAVE_NOTIFY ? 0 : client_data;
1737 1736
1737 ev.crossing = *event;
1738 subwidget = gtk_get_event_widget (&ev);
1739 data = (xg_menu_item_cb_data *) g_object_get_data (G_OBJECT (subwidget),
1740 XG_ITEM_DATA);
1741 if (data)
1742 {
1738 if (! NILP (data->help) && data->cl_data->highlight_cb) 1743 if (! NILP (data->help) && data->cl_data->highlight_cb)
1739 { 1744 {
1745 gpointer call_data = event->type == GDK_LEAVE_NOTIFY ? 0 : data;
1740 GtkCallback func = (GtkCallback) data->cl_data->highlight_cb; 1746 GtkCallback func = (GtkCallback) data->cl_data->highlight_cb;
1741 (*func) (w, call_data); 1747 (*func) (subwidget, call_data);
1742 } 1748 }
1743 } 1749 }
1744 1750
@@ -2004,7 +2010,7 @@ xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group)
2004 2010
2005 xg_list_insert (&xg_menu_item_cb_list, &cb_data->ptrs); 2011 xg_list_insert (&xg_menu_item_cb_list, &cb_data->ptrs);
2006 2012
2007 cb_data->unhighlight_id = cb_data->highlight_id = cb_data->select_id = 0; 2013 cb_data->select_id = 0;
2008 cb_data->help = item->help; 2014 cb_data->help = item->help;
2009 cb_data->cl_data = cl_data; 2015 cb_data->cl_data = cl_data;
2010 cb_data->call_data = item->call_data; 2016 cb_data->call_data = item->call_data;
@@ -2025,22 +2031,6 @@ xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group)
2025 = g_signal_connect (G_OBJECT (w), "activate", select_cb, cb_data); 2031 = g_signal_connect (G_OBJECT (w), "activate", select_cb, cb_data);
2026 } 2032 }
2027 2033
2028 if (! NILP (item->help) && highlight_cb)
2029 {
2030 /* We use enter/leave notify instead of select/deselect because
2031 select/deselect doesn't go well with detached menus. */
2032 cb_data->highlight_id
2033 = g_signal_connect (G_OBJECT (w),
2034 "enter-notify-event",
2035 G_CALLBACK (menuitem_highlight_callback),
2036 cb_data);
2037 cb_data->unhighlight_id
2038 = g_signal_connect (G_OBJECT (w),
2039 "leave-notify-event",
2040 G_CALLBACK (menuitem_highlight_callback),
2041 cb_data);
2042 }
2043
2044 return w; 2034 return w;
2045} 2035}
2046 2036
@@ -2123,6 +2113,17 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb,
2123 { 2113 {
2124 wmenu = gtk_menu_new (); 2114 wmenu = gtk_menu_new ();
2125 xg_set_screen (wmenu, f); 2115 xg_set_screen (wmenu, f);
2116 /* Connect this to the menu instead of items so we get enter/leave for
2117 disabled items also. TODO: Still does not get enter/leave for
2118 disabled items in detached menus. */
2119 g_signal_connect (G_OBJECT (wmenu),
2120 "enter-notify-event",
2121 G_CALLBACK (menuitem_highlight_callback),
2122 NULL);
2123 g_signal_connect (G_OBJECT (wmenu),
2124 "leave-notify-event",
2125 G_CALLBACK (menuitem_highlight_callback),
2126 NULL);
2126 } 2127 }
2127 else wmenu = gtk_menu_bar_new (); 2128 else wmenu = gtk_menu_bar_new ();
2128 2129
@@ -2619,37 +2620,6 @@ xg_update_menu_item (val, w, select_cb, highlight_cb, cl_data)
2619 g_signal_handler_disconnect (w, cb_data->select_id); 2620 g_signal_handler_disconnect (w, cb_data->select_id);
2620 cb_data->select_id = 0; 2621 cb_data->select_id = 0;
2621 } 2622 }
2622
2623 if (NILP (cb_data->help))
2624 {
2625 /* Shall not have help. Remove if any existed previously. */
2626 if (cb_data->highlight_id)
2627 {
2628 g_signal_handler_disconnect (G_OBJECT (w),
2629 cb_data->highlight_id);
2630 cb_data->highlight_id = 0;
2631 }
2632 if (cb_data->unhighlight_id)
2633 {
2634 g_signal_handler_disconnect (G_OBJECT (w),
2635 cb_data->unhighlight_id);
2636 cb_data->unhighlight_id = 0;
2637 }
2638 }
2639 else if (! cb_data->highlight_id && highlight_cb)
2640 {
2641 /* Have help now, but didn't previously. Add callback. */
2642 cb_data->highlight_id
2643 = g_signal_connect (G_OBJECT (w),
2644 "enter-notify-event",
2645 G_CALLBACK (menuitem_highlight_callback),
2646 cb_data);
2647 cb_data->unhighlight_id
2648 = g_signal_connect (G_OBJECT (w),
2649 "leave-notify-event",
2650 G_CALLBACK (menuitem_highlight_callback),
2651 cb_data);
2652 }
2653 } 2623 }
2654} 2624}
2655 2625
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 742e3ecb1e5..f87583ea1c2 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -1,5 +1,5 @@
1/* Definitions and headers for GTK widgets. 1/* Definitions and headers for GTK widgets.
2 Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -79,8 +79,6 @@ typedef struct xg_menu_item_cb_data_
79{ 79{
80 xg_list_node ptrs; 80 xg_list_node ptrs;
81 81
82 gulong highlight_id;
83 gulong unhighlight_id;
84 gulong select_id; 82 gulong select_id;
85 Lisp_Object help; 83 Lisp_Object help;
86 gpointer call_data; 84 gpointer call_data;
diff --git a/src/image.c b/src/image.c
index f4616b626a6..c58e0d4695e 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1,6 +1,6 @@
1/* Functions for image support on window system. 1/* Functions for image support on window system.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -122,8 +122,6 @@ typedef struct mac_bitmap_record Bitmap_Record;
122#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual 122#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual
123#define x_defined_color mac_defined_color 123#define x_defined_color mac_defined_color
124#define DefaultDepthOfScreen(screen) (one_mac_display_info.n_planes) 124#define DefaultDepthOfScreen(screen) (one_mac_display_info.n_planes)
125#define XDrawLine(display, w, gc, x1, y1, x2, y2) \
126 mac_draw_line_to_pixmap(display, w, gc, x1, y1, x2, y2)
127 125
128#endif /* MAC_OS */ 126#endif /* MAC_OS */
129 127
@@ -5251,14 +5249,12 @@ x_disable_image (f, img)
5251 GC gc; 5249 GC gc;
5252 5250
5253#ifdef MAC_OS 5251#ifdef MAC_OS
5254#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, NULL, 0, NULL)
5255#define MaskForeground(f) PIX_MASK_DRAW 5252#define MaskForeground(f) PIX_MASK_DRAW
5256#else 5253#else
5257#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, pixmap, 0, NULL)
5258#define MaskForeground(f) WHITE_PIX_DEFAULT (f) 5254#define MaskForeground(f) WHITE_PIX_DEFAULT (f)
5259#endif 5255#endif
5260 5256
5261 gc = XCreateGC_pixmap (dpy, img->pixmap); 5257 gc = XCreateGC (dpy, img->pixmap, 0, NULL);
5262 XSetForeground (dpy, gc, BLACK_PIX_DEFAULT (f)); 5258 XSetForeground (dpy, gc, BLACK_PIX_DEFAULT (f));
5263 XDrawLine (dpy, img->pixmap, gc, 0, 0, 5259 XDrawLine (dpy, img->pixmap, gc, 0, 0,
5264 img->width - 1, img->height - 1); 5260 img->width - 1, img->height - 1);
@@ -5268,7 +5264,7 @@ x_disable_image (f, img)
5268 5264
5269 if (img->mask) 5265 if (img->mask)
5270 { 5266 {
5271 gc = XCreateGC_pixmap (dpy, img->mask); 5267 gc = XCreateGC (dpy, img->mask, 0, NULL);
5272 XSetForeground (dpy, gc, MaskForeground (f)); 5268 XSetForeground (dpy, gc, MaskForeground (f));
5273 XDrawLine (dpy, img->mask, gc, 0, 0, 5269 XDrawLine (dpy, img->mask, gc, 0, 0,
5274 img->width - 1, img->height - 1); 5270 img->width - 1, img->height - 1);
diff --git a/src/indent.c b/src/indent.c
index 368609bad64..429c2722a1d 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1,6 +1,6 @@
1/* Indentation functions. 1/* Indentation functions.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -2074,7 +2074,7 @@ whether or not it is currently displayed in some window. */)
2074 { 2074 {
2075 int it_start; 2075 int it_start;
2076 int oselective; 2076 int oselective;
2077 int it_overshoot_expected_p; 2077 int it_overshoot_expected;
2078 2078
2079 SET_TEXT_POS (pt, PT, PT_BYTE); 2079 SET_TEXT_POS (pt, PT, PT_BYTE);
2080 start_display (&it, w, pt); 2080 start_display (&it, w, pt);
@@ -2100,12 +2100,16 @@ whether or not it is currently displayed in some window. */)
2100 while (s < e && *s != '\n') 2100 while (s < e && *s != '\n')
2101 ++s; 2101 ++s;
2102 2102
2103 it_overshoot_expected_p = (s == e); 2103 /* If there is no newline in the string, we need to check
2104 whether there is a newline immediately after the string
2105 in move_it_to below. This may happen if there is an
2106 overlay with an after-string just before the newline. */
2107 it_overshoot_expected = (s == e) ? -1 : 0;
2104 } 2108 }
2105 else 2109 else
2106 it_overshoot_expected_p = (it.method == GET_FROM_IMAGE 2110 it_overshoot_expected = (it.method == GET_FROM_IMAGE
2107 || it.method == GET_FROM_STRETCH 2111 || it.method == GET_FROM_STRETCH
2108 || it.method == GET_FROM_COMPOSITION); 2112 || it.method == GET_FROM_COMPOSITION);
2109 2113
2110 reseat_at_previous_visible_line_start (&it); 2114 reseat_at_previous_visible_line_start (&it);
2111 it.current_x = it.hpos = 0; 2115 it.current_x = it.hpos = 0;
@@ -2119,7 +2123,10 @@ whether or not it is currently displayed in some window. */)
2119 truncate-lines is on and PT is beyond right margin. 2123 truncate-lines is on and PT is beyond right margin.
2120 Don't go back if the overshoot is expected (see above). */ 2124 Don't go back if the overshoot is expected (see above). */
2121 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 2125 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0
2122 && !it_overshoot_expected_p) 2126 && (!it_overshoot_expected
2127 || (it_overshoot_expected < 0
2128 && it.method == GET_FROM_BUFFER
2129 && it.c == '\n')))
2123 move_it_by_lines (&it, -1, 0); 2130 move_it_by_lines (&it, -1, 0);
2124 2131
2125 it.vpos = 0; 2132 it.vpos = 0;
diff --git a/src/indent.h b/src/indent.h
index ddfd16a16de..b9c39869e60 100644
--- a/src/indent.h
+++ b/src/indent.h
@@ -1,6 +1,6 @@
1/* Definitions for interface to indent.c 1/* Definitions for interface to indent.c
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/insdel.c b/src/insdel.c
index 5e0eec936d4..6f8aac3d6da 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1,6 +1,6 @@
1/* Buffer insertion/deletion and gap motion for GNU Emacs. 1/* Buffer insertion/deletion and gap motion for GNU Emacs.
2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/intervals.c b/src/intervals.c
index fecd1d181dc..ef97aa4973a 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1,6 +1,6 @@
1/* Code for doing intervals. 1/* Code for doing intervals.
2 Copyright (C) 1993, 1994, 1995, 1997, 1998, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/intervals.h b/src/intervals.h
index 5aec706afea..d42462bc7ea 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -1,6 +1,6 @@
1/* Definitions and global variables for intervals. 1/* Definitions and global variables for intervals.
2 Copyright (C) 1993, 1994, 2000, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/keyboard.c b/src/keyboard.c
index 75b78d63d19..572b3096c06 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1,7 +1,7 @@
1/* Keyboard and mouse input; editor command loop. 1/* Keyboard and mouse input; editor command loop.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995,
3 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 3 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -9286,7 +9286,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
9286 { 9286 {
9287 pos = POSN_BUFFER_POSN (start); 9287 pos = POSN_BUFFER_POSN (start);
9288 if (INTEGERP (pos) 9288 if (INTEGERP (pos)
9289 && XINT (pos) >= BEG && XINT (pos) <= Z) 9289 && XINT (pos) >= BEGV
9290 && XINT (pos) <= ZV)
9290 { 9291 {
9291 map_here = get_local_map (XINT (pos), 9292 map_here = get_local_map (XINT (pos),
9292 current_buffer, Qlocal_map); 9293 current_buffer, Qlocal_map);
@@ -11019,6 +11020,8 @@ init_keyboard ()
11019 do_mouse_tracking = Qnil; 11020 do_mouse_tracking = Qnil;
11020#endif 11021#endif
11021 input_pending = 0; 11022 input_pending = 0;
11023 interrupt_input_blocked = 0;
11024 interrupt_input_pending = 0;
11022 11025
11023 /* This means that command_loop_1 won't try to select anything the first 11026 /* This means that command_loop_1 won't try to select anything the first
11024 time through. */ 11027 time through. */
diff --git a/src/keyboard.h b/src/keyboard.h
index 984ecccc0a4..6fe76363064 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -1,6 +1,6 @@
1/* Declarations useful when processing input. 1/* Declarations useful when processing input.
2 Copyright (C) 1985, 1986, 1987, 1993, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1987, 1993, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/keymap.c b/src/keymap.c
index 3fd81effb04..671801fa1ba 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1,7 +1,7 @@
1/* Manipulation of keymaps 1/* Manipulation of keymaps
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -3452,9 +3452,13 @@ describe_map (map, prefix, elt_describer, partial, shadow,
3452 tem = shadow_lookup (shadow, kludge, Qt); 3452 tem = shadow_lookup (shadow, kludge, Qt);
3453 if (!NILP (tem)) 3453 if (!NILP (tem))
3454 { 3454 {
3455 /* If both bindings are keymaps, this key is a prefix key,
3456 so don't say it is shadowed. */
3457 if (KEYMAPP (definition) && KEYMAPP (tem))
3458 ;
3455 /* Avoid generating duplicate entries if the 3459 /* Avoid generating duplicate entries if the
3456 shadowed binding has the same definition. */ 3460 shadowed binding has the same definition. */
3457 if (mention_shadow && !EQ (tem, definition)) 3461 else if (mention_shadow && !EQ (tem, definition))
3458 this_shadowed = 1; 3462 this_shadowed = 1;
3459 else 3463 else
3460 continue; 3464 continue;
diff --git a/src/keymap.h b/src/keymap.h
index b11f630a1fb..62a97b415ce 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -1,6 +1,6 @@
1/* Functions to manipulate keymaps. 1/* Functions to manipulate keymaps.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/lastfile.c b/src/lastfile.c
index 7c5e067dd02..7a7888f4683 100644
--- a/src/lastfile.c
+++ b/src/lastfile.c
@@ -1,6 +1,6 @@
1/* Mark end of data space to dump as pure, for GNU Emacs. 1/* Mark end of data space to dump as pure, for GNU Emacs.
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/lisp.h b/src/lisp.h
index 787eface0ee..31c7e50718f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1,6 +1,6 @@
1/* Fundamental definitions for GNU Emacs Lisp interpreter. 1/* Fundamental definitions for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/lread.c b/src/lread.c
index d6fab4ffc8c..197dc8c3582 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1,7 +1,7 @@
1/* Lisp parsing and input streams. 1/* Lisp parsing and input streams.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995,
3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/m/7300.h b/src/m/7300.h
index a8751efa52a..1022e077046 100644
--- a/src/m/7300.h
+++ b/src/m/7300.h
@@ -1,6 +1,6 @@
1/* machine description file for AT&T UNIX PC model 7300 1/* machine description file for AT&T UNIX PC model 7300
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Modified for this machine by mtxinu!rtech!gonzo!daveb 4 Modified for this machine by mtxinu!rtech!gonzo!daveb
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
diff --git a/src/m/acorn.h b/src/m/acorn.h
index 326fb7760ae..dee60071e12 100644
--- a/src/m/acorn.h
+++ b/src/m/acorn.h
@@ -1,6 +1,6 @@
1/* Machine description file for Acorn RISCiX machines. 1/* Machine description file for Acorn RISCiX machines.
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/alliant-2800.h b/src/m/alliant-2800.h
index d56624a1eac..e81fe48b9e7 100644
--- a/src/m/alliant-2800.h
+++ b/src/m/alliant-2800.h
@@ -1,6 +1,6 @@
1/* alliant-2800.h - Alliant FX/2800 machine running Concentrix 2800. 1/* alliant-2800.h - Alliant FX/2800 machine running Concentrix 2800.
2 Copyright (C) 1990, 2002, 2003, 2004, 2005, 2 Copyright (C) 1990, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/alliant.h b/src/m/alliant.h
index 49459c0b7f7..5ddab96012f 100644
--- a/src/m/alliant.h
+++ b/src/m/alliant.h
@@ -1,6 +1,6 @@
1/* alliant.h Alliant machine running system version 2 or 3. 1/* alliant.h Alliant machine running system version 2 or 3.
2 Copyright (C) 1985, 1986, 1987, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1987, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 Note that for version 1 of the Alliant system 4 Note that for version 1 of the Alliant system
5 you should use alliant1.h instead of this file. 5 you should use alliant1.h instead of this file.
6 Use alliant4.h for version 4. 6 Use alliant4.h for version 4.
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 47003400846..cf629c20291 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -1,6 +1,6 @@
1/* machine description file For the alpha chip. 1/* machine description file For the alpha chip.
2 Copyright (C) 1994, 1997, 1999, 2002, 2003, 2004, 2 Copyright (C) 1994, 1997, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/altos.h b/src/m/altos.h
index 16e7fb7ce06..1a7c6d4f95a 100644
--- a/src/m/altos.h
+++ b/src/m/altos.h
@@ -1,6 +1,6 @@
1/* altos machine description file Altos 3068 Unix System V Release 2 1/* altos machine description file Altos 3068 Unix System V Release 2
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/amdahl.h b/src/m/amdahl.h
index e418e3a43bf..c5cae1fc560 100644
--- a/src/m/amdahl.h
+++ b/src/m/amdahl.h
@@ -1,6 +1,6 @@
1/* amdahl machine description file 1/* amdahl machine description file
2 Copyright (C) 1987, 1999, 2002, 2003, 2004, 2 Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 36e62ef6166..0dcf5524645 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -1,5 +1,5 @@
1/* machine description file for AMD x86-64. 1/* machine description file for AMD x86-64.
2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
diff --git a/src/m/apollo.h b/src/m/apollo.h
index d9b3cffdb6d..0e6e53327bc 100644
--- a/src/m/apollo.h
+++ b/src/m/apollo.h
@@ -1,6 +1,6 @@
1/* machine description file for Apollo machine. 1/* machine description file for Apollo machine.
2 Copyright (C) 1985, 1986, 1994, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/arm.h b/src/m/arm.h
index 0a49f0cbd4b..18675f2805c 100644
--- a/src/m/arm.h
+++ b/src/m/arm.h
@@ -1,6 +1,6 @@
1/* Machine description file for ARM-based non-RISCiX machines. 1/* Machine description file for ARM-based non-RISCiX machines.
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/att3b.h b/src/m/att3b.h
index 049593ebcf4..33411ff005c 100644
--- a/src/m/att3b.h
+++ b/src/m/att3b.h
@@ -1,6 +1,6 @@
1/* Machine-dependent configuration for GNU Emacs for AT&T 3b machines. 1/* Machine-dependent configuration for GNU Emacs for AT&T 3b machines.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5 Modified by David Robinson (daver@csvax.caltech.edu) 6/6/86 5 Modified by David Robinson (daver@csvax.caltech.edu) 6/6/86
6 6
diff --git a/src/m/aviion.h b/src/m/aviion.h
index 50355b25bd6..87b7d963f5a 100644
--- a/src/m/aviion.h
+++ b/src/m/aviion.h
@@ -1,6 +1,6 @@
1/* machine description file for Data General AViiON. 1/* machine description file for Data General AViiON.
2 Copyright (C) 1985, 1986, 1991, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1991, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/celerity.h b/src/m/celerity.h
index 10d38e14c6c..0eba349b7db 100644
--- a/src/m/celerity.h
+++ b/src/m/celerity.h
@@ -1,6 +1,6 @@
1/* machine description file for Celerity. 1/* machine description file for Celerity.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/clipper.h b/src/m/clipper.h
index 0dfa13382b3..6851761d53e 100644
--- a/src/m/clipper.h
+++ b/src/m/clipper.h
@@ -1,6 +1,6 @@
1/* machine description file for clipper 1/* machine description file for clipper
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/cnvrgnt.h b/src/m/cnvrgnt.h
index f8df583657a..09e3365bee9 100644
--- a/src/m/cnvrgnt.h
+++ b/src/m/cnvrgnt.h
@@ -1,6 +1,6 @@
1/* machine description file for convergent S series. 1/* machine description file for convergent S series.
2 Copyright (C) 1989, 2002, 2003, 2004, 2005, 2 Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/convex.h b/src/m/convex.h
index fa87d89e3d3..2904b5942f4 100644
--- a/src/m/convex.h
+++ b/src/m/convex.h
@@ -1,6 +1,6 @@
1/* machine description file for Convex (all models). 1/* machine description file for Convex (all models).
2 Copyright (C) 1987, 1994, 2002, 2003, 2004, 2 Copyright (C) 1987, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/cydra5.h b/src/m/cydra5.h
index a64f4761c25..75aca4b0e64 100644
--- a/src/m/cydra5.h
+++ b/src/m/cydra5.h
@@ -1,6 +1,6 @@
1/* machine description file for Cydrome's CYDRA 5 mini super computer 1/* machine description file for Cydrome's CYDRA 5 mini super computer
2 Copyright (C) 1988, 1999, 2002, 2003, 2004, 2 Copyright (C) 1988, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/delta88k.h b/src/m/delta88k.h
index 86e416e887d..7017e38284e 100644
--- a/src/m/delta88k.h
+++ b/src/m/delta88k.h
@@ -1,6 +1,6 @@
1/* Machine description file for Motorola System V/88 machines 1/* Machine description file for Motorola System V/88 machines
2 Copyright (C) 1985, 2002, 2003, 2004, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/dpx2.h b/src/m/dpx2.h
index 2a90ff46284..de0b93b21ac 100644
--- a/src/m/dpx2.h
+++ b/src/m/dpx2.h
@@ -1,6 +1,6 @@
1/* machine description for Bull DPX/2 range 1/* machine description for Bull DPX/2 range
2 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/dual.h b/src/m/dual.h
index d02ac5bc38e..63829b75d2e 100644
--- a/src/m/dual.h
+++ b/src/m/dual.h
@@ -1,6 +1,6 @@
1/* machine description file for Dual machines using unisoft port. 1/* machine description file for Dual machines using unisoft port.
2 Copyright (C) 1985, 2002, 2003, 2004, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/elxsi.h b/src/m/elxsi.h
index 0cb0c5513bf..c264d57338b 100644
--- a/src/m/elxsi.h
+++ b/src/m/elxsi.h
@@ -1,6 +1,6 @@
1/* machine description file for Elxsi machine (running enix). 1/* machine description file for Elxsi machine (running enix).
2 Copyright (C) 1986, 1992, 2002, 2003, 2004, 2 Copyright (C) 1986, 1992, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 Adapted by John Salmon 4 Adapted by John Salmon
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
diff --git a/src/m/ews4800.h b/src/m/ews4800.h
index 9db133ba682..528ce95d685 100644
--- a/src/m/ews4800.h
+++ b/src/m/ews4800.h
@@ -1,6 +1,6 @@
1/* m- file for NEC EWS4800 RISC series. 1/* m- file for NEC EWS4800 RISC series.
2 Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/gould-np1.h b/src/m/gould-np1.h
index 272a06cf305..a750c9f8f39 100644
--- a/src/m/gould-np1.h
+++ b/src/m/gould-np1.h
@@ -1,6 +1,6 @@
1/* machine description file for Gould NP1 with UTX/32 3.0 (first release for NP1) 1/* machine description file for Gould NP1 with UTX/32 3.0 (first release for NP1)
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/gould.h b/src/m/gould.h
index 3b5f1494e78..0b422f18fe2 100644
--- a/src/m/gould.h
+++ b/src/m/gould.h
@@ -6,7 +6,7 @@
6* official releases of 2.1 6* official releases of 2.1
7 7
8 Copyright (C) 1986, 2002, 2003, 2004, 2005, 8 Copyright (C) 1986, 2002, 2003, 2004, 2005,
9 2006 Free Software Foundation, Inc. 9 2006, 2007 Free Software Foundation, Inc.
10 10
11This file is part of GNU Emacs. 11This file is part of GNU Emacs.
12 12
diff --git a/src/m/hp800.h b/src/m/hp800.h
index 1630a0bc883..f48f4c8152e 100644
--- a/src/m/hp800.h
+++ b/src/m/hp800.h
@@ -1,6 +1,6 @@
1/* machine description file for hp9000 series 800 machines. 1/* machine description file for hp9000 series 800 machines.
2 Copyright (C) 1987, 2002, 2003, 2004, 2005, 2 Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/hp9000s300.h b/src/m/hp9000s300.h
index 9760b9bd2ed..c02a68d31cc 100644
--- a/src/m/hp9000s300.h
+++ b/src/m/hp9000s300.h
@@ -1,6 +1,6 @@
1/* machine description file for hp9000 series 200 or 300 on either HPUX or BSD. 1/* machine description file for hp9000 series 200 or 300 on either HPUX or BSD.
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/i860.h b/src/m/i860.h
index d74a01a889c..6af68cc2ae7 100644
--- a/src/m/i860.h
+++ b/src/m/i860.h
@@ -1,6 +1,6 @@
1/* machine description file for i860. 1/* machine description file for i860.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ia64.h b/src/m/ia64.h
index 560cd30f599..7e88aeaedc8 100644
--- a/src/m/ia64.h
+++ b/src/m/ia64.h
@@ -1,6 +1,6 @@
1/* machine description file for the IA-64 architecture. 1/* machine description file for the IA-64 architecture.
2 Copyright (C) 2000, 2002, 2003, 2004, 2005, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Contributed by David Mosberger <davidm@hpl.hp.com> 4 Contributed by David Mosberger <davidm@hpl.hp.com>
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
diff --git a/src/m/ibm370aix.h b/src/m/ibm370aix.h
index 1a9ed6efe11..09460092b3e 100644
--- a/src/m/ibm370aix.h
+++ b/src/m/ibm370aix.h
@@ -1,6 +1,6 @@
1/* m/ file for IBM 370 running AIX. 1/* m/ file for IBM 370 running AIX.
2 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ibmps2-aix.h b/src/m/ibmps2-aix.h
index ea895cd4fd8..c8449baef41 100644
--- a/src/m/ibmps2-aix.h
+++ b/src/m/ibmps2-aix.h
@@ -1,6 +1,6 @@
1/* machine description file for ibm ps/2 aix386. 1/* machine description file for ibm ps/2 aix386.
2 Copyright (C) 1989, 2002, 2003, 2004, 2005, 2 Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h
index 10b43bf8246..6729282953e 100644
--- a/src/m/ibmrs6000.h
+++ b/src/m/ibmrs6000.h
@@ -1,6 +1,6 @@
1/* R2 AIX machine/system dependent defines 1/* R2 AIX machine/system dependent defines
2 Copyright (C) 1988, 2002, 2003, 2004, 2005, 2 Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ibmrt-aix.h b/src/m/ibmrt-aix.h
index 43e11b36428..ccee40a46a9 100644
--- a/src/m/ibmrt-aix.h
+++ b/src/m/ibmrt-aix.h
@@ -1,6 +1,6 @@
1/* RTPC AIX machine/system dependent defines 1/* RTPC AIX machine/system dependent defines
2 Copyright (C) 1988, 1999, 2002, 2003, 2004, 2 Copyright (C) 1988, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ibmrt.h b/src/m/ibmrt.h
index e78d182940c..2cf372a278d 100644
--- a/src/m/ibmrt.h
+++ b/src/m/ibmrt.h
@@ -1,6 +1,6 @@
1/* RTPC machine dependent defines 1/* RTPC machine dependent defines
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ibms390.h b/src/m/ibms390.h
index d60b33fdd04..e038e2e1b52 100644
--- a/src/m/ibms390.h
+++ b/src/m/ibms390.h
@@ -1,6 +1,6 @@
1/* machine description file template. 1/* machine description file template.
2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h
index 716dd44c727..f8b21bc3df4 100644
--- a/src/m/ibms390x.h
+++ b/src/m/ibms390x.h
@@ -1,5 +1,5 @@
1/* machine description file for IBM S390 in 64-bit mode 1/* machine description file for IBM S390 in 64-bit mode
2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
diff --git a/src/m/intel386.h b/src/m/intel386.h
index 0d2aacf8d19..44ba3245b2e 100644
--- a/src/m/intel386.h
+++ b/src/m/intel386.h
@@ -1,6 +1,6 @@
1/* Machine description file for intel 386. 1/* Machine description file for intel 386.
2 Copyright (C) 1987, 2002, 2003, 2004, 2005, 2 Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/iris4d.h b/src/m/iris4d.h
index bc8d1242710..4304871ca23 100644
--- a/src/m/iris4d.h
+++ b/src/m/iris4d.h
@@ -1,6 +1,6 @@
1/* machine description file for Iris-4D machines. Use with s/irix*.h. 1/* machine description file for Iris-4D machines. Use with s/irix*.h.
2 Copyright (C) 1987, 2002, 2003, 2004, 2005, 2 Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/irist.h b/src/m/irist.h
index a366b521a9a..4ae3681bd92 100644
--- a/src/m/irist.h
+++ b/src/m/irist.h
@@ -1,7 +1,7 @@
1/* machine description file for Silicon Graphics Iris 2500 Turbos; 1/* machine description file for Silicon Graphics Iris 2500 Turbos;
2 also possibly for non-turbo Irises with system release 2.5. 2 also possibly for non-turbo Irises with system release 2.5.
3 Copyright (C) 1985, 1986, 2002, 2003, 2004, 3 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/m/isi-ov.h b/src/m/isi-ov.h
index 5b6c3cd0214..ed96605b5a1 100644
--- a/src/m/isi-ov.h
+++ b/src/m/isi-ov.h
@@ -1,6 +1,6 @@
1/* machine description file for ISI 68000's 1/* machine description file for ISI 68000's
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/m68k.h b/src/m/m68k.h
index 31307ffa499..1071847eda9 100644
--- a/src/m/m68k.h
+++ b/src/m/m68k.h
@@ -1,6 +1,6 @@
1/* Machine description file for generic Motorola 68k. 1/* Machine description file for generic Motorola 68k.
2 Copyright (C) 1985, 1995, 2002, 2003, 2004, 2 Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/macppc.h b/src/m/macppc.h
index 25005888c77..eba0a401a18 100644
--- a/src/m/macppc.h
+++ b/src/m/macppc.h
@@ -1,6 +1,6 @@
1/* machine description file For the powerpc Macintosh. 1/* machine description file For the powerpc Macintosh.
2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/masscomp.h b/src/m/masscomp.h
index df0d9a1aa1a..777ff797727 100644
--- a/src/m/masscomp.h
+++ b/src/m/masscomp.h
@@ -1,6 +1,6 @@
1/* machine description file for Masscomp 5000 series running RTU, ucb universe. 1/* machine description file for Masscomp 5000 series running RTU, ucb universe.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/mega68.h b/src/m/mega68.h
index 7db67fa0cca..54340bdb0be 100644
--- a/src/m/mega68.h
+++ b/src/m/mega68.h
@@ -1,6 +1,6 @@
1/* machine description file for Megatest 68000's. 1/* machine description file for Megatest 68000's.
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/mg1.h b/src/m/mg1.h
index 92e358837c4..b0d6faca500 100644
--- a/src/m/mg1.h
+++ b/src/m/mg1.h
@@ -1,6 +1,6 @@
1/* machine description file for Whitechapel Computer Works MG1 (ns16000 based). 1/* machine description file for Whitechapel Computer Works MG1 (ns16000 based).
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 MG-1 version by L.M.McLoughlin 4 MG-1 version by L.M.McLoughlin
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
diff --git a/src/m/mips-siemens.h b/src/m/mips-siemens.h
index 27274c8b527..376f8805788 100644
--- a/src/m/mips-siemens.h
+++ b/src/m/mips-siemens.h
@@ -1,6 +1,6 @@
1/* m- file for Mips machines. 1/* m- file for Mips machines.
2 Copyright (C) 1987, 1992, 1993, 1995, 2002, 2003, 2004, 2 Copyright (C) 1987, 1992, 1993, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5 This file contains some changes for our SVR4 based SINIX-Mips 5.4. 5 This file contains some changes for our SVR4 based SINIX-Mips 5.4.
6 I hope this is helpful to port the emacs to our RM?00 series and 6 I hope this is helpful to port the emacs to our RM?00 series and
diff --git a/src/m/mips.h b/src/m/mips.h
index 9ae74178143..ee8e63030c7 100644
--- a/src/m/mips.h
+++ b/src/m/mips.h
@@ -1,6 +1,6 @@
1/* m- file for Mips machines. 1/* m- file for Mips machines.
2 Copyright (C) 1987, 1992, 1999, 2002, 2003, 2004, 2 Copyright (C) 1987, 1992, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/news.h b/src/m/news.h
index 5ac2cd6b6dc..13a718a8612 100644
--- a/src/m/news.h
+++ b/src/m/news.h
@@ -1,6 +1,6 @@
1/* machine description file for Sony's NEWS workstations, NEWS-OS 3.0. 1/* machine description file for Sony's NEWS workstations, NEWS-OS 3.0.
2 Copyright (C) 1985, 1986, 1989, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1989, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/next.h b/src/m/next.h
index b519e41920d..2a0f7243772 100644
--- a/src/m/next.h
+++ b/src/m/next.h
@@ -1,6 +1,6 @@
1/* Configuration file for the NeXT machine. 1/* Configuration file for the NeXT machine.
2 Copyright (C) 1990, 2002, 2003, 2004, 2005, 2 Copyright (C) 1990, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/nh3000.h b/src/m/nh3000.h
index ad2d8dd1340..e5cf1a61b58 100644
--- a/src/m/nh3000.h
+++ b/src/m/nh3000.h
@@ -1,8 +1,8 @@
1/* machine description for Harris Night Hawk Series 1200 and Series 3000 1/* machine description for Harris Night Hawk Series 1200 and Series 3000
2 MC68030-based systems (FPP on these is custom). These systems are 2 MC68030-based systems (FPP on these is custom). These systems are
3 also known as "ecx" and "gcx". 3 also known as "ecx" and "gcx".
4 Copyright (C) 1994, 2002, 2003, 2004, 2005, 4 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
5 2006 Free Software Foundation, Inc. 5 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/m/nh4000.h b/src/m/nh4000.h
index 1c0bc51c896..ba695700d77 100644
--- a/src/m/nh4000.h
+++ b/src/m/nh4000.h
@@ -1,7 +1,7 @@
1/* machine description for Harris NightHawk 88k based machines 1/* machine description for Harris NightHawk 88k based machines
2 (includes nh4000 and nh5000 machines). 2 (includes nh4000 and nh5000 machines).
3 Copyright (C) 1994, 2002, 2003, 2004, 2005, 3 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
4 2006 Free Software Foundation, Inc. 4 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/m/ns16000.h b/src/m/ns16000.h
index 5e9793a44b8..707cb21abb7 100644
--- a/src/m/ns16000.h
+++ b/src/m/ns16000.h
@@ -1,6 +1,6 @@
1/* machine description file for ns16000. 1/* machine description file for ns16000.
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ns32000.h b/src/m/ns32000.h
index 33e48d297bc..fe1fd153b70 100644
--- a/src/m/ns32000.h
+++ b/src/m/ns32000.h
@@ -1,6 +1,6 @@
1/* machine description file for National Semiconductor 32000, running Genix. 1/* machine description file for National Semiconductor 32000, running Genix.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/nu.h b/src/m/nu.h
index ec051150bdf..01fadeba18a 100644
--- a/src/m/nu.h
+++ b/src/m/nu.h
@@ -1,6 +1,6 @@
1/* machine description file for TI Nu machines using system V. 1/* machine description file for TI Nu machines using system V.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/orion.h b/src/m/orion.h
index 3db485dd3f1..472b7b4c8eb 100644
--- a/src/m/orion.h
+++ b/src/m/orion.h
@@ -1,6 +1,6 @@
1/* machine description file for HLH Orion. 1/* machine description file for HLH Orion.
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/orion105.h b/src/m/orion105.h
index 66f87748099..586ddf2ea35 100644
--- a/src/m/orion105.h
+++ b/src/m/orion105.h
@@ -1,6 +1,6 @@
1/* machine description file for HLH Orion 1/05 (Clipper). 1/* machine description file for HLH Orion 1/05 (Clipper).
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 Lee McLoughlin <lmjm%doc.imperial.ac.uk@nss.cs.ucl.ac.uk> 4 Lee McLoughlin <lmjm%doc.imperial.ac.uk@nss.cs.ucl.ac.uk>
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
diff --git a/src/m/pfa50.h b/src/m/pfa50.h
index 0b1511fd8e7..3c13aa77872 100644
--- a/src/m/pfa50.h
+++ b/src/m/pfa50.h
@@ -1,6 +1,6 @@
1/* Machine description file for PFU A-series. 1/* Machine description file for PFU A-series.
2 Copyright (C) 1988, 1999, 2002, 2003, 2004, 2 Copyright (C) 1988, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/plexus.h b/src/m/plexus.h
index 8b3e9be7849..606caeb20f4 100644
--- a/src/m/plexus.h
+++ b/src/m/plexus.h
@@ -1,6 +1,6 @@
1/* machine description file for the Plexus running System V.2. 1/* machine description file for the Plexus running System V.2.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/powermac.h b/src/m/powermac.h
index 232e424da35..419edb21b9f 100644
--- a/src/m/powermac.h
+++ b/src/m/powermac.h
@@ -1,5 +1,5 @@
1/* Machine description file for Apple Power Macintosh 1/* Machine description file for Apple Power Macintosh
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
diff --git a/src/m/powerpcle.h b/src/m/powerpcle.h
index b4681db06bd..fb70cbfcb4f 100644
--- a/src/m/powerpcle.h
+++ b/src/m/powerpcle.h
@@ -1,6 +1,6 @@
1/* machine description file for PowerPC. 1/* machine description file for PowerPC.
2 Copyright (C) 1987, 2002, 2003, 2004, 2005, 2 Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/pyramid.h b/src/m/pyramid.h
index 2dbd713f881..9a07ff09f1d 100644
--- a/src/m/pyramid.h
+++ b/src/m/pyramid.h
@@ -1,6 +1,6 @@
1/* machine description file for pyramid. 1/* machine description file for pyramid.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/sequent-ptx.h b/src/m/sequent-ptx.h
index dbb0944a330..03a0bff3e12 100644
--- a/src/m/sequent-ptx.h
+++ b/src/m/sequent-ptx.h
@@ -1,6 +1,6 @@
1/* machine description file for SEQUENT machines running DYNIX/ptx 1/* machine description file for SEQUENT machines running DYNIX/ptx
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/sequent.h b/src/m/sequent.h
index e970275901c..d0051642826 100644
--- a/src/m/sequent.h
+++ b/src/m/sequent.h
@@ -1,6 +1,6 @@
1/* machine description file for SEQUENT BALANCE machines 1/* machine description file for SEQUENT BALANCE machines
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/sh3el.h b/src/m/sh3el.h
index 0854ecd1b25..9c510979bdc 100644
--- a/src/m/sh3el.h
+++ b/src/m/sh3el.h
@@ -1,5 +1,5 @@
1/* machine description file for sh3el 1/* machine description file for sh3el
2 Copyright (C) 1985, 1986 Free Software Foundation, Inc. 2 Copyright (C) 1985, 1986, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
diff --git a/src/m/sparc.h b/src/m/sparc.h
index c9ef035653b..3efb4c05553 100644
--- a/src/m/sparc.h
+++ b/src/m/sparc.h
@@ -1,6 +1,6 @@
1/* machine description file for Sun 4 SPARC. 1/* machine description file for Sun 4 SPARC.
2 Copyright (C) 1987, 2002, 2003, 2004, 2005, 2 Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/sps7.h b/src/m/sps7.h
index 52edc570f92..db6c9d3a91e 100644
--- a/src/m/sps7.h
+++ b/src/m/sps7.h
@@ -1,6 +1,6 @@
1/* machine description file for Bull SPS-7. 1/* machine description file for Bull SPS-7.
2 Copyright (C) 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/sr2k.h b/src/m/sr2k.h
index 14a90c666f4..2342bf8ef20 100644
--- a/src/m/sr2k.h
+++ b/src/m/sr2k.h
@@ -1,6 +1,6 @@
1/* machine description file for Hitachi SR2001/SR2201 machines. 1/* machine description file for Hitachi SR2001/SR2201 machines.
2 Copyright (C) 1996, 2002, 2003, 2004, 2005, 2 Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/stride.h b/src/m/stride.h
index 6f05b17d96e..8acc84e3cbe 100644
--- a/src/m/stride.h
+++ b/src/m/stride.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on Stride Micro System-V.2.2 1/* Definitions file for GNU Emacs running on Stride Micro System-V.2.2
2 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/sun1.h b/src/m/sun1.h
index 5ded70a9e47..526056dd80f 100644
--- a/src/m/sun1.h
+++ b/src/m/sun1.h
@@ -1,6 +1,6 @@
1/* machine description file for Sun 68000's 1/* machine description file for Sun 68000's
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/sun2.h b/src/m/sun2.h
index 1afa4a2fa63..cee54da79b7 100644
--- a/src/m/sun2.h
+++ b/src/m/sun2.h
@@ -1,8 +1,8 @@
1/* machine description file for Sun 68000's OPERATING SYSTEM version 2. 1/* machine description file for Sun 68000's OPERATING SYSTEM version 2.
2 Note that "sun2.h" refers to the operating system version, not the 2 Note that "sun2.h" refers to the operating system version, not the
3 CPU model number. See the MACHINES file for details. 3 CPU model number. See the MACHINES file for details.
4 Copyright (C) 1985, 1986, 2002, 2003, 2004, 4 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
5 2005, 2006 Free Software Foundation, Inc. 5 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/m/sun386.h b/src/m/sun386.h
index 435c1ded6d2..21a07a69423 100644
--- a/src/m/sun386.h
+++ b/src/m/sun386.h
@@ -2,8 +2,8 @@
2 "sun2.h", but since that file is heavily cpu-specific, it was easier 2 "sun2.h", but since that file is heavily cpu-specific, it was easier
3 not to include it. 3 not to include it.
4 4
5 Copyright (C) 1988, 2002, 2003, 2004, 2005, 5 Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005,
6 2006 Free Software Foundation, Inc. 6 2006, 2007 Free Software Foundation, Inc.
7 7
8This file is part of GNU Emacs. 8This file is part of GNU Emacs.
9 9
diff --git a/src/m/symmetry.h b/src/m/symmetry.h
index 91209d0eb67..39dde99f13c 100644
--- a/src/m/symmetry.h
+++ b/src/m/symmetry.h
@@ -1,6 +1,6 @@
1/* machine description file for SEQUENT SYMMETRY machines 1/* machine description file for SEQUENT SYMMETRY machines
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/tad68k.h b/src/m/tad68k.h
index fce223da826..357bbe80982 100644
--- a/src/m/tad68k.h
+++ b/src/m/tad68k.h
@@ -1,6 +1,6 @@
1/* Machine-dependent configuration for GNU Emacs for Tadpole 68k machines 1/* Machine-dependent configuration for GNU Emacs for Tadpole 68k machines
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/tahoe.h b/src/m/tahoe.h
index 07ec23c7bb6..c28018a149d 100644
--- a/src/m/tahoe.h
+++ b/src/m/tahoe.h
@@ -1,6 +1,6 @@
1/* machine description file for tahoe. 1/* machine description file for tahoe.
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/targon31.h b/src/m/targon31.h
index 7100e0e8705..34e3ae40c9e 100644
--- a/src/m/targon31.h
+++ b/src/m/targon31.h
@@ -1,6 +1,6 @@
1/* targon31 machine description file 1/* targon31 machine description file
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/tek4300.h b/src/m/tek4300.h
index 3ff3ca4a6a0..30e40a0e09f 100644
--- a/src/m/tek4300.h
+++ b/src/m/tek4300.h
@@ -1,6 +1,6 @@
1/* machine description file for tek4300. 1/* machine description file for tek4300.
2 Copyright (C) 1988, 2002, 2003, 2004, 2005, 2 Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/tekxd88.h b/src/m/tekxd88.h
index 24c10330363..3b858310af3 100644
--- a/src/m/tekxd88.h
+++ b/src/m/tekxd88.h
@@ -1,8 +1,8 @@
1/* Configuration file for the Tektronix XD88 running UTekV 3.2e, 1/* Configuration file for the Tektronix XD88 running UTekV 3.2e,
2 contributed by Kaveh Ghazi (ghazi@caip.rutgers.edu) 1/15/93. 2 contributed by Kaveh Ghazi (ghazi@caip.rutgers.edu) 1/15/93.
3 You probably need to use gnu make (version 3.63 or higher.) 3 You probably need to use gnu make (version 3.63 or higher.)
4 Copyright (C) 1993, 2002, 2003, 2004, 2005, 4 Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005,
5 2006 Free Software Foundation, Inc. 5 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/m/template.h b/src/m/template.h
index 2b39964018a..79d2d40ab70 100644
--- a/src/m/template.h
+++ b/src/m/template.h
@@ -1,6 +1,6 @@
1/* machine description file template. 1/* machine description file template.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/tower32.h b/src/m/tower32.h
index 06ed7efe5d7..cdb6884d5fc 100644
--- a/src/m/tower32.h
+++ b/src/m/tower32.h
@@ -1,6 +1,6 @@
1/* machine description file for the NCR Tower 32 running System V.2. 1/* machine description file for the NCR Tower 32 running System V.2.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/tower32v3.h b/src/m/tower32v3.h
index 8f5c60cd7c8..19e7d3ba7ea 100644
--- a/src/m/tower32v3.h
+++ b/src/m/tower32v3.h
@@ -1,6 +1,6 @@
1/* machine description file for the NCR Tower 32 running System V.3. 1/* machine description file for the NCR Tower 32 running System V.3.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/ustation.h b/src/m/ustation.h
index 0a70df92233..b662cca208e 100644
--- a/src/m/ustation.h
+++ b/src/m/ustation.h
@@ -1,6 +1,6 @@
1/* machine description file for U-station (Nihon Unisys, SS5E; Sumitomo Denkoh, U-Station E30). 1/* machine description file for U-station (Nihon Unisys, SS5E; Sumitomo Denkoh, U-Station E30).
2 Copyright (C) 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/vax.h b/src/m/vax.h
index 9332b8f494d..fae30d37f73 100644
--- a/src/m/vax.h
+++ b/src/m/vax.h
@@ -1,6 +1,6 @@
1/* machine description file for vax. 1/* machine description file for vax.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/wicat.h b/src/m/wicat.h
index 24bb2acd210..6ab0a498104 100644
--- a/src/m/wicat.h
+++ b/src/m/wicat.h
@@ -1,6 +1,6 @@
1/* machine description file for WICAT machines. 1/* machine description file for WICAT machines.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/m/windowsnt.h b/src/m/windowsnt.h
index 4351f14144f..223958375ca 100644
--- a/src/m/windowsnt.h
+++ b/src/m/windowsnt.h
@@ -1,7 +1,7 @@
1/* Machine description file for Windows NT. 1/* Machine description file for Windows NT.
2 2
3 Copyright (C) 1993, 1994, 2002, 2003, 2004, 3 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/m/xps100.h b/src/m/xps100.h
index a9ac9bc5e36..89300211eec 100644
--- a/src/m/xps100.h
+++ b/src/m/xps100.h
@@ -1,8 +1,8 @@
1/* xps100.h for the Honeywell XPS100 running UNIX System V.2 1/* xps100.h for the Honeywell XPS100 running UNIX System V.2
2 Mark J. Hewitt (mjh@uk.co.kernel) 2 Mark J. Hewitt (mjh@uk.co.kernel)
3 3
4 Copyright (C) 1985, 1986, 2002, 2003, 2004, 4 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
5 2005, 2006 Free Software Foundation, Inc. 5 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/mac.c b/src/mac.c
index 7a08d828725..5084a02b27d 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -1,6 +1,6 @@
1/* Unix emulation routines for GNU Emacs on the Mac OS. 1/* Unix emulation routines for GNU Emacs on the Mac OS.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -2261,7 +2261,7 @@ sys_open (const char *path, int oflag)
2261 int res = open (mac_pathname, oflag); 2261 int res = open (mac_pathname, oflag);
2262 /* if (oflag == O_WRONLY || oflag == O_RDWR) */ 2262 /* if (oflag == O_WRONLY || oflag == O_RDWR) */
2263 if (oflag & O_CREAT) 2263 if (oflag & O_CREAT)
2264 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT'); 2264 fsetfileinfo (mac_pathname, MAC_EMACS_CREATOR_CODE, 'TEXT');
2265 return res; 2265 return res;
2266#else /* not __MRC__ */ 2266#else /* not __MRC__ */
2267 return open (mac_pathname, oflag); 2267 return open (mac_pathname, oflag);
@@ -2287,7 +2287,7 @@ sys_creat (const char *path, mode_t mode)
2287 { 2287 {
2288#ifdef __MRC__ 2288#ifdef __MRC__
2289 int result = creat (mac_pathname); 2289 int result = creat (mac_pathname);
2290 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT'); 2290 fsetfileinfo (mac_pathname, MAC_EMACS_CREATOR_CODE, 'TEXT');
2291 return result; 2291 return result;
2292#else /* not __MRC__ */ 2292#else /* not __MRC__ */
2293 return creat (mac_pathname, mode); 2293 return creat (mac_pathname, mode);
@@ -2415,7 +2415,7 @@ sys_fopen (const char *name, const char *mode)
2415 { 2415 {
2416#ifdef __MRC__ 2416#ifdef __MRC__
2417 if (mode[0] == 'w' || mode[0] == 'a') 2417 if (mode[0] == 'w' || mode[0] == 'a')
2418 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT'); 2418 fsetfileinfo (mac_pathname, MAC_EMACS_CREATOR_CODE, 'TEXT');
2419#endif /* not __MRC__ */ 2419#endif /* not __MRC__ */
2420 return fopen (mac_pathname, mode); 2420 return fopen (mac_pathname, mode);
2421 } 2421 }
@@ -4316,7 +4316,7 @@ assumed. Return non-nil if successful. */)
4316 OSType cCode; 4316 OSType cCode;
4317 CHECK_STRING (filename); 4317 CHECK_STRING (filename);
4318 4318
4319 cCode = mac_get_code_from_arg(code, 'EMAx'); 4319 cCode = mac_get_code_from_arg(code, MAC_EMACS_CREATOR_CODE);
4320 4320
4321 if (NILP(Ffile_exists_p(filename)) || !NILP(Ffile_directory_p(filename))) { 4321 if (NILP(Ffile_exists_p(filename)) || !NILP(Ffile_directory_p(filename))) {
4322 return Qnil; 4322 return Qnil;
diff --git a/src/macfns.c b/src/macfns.c
index 962f837c152..fb7e661f5fa 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1,6 +1,6 @@
1/* Graphical user interface functions for Mac OS. 1/* Graphical user interface functions for Mac OS.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/macgui.h b/src/macgui.h
index 01f5317aad6..3c37b86e22a 100644
--- a/src/macgui.h
+++ b/src/macgui.h
@@ -1,6 +1,6 @@
1/* Definitions and headers for communication on the Mac OS. 1/* Definitions and headers for communication on the Mac OS.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */
24#ifndef EMACS_MACGUI_H 24#ifndef EMACS_MACGUI_H
25#define EMACS_MACGUI_H 25#define EMACS_MACGUI_H
26 26
27typedef int Display; /* fix later */ 27typedef struct _XDisplay Display; /* opaque */
28 28
29typedef Lisp_Object XrmDatabase; 29typedef Lisp_Object XrmDatabase;
30 30
@@ -246,6 +246,14 @@ typedef struct _XGC
246 /* QuickDraw background color. */ 246 /* QuickDraw background color. */
247 RGBColor back_color; 247 RGBColor back_color;
248 248
249#if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
250 /* Quartz 2D foreground color. */
251 CGColorRef cg_fore_color;
252
253 /* Quartz 2D background color. */
254 CGColorRef cg_back_color;
255#endif
256
249#define MAX_CLIP_RECTS 2 257#define MAX_CLIP_RECTS 2
250 /* Number of clipping rectangles. */ 258 /* Number of clipping rectangles. */
251 int n_clip_rects; 259 int n_clip_rects;
diff --git a/src/macmenu.c b/src/macmenu.c
index 14bfe92cb25..3ea09412650 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -1,6 +1,6 @@
1/* Menu support for GNU Emacs on Mac OS. 1/* Menu support for GNU Emacs on Mac OS.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -77,10 +77,11 @@ static const int min_menu_id[] = {0, 1, 234, 235, 236, 256, 16384, 32768};
77 77
78#define DIALOG_WINDOW_RESOURCE 130 78#define DIALOG_WINDOW_RESOURCE 130
79 79
80#if TARGET_API_MAC_CARBON
80#define HAVE_DIALOGS 1 81#define HAVE_DIALOGS 1
82#endif
81 83
82#undef HAVE_MULTILINGUAL_MENU 84#undef HAVE_MULTILINGUAL_MENU
83#undef HAVE_DIALOGS /* TODO: Implement native dialogs. */
84 85
85/******************************************************************/ 86/******************************************************************/
86/* Definitions copied from lwlib.h */ 87/* Definitions copied from lwlib.h */
@@ -876,6 +877,32 @@ no quit occurs and `x-popup-menu' returns nil. */)
876 877
877#ifdef HAVE_MENUS 878#ifdef HAVE_MENUS
878 879
880/* Regard ESC and C-g as Cancel even without the Cancel button. */
881
882#ifdef MAC_OSX
883static Boolean
884mac_dialog_modal_filter (dialog, event, item_hit)
885 DialogRef dialog;
886 EventRecord *event;
887 DialogItemIndex *item_hit;
888{
889 Boolean result;
890
891 result = StdFilterProc (dialog, event, item_hit);
892 if (result == false
893 && (event->what == keyDown || event->what == autoKey)
894 && ((event->message & charCodeMask) == kEscapeCharCode
895 || mac_quit_char_key_p (event->modifiers,
896 (event->message & keyCodeMask) >> 8)))
897 {
898 *item_hit = kStdCancelItemIndex;
899 return true;
900 }
901
902 return result;
903}
904#endif
905
879DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, 906DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
880 doc: /* Pop up a dialog box and return user's selection. 907 doc: /* Pop up a dialog box and return user's selection.
881POSITION specifies which frame to use. 908POSITION specifies which frame to use.
@@ -961,6 +988,96 @@ for instance using the window manager, then this produces a quit and
961 but I don't want to make one now. */ 988 but I don't want to make one now. */
962 CHECK_WINDOW (window); 989 CHECK_WINDOW (window);
963 990
991#ifdef MAC_OSX
992 /* Special treatment for Fmessage_box, Fyes_or_no_p, and Fy_or_n_p. */
993 if (EQ (position, Qt)
994 && STRINGP (Fcar (contents))
995 && ((!NILP (Fequal (XCDR (contents),
996 Fcons (Fcons (build_string ("OK"), Qt), Qnil)))
997 && EQ (header, Qt))
998 || (!NILP (Fequal (XCDR (contents),
999 Fcons (Fcons (build_string ("Yes"), Qt),
1000 Fcons (Fcons (build_string ("No"), Qnil),
1001 Qnil))))
1002 && NILP (header))))
1003 {
1004 OSStatus err = noErr;
1005 AlertStdCFStringAlertParamRec param;
1006 CFStringRef error_string, explanation_string;
1007 DialogRef alert;
1008 DialogItemIndex item_hit;
1009 Lisp_Object tem;
1010
1011 tem = Fstring_match (concat3 (build_string ("\\("),
1012 call0 (intern ("sentence-end")),
1013 build_string ("\\)\n")),
1014 XCAR (contents), Qnil);
1015 BLOCK_INPUT;
1016 if (NILP (tem))
1017 {
1018 error_string = cfstring_create_with_string (XCAR (contents));
1019 if (error_string == NULL)
1020 err = memFullErr;
1021 explanation_string = NULL;
1022 }
1023 else
1024 {
1025 tem = Fmatch_end (make_number (1));
1026 error_string =
1027 cfstring_create_with_string (Fsubstring (XCAR (contents),
1028 make_number (0), tem));
1029 if (error_string == NULL)
1030 err = memFullErr;
1031 else
1032 {
1033 XSETINT (tem, XINT (tem) + 1);
1034 explanation_string =
1035 cfstring_create_with_string (Fsubstring (XCAR (contents),
1036 tem, Qnil));
1037 if (explanation_string == NULL)
1038 {
1039 CFRelease (error_string);
1040 err = memFullErr;
1041 }
1042 }
1043 }
1044 if (err == noErr)
1045 err = GetStandardAlertDefaultParams (&param,
1046 kStdCFStringAlertVersionOne);
1047 if (err == noErr)
1048 {
1049 param.movable = true;
1050 param.position = kWindowAlertPositionParentWindow;
1051 if (NILP (header))
1052 {
1053 param.defaultText = CFSTR ("Yes");
1054 param.otherText = CFSTR ("No");
1055#if 0
1056 param.cancelText = CFSTR ("Cancel");
1057 param.cancelButton = kAlertStdAlertCancelButton;
1058#endif
1059 }
1060 err = CreateStandardAlert (kAlertNoteAlert, error_string,
1061 explanation_string, &param, &alert);
1062 CFRelease (error_string);
1063 if (explanation_string)
1064 CFRelease (explanation_string);
1065 }
1066 if (err == noErr)
1067 err = RunStandardAlert (alert, mac_dialog_modal_filter, &item_hit);
1068 UNBLOCK_INPUT;
1069
1070 if (err == noErr)
1071 {
1072 if (item_hit == kStdCancelItemIndex)
1073 Fsignal (Qquit, Qnil);
1074 else if (item_hit == kStdOkItemIndex)
1075 return Qt;
1076 else
1077 return Qnil;
1078 }
1079 }
1080#endif
964#ifndef HAVE_DIALOGS 1081#ifndef HAVE_DIALOGS
965 /* Display a menu with these alternatives 1082 /* Display a menu with these alternatives
966 in the middle of frame F. */ 1083 in the middle of frame F. */
@@ -1450,6 +1567,80 @@ update_submenu_strings (first_wv)
1450} 1567}
1451 1568
1452 1569
1570#if TARGET_API_MAC_CARBON
1571extern Lisp_Object Vshow_help_function;
1572
1573static Lisp_Object
1574restore_show_help_function (old_show_help_function)
1575 Lisp_Object old_show_help_function;
1576{
1577 Vshow_help_function = old_show_help_function;
1578
1579 return Qnil;
1580}
1581
1582static pascal OSStatus
1583menu_target_item_handler (next_handler, event, data)
1584 EventHandlerCallRef next_handler;
1585 EventRef event;
1586 void *data;
1587{
1588 OSStatus err, result;
1589 MenuRef menu;
1590 MenuItemIndex menu_item;
1591 Lisp_Object help;
1592 GrafPtr port;
1593 int specpdl_count = SPECPDL_INDEX ();
1594
1595 result = CallNextEventHandler (next_handler, event);
1596
1597 err = GetEventParameter (event, kEventParamDirectObject, typeMenuRef,
1598 NULL, sizeof (MenuRef), NULL, &menu);
1599 if (err == noErr)
1600 err = GetEventParameter (event, kEventParamMenuItemIndex,
1601 typeMenuItemIndex, NULL,
1602 sizeof (MenuItemIndex), NULL, &menu_item);
1603 if (err == noErr)
1604 err = GetMenuItemProperty (menu, menu_item,
1605 MAC_EMACS_CREATOR_CODE, 'help',
1606 sizeof (Lisp_Object), NULL, &help);
1607 if (err != noErr)
1608 help = Qnil;
1609
1610 /* Temporarily bind Vshow_help_function to Qnil because we don't
1611 want tooltips during menu tracking. */
1612 record_unwind_protect (restore_show_help_function, Vshow_help_function);
1613 Vshow_help_function = Qnil;
1614 GetPort (&port);
1615 show_help_echo (help, Qnil, Qnil, Qnil, 1);
1616 SetPort (port);
1617 unbind_to (specpdl_count, Qnil);
1618
1619 return err == noErr ? noErr : result;
1620}
1621#endif
1622
1623OSStatus
1624install_menu_target_item_handler (window)
1625 WindowPtr window;
1626{
1627 OSStatus err = noErr;
1628#if TARGET_API_MAC_CARBON
1629 static const EventTypeSpec specs[] =
1630 {{kEventClassMenu, kEventMenuTargetItem}};
1631 static EventHandlerUPP menu_target_item_handlerUPP = NULL;
1632
1633 if (menu_target_item_handlerUPP == NULL)
1634 menu_target_item_handlerUPP =
1635 NewEventHandlerUPP (menu_target_item_handler);
1636
1637 err = InstallWindowEventHandler (window, menu_target_item_handlerUPP,
1638 GetEventTypeCount (specs), specs,
1639 NULL, NULL);
1640#endif
1641 return err;
1642}
1643
1453/* Event handler function that pops down a menu on C-g. We can only pop 1644/* Event handler function that pops down a menu on C-g. We can only pop
1454 down menus if CancelMenuTracking is present (OSX 10.3 or later). */ 1645 down menus if CancelMenuTracking is present (OSX 10.3 or later). */
1455 1646
@@ -1463,8 +1654,6 @@ menu_quit_handler (nextHandler, theEvent, userData)
1463 OSStatus err; 1654 OSStatus err;
1464 UInt32 keyCode; 1655 UInt32 keyCode;
1465 UInt32 keyModifiers; 1656 UInt32 keyModifiers;
1466 extern int mac_quit_char_modifiers;
1467 extern int mac_quit_char_keycode;
1468 1657
1469 err = GetEventParameter (theEvent, kEventParamKeyCode, 1658 err = GetEventParameter (theEvent, kEventParamKeyCode,
1470 typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode); 1659 typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);
@@ -1474,8 +1663,7 @@ menu_quit_handler (nextHandler, theEvent, userData)
1474 typeUInt32, NULL, sizeof(UInt32), 1663 typeUInt32, NULL, sizeof(UInt32),
1475 NULL, &keyModifiers); 1664 NULL, &keyModifiers);
1476 1665
1477 if (err == noErr && keyCode == mac_quit_char_keycode 1666 if (err == noErr && mac_quit_char_key_p (keyModifiers, keyCode))
1478 && keyModifiers == mac_quit_char_modifiers)
1479 { 1667 {
1480 MenuRef menu = userData != 0 1668 MenuRef menu = userData != 0
1481 ? (MenuRef)userData : AcquireRootMenu (); 1669 ? (MenuRef)userData : AcquireRootMenu ();
@@ -2132,8 +2320,390 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
2132 2320
2133 2321
2134#ifdef HAVE_DIALOGS 2322#ifdef HAVE_DIALOGS
2135/* Construct native Mac OS menubar based on widget_value tree. */ 2323/* Construct native Mac OS dialog based on widget_value tree. */
2324
2325#if TARGET_API_MAC_CARBON
2326
2327static pascal OSStatus
2328mac_handle_dialog_event (next_handler, event, data)
2329 EventHandlerCallRef next_handler;
2330 EventRef event;
2331 void *data;
2332{
2333 OSStatus err;
2334 WindowRef window = (WindowRef) data;
2335
2336 switch (GetEventClass (event))
2337 {
2338 case kEventClassCommand:
2339 {
2340 HICommand command;
2341
2342 err = GetEventParameter (event, kEventParamDirectObject,
2343 typeHICommand, NULL, sizeof (HICommand),
2344 NULL, &command);
2345 if (err == noErr)
2346 if ((command.commandID & ~0xffff) == 'Bt\0\0')
2347 {
2348 SetWRefCon (window, command.commandID);
2349 err = QuitAppModalLoopForWindow (window);
2350
2351 return err == noErr ? noErr : eventNotHandledErr;
2352 }
2353
2354 return CallNextEventHandler (next_handler, event);
2355 }
2356 break;
2357
2358 case kEventClassKeyboard:
2359 {
2360 OSStatus result;
2361 char char_code;
2362
2363 result = CallNextEventHandler (next_handler, event);
2364 if (result == noErr)
2365 return noErr;
2366
2367 err = GetEventParameter (event, kEventParamKeyMacCharCodes,
2368 typeChar, NULL, sizeof (char),
2369 NULL, &char_code);
2370 if (err == noErr)
2371 switch (char_code)
2372 {
2373 case kEscapeCharCode:
2374 err = QuitAppModalLoopForWindow (window);
2375 break;
2376
2377 default:
2378 {
2379 UInt32 modifiers, key_code;
2380
2381 err = GetEventParameter (event, kEventParamKeyModifiers,
2382 typeUInt32, NULL, sizeof (UInt32),
2383 NULL, &modifiers);
2384 if (err == noErr)
2385 err = GetEventParameter (event, kEventParamKeyCode,
2386 typeUInt32, NULL, sizeof (UInt32),
2387 NULL, &key_code);
2388 if (err == noErr)
2389 if (mac_quit_char_key_p (modifiers, key_code))
2390 err = QuitAppModalLoopForWindow (window);
2391 else
2392 err = eventNotHandledErr;
2393 }
2394 break;
2395 }
2396
2397 return err == noErr ? noErr : result;
2398 }
2399 break;
2400
2401 default:
2402 abort ();
2403 }
2404}
2405
2406static OSStatus
2407install_dialog_event_handler (window)
2408 WindowRef window;
2409{
2410 static const EventTypeSpec specs[] =
2411 {{kEventClassCommand, kEventCommandProcess},
2412 {kEventClassKeyboard, kEventRawKeyDown}};
2413 static EventHandlerUPP handle_dialog_eventUPP = NULL;
2414
2415 if (handle_dialog_eventUPP == NULL)
2416 handle_dialog_eventUPP = NewEventHandlerUPP (mac_handle_dialog_event);
2417 return InstallWindowEventHandler (window, handle_dialog_eventUPP,
2418 GetEventTypeCount (specs), specs,
2419 window, NULL);
2420}
2421
2422#define DIALOG_LEFT_MARGIN (112)
2423#define DIALOG_TOP_MARGIN (24)
2424#define DIALOG_RIGHT_MARGIN (24)
2425#define DIALOG_BOTTOM_MARGIN (20)
2426#define DIALOG_MIN_INNER_WIDTH (338)
2427#define DIALOG_MAX_INNER_WIDTH (564)
2428#define DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE (12)
2429#define DIALOG_BUTTON_BUTTON_VERTICAL_SPACE (12)
2430#define DIALOG_BUTTON_MIN_WIDTH (68)
2431#define DIALOG_TEXT_MIN_HEIGHT (50)
2432#define DIALOG_TEXT_BUTTONS_VERTICAL_SPACE (10)
2433#define DIALOG_ICON_WIDTH (64)
2434#define DIALOG_ICON_HEIGHT (64)
2435#define DIALOG_ICON_LEFT_MARGIN (24)
2436#define DIALOG_ICON_TOP_MARGIN (15)
2437
2438static int
2439create_and_show_dialog (f, first_wv)
2440 FRAME_PTR f;
2441 widget_value *first_wv;
2442{
2443 OSStatus err;
2444 char *dialog_name, *message;
2445 int nb_buttons, first_group_count, i, result = 0;
2446 widget_value *wv;
2447 short buttons_height, text_height, inner_width, inner_height;
2448 Rect empty_rect, *rects;
2449 WindowRef window = NULL;
2450 ControlRef *buttons, default_button = NULL, text;
2451
2452 dialog_name = first_wv->name;
2453 nb_buttons = dialog_name[1] - '0';
2454 first_group_count = nb_buttons - (dialog_name[4] - '0');
2455
2456 wv = first_wv->contents;
2457 message = wv->value;
2136 2458
2459 wv = wv->next;
2460 SetRect (&empty_rect, 0, 0, 0, 0);
2461
2462 /* Create dialog window. */
2463 err = CreateNewWindow (kMovableModalWindowClass,
2464 kWindowStandardHandlerAttribute,
2465 &empty_rect, &window);
2466 if (err == noErr)
2467 err = SetThemeWindowBackground (window, kThemeBrushMovableModalBackground,
2468 true);
2469 if (err == noErr)
2470 err = SetWindowTitleWithCFString (window, (dialog_name[0] == 'Q'
2471 ? CFSTR ("Question")
2472 : CFSTR ("Information")));
2473
2474 /* Create button controls and measure their optimal bounds. */
2475 if (err == noErr)
2476 {
2477 buttons = alloca (sizeof (ControlRef) * nb_buttons);
2478 rects = alloca (sizeof (Rect) * nb_buttons);
2479 for (i = 0; i < nb_buttons; i++)
2480 {
2481 CFStringRef label = cfstring_create_with_utf8_cstring (wv->value);
2482
2483 if (label == NULL)
2484 err = memFullErr;
2485 else
2486 {
2487 err = CreatePushButtonControl (window, &empty_rect,
2488 label, &buttons[i]);
2489 CFRelease (label);
2490 }
2491 if (err == noErr)
2492 {
2493 if (!wv->enabled)
2494 {
2495#ifdef MAC_OSX
2496 err = DisableControl (buttons[i]);
2497#else
2498 err = DeactivateControl (buttons[i]);
2499#endif
2500 }
2501 else if (default_button == NULL)
2502 default_button = buttons[i];
2503 }
2504 if (err == noErr)
2505 {
2506 SInt16 unused;
2507
2508 rects[i] = empty_rect;
2509 err = GetBestControlRect (buttons[i], &rects[i], &unused);
2510 }
2511 if (err == noErr)
2512 {
2513 OffsetRect (&rects[i], -rects[i].left, -rects[i].top);
2514 if (rects[i].right < DIALOG_BUTTON_MIN_WIDTH)
2515 rects[i].right = DIALOG_BUTTON_MIN_WIDTH;
2516 else if (rects[i].right > DIALOG_MAX_INNER_WIDTH)
2517 rects[i].right = DIALOG_MAX_INNER_WIDTH;
2518
2519 err = SetControlCommandID (buttons[i],
2520 'Bt\0\0' + (int) wv->call_data);
2521 }
2522 if (err != noErr)
2523 break;
2524 wv = wv->next;
2525 }
2526 }
2527
2528 /* Layout buttons. rects[i] is set relative to the bottom-right
2529 corner of the inner box. */
2530 if (err == noErr)
2531 {
2532 short bottom, right, max_height, left_align_shift;
2533
2534 inner_width = DIALOG_MIN_INNER_WIDTH;
2535 bottom = right = max_height = 0;
2536 for (i = 0; i < nb_buttons; i++)
2537 {
2538 if (right - rects[i].right < - inner_width)
2539 {
2540 if (i != first_group_count
2541 && right - rects[i].right >= - DIALOG_MAX_INNER_WIDTH)
2542 inner_width = - (right - rects[i].right);
2543 else
2544 {
2545 bottom -= max_height + DIALOG_BUTTON_BUTTON_VERTICAL_SPACE;
2546 right = max_height = 0;
2547 }
2548 }
2549 if (max_height < rects[i].bottom)
2550 max_height = rects[i].bottom;
2551 OffsetRect (&rects[i], right - rects[i].right,
2552 bottom - rects[i].bottom);
2553 right = rects[i].left - DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE;
2554 if (i == first_group_count - 1)
2555 right -= DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE;
2556 }
2557 buttons_height = - (bottom - max_height);
2558
2559 left_align_shift = - (inner_width + rects[nb_buttons - 1].left);
2560 for (i = nb_buttons - 1; i >= first_group_count; i--)
2561 {
2562 if (bottom != rects[i].bottom)
2563 {
2564 left_align_shift = - (inner_width + rects[i].left);
2565 bottom = rects[i].bottom;
2566 }
2567 OffsetRect (&rects[i], left_align_shift, 0);
2568 }
2569 }
2570
2571 /* Create a static text control and measure its bounds. */
2572 if (err == noErr)
2573 {
2574 CFStringRef message_string;
2575 Rect bounds;
2576
2577 message_string = cfstring_create_with_utf8_cstring (message);
2578 if (message_string == NULL)
2579 err = memFullErr;
2580 else
2581 {
2582 ControlFontStyleRec text_style;
2583
2584 text_style.flags = 0;
2585 SetRect (&bounds, 0, 0, inner_width, 0);
2586 err = CreateStaticTextControl (window, &bounds, message_string,
2587 &text_style, &text);
2588 CFRelease (message_string);
2589 }
2590 if (err == noErr)
2591 {
2592 SInt16 unused;
2593
2594 bounds = empty_rect;
2595 err = GetBestControlRect (text, &bounds, &unused);
2596 }
2597 if (err == noErr)
2598 {
2599 text_height = bounds.bottom - bounds.top;
2600 if (text_height < DIALOG_TEXT_MIN_HEIGHT)
2601 text_height = DIALOG_TEXT_MIN_HEIGHT;
2602 }
2603 }
2604
2605 /* Place buttons. */
2606 if (err == noErr)
2607 {
2608 inner_height = (text_height + DIALOG_TEXT_BUTTONS_VERTICAL_SPACE
2609 + buttons_height);
2610
2611 for (i = 0; i < nb_buttons; i++)
2612 {
2613 OffsetRect (&rects[i], DIALOG_LEFT_MARGIN + inner_width,
2614 DIALOG_TOP_MARGIN + inner_height);
2615 SetControlBounds (buttons[i], &rects[i]);
2616 }
2617 }
2618
2619 /* Place text. */
2620 if (err == noErr)
2621 {
2622 Rect bounds;
2623
2624 SetRect (&bounds, DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN,
2625 DIALOG_LEFT_MARGIN + inner_width,
2626 DIALOG_TOP_MARGIN + text_height);
2627 SetControlBounds (text, &bounds);
2628 }
2629
2630 /* Create the application icon at the upper-left corner. */
2631 if (err == noErr)
2632 {
2633 ControlButtonContentInfo content;
2634 ControlRef icon;
2635 static const ProcessSerialNumber psn = {0, kCurrentProcess};
2636#ifdef MAC_OSX
2637 FSRef app_location;
2638#else
2639 ProcessInfoRec pinfo;
2640 FSSpec app_spec;
2641#endif
2642 SInt16 unused;
2643
2644 content.contentType = kControlContentIconRef;
2645#ifdef MAC_OSX
2646 err = GetProcessBundleLocation (&psn, &app_location);
2647 if (err == noErr)
2648 err = GetIconRefFromFileInfo (&app_location, 0, NULL, 0, NULL,
2649 kIconServicesNormalUsageFlag,
2650 &content.u.iconRef, &unused);
2651#else
2652 bzero (&pinfo, sizeof (ProcessInfoRec));
2653 pinfo.processInfoLength = sizeof (ProcessInfoRec);
2654 pinfo.processAppSpec = &app_spec;
2655 err = GetProcessInformation (&psn, &pinfo);
2656 if (err == noErr)
2657 err = GetIconRefFromFile (&app_spec, &content.u.iconRef, &unused);
2658#endif
2659 if (err == noErr)
2660 {
2661 Rect bounds;
2662
2663 SetRect (&bounds, DIALOG_ICON_LEFT_MARGIN, DIALOG_ICON_TOP_MARGIN,
2664 DIALOG_ICON_LEFT_MARGIN + DIALOG_ICON_WIDTH,
2665 DIALOG_ICON_TOP_MARGIN + DIALOG_ICON_HEIGHT);
2666 err = CreateIconControl (window, &bounds, &content, true, &icon);
2667 ReleaseIconRef (content.u.iconRef);
2668 }
2669 }
2670
2671 /* Show the dialog window and run event loop. */
2672 if (err == noErr)
2673 if (default_button)
2674 err = SetWindowDefaultButton (window, default_button);
2675 if (err == noErr)
2676 err = install_dialog_event_handler (window);
2677 if (err == noErr)
2678 {
2679 SizeWindow (window,
2680 DIALOG_LEFT_MARGIN + inner_width + DIALOG_RIGHT_MARGIN,
2681 DIALOG_TOP_MARGIN + inner_height + DIALOG_BOTTOM_MARGIN,
2682 true);
2683 err = RepositionWindow (window, FRAME_MAC_WINDOW (f),
2684 kWindowAlertPositionOnParentWindow);
2685 }
2686 if (err == noErr)
2687 {
2688 SetWRefCon (window, 0);
2689 ShowWindow (window);
2690 BringToFront (window);
2691 err = RunAppModalLoopForWindow (window);
2692 }
2693 if (err == noErr)
2694 {
2695 UInt32 command_id = GetWRefCon (window);
2696
2697 if ((command_id & ~0xffff) == 'Bt\0\0')
2698 result = command_id - 'Bt\0\0';
2699 }
2700
2701 if (window)
2702 DisposeWindow (window);
2703
2704 return result;
2705}
2706#else /* not TARGET_API_MAC_CARBON */
2137static int 2707static int
2138mac_dialog (widget_value *wv) 2708mac_dialog (widget_value *wv)
2139{ 2709{
@@ -2238,6 +2808,7 @@ mac_dialog (widget_value *wv)
2238 2808
2239 return i; 2809 return i;
2240} 2810}
2811#endif /* not TARGET_API_MAC_CARBON */
2241 2812
2242static char * button_names [] = { 2813static char * button_names [] = {
2243 "button1", "button2", "button3", "button4", "button5", 2814 "button1", "button2", "button3", "button4", "button5",
@@ -2370,10 +2941,10 @@ mac_dialog_show (f, keymaps, title, header, error_name)
2370 } 2941 }
2371 2942
2372 /* Actually create the dialog. */ 2943 /* Actually create the dialog. */
2373#ifdef HAVE_DIALOGS 2944#if TARGET_API_MAC_CARBON
2374 menu_item_selection = mac_dialog (first_wv); 2945 menu_item_selection = create_and_show_dialog (f, first_wv);
2375#else 2946#else
2376 menu_item_selection = 0; 2947 menu_item_selection = mac_dialog (first_wv);
2377#endif 2948#endif
2378 2949
2379 /* Free the widget_value objects we used to specify the contents. */ 2950 /* Free the widget_value objects we used to specify the contents. */
@@ -2485,6 +3056,10 @@ add_menu_item (menu, pos, wv)
2485 EnableMenuItem (menu, pos); 3056 EnableMenuItem (menu, pos);
2486 else 3057 else
2487 DisableMenuItem (menu, pos); 3058 DisableMenuItem (menu, pos);
3059
3060 if (STRINGP (wv->help))
3061 SetMenuItemProperty (menu, pos, MAC_EMACS_CREATOR_CODE, 'help',
3062 sizeof (Lisp_Object), &wv->help);
2488#else /* ! TARGET_API_MAC_CARBON */ 3063#else /* ! TARGET_API_MAC_CARBON */
2489 item_name[sizeof (item_name) - 1] = '\0'; 3064 item_name[sizeof (item_name) - 1] = '\0';
2490 strncpy (item_name, wv->name, sizeof (item_name) - 1); 3065 strncpy (item_name, wv->name, sizeof (item_name) - 1);
diff --git a/src/macros.c b/src/macros.c
index fb452e4e318..40fb429d41d 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -1,6 +1,6 @@
1/* Keyboard macros. 1/* Keyboard macros.
2 Copyright (C) 1985, 1986, 1993, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1993, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/macros.h b/src/macros.h
index bdd510456b0..2fb01667918 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -1,6 +1,6 @@
1/* Definitions for keyboard macro interpretation in GNU Emacs. 1/* Definitions for keyboard macro interpretation in GNU Emacs.
2 Copyright (C) 1985, 2002, 2003, 2004, 2005, 2 Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/macselect.c b/src/macselect.c
index 8d15db24144..8e86c7651e2 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -1,5 +1,5 @@
1/* Selection processing for Emacs on Mac OS. 1/* Selection processing for Emacs on Mac OS.
2 Copyright (C) 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -1390,7 +1390,7 @@ nil, which means the event is already resumed or expired. */)
1390 ae = *p; 1390 ae = *p;
1391 *p = (*p)->next; 1391 *p = (*p)->next;
1392 if (INTEGERP (error_code) 1392 if (INTEGERP (error_code)
1393 && ae->apple_event.descriptorType != typeNull) 1393 && ae->reply.descriptorType != typeNull)
1394 { 1394 {
1395 SInt32 errn = XINT (error_code); 1395 SInt32 errn = XINT (error_code);
1396 1396
@@ -1562,10 +1562,17 @@ mac_do_receive_drag (window, refcon, drag)
1562 GlobalToLocal (&mouse_pos); 1562 GlobalToLocal (&mouse_pos);
1563 err = GetDragModifiers (drag, NULL, NULL, &modifiers); 1563 err = GetDragModifiers (drag, NULL, NULL, &modifiers);
1564 } 1564 }
1565 if (err == noErr)
1566 {
1567 UInt32 key_modifiers = modifiers;
1568
1569 err = AEPutParamPtr (&apple_event, kEventParamKeyModifiers,
1570 typeUInt32, &key_modifiers, sizeof (UInt32));
1571 }
1565 1572
1566 if (err == noErr) 1573 if (err == noErr)
1567 { 1574 {
1568 mac_store_drag_event (window, mouse_pos, modifiers, &apple_event); 1575 mac_store_drag_event (window, mouse_pos, 0, &apple_event);
1569 AEDisposeDesc (&apple_event); 1576 AEDisposeDesc (&apple_event);
1570 mac_wakeup_from_rne (); 1577 mac_wakeup_from_rne ();
1571 return noErr; 1578 return noErr;
diff --git a/src/macterm.c b/src/macterm.c
index cb0e024b8eb..fa2e5da8560 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1,6 +1,6 @@
1/* Implementation of GUI terminal on the Mac OS. 1/* Implementation of GUI terminal on the Mac OS.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -272,16 +272,63 @@ static void XSetFont P_ ((Display *, GC, XFontStruct *));
272#define GC_BACK_COLOR(gc) (&(gc)->back_color) 272#define GC_BACK_COLOR(gc) (&(gc)->back_color)
273#define GC_FONT(gc) ((gc)->xgcv.font) 273#define GC_FONT(gc) ((gc)->xgcv.font)
274#define FRAME_NORMAL_GC(f) ((f)->output_data.mac->normal_gc) 274#define FRAME_NORMAL_GC(f) ((f)->output_data.mac->normal_gc)
275#define CG_SET_FILL_COLOR(context, color) \ 275
276#define CG_SET_FILL_COLOR(context, color) \
276 CGContextSetRGBFillColor (context, \ 277 CGContextSetRGBFillColor (context, \
277 RED_FROM_ULONG (color) / 255.0f, \ 278 RED_FROM_ULONG (color) / 255.0f, \
278 GREEN_FROM_ULONG (color) / 255.0f, \ 279 GREEN_FROM_ULONG (color) / 255.0f, \
279 BLUE_FROM_ULONG (color) / 255.0f, 1.0f) 280 BLUE_FROM_ULONG (color) / 255.0f, 1.0f)
280#define CG_SET_STROKE_COLOR(context, color) \ 281#if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
282#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
283#define CG_SET_FILL_COLOR_MAYBE_WITH_CGCOLOR(context, color, cg_color) \
284 do { \
285 if (CGColorGetTypeID != NULL) \
286 CGContextSetFillColorWithColor (context, cg_color); \
287 else \
288 CG_SET_FILL_COLOR (context, color); \
289 } while (0)
290#else
291#define CG_SET_FILL_COLOR_MAYBE_WITH_CGCOLOR(context, color, cg_color) \
292 CGContextSetFillColorWithColor (context, cg_color)
293#endif
294#else
295#define CG_SET_FILL_COLOR_MAYBE_WITH_CGCOLOR(context, color, cg_color) \
296 CG_SET_FILL_COLOR (context, color)
297#endif
298#define CG_SET_FILL_COLOR_WITH_GC_FOREGROUND(context, gc) \
299 CG_SET_FILL_COLOR_MAYBE_WITH_CGCOLOR (context, (gc)->xgcv.foreground, \
300 (gc)->cg_fore_color)
301#define CG_SET_FILL_COLOR_WITH_GC_BACKGROUND(context, gc) \
302 CG_SET_FILL_COLOR_MAYBE_WITH_CGCOLOR (context, (gc)->xgcv.background, \
303 (gc)->cg_back_color)
304
305
306#define CG_SET_STROKE_COLOR(context, color) \
281 CGContextSetRGBStrokeColor (context, \ 307 CGContextSetRGBStrokeColor (context, \
282 RED_FROM_ULONG (color) / 255.0f, \ 308 RED_FROM_ULONG (color) / 255.0f, \
283 GREEN_FROM_ULONG (color) / 255.0f, \ 309 GREEN_FROM_ULONG (color) / 255.0f, \
284 BLUE_FROM_ULONG (color) / 255.0f, 1.0f) 310 BLUE_FROM_ULONG (color) / 255.0f, 1.0f)
311#if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
312#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
313#define CG_SET_STROKE_COLOR_MAYBE_WITH_CGCOLOR(context, color, cg_color) \
314 do { \
315 if (CGColorGetTypeID != NULL) \
316 CGContextSetStrokeColorWithColor (context, cg_color); \
317 else \
318 CG_SET_STROKE_COLOR (context, color); \
319 } while (0)
320#else
321#define CG_SET_STROKE_COLOR_MAYBE_WITH_CGCOLOR(context, color, cg_color) \
322 CGContextSetStrokeColorWithColor (context, cg_color)
323#endif
324#else
325#define CG_SET_STROKE_COLOR_MAYBE_WITH_CGCOLOR(context, color, cg_color) \
326 CG_SET_STROKE_COLOR (context, color)
327#endif
328#define CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND(context, gc) \
329 CG_SET_STROKE_COLOR_MAYBE_WITH_CGCOLOR (context, (gc)->xgcv.foreground, \
330 (gc)->cg_fore_color)
331
285#if USE_CG_DRAWING 332#if USE_CG_DRAWING
286#define FRAME_CG_CONTEXT(f) ((f)->output_data.mac->cg_context) 333#define FRAME_CG_CONTEXT(f) ((f)->output_data.mac->cg_context)
287 334
@@ -290,6 +337,29 @@ static void XSetFont P_ ((Display *, GC, XFontStruct *));
290static int max_fringe_bmp = 0; 337static int max_fringe_bmp = 0;
291static CGImageRef *fringe_bmp = 0; 338static CGImageRef *fringe_bmp = 0;
292 339
340static CGColorSpaceRef mac_cg_color_space_rgb;
341#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
342static CGColorRef mac_cg_color_black;
343#endif
344
345static void
346init_cg_color ()
347{
348 mac_cg_color_space_rgb = CGColorSpaceCreateDeviceRGB ();
349#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
350#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
351 /* Don't check the availability of CGColorCreate; this symbol is
352 defined even in Mac OS X 10.1. */
353 if (CGColorGetTypeID != NULL)
354#endif
355 {
356 float rgba[] = {0.0f, 0.0f, 0.0f, 1.0f};
357
358 mac_cg_color_black = CGColorCreate (mac_cg_color_space_rgb, rgba);
359 }
360#endif
361}
362
293static CGContextRef 363static CGContextRef
294mac_begin_cg_clip (f, gc) 364mac_begin_cg_clip (f, gc)
295 struct frame *f; 365 struct frame *f;
@@ -403,7 +473,7 @@ mac_draw_line (f, gc, x1, y1, x2, y2)
403 gy1 += 0.5f, gy2 += 0.5f; 473 gy1 += 0.5f, gy2 += 0.5f;
404 474
405 context = mac_begin_cg_clip (f, gc); 475 context = mac_begin_cg_clip (f, gc);
406 CG_SET_STROKE_COLOR (context, gc->xgcv.foreground); 476 CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND (context, gc);
407 CGContextBeginPath (context); 477 CGContextBeginPath (context);
408 CGContextMoveToPoint (context, gx1, gy1); 478 CGContextMoveToPoint (context, gx1, gy1);
409 CGContextAddLineToPoint (context, gx2, gy2); 479 CGContextAddLineToPoint (context, gx2, gy2);
@@ -437,8 +507,10 @@ mac_draw_line (f, gc, x1, y1, x2, y2)
437#endif 507#endif
438} 508}
439 509
510/* Mac version of XDrawLine (to Pixmap). */
511
440void 512void
441mac_draw_line_to_pixmap (display, p, gc, x1, y1, x2, y2) 513XDrawLine (display, p, gc, x1, y1, x2, y2)
442 Display *display; 514 Display *display;
443 Pixmap p; 515 Pixmap p;
444 GC gc; 516 GC gc;
@@ -487,7 +559,7 @@ mac_erase_rectangle (f, gc, x, y, width, height)
487 CGContextRef context; 559 CGContextRef context;
488 560
489 context = mac_begin_cg_clip (f, gc); 561 context = mac_begin_cg_clip (f, gc);
490 CG_SET_FILL_COLOR (context, gc->xgcv.background); 562 CG_SET_FILL_COLOR_WITH_GC_BACKGROUND (context, gc);
491 CGContextFillRect (context, CGRectMake (x, y, width, height)); 563 CGContextFillRect (context, CGRectMake (x, y, width, height));
492 mac_end_cg_clip (f); 564 mac_end_cg_clip (f);
493#else 565#else
@@ -529,7 +601,7 @@ mac_clear_window (f)
529 GC gc = FRAME_NORMAL_GC (f); 601 GC gc = FRAME_NORMAL_GC (f);
530 602
531 context = mac_begin_cg_clip (f, NULL); 603 context = mac_begin_cg_clip (f, NULL);
532 CG_SET_FILL_COLOR (context, gc->xgcv.background); 604 CG_SET_FILL_COLOR_WITH_GC_BACKGROUND (context, gc);
533 CGContextFillRect (context, CGRectMake (0, 0, FRAME_PIXEL_WIDTH (f), 605 CGContextFillRect (context, CGRectMake (0, 0, FRAME_PIXEL_WIDTH (f),
534 FRAME_PIXEL_HEIGHT (f))); 606 FRAME_PIXEL_HEIGHT (f)));
535 mac_end_cg_clip (f); 607 mac_end_cg_clip (f);
@@ -572,14 +644,14 @@ mac_draw_cg_image (image, f, gc, src_x, src_y, width, height,
572 context = mac_begin_cg_clip (f, gc); 644 context = mac_begin_cg_clip (f, gc);
573 if (!overlay_p) 645 if (!overlay_p)
574 { 646 {
575 CG_SET_FILL_COLOR (context, gc->xgcv.background); 647 CG_SET_FILL_COLOR_WITH_GC_BACKGROUND (context, gc);
576 CGContextFillRect (context, dest_rect); 648 CGContextFillRect (context, dest_rect);
577 } 649 }
578 CGContextClipToRect (context, dest_rect); 650 CGContextClipToRect (context, dest_rect);
579 CGContextScaleCTM (context, 1, -1); 651 CGContextScaleCTM (context, 1, -1);
580 CGContextTranslateCTM (context, 0, -port_height); 652 CGContextTranslateCTM (context, 0, -port_height);
581 if (CGImageIsMask (image)) 653 if (CGImageIsMask (image))
582 CG_SET_FILL_COLOR (context, gc->xgcv.foreground); 654 CG_SET_FILL_COLOR_WITH_GC_FOREGROUND (context, gc);
583 CGContextDrawImage (context, 655 CGContextDrawImage (context,
584 CGRectMake (dest_x - src_x, 656 CGRectMake (dest_x - src_x,
585 port_height - (dest_y - src_y 657 port_height - (dest_y - src_y
@@ -766,7 +838,7 @@ mac_fill_rectangle (f, gc, x, y, width, height)
766 CGContextRef context; 838 CGContextRef context;
767 839
768 context = mac_begin_cg_clip (f, gc); 840 context = mac_begin_cg_clip (f, gc);
769 CG_SET_FILL_COLOR (context, gc->xgcv.foreground); 841 CG_SET_FILL_COLOR_WITH_GC_FOREGROUND (context, gc);
770 CGContextFillRect (context, CGRectMake (x, y, width, height)); 842 CGContextFillRect (context, CGRectMake (x, y, width, height));
771 mac_end_cg_clip (f); 843 mac_end_cg_clip (f);
772#else 844#else
@@ -797,7 +869,7 @@ mac_draw_rectangle (f, gc, x, y, width, height)
797 CGContextRef context; 869 CGContextRef context;
798 870
799 context = mac_begin_cg_clip (f, gc); 871 context = mac_begin_cg_clip (f, gc);
800 CG_SET_STROKE_COLOR (context, gc->xgcv.foreground); 872 CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND (context, gc);
801 CGContextStrokeRect (context, 873 CGContextStrokeRect (context,
802 CGRectMake (x + 0.5f, y + 0.5f, width, height)); 874 CGRectMake (x + 0.5f, y + 0.5f, width, height));
803 mac_end_cg_clip (f); 875 mac_end_cg_clip (f);
@@ -984,7 +1056,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width,
984#endif 1056#endif
985 if (bg_width) 1057 if (bg_width)
986 { 1058 {
987 CG_SET_FILL_COLOR (context, gc->xgcv.background); 1059 CG_SET_FILL_COLOR_WITH_GC_BACKGROUND (context, gc);
988 CGContextFillRect 1060 CGContextFillRect
989 (context, 1061 (context,
990 CGRectMake (x, y - FONT_BASE (GC_FONT (gc)), 1062 CGRectMake (x, y - FONT_BASE (GC_FONT (gc)),
@@ -995,7 +1067,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width,
995#if !USE_CG_DRAWING 1067#if !USE_CG_DRAWING
996 } 1068 }
997#endif 1069#endif
998 CG_SET_FILL_COLOR (context, gc->xgcv.foreground); 1070 CG_SET_FILL_COLOR_WITH_GC_FOREGROUND (context, gc);
999 err = ATSUSetLayoutControls (text_layout, 1071 err = ATSUSetLayoutControls (text_layout,
1000 sizeof (tags) / sizeof (tags[0]), 1072 sizeof (tags) / sizeof (tags[0]),
1001 tags, sizes, values); 1073 tags, sizes, values);
@@ -1346,7 +1418,7 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
1346#endif 1418#endif
1347 if (bg_width) 1419 if (bg_width)
1348 { 1420 {
1349 CG_SET_FILL_COLOR (context, gc->xgcv.background); 1421 CG_SET_FILL_COLOR_WITH_GC_BACKGROUND (context, gc);
1350 CGContextFillRect 1422 CGContextFillRect
1351 (context, 1423 (context,
1352 CGRectMake (gx, y - FONT_BASE (GC_FONT (gc)), 1424 CGRectMake (gx, y - FONT_BASE (GC_FONT (gc)),
@@ -1357,7 +1429,7 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
1357#if !USE_CG_DRAWING 1429#if !USE_CG_DRAWING
1358 } 1430 }
1359#endif 1431#endif
1360 CG_SET_FILL_COLOR (context, gc->xgcv.foreground); 1432 CG_SET_FILL_COLOR_WITH_GC_FOREGROUND (context, gc);
1361 CGContextSetFont (context, GC_FONT (gc)->cg_font); 1433 CGContextSetFont (context, GC_FONT (gc)->cg_font);
1362 CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize); 1434 CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize);
1363 if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold) 1435 if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold)
@@ -1560,15 +1632,25 @@ XChangeGC (display, gc, mask, xgcv)
1560/* Mac replacement for XCreateGC. */ 1632/* Mac replacement for XCreateGC. */
1561 1633
1562GC 1634GC
1563XCreateGC (display, window, mask, xgcv) 1635XCreateGC (display, d, mask, xgcv)
1564 Display *display; 1636 Display *display;
1565 Window window; 1637 void *d;
1566 unsigned long mask; 1638 unsigned long mask;
1567 XGCValues *xgcv; 1639 XGCValues *xgcv;
1568{ 1640{
1569 GC gc = xmalloc (sizeof (*gc)); 1641 GC gc = xmalloc (sizeof (*gc));
1570 1642
1571 bzero (gc, sizeof (*gc)); 1643 bzero (gc, sizeof (*gc));
1644#if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1645#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1646 if (CGColorGetTypeID != NULL)
1647#endif
1648 {
1649 gc->cg_fore_color = gc->cg_back_color = mac_cg_color_black;
1650 CGColorRetain (gc->cg_fore_color);
1651 CGColorRetain (gc->cg_back_color);
1652 }
1653#endif
1572 XChangeGC (display, gc, mask, xgcv); 1654 XChangeGC (display, gc, mask, xgcv);
1573 1655
1574 return gc; 1656 return gc;
@@ -1584,6 +1666,15 @@ XFreeGC (display, gc)
1584{ 1666{
1585 if (gc->clip_region) 1667 if (gc->clip_region)
1586 DisposeRgn (gc->clip_region); 1668 DisposeRgn (gc->clip_region);
1669#if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1670#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1671 if (CGColorGetTypeID != NULL)
1672#endif
1673 {
1674 CGColorRelease (gc->cg_fore_color);
1675 CGColorRelease (gc->cg_back_color);
1676 }
1677#endif
1587 xfree (gc); 1678 xfree (gc);
1588} 1679}
1589 1680
@@ -1620,6 +1711,29 @@ XSetForeground (display, gc, color)
1620 gc->fore_color.red = RED16_FROM_ULONG (color); 1711 gc->fore_color.red = RED16_FROM_ULONG (color);
1621 gc->fore_color.green = GREEN16_FROM_ULONG (color); 1712 gc->fore_color.green = GREEN16_FROM_ULONG (color);
1622 gc->fore_color.blue = BLUE16_FROM_ULONG (color); 1713 gc->fore_color.blue = BLUE16_FROM_ULONG (color);
1714#if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1715#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1716 if (CGColorGetTypeID != NULL)
1717#endif
1718 {
1719 CGColorRelease (gc->cg_fore_color);
1720 if (color == 0)
1721 {
1722 gc->cg_fore_color = mac_cg_color_black;
1723 CGColorRetain (gc->cg_fore_color);
1724 }
1725 else
1726 {
1727 float rgba[4];
1728
1729 rgba[0] = gc->fore_color.red / 65535.0f;
1730 rgba[1] = gc->fore_color.green / 65535.0f;
1731 rgba[2] = gc->fore_color.blue / 65535.0f;
1732 rgba[3] = 1.0f;
1733 gc->cg_fore_color = CGColorCreate (mac_cg_color_space_rgb, rgba);
1734 }
1735 }
1736#endif
1623 } 1737 }
1624} 1738}
1625 1739
@@ -1638,6 +1752,29 @@ XSetBackground (display, gc, color)
1638 gc->back_color.red = RED16_FROM_ULONG (color); 1752 gc->back_color.red = RED16_FROM_ULONG (color);
1639 gc->back_color.green = GREEN16_FROM_ULONG (color); 1753 gc->back_color.green = GREEN16_FROM_ULONG (color);
1640 gc->back_color.blue = BLUE16_FROM_ULONG (color); 1754 gc->back_color.blue = BLUE16_FROM_ULONG (color);
1755#if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1756#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1757 if (CGColorGetTypeID != NULL)
1758#endif
1759 {
1760 CGColorRelease (gc->cg_back_color);
1761 if (color == 0)
1762 {
1763 gc->cg_back_color = mac_cg_color_black;
1764 CGColorRetain (gc->cg_back_color);
1765 }
1766 else
1767 {
1768 float rgba[4];
1769
1770 rgba[0] = gc->back_color.red / 65535.0f;
1771 rgba[1] = gc->back_color.green / 65535.0f;
1772 rgba[2] = gc->back_color.blue / 65535.0f;
1773 rgba[3] = 1.0f;
1774 gc->cg_back_color = CGColorCreate (mac_cg_color_space_rgb, rgba);
1775 }
1776 }
1777#endif
1641 } 1778 }
1642} 1779}
1643 1780
@@ -6454,6 +6591,9 @@ x_free_frame_resources (f)
6454 if (wp != tip_window) 6591 if (wp != tip_window)
6455 remove_window_handler (wp); 6592 remove_window_handler (wp);
6456 6593
6594#if USE_CG_DRAWING
6595 mac_prepare_for_quickdraw (f);
6596#endif
6457 DisposeWindow (wp); 6597 DisposeWindow (wp);
6458 if (wp == tip_window) 6598 if (wp == tip_window)
6459 /* Neither WaitNextEvent nor ReceiveNextEvent receives `window 6599 /* Neither WaitNextEvent nor ReceiveNextEvent receives `window
@@ -8759,14 +8899,18 @@ extern void mac_find_apple_event_spec P_ ((AEEventClass, AEEventID,
8759extern OSErr init_coercion_handler P_ ((void)); 8899extern OSErr init_coercion_handler P_ ((void));
8760 8900
8761/* Drag and Drop */ 8901/* Drag and Drop */
8762OSErr install_drag_handler P_ ((WindowRef)); 8902extern OSErr install_drag_handler P_ ((WindowRef));
8763void remove_drag_handler P_ ((WindowRef)); 8903extern void remove_drag_handler P_ ((WindowRef));
8904
8905/* Showing help echo string during menu tracking */
8906extern OSStatus install_menu_target_item_handler P_ ((WindowPtr));
8764 8907
8765#if USE_CARBON_EVENTS 8908#if USE_CARBON_EVENTS
8766#ifdef MAC_OSX 8909#ifdef MAC_OSX
8767extern void init_service_handler (); 8910extern void init_service_handler ();
8768static Lisp_Object Qservice, Qpaste, Qperform; 8911static Lisp_Object Qservice, Qpaste, Qperform;
8769#endif 8912#endif
8913
8770/* Window Event Handler */ 8914/* Window Event Handler */
8771static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, 8915static pascal OSStatus mac_handle_window_event (EventHandlerCallRef,
8772 EventRef, void *); 8916 EventRef, void *);
@@ -8854,7 +8998,7 @@ static const unsigned char fn_keycode_to_keycode_table[] = {
8854}; 8998};
8855#endif /* MAC_OSX */ 8999#endif /* MAC_OSX */
8856 9000
8857static unsigned int 9001static int
8858#if USE_CARBON_EVENTS 9002#if USE_CARBON_EVENTS
8859mac_to_emacs_modifiers (UInt32 mods) 9003mac_to_emacs_modifiers (UInt32 mods)
8860#else 9004#else
@@ -8901,6 +9045,23 @@ mac_to_emacs_modifiers (EventModifiers mods)
8901 return result; 9045 return result;
8902} 9046}
8903 9047
9048static UInt32
9049mac_mapped_modifiers (modifiers)
9050 UInt32 modifiers;
9051{
9052 UInt32 mapped_modifiers_all =
9053 (NILP (Vmac_control_modifier) ? 0 : controlKey)
9054 | (NILP (Vmac_option_modifier) ? 0 : optionKey)
9055 | (NILP (Vmac_command_modifier) ? 0 : cmdKey);
9056
9057#ifdef MAC_OSX
9058 mapped_modifiers_all |=
9059 (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask);
9060#endif
9061
9062 return mapped_modifiers_all & modifiers;
9063}
9064
8904static int 9065static int
8905mac_get_emulated_btn ( UInt32 modifiers ) 9066mac_get_emulated_btn ( UInt32 modifiers )
8906{ 9067{
@@ -8915,10 +9076,42 @@ mac_get_emulated_btn ( UInt32 modifiers )
8915 return result; 9076 return result;
8916} 9077}
8917 9078
9079#if TARGET_API_MAC_CARBON
9080/***** Code to handle C-g testing *****/
9081extern int quit_char;
9082extern int make_ctrl_char P_ ((int));
9083
9084int
9085mac_quit_char_key_p (modifiers, key_code)
9086 UInt32 modifiers, key_code;
9087{
9088 UInt32 char_code;
9089 unsigned long some_state = 0;
9090 Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
9091 int c, emacs_modifiers;
9092
9093 /* Mask off modifier keys that are mapped to some Emacs modifiers. */
9094 key_code |= (modifiers & ~(mac_mapped_modifiers (modifiers)));
9095 char_code = KeyTranslate (kchr_ptr, key_code, &some_state);
9096 if (char_code & ~0xff)
9097 return 0;
9098
9099 emacs_modifiers = mac_to_emacs_modifiers (modifiers);
9100 if (emacs_modifiers & ctrl_modifier)
9101 c = make_ctrl_char (char_code);
9102
9103 c |= (emacs_modifiers
9104 & (meta_modifier | alt_modifier
9105 | hyper_modifier | super_modifier));
9106
9107 return c == quit_char;
9108}
9109#endif
9110
8918#if USE_CARBON_EVENTS 9111#if USE_CARBON_EVENTS
8919/* Obtains the event modifiers from the event ref and then calls 9112/* Obtains the event modifiers from the event ref and then calls
8920 mac_to_emacs_modifiers. */ 9113 mac_to_emacs_modifiers. */
8921static UInt32 9114static int
8922mac_event_to_emacs_modifiers (EventRef eventRef) 9115mac_event_to_emacs_modifiers (EventRef eventRef)
8923{ 9116{
8924 UInt32 mods = 0; 9117 UInt32 mods = 0;
@@ -9143,6 +9336,9 @@ do_window_update (WindowPtr win)
9143 GetPortVisibleRegion (GetWindowPort (win), region); 9336 GetPortVisibleRegion (GetWindowPort (win), region);
9144 GetRegionBounds (region, &r); 9337 GetRegionBounds (region, &r);
9145 expose_frame (f, r.left, r.top, r.right - r.left, r.bottom - r.top); 9338 expose_frame (f, r.left, r.top, r.right - r.left, r.bottom - r.top);
9339#if USE_CG_DRAWING
9340 mac_prepare_for_quickdraw (f);
9341#endif
9146 UpdateControls (win, region); 9342 UpdateControls (win, region);
9147 DisposeRgn (region); 9343 DisposeRgn (region);
9148#else 9344#else
@@ -9954,21 +10150,10 @@ mac_handle_text_input_event (next_handler, event, data)
9954 err = GetEventParameter (kbd_event, kEventParamKeyModifiers, 10150 err = GetEventParameter (kbd_event, kEventParamKeyModifiers,
9955 typeUInt32, NULL, 10151 typeUInt32, NULL,
9956 sizeof (UInt32), NULL, &modifiers); 10152 sizeof (UInt32), NULL, &modifiers);
9957 if (err == noErr) 10153 if (err == noErr && mac_mapped_modifiers (modifiers))
9958 { 10154 /* There're mapped modifier keys. Process it in
9959 mapped_modifiers = 10155 XTread_socket. */
9960 (NILP (Vmac_control_modifier) ? 0 : controlKey) 10156 return eventNotHandledErr;
9961 | (NILP (Vmac_option_modifier) ? 0 : optionKey)
9962 | (NILP (Vmac_command_modifier) ? 0 : cmdKey);
9963#ifdef MAC_OSX
9964 mapped_modifiers |=
9965 (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask);
9966#endif
9967 if (modifiers & mapped_modifiers)
9968 /* There're mapped modifier keys. Process it in
9969 XTread_socket. */
9970 return eventNotHandledErr;
9971 }
9972 if (err == noErr) 10157 if (err == noErr)
9973 err = GetEventParameter (kbd_event, kEventParamKeyUnicodes, 10158 err = GetEventParameter (kbd_event, kEventParamKeyUnicodes,
9974 typeUnicodeText, NULL, 0, &actual_size, 10159 typeUnicodeText, NULL, 0, &actual_size,
@@ -10189,6 +10374,8 @@ install_window_handler (window)
10189#endif 10374#endif
10190 if (err == noErr) 10375 if (err == noErr)
10191 err = install_drag_handler (window); 10376 err = install_drag_handler (window);
10377 if (err == noErr)
10378 err = install_menu_target_item_handler (window);
10192 10379
10193 return err; 10380 return err;
10194} 10381}
@@ -10236,7 +10423,7 @@ main (void)
10236 10423
10237#if __MWERKS__ 10424#if __MWERKS__
10238 /* set creator and type for files created by MSL */ 10425 /* set creator and type for files created by MSL */
10239 _fcreator = 'EMAx'; 10426 _fcreator = MAC_EMACS_CREATOR_CODE;
10240 _ftype = 'TEXT'; 10427 _ftype = 'TEXT';
10241#endif 10428#endif
10242 10429
@@ -10893,20 +11080,12 @@ XTread_socket (sd, expected, hold_quit)
10893 SInt16 current_key_script; 11080 SInt16 current_key_script;
10894 UInt32 modifiers = er.modifiers, mapped_modifiers; 11081 UInt32 modifiers = er.modifiers, mapped_modifiers;
10895 11082
10896 mapped_modifiers =
10897 (NILP (Vmac_control_modifier) ? 0 : controlKey)
10898 | (NILP (Vmac_option_modifier) ? 0 : optionKey)
10899 | (NILP (Vmac_command_modifier) ? 0 : cmdKey);
10900
10901#if USE_CARBON_EVENTS && defined (MAC_OSX) 11083#if USE_CARBON_EVENTS && defined (MAC_OSX)
10902 mapped_modifiers |=
10903 (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask);
10904
10905 GetEventParameter (eventRef, kEventParamKeyModifiers, 11084 GetEventParameter (eventRef, kEventParamKeyModifiers,
10906 typeUInt32, NULL, 11085 typeUInt32, NULL,
10907 sizeof (UInt32), NULL, &modifiers); 11086 sizeof (UInt32), NULL, &modifiers);
10908#endif 11087#endif
10909 mapped_modifiers &= modifiers; 11088 mapped_modifiers = mac_mapped_modifiers (modifiers);
10910 11089
10911#if USE_CARBON_EVENTS && (defined (MAC_OSX) || USE_MAC_TSM) 11090#if USE_CARBON_EVENTS && (defined (MAC_OSX) || USE_MAC_TSM)
10912 /* When using Carbon Events, we need to pass raw keyboard 11091 /* When using Carbon Events, we need to pass raw keyboard
@@ -11460,35 +11639,6 @@ x_delete_display (dpyinfo)
11460 11639
11461#ifdef MAC_OSX 11640#ifdef MAC_OSX
11462void 11641void
11463mac_check_bundle()
11464{
11465 extern int inhibit_window_system;
11466 extern int noninteractive;
11467 CFBundleRef appsBundle;
11468
11469 /* No need to test if already -nw*/
11470 if (inhibit_window_system || noninteractive)
11471 return;
11472
11473 appsBundle = CFBundleGetMainBundle();
11474 if (appsBundle != NULL)
11475 {
11476 CFStringRef cfBI = CFSTR("CFBundleIdentifier");
11477 CFTypeRef res = CFBundleGetValueForInfoDictionaryKey(appsBundle, cfBI);
11478 /* We found the bundle identifier, now we know we are valid. */
11479 if (res != NULL)
11480 {
11481 CFRelease(res);
11482 return;
11483 }
11484 }
11485 /* MAC_TODO: Have this start the bundled executable */
11486
11487 /* For now, prevent the fatal error by bringing it up in the terminal */
11488 inhibit_window_system = 1;
11489}
11490
11491void
11492MakeMeTheFrontProcess () 11642MakeMeTheFrontProcess ()
11493{ 11643{
11494 ProcessSerialNumber psn; 11644 ProcessSerialNumber psn;
@@ -11498,37 +11648,6 @@ MakeMeTheFrontProcess ()
11498 if (err == noErr) 11648 if (err == noErr)
11499 (void) SetFrontProcess (&psn); 11649 (void) SetFrontProcess (&psn);
11500} 11650}
11501
11502/***** Code to handle C-g testing *****/
11503
11504/* Contains the Mac modifier formed from quit_char */
11505int mac_quit_char_modifiers = 0;
11506int mac_quit_char_keycode;
11507extern int quit_char;
11508
11509static void
11510mac_determine_quit_char_modifiers()
11511{
11512 /* Todo: Determine modifiers from quit_char. */
11513 UInt32 qc_modifiers = ctrl_modifier;
11514
11515 /* Map modifiers */
11516 mac_quit_char_modifiers = 0;
11517 if (qc_modifiers & ctrl_modifier) mac_quit_char_modifiers |= controlKey;
11518 if (qc_modifiers & shift_modifier) mac_quit_char_modifiers |= shiftKey;
11519 if (qc_modifiers & alt_modifier) mac_quit_char_modifiers |= optionKey;
11520}
11521
11522static void
11523init_quit_char_handler ()
11524{
11525 /* TODO: Let this support keys other the 'g' */
11526 mac_quit_char_keycode = 5;
11527 /* Look at <architecture/adb_kb_map.h> for details */
11528 /* http://gemma.apple.com/techpubs/mac/Toolbox/Toolbox-40.html#MARKER-9-184*/
11529
11530 mac_determine_quit_char_modifiers();
11531}
11532#endif /* MAC_OSX */ 11651#endif /* MAC_OSX */
11533 11652
11534static void 11653static void
@@ -11664,8 +11783,6 @@ mac_initialize ()
11664#if USE_CARBON_EVENTS 11783#if USE_CARBON_EVENTS
11665#ifdef MAC_OSX 11784#ifdef MAC_OSX
11666 init_service_handler (); 11785 init_service_handler ();
11667
11668 init_quit_char_handler ();
11669#endif /* MAC_OSX */ 11786#endif /* MAC_OSX */
11670 11787
11671 init_command_handler (); 11788 init_command_handler ();
@@ -11688,6 +11805,8 @@ mac_initialize ()
11688#endif 11805#endif
11689 11806
11690#if USE_CG_DRAWING 11807#if USE_CG_DRAWING
11808 init_cg_color ();
11809
11691 mac_init_fringe (); 11810 mac_init_fringe ();
11692#endif 11811#endif
11693 11812
diff --git a/src/macterm.h b/src/macterm.h
index 856d349f6f7..0447b41d908 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -1,6 +1,6 @@
1/* Display module for Mac OS. 1/* Display module for Mac OS.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -44,8 +44,6 @@ Boston, MA 02110-1301, USA. */
44#define FONT_BASE(f) ((f)->ascent) 44#define FONT_BASE(f) ((f)->ascent)
45#define FONT_DESCENT(f) ((f)->descent) 45#define FONT_DESCENT(f) ((f)->descent)
46 46
47#define FONT_MAX_WIDTH(f) FONT_WIDTH(f) /* fix later */
48
49/* Structure recording bitmaps and reference count. 47/* Structure recording bitmaps and reference count.
50 If REFCOUNT is 0 then this record is free to be reused. */ 48 If REFCOUNT is 0 then this record is free to be reused. */
51 49
@@ -527,10 +525,15 @@ struct scroll_bar {
527#define MAC_AQUA_SMALL_VERTICAL_SCROLL_BAR_WIDTH (11) 525#define MAC_AQUA_SMALL_VERTICAL_SCROLL_BAR_WIDTH (11)
528 526
529/* Size of hourglass controls */ 527/* Size of hourglass controls */
530#define HOURGLASS_WIDTH 16 528#define HOURGLASS_WIDTH (16)
531#define HOURGLASS_HEIGHT 16 529#define HOURGLASS_HEIGHT (16)
532 530
533/* Some constants that are used locally. */ 531/* Some constants that are used locally. */
532/* Creator code for Emacs on Mac OS. */
533enum {
534 MAC_EMACS_CREATOR_CODE = 'EMAx'
535};
536
534/* Apple event descriptor types */ 537/* Apple event descriptor types */
535enum { 538enum {
536 TYPE_FILE_NAME = 'fNam' 539 TYPE_FILE_NAME = 'fNam'
@@ -612,13 +615,12 @@ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *,
612 unsigned long, unsigned long, 615 unsigned long, unsigned long,
613 unsigned int)); 616 unsigned int));
614extern void XFreePixmap P_ ((Display *, Pixmap)); 617extern void XFreePixmap P_ ((Display *, Pixmap));
615extern GC XCreateGC P_ ((Display *, Window, unsigned long, XGCValues *)); 618extern GC XCreateGC P_ ((Display *, void *, unsigned long, XGCValues *));
616extern void XFreeGC P_ ((Display *, GC)); 619extern void XFreeGC P_ ((Display *, GC));
617extern void XSetForeground P_ ((Display *, GC, unsigned long)); 620extern void XSetForeground P_ ((Display *, GC, unsigned long));
618extern void XSetBackground P_ ((Display *, GC, unsigned long)); 621extern void XSetBackground P_ ((Display *, GC, unsigned long));
619extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); 622extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long));
620extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, 623extern void XDrawLine P_ ((Display *, Pixmap, GC, int, int, int, int));
621 int, int));
622extern void mac_clear_area P_ ((struct frame *, int, int, 624extern void mac_clear_area P_ ((struct frame *, int, int,
623 unsigned int, unsigned int)); 625 unsigned int, unsigned int));
624extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); 626extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
@@ -634,6 +636,7 @@ extern void do_apple_menu P_ ((SInt16));
634#if USE_CG_DRAWING 636#if USE_CG_DRAWING
635extern void mac_prepare_for_quickdraw P_ ((struct frame *)); 637extern void mac_prepare_for_quickdraw P_ ((struct frame *));
636#endif 638#endif
639extern int mac_quit_char_key_p P_ ((UInt32, UInt32));
637 640
638#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 641#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
639#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 642#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index e9aac2fb5a6..b3e752ee8e3 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -1,6 +1,6 @@
1# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. 1# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2# Copyright (C) 2000, 2001, 2002, 2003, 2004,
3# 2005, 2006 Free Software Foundation, Inc. 3# 2005, 2006, 2007 Free Software Foundation, Inc.
4# 4#
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6# 6#
diff --git a/src/marker.c b/src/marker.c
index bac8e46fc3f..b26aa404986 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -1,6 +1,6 @@
1/* Markers: examining, setting and deleting. 1/* Markers: examining, setting and deleting.
2 Copyright (C) 1985, 1997, 1998, 2002, 2003, 2004, 2 Copyright (C) 1985, 1997, 1998, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/md5.c b/src/md5.c
index 0daf2c3ef7c..4d8c6d890fe 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -1,7 +1,7 @@
1/* Functions to compute MD5 message digest of files or memory blocks. 1/* Functions to compute MD5 message digest of files or memory blocks.
2 according to the definition of MD5 in RFC 1321 from April 1992. 2 according to the definition of MD5 in RFC 1321 from April 1992.
3 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2002, 2003, 2004, 3 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 This file is part of the GNU Emacs. 5 This file is part of the GNU Emacs.
6 6
7 The GNU C Library is free software; you can redistribute it and/or 7 The GNU C Library is free software; you can redistribute it and/or
diff --git a/src/md5.h b/src/md5.h
index 202b2749504..a23dbd089ba 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -1,7 +1,7 @@
1/* Declaration of functions and data types used for MD5 sum computing 1/* Declaration of functions and data types used for MD5 sum computing
2 library functions. 2 library functions.
3 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2002, 2003, 2004, 3 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 This file is part of GNU Emacs. 5 This file is part of GNU Emacs.
6 6
7 The GNU C Library is free software; you can redistribute it and/or 7 The GNU C Library is free software; you can redistribute it and/or
diff --git a/src/mem-limits.h b/src/mem-limits.h
index 45dabca3ac5..30d57d8b51c 100644
--- a/src/mem-limits.h
+++ b/src/mem-limits.h
@@ -1,6 +1,6 @@
1/* Includes for memory limit warnings. 1/* Includes for memory limit warnings.
2 Copyright (C) 1990, 1993, 1994, 1995, 1996, 2002, 2003, 2004, 2 Copyright (C) 1990, 1993, 1994, 1995, 1996, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/minibuf.c b/src/minibuf.c
index 85a0169e10a..58bcf1ef1a4 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1,7 +1,7 @@
1/* Minibuffer input and completion. 1/* Minibuffer input and completion.
2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 3 2001, 2002, 2003, 2004, 2005,
4 2006 Free Software Foundation, Inc. 4 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -983,7 +983,7 @@ POSITION in the minibuffer. Any integer value less than or equal to
983one puts point at the beginning of the string. *Note* that this 983one puts point at the beginning of the string. *Note* that this
984behavior differs from the way such arguments are used in `completing-read' 984behavior differs from the way such arguments are used in `completing-read'
985and some related functions, which use zero-indexing for POSITION. */) 985and some related functions, which use zero-indexing for POSITION. */)
986(prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method) 986 (prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method)
987 Lisp_Object prompt, initial_contents, keymap, read, hist, default_value; 987 Lisp_Object prompt, initial_contents, keymap, read, hist, default_value;
988 Lisp_Object inherit_input_method; 988 Lisp_Object inherit_input_method;
989{ 989{
diff --git a/src/mktime.c b/src/mktime.c
index a85ebeb3783..20c1092a62a 100644
--- a/src/mktime.c
+++ b/src/mktime.c
@@ -1,6 +1,6 @@
1/* Convert a `struct tm' to a time_t value. 1/* Convert a `struct tm' to a time_t value.
2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
3 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 Contributed by Paul Eggert (eggert@twinsun.com). 4 Contributed by Paul Eggert (eggert@twinsun.com).
5 5
6 NOTE: The canonical source of this file is maintained with the GNU C Library. 6 NOTE: The canonical source of this file is maintained with the GNU C Library.
diff --git a/src/msdos.c b/src/msdos.c
index 4e989402a80..d40aafdcb34 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1,6 +1,6 @@
1/* MS-DOS specific C utilities. -*- coding: raw-text -*- 1/* MS-DOS specific C utilities. -*- coding: raw-text -*-
2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/msdos.h b/src/msdos.h
index cbe65818867..7a6d2e64ca0 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -1,6 +1,6 @@
1/* MS-DOS specific C utilities, interface. 1/* MS-DOS specific C utilities, interface.
2 Copyright (C) 1993, 2001, 2002, 2003, 2004, 2 Copyright (C) 1993, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/prefix-args.c b/src/prefix-args.c
index 5580d176bcf..50ab81c10c9 100644
--- a/src/prefix-args.c
+++ b/src/prefix-args.c
@@ -1,6 +1,6 @@
1/* prefix-args.c - echo each argument, prefixed by a string. 1/* prefix-args.c - echo each argument, prefixed by a string.
2 Copyright (C) 1992, 2002, 2003, 2004, 2005, 2 Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/print.c b/src/print.c
index f6b64e32e30..0fef9cb9880 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,7 +1,7 @@
1/* Lisp object printing and output streams. 1/* Lisp object printing and output streams.
2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997,
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/process.c b/src/process.c
index 6dc5a88944c..4611ce2c05c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1,7 +1,7 @@
1/* Asynchronous subprocess control for GNU Emacs. 1/* Asynchronous subprocess control for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
3 1996, 1998, 1999, 2001, 2002, 2003, 2004, 3 1996, 1998, 1999, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -814,9 +814,12 @@ nil, indicating the current buffer's process. */)
814 { 814 {
815#ifdef SIGCHLD 815#ifdef SIGCHLD
816 Lisp_Object symbol; 816 Lisp_Object symbol;
817 /* Assignment to EMACS_INT stops GCC whining about limited range
818 of data type. */
819 EMACS_INT pid = p->pid;;
817 820
818 /* No problem storing the pid here, as it is still in Vprocess_alist. */ 821 /* No problem storing the pid here, as it is still in Vprocess_alist. */
819 deleted_pid_list = Fcons (make_fixnum_or_float (p->pid), 822 deleted_pid_list = Fcons (make_fixnum_or_float (pid),
820 /* GC treated elements set to nil. */ 823 /* GC treated elements set to nil. */
821 Fdelq (Qnil, deleted_pid_list)); 824 Fdelq (Qnil, deleted_pid_list));
822 /* If the process has already signaled, remove it from the list. */ 825 /* If the process has already signaled, remove it from the list. */
@@ -826,7 +829,7 @@ nil, indicating the current buffer's process. */)
826 if (CONSP (p->status)) 829 if (CONSP (p->status))
827 symbol = XCAR (p->status); 830 symbol = XCAR (p->status);
828 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) 831 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit))
829 Fdelete (make_fixnum_or_float (p->pid), deleted_pid_list); 832 Fdelete (make_fixnum_or_float (pid), deleted_pid_list);
830 else 833 else
831#endif 834#endif
832 { 835 {
@@ -911,10 +914,13 @@ For a network connection, this value is nil. */)
911 (process) 914 (process)
912 register Lisp_Object process; 915 register Lisp_Object process;
913{ 916{
917 /* Assignment to EMACS_INT stops GCC whining about limited range of
918 data type. */
919 EMACS_INT pid;
920
914 CHECK_PROCESS (process); 921 CHECK_PROCESS (process);
915 return (XPROCESS (process)->pid 922 pid = XPROCESS (process)->pid;
916 ? make_fixnum_or_float (XPROCESS (process)->pid) 923 return (pid ? make_fixnum_or_float (pid) : Qnil);
917 : Qnil);
918} 924}
919 925
920DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, 926DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0,
@@ -6386,7 +6392,7 @@ sigchld_handler (signo)
6386 6392
6387 while (1) 6393 while (1)
6388 { 6394 {
6389 register int pid; 6395 register EMACS_INT pid;
6390 WAITTYPE w; 6396 WAITTYPE w;
6391 Lisp_Object tail; 6397 Lisp_Object tail;
6392 6398
diff --git a/src/process.h b/src/process.h
index fcf8d9b6c1f..718d2a70ea8 100644
--- a/src/process.h
+++ b/src/process.h
@@ -1,6 +1,6 @@
1/* Definitions for asynchronous process control in GNU Emacs. 1/* Definitions for asynchronous process control in GNU Emacs.
2 Copyright (C) 1985, 1994, 2002, 2003, 2004, 2 Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/puresize.h b/src/puresize.h
index 5dd374af207..95f6ef6b620 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -1,6 +1,6 @@
1/* How much read-only Lisp storage a dumped Emacs needs. 1/* How much read-only Lisp storage a dumped Emacs needs.
2 Copyright (C) 1993, 2002, 2003, 2004, 2005, 2 Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/ralloc.c b/src/ralloc.c
index 83a26dd35d6..7b319556117 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1,6 +1,6 @@
1/* Block-relocating memory allocator. 1/* Block-relocating memory allocator.
2 Copyright (C) 1993, 1995, 2000, 2002, 2003, 2004, 2 Copyright (C) 1993, 1995, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/regex.c b/src/regex.c
index 396e55c6404..177908cb751 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -3,7 +3,7 @@
3 internationalization features.) 3 internationalization features.)
4 4
5 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 5 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
6 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 6 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/src/regex.h b/src/regex.h
index e065c597d49..3f3d313397b 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -1,8 +1,9 @@
1/* Definitions for data structures and routines for the regular 1/* Definitions for data structures and routines for the regular
2 expression library, version 0.12. 2 expression library, version 0.12.
3 3
4 Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 2000, 2002, 4 Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 2000, 2001,
5 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 5 2002, 2003, 2004, 2005, 2006, 2007
6 Free Software Foundation, Inc.
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/src/region-cache.c b/src/region-cache.c
index cedb0017da0..f30e00470f7 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -1,6 +1,6 @@
1/* Caching facts about regions of the buffer, for optimization. 1/* Caching facts about regions of the buffer, for optimization.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1995, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1995, 2001, 2002, 2003,
3 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/region-cache.h b/src/region-cache.h
index 40e68084cce..27176d80dbc 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -1,6 +1,6 @@
1/* Header file: Caching facts about regions of the buffer, for optimization. 1/* Header file: Caching facts about regions of the buffer, for optimization.
2 Copyright (C) 1985, 1986, 1993, 1995, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1993, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/aix3-1.h b/src/s/aix3-1.h
index f77a209f0d2..204baa40f07 100644
--- a/src/s/aix3-1.h
+++ b/src/s/aix3-1.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on IBM AIX version 3.1 1/* Definitions file for GNU Emacs running on IBM AIX version 3.1
2 Copyright (C) 1985, 1986, 1990, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1990, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/bsd4-1.h b/src/s/bsd4-1.h
index 3e6a44f1fab..2b11ba2302f 100644
--- a/src/s/bsd4-1.h
+++ b/src/s/bsd4-1.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on bsd 4.1. 1/* Definitions file for GNU Emacs running on bsd 4.1.
2 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/bsd4-2.h b/src/s/bsd4-2.h
index ace519c0d74..40c655bea87 100644
--- a/src/s/bsd4-2.h
+++ b/src/s/bsd4-2.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on bsd 4.2 1/* Definitions file for GNU Emacs running on bsd 4.2
2 Copyright (C) 1985, 1986, 1994, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/bsd4-3.h b/src/s/bsd4-3.h
index 483effe71c1..249cf34f41b 100644
--- a/src/s/bsd4-3.h
+++ b/src/s/bsd4-3.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on bsd 4.3 1/* Definitions file for GNU Emacs running on bsd 4.3
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/cxux.h b/src/s/cxux.h
index 3c4ffcd24a2..daed2fc85d8 100644
--- a/src/s/cxux.h
+++ b/src/s/cxux.h
@@ -1,6 +1,6 @@
1/* Header file for Harris CXUX. 1/* Header file for Harris CXUX.
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/cygwin.h b/src/s/cygwin.h
index 749d1a38e3e..eff48e339cb 100644
--- a/src/s/cygwin.h
+++ b/src/s/cygwin.h
@@ -2,7 +2,7 @@
2 This file describes the parameters that system description files 2 This file describes the parameters that system description files
3 should define or not. 3 should define or not.
4 Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 4 Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004,
5 2005, 2006 Free Software Foundation, Inc. 5 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/s/darwin.h b/src/s/darwin.h
index 91975cd441b..7175ea5457c 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -1,6 +1,6 @@
1/* System description header file for Darwin (Mac OS X). 1/* System description header file for Darwin (Mac OS X).
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/dgux.h b/src/s/dgux.h
index d48d95709c8..62194a2fc6e 100644
--- a/src/s/dgux.h
+++ b/src/s/dgux.h
@@ -1,7 +1,7 @@
1/* Definitions file for GNU Emacs running on Data General's DG/UX 1/* Definitions file for GNU Emacs running on Data General's DG/UX
2 version 4.32 upto and including 5.4.1. 2 version 4.32 upto and including 5.4.1.
3 Copyright (C) 1994, 1999, 2002, 2003, 2004, 3 Copyright (C) 1994, 1999, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/s/dgux4.h b/src/s/dgux4.h
index ee24cd65b50..01d75650e6f 100644
--- a/src/s/dgux4.h
+++ b/src/s/dgux4.h
@@ -1,7 +1,7 @@
1/* Definitions file for GNU Emacs running on Data General's DG/UX 1/* Definitions file for GNU Emacs running on Data General's DG/UX
2 Release 4.10 and above. 2 Release 4.10 and above.
3 Copyright (C) 1996, 2002, 2003, 2004, 2005, 3 Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005,
4 2006 Free Software Foundation, Inc. 4 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/s/dgux5-4-3.h b/src/s/dgux5-4-3.h
index d0f6d4f43e8..c9f471af05a 100644
--- a/src/s/dgux5-4-3.h
+++ b/src/s/dgux5-4-3.h
@@ -1,7 +1,7 @@
1/* Definitions file for GNU Emacs running on Data General's DG/UX 1/* Definitions file for GNU Emacs running on Data General's DG/UX
2 version 5.4 Release 3.00 and above. 2 version 5.4 Release 3.00 and above.
3 Copyright (C) 1994, 2002, 2003, 2004, 2005, 3 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
4 2006 Free Software Foundation, Inc. 4 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/s/dgux5-4r2.h b/src/s/dgux5-4r2.h
index be0ba73b4e0..fef2da7d29d 100644
--- a/src/s/dgux5-4r2.h
+++ b/src/s/dgux5-4r2.h
@@ -1,7 +1,7 @@
1/* Definitions file for GNU Emacs running on Data General's DG/UX 1/* Definitions file for GNU Emacs running on Data General's DG/UX
2 5.4 Release 2.xx systems. 2 5.4 Release 2.xx systems.
3 Copyright (C) 1994, 2002, 2003, 2004, 2005, 3 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
4 2006 Free Software Foundation, Inc. 4 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/s/freebsd.h b/src/s/freebsd.h
index 78f314700b3..3adca71bebc 100644
--- a/src/s/freebsd.h
+++ b/src/s/freebsd.h
@@ -2,7 +2,7 @@
2 This file describes the parameters that system description files 2 This file describes the parameters that system description files
3 should define or not. 3 should define or not.
4 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 4 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 5 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 7116d24c718..24a37f964db 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -1,6 +1,6 @@
1/* This file is the configuration file for Linux-based GNU systems 1/* This file is the configuration file for Linux-based GNU systems
2 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/gnu.h b/src/s/gnu.h
index 71f1dd34a5e..c4f1a798d9e 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on the GNU Hurd. 1/* Definitions file for GNU Emacs running on the GNU Hurd.
2 Copyright (C) 1994, 1995, 1996, 2002, 2003, 2004, 2 Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/hpux.h b/src/s/hpux.h
index b8f9c62a893..c0419fbad46 100644
--- a/src/s/hpux.h
+++ b/src/s/hpux.h
@@ -1,7 +1,7 @@
1/* Definitions file for GNU Emacs running on HPUX release 7.0. 1/* Definitions file for GNU Emacs running on HPUX release 7.0.
2 Based on AT&T System V.2. 2 Based on AT&T System V.2.
3 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 3 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/s/iris3-5.h b/src/s/iris3-5.h
index 6b0009c1c38..abbd945ab2f 100644
--- a/src/s/iris3-5.h
+++ b/src/s/iris3-5.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on Silicon Graphics 3.5 1/* Definitions file for GNU Emacs running on Silicon Graphics 3.5
2 Copyright (C) 1987, 1999, 2002, 2003, 2004, 2 Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/iris3-6.h b/src/s/iris3-6.h
index d0c68bd89cb..192118eeca7 100644
--- a/src/s/iris3-6.h
+++ b/src/s/iris3-6.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on Silicon Graphics system 3.6. 1/* Definitions file for GNU Emacs running on Silicon Graphics system 3.6.
2 Copyright (C) 1987, 1999, 2002, 2003, 2004, 2 Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/irix3-3.h b/src/s/irix3-3.h
index a65242179a9..1512077fe49 100644
--- a/src/s/irix3-3.h
+++ b/src/s/irix3-3.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on Silicon Graphics Irix system 3.3. 1/* Definitions file for GNU Emacs running on Silicon Graphics Irix system 3.3.
2 Copyright (C) 1987, 1990, 1999, 2002, 2003, 2004, 2 Copyright (C) 1987, 1990, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/lynxos.h b/src/s/lynxos.h
index b822bad3691..faa036037f5 100644
--- a/src/s/lynxos.h
+++ b/src/s/lynxos.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on LynxOS-3.0.1 1/* Definitions file for GNU Emacs running on LynxOS-3.0.1
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index 06b1f8960f0..ad699dff035 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -1,6 +1,6 @@
1/* System description file for Windows NT. 1/* System description file for Windows NT.
2 Copyright (C) 1993, 1994, 1995, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/msdos.h b/src/s/msdos.h
index 966384ee352..0bb5a678ae3 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -1,7 +1,7 @@
1/* System description file for MS-DOS 1/* System description file for MS-DOS
2 2
3 Copyright (C) 1993, 1996, 1997, 2001, 2002, 2003, 2004, 3 Copyright (C) 1993, 1996, 1997, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/s/newsos5.h b/src/s/newsos5.h
index 0b441d74e24..b548a47ffbe 100644
--- a/src/s/newsos5.h
+++ b/src/s/newsos5.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on Sony's NEWS-OS 5.0.2 1/* Definitions file for GNU Emacs running on Sony's NEWS-OS 5.0.2
2 Copyright (C) 1992, 1994, 2002, 2003, 2004, 2 Copyright (C) 1992, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/nextstep.h b/src/s/nextstep.h
index 8ea45e16e6e..2923712d929 100644
--- a/src/s/nextstep.h
+++ b/src/s/nextstep.h
@@ -1,6 +1,6 @@
1/* Configuration file for the NeXTstep system. 1/* Configuration file for the NeXTstep system.
2 Copyright (C) 1990, 1995, 2002, 2003, 2004, 2 Copyright (C) 1990, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/ptx.h b/src/s/ptx.h
index 319bbc049f2..edbbe5b2ac4 100644
--- a/src/s/ptx.h
+++ b/src/s/ptx.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on Sequent DYNIX/ptx 1.x/2.x 1/* Definitions file for GNU Emacs running on Sequent DYNIX/ptx 1.x/2.x
2 Copyright (C) 1987, 1990, 1999, 2002, 2003, 2004, 2 Copyright (C) 1987, 1990, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/riscix1-1.h b/src/s/riscix1-1.h
index d6281d256b6..682ba06720a 100644
--- a/src/s/riscix1-1.h
+++ b/src/s/riscix1-1.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on RISCiX 1.1 (bsd 4.3) 1/* Definitions file for GNU Emacs running on RISCiX 1.1 (bsd 4.3)
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/riscix12.h b/src/s/riscix12.h
index a4811877070..d082e442810 100644
--- a/src/s/riscix12.h
+++ b/src/s/riscix12.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on RISCiX 1.2 (bsd 4.3) 1/* Definitions file for GNU Emacs running on RISCiX 1.2 (bsd 4.3)
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/rtu.h b/src/s/rtu.h
index 2a9df14a14c..1517165877b 100644
--- a/src/s/rtu.h
+++ b/src/s/rtu.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on RTU 3.0, ucb universe. 1/* Definitions file for GNU Emacs running on RTU 3.0, ucb universe.
2 Copyright (C) 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/sco4.h b/src/s/sco4.h
index 0eda0a3f728..96e812ce0e4 100644
--- a/src/s/sco4.h
+++ b/src/s/sco4.h
@@ -1,6 +1,6 @@
1/* System description file for SCO 3.2v4. 1/* System description file for SCO 3.2v4.
2 Copyright (C) 1993, 1994, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/sco5.h b/src/s/sco5.h
index 06166f32fd9..6ab7b60e466 100644
--- a/src/s/sco5.h
+++ b/src/s/sco5.h
@@ -1,5 +1,6 @@
1/* System description file for SCO 3.2v5. 1/* System description file for SCO 3.2v5.
2 Copyright (C) 1996, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, 2006,
3 2007 Free Software Foundation, Inc.
3 4
4This file is part of GNU Emacs. 5This file is part of GNU Emacs.
5 6
diff --git a/src/s/template.h b/src/s/template.h
index 94b3787811f..c16b12971ad 100644
--- a/src/s/template.h
+++ b/src/s/template.h
@@ -1,8 +1,8 @@
1/* Template for system description header files. 1/* Template for system description header files.
2 This file describes the parameters that system description files 2 This file describes the parameters that system description files
3 should define or not. 3 should define or not.
4 Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 4 Copyright (C) 1985, 1986, 1992, 1999, 2001, 2002, 2003, 2004,
5 2005, 2006 Free Software Foundation, Inc. 5 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/s/umax.h b/src/s/umax.h
index ae3b98cfcad..5d379ea398a 100644
--- a/src/s/umax.h
+++ b/src/s/umax.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on UMAX 4.2 1/* Definitions file for GNU Emacs running on UMAX 4.2
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/unipl5-2.h b/src/s/unipl5-2.h
index 096096f9f7a..0d4aba8ea2b 100644
--- a/src/s/unipl5-2.h
+++ b/src/s/unipl5-2.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on UniSoft's UniPlus 5.2 1/* Definitions file for GNU Emacs running on UniSoft's UniPlus 5.2
2 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/usg5-0.h b/src/s/usg5-0.h
index 94389290726..101e75726ef 100644
--- a/src/s/usg5-0.h
+++ b/src/s/usg5-0.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on AT&T's System V.0 1/* Definitions file for GNU Emacs running on AT&T's System V.0
2 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/usg5-2-2.h b/src/s/usg5-2-2.h
index a60a985856d..b2c89a1abdc 100644
--- a/src/s/usg5-2-2.h
+++ b/src/s/usg5-2-2.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on AT&T's System V Release 2.2 1/* Definitions file for GNU Emacs running on AT&T's System V Release 2.2
2 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/usg5-2.h b/src/s/usg5-2.h
index 7f1fcb92ec5..13a9885fb53 100644
--- a/src/s/usg5-2.h
+++ b/src/s/usg5-2.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on AT&T's System V Release 2.0 1/* Definitions file for GNU Emacs running on AT&T's System V Release 2.0
2 Copyright (C) 1985, 1986, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/usg5-3.h b/src/s/usg5-3.h
index 56a448e9dba..0e0a1c84829 100644
--- a/src/s/usg5-3.h
+++ b/src/s/usg5-3.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on AT&T's System V Release 3 1/* Definitions file for GNU Emacs running on AT&T's System V Release 3
2 Copyright (C) 1987, 1999, 2002, 2003, 2004, 2 Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h
index 5e202e3edad..4ca5b6fcabc 100644
--- a/src/s/usg5-4.h
+++ b/src/s/usg5-4.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running on AT&T's System V Release 4 1/* Definitions file for GNU Emacs running on AT&T's System V Release 4
2 Copyright (C) 1987, 1990, 1999, 2000, 2002, 2003, 2004, 2 Copyright (C) 1987, 1990, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/vms.h b/src/s/vms.h
index 51f3ca1a531..4d9bbaebb07 100644
--- a/src/s/vms.h
+++ b/src/s/vms.h
@@ -1,6 +1,6 @@
1/* system description header for VMS 1/* system description header for VMS
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/s/xenix.h b/src/s/xenix.h
index 09a7b61fcd1..6d77ef50acc 100644
--- a/src/s/xenix.h
+++ b/src/s/xenix.h
@@ -1,6 +1,6 @@
1/* Definitions file for GNU Emacs running SCO Xenix 386 Release 2.2 1/* Definitions file for GNU Emacs running SCO Xenix 386 Release 2.2
2 Copyright (C) 1988, 1999, 2002, 2003, 2004, 2 Copyright (C) 1988, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/scroll.c b/src/scroll.c
index e8981fcfb5f..3afc927c77f 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -1,6 +1,6 @@
1/* Calculate what line insertion or deletion to do, and do it, 1/* Calculate what line insertion or deletion to do, and do it,
2 Copyright (C) 1985, 1986, 1990, 1993, 1994, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1990, 1993, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/search.c b/src/search.c
index 4c4fa7931a1..2e4ddc3256d 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1,6 +1,6 @@
1/* String search routines for GNU Emacs. 1/* String search routines for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1997, 1998, 1999, 2002, 2003, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1997, 1998, 1999, 2001, 2002,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/sheap.c b/src/sheap.c
index 03da2afa813..510a75d4743 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -1,7 +1,7 @@
1/* simulate `sbrk' with an array in .bss, for `unexec' support for Cygwin; 1/* simulate `sbrk' with an array in .bss, for `unexec' support for Cygwin;
2 complete rewrite of xemacs Cygwin `unexec' code 2 complete rewrite of xemacs Cygwin `unexec' code
3 3
4 Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. 4 Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/sound.c b/src/sound.c
index b6f5ff513ee..7fb79e64048 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1,6 +1,6 @@
1/* sound.c -- sound support. 1/* sound.c -- sound support.
2 Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2 Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/strftime.c b/src/strftime.c
index 88800c0d408..7a9506e55d3 100644
--- a/src/strftime.c
+++ b/src/strftime.c
@@ -1,5 +1,6 @@
1/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 1/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 2001, 2002, 2003, 2004, 2005, 2006, 2007
3 Free Software Foundation, Inc.
3 4
4 NOTE: The canonical source of this file is maintained with gnulib. 5 NOTE: The canonical source of this file is maintained with gnulib.
5 Bugs can be reported to bug-gnulib@gnu.org. 6 Bugs can be reported to bug-gnulib@gnu.org.
diff --git a/src/sunfns.c b/src/sunfns.c
index 336f02221cf..c532ae7f849 100644
--- a/src/sunfns.c
+++ b/src/sunfns.c
@@ -1,6 +1,6 @@
1/* Functions for Sun Windows menus and selection buffer. 1/* Functions for Sun Windows menus and selection buffer.
2 Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004, 2 Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is probably totally obsolete. In any case, the FSF is 5This file is probably totally obsolete. In any case, the FSF is
6unwilling to support it. We agreed to include it in our distribution 6unwilling to support it. We agreed to include it in our distribution
diff --git a/src/syntax.c b/src/syntax.c
index d1ae3f6bd8c..65140623032 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1,6 +1,7 @@
1/* GNU Emacs routines to deal with syntax tables; also word and list parsing. 1/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
2 Copyright (C) 1985, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2002, 2 Copyright (C) 1985, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2001,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
4 5
5This file is part of GNU Emacs. 6This file is part of GNU Emacs.
6 7
diff --git a/src/syntax.h b/src/syntax.h
index c7e67ebf355..2ff63678bd2 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -1,6 +1,6 @@
1/* Declarations having to do with GNU Emacs syntax tables. 1/* Declarations having to do with GNU Emacs syntax tables.
2 Copyright (C) 1985, 1993, 1994, 1997, 1998, 2002, 2003, 2004, 2 Copyright (C) 1985, 1993, 1994, 1997, 1998, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/sysdep.c b/src/sysdep.c
index 625b5d619ab..20d60400dcb 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1,6 +1,6 @@
1/* Interfaces to system-dependent kernel and library entries. 1/* Interfaces to system-dependent kernel and library entries.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/sysselect.h b/src/sysselect.h
index ba204dafe3f..d72ff90ac0b 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -1,6 +1,6 @@
1/* sysselect.h - System-dependent definitions for the select function. 1/* sysselect.h - System-dependent definitions for the select function.
2 Copyright (C) 1995, 2002, 2003, 2004, 2005, 2 Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/syssignal.h b/src/syssignal.h
index cc2212d5e19..a4e3fcb3e1b 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -1,6 +1,6 @@
1/* syssignal.h - System-dependent definitions for signals. 1/* syssignal.h - System-dependent definitions for signals.
2 Copyright (C) 1993, 1999, 2002, 2003, 2004, 2 Copyright (C) 1993, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/systime.h b/src/systime.h
index e7ff2b2a3b7..ac28d883d64 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -1,6 +1,6 @@
1/* systime.h - System-dependent definitions for time manipulations. 1/* systime.h - System-dependent definitions for time manipulations.
2 Copyright (C) 1993, 1994, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/systty.h b/src/systty.h
index 6d6a6f01ea9..d1eb3b84597 100644
--- a/src/systty.h
+++ b/src/systty.h
@@ -1,6 +1,6 @@
1/* systty.h - System-dependent definitions for terminals. 1/* systty.h - System-dependent definitions for terminals.
2 Copyright (C) 1993, 1994, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/syswait.h b/src/syswait.h
index bb4937f353e..e70e992d545 100644
--- a/src/syswait.h
+++ b/src/syswait.h
@@ -1,6 +1,6 @@
1/* Define wait system call interface for Emacs. 1/* Define wait system call interface for Emacs.
2 Copyright (C) 1993, 1994, 1995, 2000, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/term.c b/src/term.c
index 7f25eb36328..1ec904e79f3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,6 +1,6 @@
1/* Terminal control module for terminals described by TERMCAP 1/* Terminal control module for terminals described by TERMCAP
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/termcap.c b/src/termcap.c
index dee5465ebf9..111565131b5 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -1,6 +1,6 @@
1/* Work-alike for termcap, plus extra features. 1/* Work-alike for termcap, plus extra features.
2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This program is free software; you can redistribute it and/or modify 5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by 6it under the terms of the GNU General Public License as published by
diff --git a/src/termchar.h b/src/termchar.h
index 3787e338d40..d5843bcf659 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -1,6 +1,6 @@
1/* Flags and parameters describing terminal's characteristics. 1/* Flags and parameters describing terminal's characteristics.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/termhooks.h b/src/termhooks.h
index 2b9e947996e..8aef23bc2a7 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -1,7 +1,7 @@
1/* Hooks by which low level terminal operations 1/* Hooks by which low level terminal operations
2 can be made to call other routines. 2 can be made to call other routines.
3 Copyright (C) 1985, 1986, 1993, 1994, 2002, 2003, 2004, 3 Copyright (C) 1985, 1986, 1993, 1994, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/terminfo.c b/src/terminfo.c
index 7fccfaf1700..99f8b9a1e4e 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -1,6 +1,6 @@
1/* Interface from Emacs to terminfo. 1/* Interface from Emacs to terminfo.
2 Copyright (C) 1985, 1986, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/termopts.h b/src/termopts.h
index 5d4059babb0..dff634b5192 100644
--- a/src/termopts.h
+++ b/src/termopts.h
@@ -1,6 +1,6 @@
1/* Flags and parameters describing user options for handling the terminal. 1/* Flags and parameters describing user options for handling the terminal.
2 Copyright (C) 1985, 1986, 1990, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1990, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/textprop.c b/src/textprop.c
index a039c17ae64..b98acaeccd8 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1,6 +1,6 @@
1/* Interface code for dealing with text properties. 1/* Interface code for dealing with text properties.
2 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/tparam.c b/src/tparam.c
index ea04f7eaea1..dea57ff7461 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -1,6 +1,6 @@
1/* Merge parameters into a termcap entry string. 1/* Merge parameters into a termcap entry string.
2 Copyright (C) 1985, 1987, 1993, 1995, 2000, 2002, 2003, 2004, 2 Copyright (C) 1985, 1987, 1993, 1995, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This program is free software; you can redistribute it and/or modify 5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by 6it under the terms of the GNU General Public License as published by
diff --git a/src/uaf.h b/src/uaf.h
index 05a8651b6c2..c00fc7732fe 100644
--- a/src/uaf.h
+++ b/src/uaf.h
@@ -1,6 +1,6 @@
1/* GNU Emacs VMS UAF definition file. 1/* GNU Emacs VMS UAF definition file.
2 Copyright (C) 1986, 2002, 2003, 2004, 2005, 2 Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/undo.c b/src/undo.c
index 3313c8e306c..0eca97df566 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,6 +1,6 @@
1/* undo handling for GNU Emacs. 1/* undo handling for GNU Emacs.
2 Copyright (C) 1990, 1993, 1994, 2000, 2002, 2003, 2004, 2 Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/unexaix.c b/src/unexaix.c
index 4785aa1dcb3..41324ac0fd8 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -1,6 +1,6 @@
1/* Dump an executable image. 1/* Dump an executable image.
2 Copyright (C) 1985, 1986, 1987, 1988, 1999, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1987, 1988, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/unexalpha.c b/src/unexalpha.c
index ead259437f6..cbd44616bd4 100644
--- a/src/unexalpha.c
+++ b/src/unexalpha.c
@@ -1,7 +1,7 @@
1/* Unexec for DEC alpha. schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf). 1/* Unexec for DEC alpha. schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf).
2 2
3 Copyright (C) 1994, 2000, 2002, 2003, 2004, 3 Copyright (C) 1994, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006 Free Software Foundation, Inc. 4 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/unexapollo.c b/src/unexapollo.c
index ace28dfa38d..27cf968c5fe 100644
--- a/src/unexapollo.c
+++ b/src/unexapollo.c
@@ -1,6 +1,6 @@
1/* unexapollo.c -- COFF File UNEXEC for GNU Emacs on Apollo SR10.x 1/* unexapollo.c -- COFF File UNEXEC for GNU Emacs on Apollo SR10.x
2 Copyright (C) 1988, 1994, 2002, 2003, 2004, 2 Copyright (C) 1988, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/unexconvex.c b/src/unexconvex.c
index 8409463b783..598b1b3428b 100644
--- a/src/unexconvex.c
+++ b/src/unexconvex.c
@@ -7,8 +7,8 @@
7 think about it, or about whether other Emacs maintenance might 7 think about it, or about whether other Emacs maintenance might
8 break it. 8 break it.
9 9
10 Copyright (C) 1985, 1986, 1988, 2002, 2003, 2004, 10 Copyright (C) 1985, 1986, 1988, 2001, 2002, 2003, 2004,
11 2005, 2006 Free Software Foundation, Inc. 11 2005, 2006, 2007 Free Software Foundation, Inc.
12 12
13This file is part of GNU Emacs. 13This file is part of GNU Emacs.
14 14
diff --git a/src/unexcw.c b/src/unexcw.c
index 92e313c05d6..f1023d4b239 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -1,7 +1,7 @@
1/* unexec() support for Cygwin; 1/* unexec() support for Cygwin;
2 complete rewrite of xemacs Cygwin unexec() code 2 complete rewrite of xemacs Cygwin unexec() code
3 3
4 Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. 4 Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
diff --git a/src/unexec.c b/src/unexec.c
index 7fe7e26568c..16f9c96faa7 100644
--- a/src/unexec.c
+++ b/src/unexec.c
@@ -1,5 +1,5 @@
1/* Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993, 1994, 2002, 2003, 2004, 1/* Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993, 1994, 2001, 2002, 2003,
2 2005, 2006 Free Software Foundation, Inc. 2 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
diff --git a/src/unexelf.c b/src/unexelf.c
index a236b98eab1..7b2c72f0fa9 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -1,5 +1,5 @@
1/* Copyright (C) 1985, 1986, 1987, 1988, 1990, 1992, 1999, 2000, 2001, 1/* Copyright (C) 1985, 1986, 1987, 1988, 1990, 1992, 1999, 2000, 2001,
2 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
diff --git a/src/unexenix.c b/src/unexenix.c
index c1ad8bbf7eb..4d4bec11eb6 100644
--- a/src/unexenix.c
+++ b/src/unexenix.c
@@ -6,8 +6,8 @@
6 we don't plan to think about it, or about whether other Emacs 6 we don't plan to think about it, or about whether other Emacs
7 maintenance might break it. 7 maintenance might break it.
8 8
9 Copyright (C) 1988, 1994, 2002, 2003, 2004, 9 Copyright (C) 1988, 1994, 2001, 2002, 2003, 2004,
10 2005, 2006 Free Software Foundation, Inc. 10 2005, 2006, 2007 Free Software Foundation, Inc.
11 11
12This file is part of GNU Emacs. 12This file is part of GNU Emacs.
13 13
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index e95aa2f2efc..d38053c3155 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1,6 +1,6 @@
1/* Dump Emacs in Mach-O format for use on Mac OS X. 1/* Dump Emacs in Mach-O format for use on Mac OS X.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/unexmips.c b/src/unexmips.c
index 86129e052cf..d80bc62277e 100644
--- a/src/unexmips.c
+++ b/src/unexmips.c
@@ -6,8 +6,8 @@
6 we don't plan to think about it, or about whether other Emacs 6 we don't plan to think about it, or about whether other Emacs
7 maintenance might break it. 7 maintenance might break it.
8 8
9 Copyright (C) 1988, 1994, 2002, 2003, 2004, 9 Copyright (C) 1988, 1994, 2001, 2002, 2003, 2004,
10 2005, 2006 Free Software Foundation, Inc. 10 2005, 2006, 2007 Free Software Foundation, Inc.
11 11
12This file is part of GNU Emacs. 12This file is part of GNU Emacs.
13 13
diff --git a/src/unexnext.c b/src/unexnext.c
index b453da3b023..937e5d2b80b 100644
--- a/src/unexnext.c
+++ b/src/unexnext.c
@@ -1,6 +1,6 @@
1/* Dump Emacs in macho format. 1/* Dump Emacs in macho format.
2 Copyright (C) 1990, 1993, 2002, 2003, 2004, 2 Copyright (C) 1990, 1993, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 Written by Bradley Taylor (btaylor@next.com). 4 Written by Bradley Taylor (btaylor@next.com).
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
diff --git a/src/unexsni.c b/src/unexsni.c
index 8d72acf1a18..def59c6ea84 100644
--- a/src/unexsni.c
+++ b/src/unexsni.c
@@ -1,6 +1,7 @@
1/* Unexec for Siemens machines running Sinix (modified SVR4). 1/* Unexec for Siemens machines running Sinix (modified SVR4).
2 Copyright (C) 1985, 1986, 1987, 1988, 1990, 1992, 1993, 1994, 1995, 2002, 2 Copyright (C) 1985, 1986, 1987, 1988, 1990, 1992, 1993, 1994, 1995, 2001,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
4 5
5This file is part of GNU Emacs. 6This file is part of GNU Emacs.
6 7
diff --git a/src/unexsunos4.c b/src/unexsunos4.c
index 19d982f6140..e8051fc7e88 100644
--- a/src/unexsunos4.c
+++ b/src/unexsunos4.c
@@ -1,6 +1,6 @@
1/* Unexec for Sunos 4 using shared libraries. 1/* Unexec for Sunos 4 using shared libraries.
2 Copyright (C) 1990, 1994, 1999, 2002, 2003, 2004, 2 Copyright (C) 1990, 1994, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/unexw32.c b/src/unexw32.c
index 6256062aa3f..ae2fe942c73 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -1,6 +1,6 @@
1/* unexec for GNU Emacs on Windows NT. 1/* unexec for GNU Emacs on Windows NT.
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/vm-limit.c b/src/vm-limit.c
index cadfb4cc95a..192775df81c 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -1,6 +1,6 @@
1/* Functions for memory limit warnings. 1/* Functions for memory limit warnings.
2 Copyright (C) 1990, 1992, 2002, 2003, 2004, 2 Copyright (C) 1990, 1992, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w16select.c b/src/w16select.c
index e77d4fca806..f73a12e5280 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -1,6 +1,6 @@
1/* 16-bit Windows Selection processing for emacs on MS-Windows 1/* 16-bit Windows Selection processing for emacs on MS-Windows
2 Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, 2 Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32.c b/src/w32.c
index 9fe88833b4f..87ae9d9f8fd 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1,6 +1,6 @@
1/* Utility and Unix shadow routines for GNU Emacs on the Microsoft W32 API. 1/* Utility and Unix shadow routines for GNU Emacs on the Microsoft W32 API.
2 Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32.h b/src/w32.h
index 6ba25a42403..b6fb23dc14d 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -2,8 +2,8 @@
2#define EMACS_W32_H 2#define EMACS_W32_H
3 3
4/* Support routines for the NT version of Emacs. 4/* Support routines for the NT version of Emacs.
5 Copyright (C) 1994, 2002, 2003, 2004, 2005, 5 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
6 2006 Free Software Foundation, Inc. 6 2006, 2007 Free Software Foundation, Inc.
7 7
8This file is part of GNU Emacs. 8This file is part of GNU Emacs.
9 9
diff --git a/src/w32bdf.c b/src/w32bdf.c
index fbdb7f4c373..358415c6e42 100644
--- a/src/w32bdf.c
+++ b/src/w32bdf.c
@@ -1,6 +1,6 @@
1/* Implementation of BDF font handling on the Microsoft W32 API. 1/* Implementation of BDF font handling on the Microsoft W32 API.
2 Copyright (C) 1999, 2002, 2003, 2004, 2005, 2 Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32bdf.h b/src/w32bdf.h
index dd8cfa276bf..ba408793882 100644
--- a/src/w32bdf.h
+++ b/src/w32bdf.h
@@ -1,6 +1,6 @@
1/* Definitions and header for handling BDF fonts on the Microsoft W32 API. 1/* Definitions and header for handling BDF fonts on the Microsoft W32 API.
2 Copyright (C) 1999, 2002, 2003, 2004, 2005, 2 Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32console.c b/src/w32console.c
index b660d74f852..d9cef2baa0c 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -1,6 +1,6 @@
1/* Terminal hooks for GNU Emacs on the Microsoft W32 API. 1/* Terminal hooks for GNU Emacs on the Microsoft W32 API.
2 Copyright (C) 1992, 1999, 2002, 2003, 2004, 2 Copyright (C) 1992, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32fns.c b/src/w32fns.c
index 29157dc356f..e7cafce29a6 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1,6 +1,6 @@
1/* Graphical user interface functions for the Microsoft W32 API. 1/* Graphical user interface functions for the Microsoft W32 API.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32gui.h b/src/w32gui.h
index 2b1a11987f3..18c737a6e12 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -1,6 +1,6 @@
1/* Definitions and headers for communication on the Microsoft W32 API. 1/* Definitions and headers for communication on the Microsoft W32 API.
2 Copyright (C) 1995, 2002, 2003, 2004, 2005, 2 Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32heap.c b/src/w32heap.c
index e1bdd867721..9327e7e7e7e 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -1,6 +1,6 @@
1/* Heap management routines for GNU Emacs on the Microsoft W32 API. 1/* Heap management routines for GNU Emacs on the Microsoft W32 API.
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32heap.h b/src/w32heap.h
index c862558b1cf..0d4ccb70b8a 100644
--- a/src/w32heap.h
+++ b/src/w32heap.h
@@ -1,6 +1,6 @@
1/* Heap management routines (including unexec) for GNU Emacs on Windows NT. 1/* Heap management routines (including unexec) for GNU Emacs on Windows NT.
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 0fededa6aea..b44054afef3 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -1,6 +1,6 @@
1/* Input event support for Emacs on the Microsoft W32 API. 1/* Input event support for Emacs on the Microsoft W32 API.
2 Copyright (C) 1992, 1993, 1995, 2002, 2003, 2004, 2 Copyright (C) 1992, 1993, 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32inevt.h b/src/w32inevt.h
index 8985df1ee69..f0f7f232261 100644
--- a/src/w32inevt.h
+++ b/src/w32inevt.h
@@ -1,6 +1,6 @@
1/* Input routines for GNU Emacs on the Microsoft W32 API. 1/* Input routines for GNU Emacs on the Microsoft W32 API.
2 Copyright (C) 1995, 2002, 2003, 2004, 2005, 2 Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32menu.c b/src/w32menu.c
index d5c38bee336..a3bd82a0d7d 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1,6 +1,6 @@
1/* Menu support for GNU Emacs on the Microsoft W32 API. 1/* Menu support for GNU Emacs on the Microsoft W32 API.
2 Copyright (C) 1986, 1988, 1993, 1994, 1996, 1998, 1999, 2002, 2003, 2 Copyright (C) 1986, 1988, 1993, 1994, 1996, 1998, 1999, 2001, 2002,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32proc.c b/src/w32proc.c
index 7d27172781d..2120a51fb89 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1,6 +1,6 @@
1/* Process support for GNU Emacs on the Microsoft W32 API. 1/* Process support for GNU Emacs on the Microsoft W32 API.
2 Copyright (C) 1992, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1992, 1995, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32reg.c b/src/w32reg.c
index cd2a3bdf755..37659ecb9ca 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -1,6 +1,6 @@
1/* Emulate the X Resource Manager through the registry. 1/* Emulate the X Resource Manager through the registry.
2 Copyright (C) 1990, 1993, 1994, 2002, 2003, 2004, 2 Copyright (C) 1990, 1993, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32select.c b/src/w32select.c
index 7b394943434..889e09a4a6c 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -1,6 +1,6 @@
1/* Selection processing for Emacs on the Microsoft W32 API. 1/* Selection processing for Emacs on the Microsoft W32 API.
2 Copyright (C) 1993, 1994, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32term.c b/src/w32term.c
index 992bbc76aad..e488e4eeebc 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1,6 +1,6 @@
1/* Implementation of GUI terminal on the Microsoft W32 API. 1/* Implementation of GUI terminal on the Microsoft W32 API.
2 Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2 Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32term.h b/src/w32term.h
index c9d7fc375ac..c1ad423ca67 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -1,6 +1,6 @@
1/* Definitions and headers for communication on the Microsoft W32 API. 1/* Definitions and headers for communication on the Microsoft W32 API.
2 Copyright (C) 1995, 2001, 2002, 2003, 2004, 2 Copyright (C) 1995, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 0e937e9950c..b87cc28f057 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -1,6 +1,6 @@
1/* Functions taken directly from X sources for use with the Microsoft W32 API. 1/* Functions taken directly from X sources for use with the Microsoft W32 API.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1999, 2002, 2003, 2004, 2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1999, 2001, 2002, 2003,
3 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/widget.c b/src/widget.c
index 35bf5631b20..c6ba3be468b 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -1,6 +1,6 @@
1/* The emacs frame widget. 1/* The emacs frame widget.
2 Copyright (C) 1992, 1993, 2000, 2002, 2003, 2004, 2 Copyright (C) 1992, 1993, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/widget.h b/src/widget.h
index b6c5e9f0bcb..21cd4543230 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -1,6 +1,6 @@
1/* The emacs frame widget public header file. 1/* The emacs frame widget public header file.
2 Copyright (C) 1993, 2002, 2003, 2004, 2005, 2 Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/widgetprv.h b/src/widgetprv.h
index bde384d3b5f..ac845209ba6 100644
--- a/src/widgetprv.h
+++ b/src/widgetprv.h
@@ -1,6 +1,6 @@
1/* The emacs frame widget private header file. 1/* The emacs frame widget private header file.
2 Copyright (C) 1993, 2002, 2003, 2004, 2005, 2 Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/window.c b/src/window.c
index 5bd57496180..17643ed874f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1,7 +1,7 @@
1/* Window creation, deletion and examination for GNU Emacs. 1/* Window creation, deletion and examination for GNU Emacs.
2 Does not include redisplay. 2 Does not include redisplay.
3 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 3 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
4 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 4 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -1182,7 +1182,8 @@ if it isn't already recorded. */)
1182 1182
1183 if (! NILP (update) 1183 if (! NILP (update)
1184 && ! (! NILP (w->window_end_valid) 1184 && ! (! NILP (w->window_end_valid)
1185 && XFASTINT (w->last_modified) >= BUF_MODIFF (b)) 1185 && XFASTINT (w->last_modified) >= BUF_MODIFF (b)
1186 && XFASTINT (w->last_overlay_modified) >= BUF_OVERLAY_MODIFF (b))
1186 && !noninteractive) 1187 && !noninteractive)
1187 { 1188 {
1188 struct text_pos startp; 1189 struct text_pos startp;
@@ -3265,10 +3266,6 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
3265 struct window *w = XWINDOW (window); 3266 struct window *w = XWINDOW (window);
3266 struct buffer *b = XBUFFER (buffer); 3267 struct buffer *b = XBUFFER (buffer);
3267 int count = SPECPDL_INDEX (); 3268 int count = SPECPDL_INDEX ();
3268#ifdef HAVE_WINDOW_SYSTEM
3269 struct frame *f = XFRAME (w->frame);
3270 Display_Info *dpyinfo;
3271#endif
3272 3269
3273 w->buffer = buffer; 3270 w->buffer = buffer;
3274 3271
@@ -3349,15 +3346,6 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
3349 call1 (Vrun_hooks, Qwindow_configuration_change_hook); 3346 call1 (Vrun_hooks, Qwindow_configuration_change_hook);
3350 } 3347 }
3351 3348
3352#ifdef HAVE_WINDOW_SYSTEM
3353 BLOCK_INPUT;
3354 if (f && FRAME_X_OUTPUT (f)
3355 && (dpyinfo = FRAME_X_DISPLAY_INFO (f))
3356 && EQ (window, dpyinfo->mouse_face_window))
3357 clear_mouse_face (dpyinfo);
3358 UNBLOCK_INPUT;
3359#endif
3360
3361 unbind_to (count, Qnil); 3349 unbind_to (count, Qnil);
3362} 3350}
3363 3351
diff --git a/src/window.h b/src/window.h
index ed4c8728117..d4f28034b19 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1,6 +1,6 @@
1/* Window definitions for GNU Emacs. 1/* Window definitions for GNU Emacs.
2 Copyright (C) 1985, 1986, 1993, 1995, 1997, 1998, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1993, 1995, 1997, 1998, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/xdisp.c b/src/xdisp.c
index 07df06785ad..5a78dd48c10 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1,7 +1,7 @@
1/* Display generation from window structure and buffer text. 1/* Display generation from window structure and buffer text.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 3 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 2004, 2005, 2006 Free Software Foundation, Inc. 4 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -13687,6 +13687,7 @@ try_window (window, pos, check_margins)
13687 struct window *w = XWINDOW (window); 13687 struct window *w = XWINDOW (window);
13688 struct it it; 13688 struct it it;
13689 struct glyph_row *last_text_row = NULL; 13689 struct glyph_row *last_text_row = NULL;
13690 struct frame *f = XFRAME (w->frame);
13690 13691
13691 /* Make POS the new window start. */ 13692 /* Make POS the new window start. */
13692 set_marker_both (w->start, Qnil, CHARPOS (pos), BYTEPOS (pos)); 13693 set_marker_both (w->start, Qnil, CHARPOS (pos), BYTEPOS (pos));
diff --git a/src/xfaces.c b/src/xfaces.c
index 9c8f02d6902..d10dec235ac 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1,6 +1,6 @@
1/* xfaces.c -- "Face" primitives. 1/* xfaces.c -- "Face" primitives.
2 Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/xfns.c b/src/xfns.c
index 2b9e656b9f1..74f20357657 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1,6 +1,6 @@
1/* Functions for the X window system. 1/* Functions for the X window system.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/xmenu.c b/src/xmenu.c
index 5066c9076e3..e2a67510de2 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1,6 +1,6 @@
1/* X Communication module for terminals which understand the X protocol. 1/* X Communication module for terminals which understand the X protocol.
2 Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2 Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/xrdb.c b/src/xrdb.c
index 6885123c194..3a85c14e8ff 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -1,6 +1,6 @@
1/* Deal with the X Resource Manager. 1/* Deal with the X Resource Manager.
2 Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006 Free Software Foundation, Inc. 3 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/xselect.c b/src/xselect.c
index 72d6aa071ca..4f6959587fd 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1,6 +1,6 @@
1/* X Selection processing for Emacs. 1/* X Selection processing for Emacs.
2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 4c250fecf00..5a3fdbb8812 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -1,6 +1,6 @@
1/* Session management module for systems which understand the X Session 1/* Session management module for systems which understand the X Session
2 management protocol. 2 management protocol.
3 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
diff --git a/src/xterm.c b/src/xterm.c
index 977325f0b75..efbc3c7b7ea 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1,6 +1,6 @@
1/* X Communication module for terminals which understand the X protocol. 1/* X Communication module for terminals which understand the X protocol.
2 Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2 Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -282,6 +282,10 @@ static Lisp_Object last_mouse_scroll_bar;
282 282
283static Time last_mouse_movement_time; 283static Time last_mouse_movement_time;
284 284
285/* Time for last user interaction as returned in X events. */
286
287static Time last_user_time;
288
285/* Incremented by XTread_socket whenever it really tries to read 289/* Incremented by XTread_socket whenever it really tries to read
286 events. */ 290 events. */
287 291
@@ -6115,6 +6119,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6115 break; 6119 break;
6116 6120
6117 case SelectionNotify: 6121 case SelectionNotify:
6122 last_user_time = event.xselection.time;
6118#ifdef USE_X_TOOLKIT 6123#ifdef USE_X_TOOLKIT
6119 if (! x_window_to_frame (dpyinfo, event.xselection.requestor)) 6124 if (! x_window_to_frame (dpyinfo, event.xselection.requestor))
6120 goto OTHER; 6125 goto OTHER;
@@ -6123,6 +6128,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6123 break; 6128 break;
6124 6129
6125 case SelectionClear: /* Someone has grabbed ownership. */ 6130 case SelectionClear: /* Someone has grabbed ownership. */
6131 last_user_time = event.xselectionclear.time;
6126#ifdef USE_X_TOOLKIT 6132#ifdef USE_X_TOOLKIT
6127 if (! x_window_to_frame (dpyinfo, event.xselectionclear.window)) 6133 if (! x_window_to_frame (dpyinfo, event.xselectionclear.window))
6128 goto OTHER; 6134 goto OTHER;
@@ -6139,6 +6145,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6139 break; 6145 break;
6140 6146
6141 case SelectionRequest: /* Someone wants our selection. */ 6147 case SelectionRequest: /* Someone wants our selection. */
6148 last_user_time = event.xselectionrequest.time;
6142#ifdef USE_X_TOOLKIT 6149#ifdef USE_X_TOOLKIT
6143 if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner)) 6150 if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner))
6144 goto OTHER; 6151 goto OTHER;
@@ -6159,6 +6166,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6159 break; 6166 break;
6160 6167
6161 case PropertyNotify: 6168 case PropertyNotify:
6169 last_user_time = event.xproperty.time;
6162#if 0 /* This is plain wrong. In the case that we are waiting for a 6170#if 0 /* This is plain wrong. In the case that we are waiting for a
6163 PropertyNotify used as an ACK in incremental selection 6171 PropertyNotify used as an ACK in incremental selection
6164 transfer, the property will be on the receiver's window. */ 6172 transfer, the property will be on the receiver's window. */
@@ -6182,6 +6190,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6182 6190
6183 /* Perhaps reparented due to a WM restart. Reset this. */ 6191 /* Perhaps reparented due to a WM restart. Reset this. */
6184 FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; 6192 FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
6193 FRAME_X_DISPLAY_INFO (f)->net_supported_window = 0;
6185 } 6194 }
6186 goto OTHER; 6195 goto OTHER;
6187 6196
@@ -6340,6 +6349,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6340 6349
6341 case KeyPress: 6350 case KeyPress:
6342 6351
6352 last_user_time = event.xkey.time;
6343 ignore_next_mouse_click_timeout = 0; 6353 ignore_next_mouse_click_timeout = 0;
6344 6354
6345#if defined (USE_X_TOOLKIT) || defined (USE_GTK) 6355#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
@@ -6704,6 +6714,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6704#endif 6714#endif
6705 6715
6706 case KeyRelease: 6716 case KeyRelease:
6717 last_user_time = event.xkey.time;
6707#ifdef HAVE_X_I18N 6718#ifdef HAVE_X_I18N
6708 /* Don't dispatch this event since XtDispatchEvent calls 6719 /* Don't dispatch this event since XtDispatchEvent calls
6709 XFilterEvent, and two calls in a row may freeze the 6720 XFilterEvent, and two calls in a row may freeze the
@@ -6714,6 +6725,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6714#endif 6725#endif
6715 6726
6716 case EnterNotify: 6727 case EnterNotify:
6728 last_user_time = event.xcrossing.time;
6717 x_detect_focus_change (dpyinfo, &event, &inev.ie); 6729 x_detect_focus_change (dpyinfo, &event, &inev.ie);
6718 6730
6719 f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); 6731 f = x_any_window_to_frame (dpyinfo, event.xcrossing.window);
@@ -6754,6 +6766,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6754 goto OTHER; 6766 goto OTHER;
6755 6767
6756 case LeaveNotify: 6768 case LeaveNotify:
6769 last_user_time = event.xcrossing.time;
6757 x_detect_focus_change (dpyinfo, &event, &inev.ie); 6770 x_detect_focus_change (dpyinfo, &event, &inev.ie);
6758 6771
6759 f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); 6772 f = x_top_window_to_frame (dpyinfo, event.xcrossing.window);
@@ -6787,6 +6800,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6787 6800
6788 case MotionNotify: 6801 case MotionNotify:
6789 { 6802 {
6803 last_user_time = event.xmotion.time;
6790 previous_help_echo_string = help_echo_string; 6804 previous_help_echo_string = help_echo_string;
6791 help_echo_string = Qnil; 6805 help_echo_string = Qnil;
6792 6806
@@ -6935,6 +6949,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6935 6949
6936 bzero (&compose_status, sizeof (compose_status)); 6950 bzero (&compose_status, sizeof (compose_status));
6937 last_mouse_glyph_frame = 0; 6951 last_mouse_glyph_frame = 0;
6952 last_user_time = event.xbutton.time;
6938 6953
6939 if (dpyinfo->grabbed 6954 if (dpyinfo->grabbed
6940 && last_mouse_frame 6955 && last_mouse_frame
@@ -8595,40 +8610,111 @@ x_set_offset (f, xoff, yoff, change_gravity)
8595 UNBLOCK_INPUT; 8610 UNBLOCK_INPUT;
8596} 8611}
8597 8612
8598/* Do fullscreen as specified in extended window manager hints */ 8613/* Return non-zero if _NET_SUPPORTING_WM_CHECK window exists and _NET_SUPPORTED
8614 on the root window for frame F contains ATOMNAME.
8615 This is how a WM check shall be done according to the Window Manager
8616 Specification/Extended Window Manager Hints at
8617 http://freedesktop.org/wiki/Standards_2fwm_2dspec. */
8618
8599static int 8619static int
8600do_ewmh_fullscreen (f) 8620wm_supports (f, atomname)
8601 struct frame *f; 8621 struct frame *f;
8622 const char *atomname;
8602{ 8623{
8603 int have_net_atom = FRAME_X_DISPLAY_INFO (f)->have_net_atoms; 8624 Atom actual_type;
8625 unsigned long actual_size, bytes_remaining;
8626 int i, rc, actual_format;
8627 Atom prop_atom;
8628 Window wmcheck_window;
8629 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
8630 Window target_window = dpyinfo->root_window;
8631 long max_len = 65536;
8632 Display *dpy = FRAME_X_DISPLAY (f);
8633 unsigned char *tmp_data = NULL;
8634 Atom target_type = XA_WINDOW;
8635 Atom want_atom;
8604 8636
8605 if (!have_net_atom) 8637 BLOCK_INPUT;
8638
8639 prop_atom = XInternAtom (dpy, "_NET_SUPPORTING_WM_CHECK", False);
8640
8641 x_catch_errors (dpy);
8642 rc = XGetWindowProperty (dpy, target_window,
8643 prop_atom, 0, max_len, False, target_type,
8644 &actual_type, &actual_format, &actual_size,
8645 &bytes_remaining, &tmp_data);
8646
8647 if (rc != Success || actual_type != XA_WINDOW || x_had_errors_p (dpy))
8648 {
8649 if (tmp_data) XFree (tmp_data);
8650 x_uncatch_errors ();
8651 UNBLOCK_INPUT;
8652 return 0;
8653 }
8654
8655 wmcheck_window = *(Window *) tmp_data;
8656 XFree (tmp_data);
8657
8658 /* Check if window exists. */
8659 XSelectInput (dpy, wmcheck_window, StructureNotifyMask);
8660 x_sync (f);
8661 if (x_had_errors_p (dpy))
8662 {
8663 x_uncatch_errors ();
8664 UNBLOCK_INPUT;
8665 return 0;
8666 }
8667
8668 if (dpyinfo->net_supported_window != wmcheck_window)
8606 { 8669 {
8607 int num; 8670 /* Window changed, reload atoms */
8608 Atom *atoms = XListProperties (FRAME_X_DISPLAY (f), 8671 if (dpyinfo->net_supported_atoms != NULL)
8609 FRAME_X_DISPLAY_INFO (f)->root_window, 8672 XFree (dpyinfo->net_supported_atoms);
8610 &num); 8673 dpyinfo->net_supported_atoms = NULL;
8611 if (atoms && num > 0) 8674 dpyinfo->nr_net_supported_atoms = 0;
8675 dpyinfo->net_supported_window = 0;
8676
8677 target_type = XA_ATOM;
8678 prop_atom = XInternAtom (dpy, "_NET_SUPPORTED", False);
8679 tmp_data = NULL;
8680 rc = XGetWindowProperty (dpy, target_window,
8681 prop_atom, 0, max_len, False, target_type,
8682 &actual_type, &actual_format, &actual_size,
8683 &bytes_remaining, &tmp_data);
8684
8685 if (rc != Success || actual_type != XA_ATOM || x_had_errors_p (dpy))
8612 { 8686 {
8613 char **names = (char **) xmalloc (num * sizeof(*names)); 8687 if (tmp_data) XFree (tmp_data);
8614 if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names)) 8688 x_uncatch_errors ();
8615 { 8689 UNBLOCK_INPUT;
8616 int i; 8690 return 0;
8617 for (i = 0; i < num; ++i)
8618 {
8619 if (!have_net_atom)
8620 have_net_atom = strncmp (names[i], "_NET_", 5) == 0;
8621 XFree (names[i]);
8622 }
8623 }
8624 xfree (names);
8625 } 8691 }
8626 if (atoms)
8627 XFree (atoms);
8628 8692
8629 FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom; 8693 dpyinfo->net_supported_atoms = (Atom *)tmp_data;
8694 dpyinfo->nr_net_supported_atoms = actual_size;
8695 dpyinfo->net_supported_window = wmcheck_window;
8630 } 8696 }
8631 8697
8698 rc = 0;
8699 want_atom = XInternAtom (dpy, atomname, False);
8700
8701 for (i = 0; rc == 0 && i < dpyinfo->nr_net_supported_atoms; ++i)
8702 rc = dpyinfo->net_supported_atoms[i] == want_atom;
8703
8704 x_uncatch_errors ();
8705 UNBLOCK_INPUT;
8706
8707 return rc;
8708}
8709
8710/* Do fullscreen as specified in extended window manager hints */
8711
8712static int
8713do_ewmh_fullscreen (f)
8714 struct frame *f;
8715{
8716 int have_net_atom = wm_supports (f, "_NET_WM_STATE");
8717
8632 if (have_net_atom) 8718 if (have_net_atom)
8633 { 8719 {
8634 Lisp_Object frame; 8720 Lisp_Object frame;
@@ -8655,6 +8741,9 @@ do_ewmh_fullscreen (f)
8655 break; 8741 break;
8656 } 8742 }
8657 8743
8744 if (!wm_supports (f, what)) return 0;
8745
8746
8658 Fx_send_client_event (frame, make_number (0), frame, 8747 Fx_send_client_event (frame, make_number (0), frame,
8659 make_unibyte_string (atom, strlen (atom)), 8748 make_unibyte_string (atom, strlen (atom)),
8660 make_number (32), 8749 make_number (32),
@@ -9055,23 +9144,27 @@ XTframe_raise_lower (f, raise_flag)
9055 /* The following code is needed for `raise-frame' to work on 9144 /* The following code is needed for `raise-frame' to work on
9056 some versions of metacity; see Window Manager 9145 some versions of metacity; see Window Manager
9057 Specification/Extended Window Manager Hints at 9146 Specification/Extended Window Manager Hints at
9058 http://freedesktop.org/wiki/Standards_2fwm_2dspec 9147 http://freedesktop.org/wiki/Standards_2fwm_2dspec */
9059 9148
9060 However, on other versions (metacity 2.17.2-1.fc7), it 9149#if 0
9150 /* However, on other versions (metacity 2.17.2-1.fc7), it
9061 reportedly causes hangs when resizing frames. */ 9151 reportedly causes hangs when resizing frames. */
9062 9152
9063 /* Lisp_Object frame; 9153 const char *atom = "_NET_ACTIVE_WINDOW";
9064 const char *atom = "_NET_ACTIVE_WINDOW"; */ 9154 if (f->async_visible && wm_supports (f, atom))
9065 9155 {
9066 x_raise_frame (f); 9156 Lisp_Object frame;
9067 9157 XSETFRAME (frame, f);
9068 /* XSETFRAME (frame, f); 9158 Fx_send_client_event (frame, make_number (0), frame,
9069 Fx_send_client_event (frame, make_number (0), frame, 9159 make_unibyte_string (atom, strlen (atom)),
9070 make_unibyte_string (atom, strlen (atom)), 9160 make_number (32),
9071 make_number (32), 9161 Fcons (make_number (1),
9072 Fcons (make_number (1), 9162 Fcons (make_number (last_user_time),
9073 Fcons (make_number (time (NULL) * 1000), 9163 Qnil)));
9074 Qnil))); */ 9164 }
9165 else
9166#endif
9167 x_raise_frame (f);
9075 } 9168 }
9076 else 9169 else
9077 x_lower_frame (f); 9170 x_lower_frame (f);
@@ -11210,6 +11303,10 @@ x_term_init (display_name, xrm_option, resource_name)
11210 dpyinfo->x_dnd_atoms = xmalloc (sizeof (*dpyinfo->x_dnd_atoms) 11303 dpyinfo->x_dnd_atoms = xmalloc (sizeof (*dpyinfo->x_dnd_atoms)
11211 * dpyinfo->x_dnd_atoms_size); 11304 * dpyinfo->x_dnd_atoms_size);
11212 11305
11306 dpyinfo->net_supported_atoms = NULL;
11307 dpyinfo->nr_net_supported_atoms = 0;
11308 dpyinfo->net_supported_window = 0;
11309
11213 connection = ConnectionNumber (dpyinfo->display); 11310 connection = ConnectionNumber (dpyinfo->display);
11214 dpyinfo->connection = connection; 11311 dpyinfo->connection = connection;
11215 11312
diff --git a/src/xterm.h b/src/xterm.h
index 35ab0816286..141f58168e1 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1,6 +1,6 @@
1/* Definitions and headers for communication with X protocol. 1/* Definitions and headers for communication with X protocol.
2 Copyright (C) 1989, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2 Copyright (C) 1989, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc. 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -396,7 +396,10 @@ struct x_display_info
396 size_t x_dnd_atoms_size; 396 size_t x_dnd_atoms_size;
397 size_t x_dnd_atoms_length; 397 size_t x_dnd_atoms_length;
398 398
399 int have_net_atoms; 399 /* Extended window manager hints, Atoms supported by the window manager */
400 Atom *net_supported_atoms;
401 int nr_net_supported_atoms;
402 Window net_supported_window;
400}; 403};
401 404
402#ifdef HAVE_X_I18N 405#ifdef HAVE_X_I18N