aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2007-08-03 05:20:51 +0000
committerMiles Bader2007-08-03 05:20:51 +0000
commite145a7fe95fb8f97407d125f94653ef95e42696d (patch)
tree4f83705aac9d1a4416dabcf774115f7cccb80bda
parent2a4924ce174b1a2b032558f3036f1d95445c4936 (diff)
parent2f12b713116a4e15b4744fc78d5f0dbb57fcd1ca (diff)
downloademacs-e145a7fe95fb8f97407d125f94653ef95e42696d.tar.gz
emacs-e145a7fe95fb8f97407d125f94653ef95e42696d.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 832-838) - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Fix void function definition error in cus-edit.el - Update from CVS - Restore lisp/emacs-lisp/cl-loaddefs.el - Merge from emacs--rel--22 * emacs--rel--22 (patch 75-83) - Update from CVS - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Indicate that emacs--devo--0--patch-834 does not need to be applied - Merge from gnus--rel--5.10 - Restore lisp/emacs-lisp/cl-loaddefs.el * gnus--rel--5.10 (patch 239-241) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-239
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.in2
-rw-r--r--admin/FOR-RELEASE6
-rw-r--r--etc/NEWS24
-rw-r--r--etc/NEWS.224
-rw-r--r--lib-src/.arch-inventory2
-rw-r--r--lisp/ChangeLog145
-rw-r--r--lisp/bindings.el2
-rw-r--r--lisp/calendar/appt.el8
-rw-r--r--lisp/calendar/cal-bahai.el64
-rw-r--r--lisp/calendar/cal-menu.el13
-rw-r--r--lisp/calendar/cal-move.el64
-rw-r--r--lisp/calendar/calendar.el67
-rw-r--r--lisp/cus-edit.el107
-rw-r--r--lisp/dired.el25
-rw-r--r--lisp/emacs-lisp/advice.el12
-rw-r--r--lisp/emacs-lisp/copyright.el17
-rw-r--r--lisp/emacs-lisp/lisp-mode.el2
-rw-r--r--lisp/erc/ChangeLog6
-rw-r--r--lisp/erc/erc-nicklist.el414
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-msg.el38
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/mb-depth.el2
-rw-r--r--lisp/net/tramp-cache.el5
-rw-r--r--lisp/net/tramp-fish.el5
-rw-r--r--lisp/net/tramp-ftp.el2
-rw-r--r--lisp/net/tramp-gw.el5
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp-uu.el4
-rw-r--r--lisp/net/tramp.el9
-rw-r--r--lisp/net/trampver.el8
-rw-r--r--lisp/progmodes/cc-langs.el10
-rw-r--r--lisp/progmodes/cc-mode.el9
-rw-r--r--lisp/progmodes/compile.el11
-rw-r--r--lisp/progmodes/python.el2
-rw-r--r--lisp/ps-print.el2
-rw-r--r--lisp/textmodes/bibtex-style.el2
-rw-r--r--lisp/textmodes/org-publish.el2
-rw-r--r--lisp/vc-bzr.el4
-rw-r--r--lisp/vc-git.el7
-rw-r--r--lisp/vc-hg.el14
-rw-r--r--lisp/vc.el11
-rw-r--r--lisp/wdired.el17
-rw-r--r--lispintro/ChangeLog5
-rw-r--r--lispintro/emacs-lisp-intro.texi2
-rw-r--r--man/ChangeLog22
-rw-r--r--man/Makefile.in1
-rw-r--r--man/building.texi4
-rw-r--r--man/calc.texi719
-rw-r--r--man/emacs.texi719
-rw-r--r--man/gpl.texi721
-rw-r--r--man/tramp.texi8
-rw-r--r--man/trampver.texi4
-rw-r--r--src/ChangeLog42
-rw-r--r--src/buffer.c4
-rw-r--r--src/gmalloc.c9
-rw-r--r--src/lread.c8
-rw-r--r--src/puresize.h2
-rw-r--r--src/w32term.c96
-rw-r--r--src/w32term.h8
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xterm.c108
-rw-r--r--src/xterm.h6
64 files changed, 1506 insertions, 2157 deletions
diff --git a/ChangeLog b/ChangeLog
index 06eb24cbb87..f6a4b9e426d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,13 @@
12007-07-28 Eli Zaretskii <eliz@gnu.org>
2
3 * Makefile.in (install-arch-indep): Use "rm -f" for removing DOC,
4 to avoid an error message if there is no DOC there.
5
12007-07-25 Glenn Morris <rgm@gnu.org> 62007-07-25 Glenn Morris <rgm@gnu.org>
2 7
3 * Relicense all FSF files to GPLv3 or later. 8 * Relicense all FSF files to GPLv3 or later.
4 9
5 * COPYING: Switch to GPLv3. 10 * COPYING, info/COPYING: Switch to GPLv3.
6 11
72007-06-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 122007-06-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
8 13
diff --git a/Makefile.in b/Makefile.in
index 8f4ba68c178..ec93805a0e9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -483,7 +483,7 @@ install-arch-indep: mkdir info
483 (cd ./etc; tar -chf - $${docfile}) \ 483 (cd ./etc; tar -chf - $${docfile}) \
484 |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ 484 |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
485 (cd $(DESTDIR)$(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \ 485 (cd $(DESTDIR)$(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \
486 if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \ 486 if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
487 else true; fi 487 else true; fi
488 -unset CDPATH; \ 488 -unset CDPATH; \
489 if [ -r ./lisp ] \ 489 if [ -r ./lisp ] \
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index d8e273c0343..9ae3f1a2ed7 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -47,6 +47,12 @@ that branch. Do not make manual changes to this file on the trunk.
47** michael.ewe@arcor.de, Apr 24: 22.0.98 not starting on Solaris 10/I386 47** michael.ewe@arcor.de, Apr 24: 22.0.98 not starting on Solaris 10/I386
48http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01113.html 48http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01113.html
49 49
50** davby@ida.liu.se, 6 July: Bug in pos-visible-in-window-p
51
52** dak@gnu.org, 30 May: Redraw problem with overlapping frames
53
54** dksw@eircom.net, 3 Jul: Telnet mode (rsh/ssh)
55
50* FIXES FOR EMACS 22.2 56* FIXES FOR EMACS 22.2
51 57
52Here we list small fixes that arrived too late for Emacs 22.1, but 58Here we list small fixes that arrived too late for Emacs 22.1, but
diff --git a/etc/NEWS b/etc/NEWS
index 21194e24a2f..cf6019cbfd2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -50,6 +50,9 @@ recenter the visited source file. Its value can be a number (for example,
50is on a remote machine, or a hyphen otherwise. 50is on a remote machine, or a hyphen otherwise.
51** The new command balance-window-area balances windows both vertically 51** The new command balance-window-area balances windows both vertically
52and horizontally. 52and horizontally.
53
54** The new command close-display-connection can be used to close a connection
55to a remote display, e.g. because the display is about to become unreachable.
53 56
54* Startup Changes in Emacs 23.1 57* Startup Changes in Emacs 23.1
55 58
@@ -74,14 +77,8 @@ history element containing the search string becomes the current.
74 77
75* New Modes and Packages in Emacs 23.1 78* New Modes and Packages in Emacs 23.1
76 79
77** css-mode to edit Cascading Style Sheets.
78
79** bibtex-style-mode helps you write BibTeX's *.bst files. 80** bibtex-style-mode helps you write BibTeX's *.bst files.
80 81
81** vera-mode to edit Vera files.
82
83** socks.el (which had been part of W3) is now part of Emacs.
84
85** minibuffer-indicate-depth-mode shows the minibuffer depth in the prompt. 82** minibuffer-indicate-depth-mode shows the minibuffer depth in the prompt.
86 83
87 84
@@ -95,12 +92,11 @@ Only copyright lines with holders matching copyright-names-regexp will be
95considered for update. 92considered for update.
96 93
97** VC 94** VC
98*** VC backends can provide completion of revision names. 95*** Clicking on the VC mode-line entry now pops the VC menu.
99*** VC has some support for Bazaar (bzr).
100 96
101*** VC has some support for Mercurial (hg). 97*** The VC mode-line entry now has a tooltip.
102 98
103*** VC has some support for Git. 99*** VC has some support for Bazaar (bzr).
104 100
105** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs. 101** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs.
106 102
@@ -147,7 +143,9 @@ file copy is checked via the file's checksum.
147If `default-directory' is a remote file name, subprocesses are started 143If `default-directory' is a remote file name, subprocesses are started
148on the corresponding remote system. 144on the corresponding remote system.
149 145
150** C-x C-q in dired-mode now runs the command wdired-change-to-wdired-mode. 146** C-x C-q in dired-mode now runs the command wdired-change-to-wdired-mode,
147and C-x C-q in wdired-mode exits it with asking a question about
148saving changes.
151 149
152* Changes in Emacs 23.1 on non-free operating systems 150* Changes in Emacs 23.1 on non-free operating systems
153 151
@@ -167,6 +165,8 @@ supported on other platforms, but not on Windows due to using the winsock
167 165
168* Lisp Changes in Emacs 23.1 166* Lisp Changes in Emacs 23.1
169 167
168** Non-breaking space now acts as whitespace.
169
170+++ 170+++
171** In `condition-case', a handler can specify "let the debugger run first". 171** In `condition-case', a handler can specify "let the debugger run first".
172 172
@@ -220,7 +220,7 @@ This file is part of GNU Emacs.
220 220
221GNU Emacs is free software; you can redistribute it and/or modify 221GNU Emacs is free software; you can redistribute it and/or modify
222it under the terms of the GNU General Public License as published by 222it under the terms of the GNU General Public License as published by
223the Free Software Foundation; either version 2, or (at your option) 223the Free Software Foundation; either version 3, or (at your option)
224any later version. 224any later version.
225 225
226GNU Emacs is distributed in the hope that it will be useful, 226GNU Emacs is distributed in the hope that it will be useful,
diff --git a/etc/NEWS.22 b/etc/NEWS.22
index 5b1f9e8c6fa..ae31b2489e1 100644
--- a/etc/NEWS.22
+++ b/etc/NEWS.22
@@ -63,8 +63,12 @@ in to make it use the scrollbars from the system theme.
63 63
64** VC 64** VC
65 65
66*** VC backends can provide completion of revision names.
67
66*** VC has some support for Mercurial (hg). 68*** VC has some support for Mercurial (hg).
67 69
70*** VC has some support for Git.
71
68 72
69* Installation Changes in Emacs 22.1 73* Installation Changes in Emacs 22.1
70 74
diff --git a/lib-src/.arch-inventory b/lib-src/.arch-inventory
index 362f3aebf63..1b0b3aec45a 100644
--- a/lib-src/.arch-inventory
+++ b/lib-src/.arch-inventory
@@ -1,5 +1,5 @@
1# Ignore binaries 1# Ignore binaries
2backup ^(test-distrib|make-docfile|profile|digest-doc|movemail|cvtmail|fakemail|yow|emacsserver|hexl|update-game-score|etags|ctags|emacsclient|b2m|ebrowse|sorted-doc)$ 2backup ^(test-distrib|make-docfile|profile|digest-doc|movemail|cvtmail|fakemail|blessmail|yow|emacsserver|hexl|update-game-score|etags|ctags|emacsclient|b2m|ebrowse|sorted-doc)$
3 3
4# Building actually makes a copy/link of the source file 4# Building actually makes a copy/link of the source file
5precious ^(ctags\.c)$ 5precious ^(ctags\.c)$
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 378d0c3fe22..f48ea78a246 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,148 @@
12007-07-29 Kimit Yada <kimitto@gmail.com> (tiny change)
2
3 * emacs-lisp/copyright.el (copyright-update-year, copyright-update)
4 (copyright-fix-years, copyright): Correctly handle the case where
5 copyright-limit is nil.
6
72007-07-28 Konstantin Novitsky <knovitsk@Bear.com> (tiny change)
8
9 * progmodes/python.el (run-python): Fix path separator under w32.
10
112007-07-30 Richard Stallman <rms@gnu.org>
12
13 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):
14 Treat non-break space as whitespace in Lisp.
15
162007-07-30 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * vc.el (vc-dired-hook): Use inhibit-read-only.
19
20 * progmodes/compile.el (compilation-forget-errors):
21 Reset compilation-auto-jump-to-next.
22
232007-07-30 Michael Olson <mwolson@gnu.org>
24
25 * cus-edit.el (custom-group-save): Fix void function definition
26 error. Thanks to Zhang Wei for the report.
27
28 * ps-print.el: Check in trivial changes to the autoloads section
29 caused by the build process. These autoloads really ought to be
30 placed in a separate file, methinks.
31
322007-07-29 Stefan Monnier <monnier@iro.umontreal.ca>
33
34 * calendar/calendar.el (calendar-mode): Make sure
35 displayed-(month|year) are set.
36 (calendar-basic-setup): Display buffer before adjusting window sizes.
37 (generate-calendar-window): Use inhibit-read-only. Simplify.
38 Generate buffer and set displayed-month and displayed-year before
39 calling update-calendar-mode-line.
40
412007-07-29 Michael Albinus <michael.albinus@gmx.de>
42
43 * tramp.el:
44 * tramp-uu.el:
45 * trampver.el: Use utf-8 encoding with coding cookie.
46
47 * tramp-cache.el:
48 * tramp-fish.el:
49 * tramp-ftp.el:
50 * tramp-gw.el:
51 * tramp-smb.el: Remove coding cookie.
52
53 * tramp.el (tramp-handle-verify-visited-file-modtime):
54 Flush buffer file-name's file property.
55 (tramp-handle-file-remote-p): The first parameter is FILENAME.
56
57 * trampver.el: Update release number.
58
592007-07-29 Juri Linkov <juri@jurta.org>
60
61 * dired.el (dired-mode-map): Bind C-x C-q to dired-toggle-read-only.
62 Filter out menu item "Edit File Names" `wdired-change-to-wdired-mode'
63 when major-mode is not dired-mode.
64 (dired-toggle-read-only): New function.
65 (dired-recursive-deletes): Remove obsolete comments about old
66 default value.
67 (dired-do-flagged-delete, dired-do-delete): Refill docstring.
68
69 * wdired.el (wdired-exit): New function.
70 (wdired-mode-map): Bind C-x C-q to wdired-exit.
71
722007-07-28 Stefan Monnier <monnier@iro.umontreal.ca>
73
74 * cus-edit.el (customize-read-group): New fun.
75 (customize-group-other-window, customize-face-other-window):
76 Prompt before delegating to customize-(group|face).
77 Bind pop-up-windows rather than use the other-window argument.
78 (customize-group, customize-face): Prompt from the interactive spec.
79 Remove args `prompt-for-group' and `other-window'.
80
81 * emacs-lisp/advice.el (ad-interactive-form): Re-introduce.
82 (ad-body-forms, ad-advised-interactive-form): Revert this part of
83 last change.
84
852007-07-28 Masatake YAMATO <jet@gyve.org>
86
87 * vc.el (vc-dired-mode): Add a menu for VC related operation.
88 Use backend name as the menu label Suggested by David Kastrup.
89
902007-07-28 Alan Mackenzie <acm@muc.de>
91
92 Fix problem with modes derived from CC Mode:
93 * progmodes/cc-mode.el (c-make-emacs-variables-local): Move this
94 macro to cc-langs.
95 (c-init-language-vars-for): Remove call to above macro.
96 * progmodes/cc-langs.el (c-make-emacs-variables-local): Macro has
97 been moved to here.
98 (c-make-init-lang-vars-fun): Call c-make-emacs-variables-local.
99
1002007-07-28 Eli Zaretskii <eliz@gnu.org>
101
102 * net/trampver.el: Fix the `coding' cookie.
103
1042007-07-28 Dan Nicolaescu <dann@ics.uci.edu>
105
106 * vc-git.el (vc-git-print-log): Support both the old single file
107 interface and the new one.
108
1092007-07-28 Nick Roberts <nickrob@snap.net.nz>
110
111 * bindings.el (mode-line-remote): Use updated %@ construct.
112
1132007-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
114
115 * calendar/cal-bahai.el (calendar-bahai-month-name-array)
116 (calendar-bahai-epoch, calendar-bahai-leap-year-p)
117 (calendar-bahai-leap-base, calendar-bahai-prompt-for-date)
118 (diary-list-bahai-entries, diary-bahai-mark-entries)
119 (calendar-bahai-mark-date-pattern, diary-insert-bahai-entry)
120 (diary-bahai-insert-monthly-entry, diary-bahai-insert-yearly-entry):
121 New names to clean up namespace.
122 (list-bahai-diary-entries, mark-bahai-diary-entries)
123 (insert-bahai-diary-entry, insert-monthly-bahai-diary-entry)
124 (insert-yearly-bahai-diary-entry, mark-bahai-calendar-date-pattern):
125 Add compatibility aliases.
126
127 * calendar/appt.el: Don't wrap defvar within eval-when-compile.
128
129 * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right)
130 (calendar-scroll-left-three-months)
131 (calendar-scroll-right-three-months): Clean up namespace.
132 (scroll-calendar-left, scroll-calendar-right)
133 (scroll-calendar-left-three-months)
134 (scroll-calendar-right-three-months): Add compatibility aliases.
135
136 * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right):
137 Behave like mouse-scroll-calendar-* when used from the mouse.
138
139 * calendar/cal-menu.el (cal-menu-scroll-menu)
140 (cal-menu-global-mouse-menu):
141 * calendar/calendar.el (calendar-mode-map):
142 Use new calendar-scroll-* names.
143 (mouse-scroll-calendar-left, mouse-scroll-calendar-right):
144 Remove. Use calendar-scroll-* directly instead.
145
12007-07-26 Stefan Monnier <monnier@iro.umontreal.ca> 1462007-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 147
3 * emacs-lisp/advice.el (ad-interactive-p, ad-interactive-form): Remove. 148 * emacs-lisp/advice.el (ad-interactive-p, ad-interactive-form): Remove.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 669652564d5..8a492d665a1 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -250,7 +250,7 @@ Normally nil in most modes, since there is no process to display.")
250 250
251(defvar mode-line-remote 251(defvar mode-line-remote
252 (list (propertize 252 (list (propertize
253 "%1R" 253 "%1@"
254 'help-echo (purecopy (lambda (window object point) 254 'help-echo (purecopy (lambda (window object point)
255 (format "%s" 255 (format "%s"
256 (save-selected-window 256 (save-selected-window
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 7f343f300dc..94df068b012 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -531,9 +531,9 @@ The time should be in either 24 hour format or am/pm format."
531 (message ""))) 531 (message "")))
532 532
533 533
534(eval-when-compile (defvar number) 534(defvar number)
535 (defvar original-date) 535(defvar original-date)
536 (defvar diary-entries-list)) 536(defvar diary-entries-list)
537;;;###autoload 537;;;###autoload
538(defun appt-make-list () 538(defun appt-make-list ()
539 "Update the appointments list from today's diary buffer. 539 "Update the appointments list from today's diary buffer.
@@ -634,7 +634,7 @@ appointment package (if it is not already active)."
634(defun appt-sort-list (appt-list) 634(defun appt-sort-list (appt-list)
635 "Sort an appointment list, putting earlier items at the front. 635 "Sort an appointment list, putting earlier items at the front.
636APPT-LIST is a list of the same format as `appt-time-msg-list'." 636APPT-LIST is a list of the same format as `appt-time-msg-list'."
637(sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2))))) 637 (sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2)))))
638 638
639 639
640(defun appt-convert-time (time2conv) 640(defun appt-convert-time (time2conv)
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index e3b84539614..1657611466c 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -63,19 +63,19 @@
63 63
64(require 'cal-julian) 64(require 'cal-julian)
65 65
66(defvar bahai-calendar-month-name-array 66(defconst calendar-bahai-month-name-array
67 ["Baha" "Jalal" "Jamal" "`Azamat" "Nur" "Rahmat" "Kalimat" "Kamal" 67 ["Baha" "Jalal" "Jamal" "`Azamat" "Nur" "Rahmat" "Kalimat" "Kamal"
68 "Asma" "`Izzat" "Mashiyyat" "`Ilm" "Qudrat" "Qawl" "Masa'il" 68 "Asma" "`Izzat" "Mashiyyat" "`Ilm" "Qudrat" "Qawl" "Masa'il"
69 "Sharaf" "Sultan" "Mulk" "`Ala"]) 69 "Sharaf" "Sultan" "Mulk" "`Ala"])
70 70
71(defvar calendar-bahai-epoch (calendar-absolute-from-gregorian '(3 21 1844)) 71(defconst calendar-bahai-epoch (calendar-absolute-from-gregorian '(3 21 1844))
72 "Absolute date of start of Baha'i calendar = March 19, 622 A.D. (Julian).") 72 "Absolute date of start of Baha'i calendar = March 19, 622 A.D. (Julian).")
73 73
74(defun bahai-calendar-leap-year-p (year) 74(defun calendar-bahai-leap-year-p (year)
75 "True if YEAR is a leap year on the Baha'i calendar." 75 "True if YEAR is a leap year on the Baha'i calendar."
76 (calendar-leap-year-p (+ year 1844))) 76 (calendar-leap-year-p (+ year 1844)))
77 77
78(defvar bahai-calendar-leap-base 78(defconst calendar-bahai-leap-base
79 (+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400))) 79 (+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400)))
80 80
81(defun calendar-absolute-from-bahai (date) 81(defun calendar-absolute-from-bahai (date)
@@ -89,7 +89,7 @@ Gregorian date Sunday, December 31, 1 BC."
89 (leap-days (- (+ (/ prior-years 4) ; Leap days in prior years. 89 (leap-days (- (+ (/ prior-years 4) ; Leap days in prior years.
90 (- (/ prior-years 100)) 90 (- (/ prior-years 100))
91 (/ prior-years 400)) 91 (/ prior-years 400))
92 bahai-calendar-leap-base))) 92 calendar-bahai-leap-base)))
93 (+ (1- calendar-bahai-epoch) ; Days before epoch 93 (+ (1- calendar-bahai-epoch) ; Days before epoch
94 (* 365 (1- year)) ; Days in prior years. 94 (* 365 (1- year)) ; Days in prior years.
95 leap-days 95 leap-days
@@ -131,10 +131,10 @@ Defaults to today's date if DATE is not given."
131 (if (and (= m 19) 131 (if (and (= m 19)
132 (<= d 0)) 132 (<= d 0))
133 "Ayyam-i-Ha" 133 "Ayyam-i-Ha"
134 (aref bahai-calendar-month-name-array (1- m)))) 134 (aref calendar-bahai-month-name-array (1- m))))
135 (day (int-to-string 135 (day (int-to-string
136 (if (<= d 0) 136 (if (<= d 0)
137 (if (bahai-calendar-leap-year-p y) 137 (if (calendar-bahai-leap-year-p y)
138 (+ d 5) 138 (+ d 5)
139 (+ d 4)) 139 (+ d 4))
140 d))) 140 d)))
@@ -152,12 +152,12 @@ Defaults to today's date if DATE is not given."
152(defun calendar-goto-bahai-date (date &optional noecho) 152(defun calendar-goto-bahai-date (date &optional noecho)
153 "Move cursor to Baha'i date DATE. 153 "Move cursor to Baha'i date DATE.
154Echo Baha'i date unless NOECHO is t." 154Echo Baha'i date unless NOECHO is t."
155 (interactive (bahai-prompt-for-date)) 155 (interactive (calendar-bahai-prompt-for-date))
156 (calendar-goto-date (calendar-gregorian-from-absolute 156 (calendar-goto-date (calendar-gregorian-from-absolute
157 (calendar-absolute-from-bahai date))) 157 (calendar-absolute-from-bahai date)))
158 (or noecho (calendar-print-bahai-date))) 158 (or noecho (calendar-print-bahai-date)))
159 159
160(defun bahai-prompt-for-date () 160(defun calendar-bahai-prompt-for-date ()
161 "Ask for a Baha'i date." 161 "Ask for a Baha'i date."
162 (let* ((today (calendar-current-date)) 162 (let* ((today (calendar-current-date))
163 (year (calendar-read 163 (year (calendar-read
@@ -172,9 +172,9 @@ Echo Baha'i date unless NOECHO is t."
172 (completing-read 172 (completing-read
173 "Baha'i calendar month name: " 173 "Baha'i calendar month name: "
174 (mapcar 'list 174 (mapcar 'list
175 (append bahai-calendar-month-name-array nil)) 175 (append calendar-bahai-month-name-array nil))
176 nil t) 176 nil t)
177 (calendar-make-alist bahai-calendar-month-name-array 177 (calendar-make-alist calendar-bahai-month-name-array
178 1)))) 178 1))))
179 (day (calendar-read "Baha'i calendar day (1-19): " 179 (day (calendar-read "Baha'i calendar day (1-19): "
180 '(lambda (x) (and (< 0 x) (<= x 19)))))) 180 '(lambda (x) (and (< 0 x) (<= x 19))))))
@@ -204,7 +204,7 @@ nil if it is not visible in the current calendar window."
204 (if (calendar-date-is-visible-p date) 204 (if (calendar-date-is-visible-p date)
205 (list (list date string)))))))) 205 (list (list date string))))))))
206 206
207(defun list-bahai-diary-entries () 207(defun diary-list-bahai-entries ()
208 "Add any Baha'i date entries from the diary file to `diary-entries-list'. 208 "Add any Baha'i date entries from the diary file to `diary-entries-list'.
209Baha'i date diary entries must be prefaced by an 209Baha'i date diary entries must be prefaced by an
210`bahai-diary-entry-symbol' (normally a `B'). The same diary date 210`bahai-diary-entry-symbol' (normally a `B'). The same diary date
@@ -238,7 +238,7 @@ calendar. This function is provided for use with the
238 (calendar-day-name gdate) "\\|" 238 (calendar-day-name gdate) "\\|"
239 (substring (calendar-day-name gdate) 0 3) ".?")) 239 (substring (calendar-day-name gdate) 0 3) ".?"))
240 (calendar-month-name-array 240 (calendar-month-name-array
241 bahai-calendar-month-name-array) 241 calendar-bahai-month-name-array)
242 (monthname 242 (monthname
243 (concat 243 (concat
244 "\\*\\|" 244 "\\*\\|"
@@ -290,7 +290,7 @@ calendar. This function is provided for use with the
290 (set-buffer-modified-p diary-modified)) 290 (set-buffer-modified-p diary-modified))
291 (goto-char (point-min)))) 291 (goto-char (point-min))))
292 292
293(defun mark-bahai-diary-entries () 293(defun diary-bahai-mark-entries ()
294 "Mark days in the calendar window that have Baha'i date diary entries. 294 "Mark days in the calendar window that have Baha'i date diary entries.
295Each entry in diary-file (or included files) visible in the calendar 295Each entry in diary-file (or included files) visible in the calendar
296window is marked. Baha'i date entries are prefaced by a 296window is marked. Baha'i date entries are prefaced by a
@@ -311,7 +311,7 @@ nongregorian-diary-marking-hook."
311 (dayname (diary-name-pattern calendar-day-name-array)) 311 (dayname (diary-name-pattern calendar-day-name-array))
312 (monthname 312 (monthname
313 (concat 313 (concat
314 (diary-name-pattern bahai-calendar-month-name-array t) 314 (diary-name-pattern calendar-bahai-month-name-array t)
315 "\\|\\*")) 315 "\\|\\*"))
316 (month "[0-9]+\\|\\*") 316 (month "[0-9]+\\|\\*")
317 (day "[0-9]+\\|\\*") 317 (day "[0-9]+\\|\\*")
@@ -395,12 +395,12 @@ nongregorian-diary-marking-hook."
395 (cdr (assoc-string 395 (cdr (assoc-string
396 mm-name 396 mm-name
397 (calendar-make-alist 397 (calendar-make-alist
398 bahai-calendar-month-name-array) 398 calendar-bahai-month-name-array)
399 t))))) 399 t)))))
400 (mark-bahai-calendar-date-pattern mm dd yy))))) 400 (calendar-bahai-mark-date-pattern mm dd yy)))))
401 (setq d (cdr d))))) 401 (setq d (cdr d)))))
402 402
403(defun mark-bahai-calendar-date-pattern (month day year) 403(defun calendar-bahai-mark-date-pattern (month day year)
404 "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR. 404 "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR.
405A value of 0 in any position is a wildcard." 405A value of 0 in any position is a wildcard."
406 (save-excursion 406 (save-excursion
@@ -458,12 +458,12 @@ A value of 0 in any position is a wildcard."
458 (mark-visible-calendar-date 458 (mark-visible-calendar-date
459 (calendar-gregorian-from-absolute date))))))))) 459 (calendar-gregorian-from-absolute date)))))))))
460 460
461(defun insert-bahai-diary-entry (arg) 461(defun diary-insert-bahai-entry (arg)
462 "Insert a diary entry. 462 "Insert a diary entry.
463For the Baha'i date corresponding to the date indicated by point. 463For the Baha'i date corresponding to the date indicated by point.
464Prefix arg will make the entry nonmarking." 464Prefix arg will make the entry nonmarking."
465 (interactive "P") 465 (interactive "P")
466 (let* ((calendar-month-name-array bahai-calendar-month-name-array)) 466 (let* ((calendar-month-name-array calendar-bahai-month-name-array))
467 (make-diary-entry 467 (make-diary-entry
468 (concat 468 (concat
469 bahai-diary-entry-symbol 469 bahai-diary-entry-symbol
@@ -474,14 +474,14 @@ Prefix arg will make the entry nonmarking."
474 nil t)) 474 nil t))
475 arg))) 475 arg)))
476 476
477(defun insert-monthly-bahai-diary-entry (arg) 477(defun diary-bahai-insert-monthly-entry (arg)
478 "Insert a monthly diary entry. 478 "Insert a monthly diary entry.
479For the day of the Baha'i month corresponding to the date indicated by point. 479For the day of the Baha'i month corresponding to the date indicated by point.
480Prefix arg will make the entry nonmarking." 480Prefix arg will make the entry nonmarking."
481 (interactive "P") 481 (interactive "P")
482 (let* ((calendar-date-display-form 482 (let* ((calendar-date-display-form
483 (if european-calendar-style '(day " * ") '("* " day ))) 483 (if european-calendar-style '(day " * ") '("* " day )))
484 (calendar-month-name-array bahai-calendar-month-name-array)) 484 (calendar-month-name-array calendar-bahai-month-name-array))
485 (make-diary-entry 485 (make-diary-entry
486 (concat 486 (concat
487 bahai-diary-entry-symbol 487 bahai-diary-entry-symbol
@@ -491,7 +491,7 @@ Prefix arg will make the entry nonmarking."
491 (calendar-cursor-to-date t))))) 491 (calendar-cursor-to-date t)))))
492 arg))) 492 arg)))
493 493
494(defun insert-yearly-bahai-diary-entry (arg) 494(defun diary-bahai-insert-yearly-entry (arg)
495 "Insert an annual diary entry. 495 "Insert an annual diary entry.
496For the day of the Baha'i year corresponding to the date indicated by point. 496For the day of the Baha'i year corresponding to the date indicated by point.
497Prefix arg will make the entry nonmarking." 497Prefix arg will make the entry nonmarking."
@@ -500,7 +500,7 @@ Prefix arg will make the entry nonmarking."
500 (if european-calendar-style 500 (if european-calendar-style
501 '(day " " monthname) 501 '(day " " monthname)
502 '(monthname " " day))) 502 '(monthname " " day)))
503 (calendar-month-name-array bahai-calendar-month-name-array)) 503 (calendar-month-name-array calendar-bahai-month-name-array))
504 (make-diary-entry 504 (make-diary-entry
505 (concat 505 (concat
506 bahai-diary-entry-symbol 506 bahai-diary-entry-symbol
@@ -510,7 +510,21 @@ Prefix arg will make the entry nonmarking."
510 (calendar-cursor-to-date t))))) 510 (calendar-cursor-to-date t)))))
511 arg))) 511 arg)))
512 512
513;; Backward compatibility.
514(define-obsolete-function-alias
515 'list-bahai-diary-entries 'diary-list-bahai-entries "23.1")
516(define-obsolete-function-alias
517 'mark-bahai-diary-entries 'diary-mark-bahai-entries "23.1")
518(define-obsolete-function-alias
519 'insert-bahai-diary-entry 'diary-insert-bahai-entry "23.1")
520(define-obsolete-function-alias
521 'insert-monthly-bahai-diary-entry 'diary-insert-bahai-monthly-entry "23.1")
522(define-obsolete-function-alias
523 'insert-yearly-bahai-diary-entry 'diary-insert-bahai-yearly-entry "23.1")
524(define-obsolete-function-alias
525 'mark-bahai-calendar-date-pattern 'calendar-bahai-mark-date-pattern "23.1")
526
513(provide 'cal-bahai) 527(provide 'cal-bahai)
514 528
515;;; arch-tag: c1cb1d67-862a-4264-a01c-41cb4df01f14 529;; arch-tag: c1cb1d67-862a-4264-a01c-41cb4df01f14
516;;; cal-bahai.el ends here 530;;; cal-bahai.el ends here
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index 40cf158dcd6..1f4e4df736f 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -33,7 +33,6 @@
33 33
34;;; Code: 34;;; Code:
35 35
36(defvar displayed-month)
37(defvar displayed-year) 36(defvar displayed-year)
38 37
39(defconst cal-menu-moon-menu 38(defconst cal-menu-moon-menu
@@ -140,11 +139,11 @@
140 139
141(defconst cal-menu-scroll-menu 140(defconst cal-menu-scroll-menu
142 '("Scroll" 141 '("Scroll"
143 ["Forward 1 Month" scroll-calendar-left] 142 ["Forward 1 Month" calendar-scroll-left]
144 ["Forward 3 Months" scroll-calendar-left-three-months] 143 ["Forward 3 Months" calendar-scroll-left-three-months]
145 ["Forward 1 Year" "4\C-v"] 144 ["Forward 1 Year" "4\C-v"]
146 ["Backward 1 Month" scroll-calendar-right] 145 ["Backward 1 Month" calendar-scroll-right]
147 ["Backward 3 Months" scroll-calendar-right-three-months] 146 ["Backward 3 Months" calendar-scroll-right-three-months]
148 ["Backward 1 Year" "4\ev"])) 147 ["Backward 1 Year" "4\ev"]))
149 148
150(defun cal-menu-x-popup-menu (position menu) 149(defun cal-menu-x-popup-menu (position menu)
@@ -459,8 +458,8 @@ The output is in landscape format, one month to a page."
459(easy-menu-define cal-menu-global-mouse-menu nil 458(easy-menu-define cal-menu-global-mouse-menu nil
460 "Menu bound to a mouse event, not specific to the mouse-click location." 459 "Menu bound to a mouse event, not specific to the mouse-click location."
461 '("Calendar" 460 '("Calendar"
462 ["Scroll forward" scroll-calendar-left-three-months] 461 ["Scroll forward" calendar-scroll-left-three-months]
463 ["Scroll backward" scroll-calendar-right-three-months] 462 ["Scroll backward" calendar-scroll-right-three-months]
464 ["Mark diary entries" mark-diary-entries] 463 ["Mark diary entries" mark-diary-entries]
465 ["List holidays" list-calendar-holidays] 464 ["List holidays" list-calendar-holidays]
466 ["Mark holidays" mark-calendar-holidays] 465 ["Mark holidays" mark-calendar-holidays]
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el
index 02760b34e93..81f75114a3f 100644
--- a/lisp/calendar/cal-move.el
+++ b/lisp/calendar/cal-move.el
@@ -85,47 +85,51 @@ Movement is forward is ARG is negative."
85 (interactive "p") 85 (interactive "p")
86 (calendar-forward-month (* -12 arg))) 86 (calendar-forward-month (* -12 arg)))
87 87
88(defun scroll-calendar-left (&optional arg) 88(defun calendar-scroll-left (&optional arg event)
89 "Scroll the displayed calendar left by ARG months. 89 "Scroll the displayed calendar left by ARG months.
90If ARG is negative the calendar is scrolled right. Maintains the relative 90If ARG is negative the calendar is scrolled right. Maintains the relative
91position of the cursor with respect to the calendar as well as possible." 91position of the cursor with respect to the calendar as well as possible."
92 (interactive "p") 92 (interactive (list (prefix-numeric-value current-prefix-arg)
93 last-nonmenu-event))
93 (unless arg (setq arg 1)) 94 (unless arg (setq arg 1))
94 (calendar-cursor-to-nearest-date) 95 (save-selected-window
95 (let ((old-date (calendar-cursor-to-date)) 96 (select-window (posn-window (event-start event)))
96 (today (calendar-current-date))) 97 (calendar-cursor-to-nearest-date)
97 (if (/= arg 0) 98 (let ((old-date (calendar-cursor-to-date))
98 (let ((month displayed-month) 99 (today (calendar-current-date)))
99 (year displayed-year)) 100 (if (/= arg 0)
100 (increment-calendar-month month year arg) 101 (let ((month displayed-month)
101 (generate-calendar-window month year) 102 (year displayed-year))
102 (calendar-cursor-to-visible-date 103 (increment-calendar-month month year arg)
103 (cond 104 (generate-calendar-window month year)
104 ((calendar-date-is-visible-p old-date) old-date) 105 (calendar-cursor-to-visible-date
105 ((calendar-date-is-visible-p today) today) 106 (cond
106 (t (list month 1 year))))))) 107 ((calendar-date-is-visible-p old-date) old-date)
107 (run-hooks 'calendar-move-hook)) 108 ((calendar-date-is-visible-p today) today)
108 109 (t (list month 1 year)))))))
109(defun scroll-calendar-right (&optional arg) 110 (run-hooks 'calendar-move-hook)))
111
112(defun calendar-scroll-right (&optional arg event)
110 "Scroll the displayed calendar window right by ARG months. 113 "Scroll the displayed calendar window right by ARG months.
111If ARG is negative the calendar is scrolled left. Maintains the relative 114If ARG is negative the calendar is scrolled left. Maintains the relative
112position of the cursor with respect to the calendar as well as possible." 115position of the cursor with respect to the calendar as well as possible."
113 (interactive "p") 116 (interactive (list (prefix-numeric-value current-prefix-arg)
114 (scroll-calendar-left (- (or arg 1)))) 117 last-nonmenu-event))
118 (calendar-scroll-left (- (or arg 1)) event))
115 119
116(defun scroll-calendar-left-three-months (arg) 120(defun calendar-scroll-left-three-months (arg)
117 "Scroll the displayed calendar window left by 3*ARG months. 121 "Scroll the displayed calendar window left by 3*ARG months.
118If ARG is negative the calendar is scrolled right. Maintains the relative 122If ARG is negative the calendar is scrolled right. Maintains the relative
119position of the cursor with respect to the calendar as well as possible." 123position of the cursor with respect to the calendar as well as possible."
120 (interactive "p") 124 (interactive "p")
121 (scroll-calendar-left (* 3 arg))) 125 (calendar-scroll-left (* 3 arg)))
122 126
123(defun scroll-calendar-right-three-months (arg) 127(defun calendar-scroll-right-three-months (arg)
124 "Scroll the displayed calendar window right by 3*ARG months. 128 "Scroll the displayed calendar window right by 3*ARG months.
125If ARG is negative the calendar is scrolled left. Maintains the relative 129If ARG is negative the calendar is scrolled left. Maintains the relative
126position of the cursor with respect to the calendar as well as possible." 130position of the cursor with respect to the calendar as well as possible."
127 (interactive "p") 131 (interactive "p")
128 (scroll-calendar-left (* -3 arg))) 132 (calendar-scroll-left (* -3 arg)))
129 133
130(defun calendar-cursor-to-nearest-date () 134(defun calendar-cursor-to-nearest-date ()
131 "Move the cursor to the closest date. 135 "Move the cursor to the closest date.
@@ -345,7 +349,17 @@ Negative DAY counts backward from end of year."
345 (+ 1 day (calendar-absolute-from-gregorian (list 12 31 year)))))) 349 (+ 1 day (calendar-absolute-from-gregorian (list 12 31 year))))))
346 (or noecho (calendar-print-day-of-year))) 350 (or noecho (calendar-print-day-of-year)))
347 351
352;; Backward compatibility.
353(define-obsolete-function-alias
354 'scroll-calendar-left 'calendar-scroll-left "23.1")
355(define-obsolete-function-alias
356 'scroll-calendar-right 'calendar-scroll-right "23.1")
357(define-obsolete-function-alias
358 'scroll-calendar-left-three-months 'calendar-scroll-left-three-months "23.1")
359(define-obsolete-function-alias
360 'scroll-calendar-right-three-months 'calendar-scroll-right-three-months "23.1")
361
348(provide 'cal-move) 362(provide 'cal-move)
349 363
350;;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781 364;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
351;;; cal-move.el ends here 365;;; cal-move.el ends here
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index c8c27703f8e..7611e40f8ef 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1493,19 +1493,19 @@ return negative results."
1493 "Move the cursor backward ARG years." 1493 "Move the cursor backward ARG years."
1494 t) 1494 t)
1495 1495
1496(autoload 'scroll-calendar-left "cal-move" 1496(autoload 'calendar-scroll-left "cal-move"
1497 "Scroll the displayed calendar left by ARG months." 1497 "Scroll the displayed calendar left by ARG months."
1498 t) 1498 t)
1499 1499
1500(autoload 'scroll-calendar-right "cal-move" 1500(autoload 'calendar-scroll-right "cal-move"
1501 "Scroll the displayed calendar window right by ARG months." 1501 "Scroll the displayed calendar window right by ARG months."
1502 t) 1502 t)
1503 1503
1504(autoload 'scroll-calendar-left-three-months "cal-move" 1504(autoload 'calendar-scroll-left-three-months "cal-move"
1505 "Scroll the displayed calendar window left by 3*ARG months." 1505 "Scroll the displayed calendar window left by 3*ARG months."
1506 t) 1506 t)
1507 1507
1508(autoload 'scroll-calendar-right-three-months "cal-move" 1508(autoload 'calendar-scroll-right-three-months "cal-move"
1509 "Scroll the displayed calendar window right by 3*ARG months." 1509 "Scroll the displayed calendar window right by 3*ARG months."
1510 t) 1510 t)
1511 1511
@@ -1678,10 +1678,10 @@ to be replaced by asterisks to highlight it whenever it is in the window."
1678 ;; not a legal date for the visible test in the diary section. 1678 ;; not a legal date for the visible test in the diary section.
1679 (if arg (setcar (cdr date) 1)) 1679 (if arg (setcar (cdr date) 1))
1680 (increment-calendar-month month year (- calendar-offset)) 1680 (increment-calendar-month month year (- calendar-offset))
1681 (generate-calendar-window month year) 1681 ;; Display the buffer before calling generate-calendar-window so that it
1682 ;; Display the buffer *after* generating it, so that menu entries that 1682 ;; can get a chance to adjust the window sizes to the frame size.
1683 ;; use display-month do not fail when creating the new frame.
1684 (pop-to-buffer calendar-buffer) 1683 (pop-to-buffer calendar-buffer)
1684 (generate-calendar-window month year)
1685 (if (and view-diary-entries-initially (calendar-date-is-visible-p date)) 1685 (if (and view-diary-entries-initially (calendar-date-is-visible-p date))
1686 (diary-view-entries))) 1686 (diary-view-entries)))
1687 (let* ((diary-buffer (get-file-buffer diary-file)) 1687 (let* ((diary-buffer (get-file-buffer diary-file))
@@ -2060,7 +2060,7 @@ existing output files are overwritten." t)
2060(defun generate-calendar-window (&optional mon yr) 2060(defun generate-calendar-window (&optional mon yr)
2061 "Generate the calendar window for the current date. 2061 "Generate the calendar window for the current date.
2062Or, for optional MON, YR." 2062Or, for optional MON, YR."
2063 (let* ((buffer-read-only nil) 2063 (let* ((inhibit-read-only t)
2064 (today (calendar-current-date)) 2064 (today (calendar-current-date))
2065 (month (extract-calendar-month today)) 2065 (month (extract-calendar-month today))
2066 (day (extract-calendar-day today)) 2066 (day (extract-calendar-day today))
@@ -2072,10 +2072,8 @@ Or, for optional MON, YR."
2072 (day-in-week (calendar-day-of-week today)) 2072 (day-in-week (calendar-day-of-week today))
2073 (in-calendar-window (eq (window-buffer (selected-window)) 2073 (in-calendar-window (eq (window-buffer (selected-window))
2074 (get-buffer calendar-buffer)))) 2074 (get-buffer calendar-buffer))))
2075 (generate-calendar (or mon month) (or yr year))
2075 (update-calendar-mode-line) 2076 (update-calendar-mode-line)
2076 (if mon
2077 (generate-calendar mon yr)
2078 (generate-calendar month year))
2079 (calendar-cursor-to-visible-date 2077 (calendar-cursor-to-visible-date
2080 (if today-visible today (list displayed-month 1 displayed-year))) 2078 (if today-visible today (list displayed-month 1 displayed-year)))
2081 (set-buffer-modified-p nil) 2079 (set-buffer-modified-p nil)
@@ -2224,14 +2222,14 @@ movement commands will not work correctly."
2224 downcase-region upcase-region kill-region 2222 downcase-region upcase-region kill-region
2225 copy-region-as-kill capitalize-region write-region)) 2223 copy-region-as-kill capitalize-region write-region))
2226 (define-key map (vector 'remap c) 'calendar-not-implemented)) 2224 (define-key map (vector 'remap c) 'calendar-not-implemented))
2227 (define-key map "<" 'scroll-calendar-right) 2225 (define-key map "<" 'calendar-scroll-right)
2228 (define-key map "\C-x<" 'scroll-calendar-right) 2226 (define-key map "\C-x<" 'calendar-scroll-right)
2229 (define-key map [prior] 'scroll-calendar-right-three-months) 2227 (define-key map [prior] 'calendar-scroll-right-three-months)
2230 (define-key map "\ev" 'scroll-calendar-right-three-months) 2228 (define-key map "\ev" 'calendar-scroll-right-three-months)
2231 (define-key map ">" 'scroll-calendar-left) 2229 (define-key map ">" 'calendar-scroll-left)
2232 (define-key map "\C-x>" 'scroll-calendar-left) 2230 (define-key map "\C-x>" 'calendar-scroll-left)
2233 (define-key map [next] 'scroll-calendar-left-three-months) 2231 (define-key map [next] 'calendar-scroll-left-three-months)
2234 (define-key map "\C-v" 'scroll-calendar-left-three-months) 2232 (define-key map "\C-v" 'calendar-scroll-left-three-months)
2235 (define-key map "\C-b" 'calendar-backward-day) 2233 (define-key map "\C-b" 'calendar-backward-day)
2236 (define-key map "\C-p" 'calendar-backward-week) 2234 (define-key map "\C-p" 'calendar-backward-week)
2237 (define-key map "\e{" 'calendar-backward-month) 2235 (define-key map "\e{" 'calendar-backward-month)
@@ -2383,7 +2381,7 @@ movement commands will not work correctly."
2383 'help-echo "mouse-1: previous month" 2381 'help-echo "mouse-1: previous month"
2384 'mouse-face 'mode-line-highlight 2382 'mouse-face 'mode-line-highlight
2385 'keymap (make-mode-line-mouse-map 'mouse-1 2383 'keymap (make-mode-line-mouse-map 'mouse-1
2386 'mouse-scroll-calendar-right)) 2384 'calendar-scroll-right))
2387 "Calendar" 2385 "Calendar"
2388 (concat 2386 (concat
2389 (propertize 2387 (propertize
@@ -2412,7 +2410,7 @@ movement commands will not work correctly."
2412 'help-echo "mouse-1: next month" 2410 'help-echo "mouse-1: next month"
2413 'mouse-face 'mode-line-highlight 2411 'mouse-face 'mode-line-highlight
2414 'keymap (make-mode-line-mouse-map 2412 'keymap (make-mode-line-mouse-map
2415 'mouse-1 'mouse-scroll-calendar-left))) 2413 'mouse-1 'calendar-scroll-left)))
2416 "The mode line of the calendar buffer. 2414 "The mode line of the calendar buffer.
2417 2415
2418This must be a list of items that evaluate to strings--those strings are 2416This must be a list of items that evaluate to strings--those strings are
@@ -2439,24 +2437,6 @@ under the cursor:
2439 (extract-calendar-year iso-date))) 2437 (extract-calendar-year iso-date)))
2440 \"\"))") 2438 \"\"))")
2441 2439
2442(defun mouse-scroll-calendar-left (event)
2443 "Scroll the displayed calendar left by one month.
2444Maintains the relative position of the cursor
2445with respect to the calendar as well as possible."
2446 (interactive "e")
2447 (save-selected-window
2448 (select-window (posn-window (event-start event)))
2449 (scroll-calendar-left 1)))
2450
2451(defun mouse-scroll-calendar-right (event)
2452 "Scroll the displayed calendar right by one month.
2453Maintains the relative position of the cursor
2454with respect to the calendar as well as possible."
2455 (interactive "e")
2456 (save-selected-window
2457 (select-window (posn-window (event-start event)))
2458 (scroll-calendar-right 1)))
2459
2460(defun mouse-calendar-other-month (event) 2440(defun mouse-calendar-other-month (event)
2461 "Display a three-month calendar centered around a specified month and year." 2441 "Display a three-month calendar centered around a specified month and year."
2462 (interactive "e") 2442 (interactive "e")
@@ -2493,8 +2473,13 @@ For a complete description, type \
2493 (setq indent-tabs-mode nil) 2473 (setq indent-tabs-mode nil)
2494 (update-calendar-mode-line) 2474 (update-calendar-mode-line)
2495 (make-local-variable 'calendar-mark-ring) 2475 (make-local-variable 'calendar-mark-ring)
2496 (make-local-variable 'displayed-month);; Month in middle of window. 2476 (make-local-variable 'displayed-month) ;; Month in middle of window.
2497 (make-local-variable 'displayed-year) ;; Year in middle of window. 2477 (make-local-variable 'displayed-year) ;; Year in middle of window.
2478 ;; Most functions only work if displayed-month and displayed-year are set,
2479 ;; so let's make sure they're always set. Most likely, this will be reset
2480 ;; soon in generate-calendar, but better safe than sorry.
2481 (unless (boundp 'displayed-month) (setq displayed-month 1))
2482 (unless (boundp 'displayed-year) (setq displayed-year 2001))
2498 (set (make-local-variable 'font-lock-defaults) 2483 (set (make-local-variable 'font-lock-defaults)
2499 '(calendar-font-lock-keywords t)) 2484 '(calendar-font-lock-keywords t))
2500 (run-mode-hooks 'calendar-mode-hook)) 2485 (run-mode-hooks 'calendar-mode-hook))
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 203129b410c..ff86711e041 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -141,9 +141,9 @@
141 141
142(require 'cus-face) 142(require 'cus-face)
143(require 'wid-edit) 143(require 'wid-edit)
144(eval-when-compile 144
145 (defvar custom-versions-load-alist) ; from cus-load 145(defvar custom-versions-load-alist) ; from cus-load
146 (defvar recentf-exclude)) ; from recentf.el 146(defvar recentf-exclude) ; from recentf.el
147 147
148(condition-case nil 148(condition-case nil
149 (require 'cus-load) 149 (require 'cus-load)
@@ -1032,22 +1032,20 @@ then prompt for the MODE to customize."
1032 t nil nil (if group (symbol-name major-mode)))))))) 1032 t nil nil (if group (symbol-name major-mode))))))))
1033 (customize-group (custom-group-of-mode mode))) 1033 (customize-group (custom-group-of-mode mode)))
1034 1034
1035(defun customize-read-group ()
1036 (let ((completion-ignore-case t))
1037 (completing-read "Customize group (default emacs): "
1038 obarray
1039 (lambda (symbol)
1040 (or (and (get symbol 'custom-loads)
1041 (not (get symbol 'custom-autoload)))
1042 (get symbol 'custom-group)))
1043 t)))
1035 1044
1036;;;###autoload 1045;;;###autoload
1037(defun customize-group (&optional group prompt-for-group other-window) 1046(defun customize-group (&optional group)
1038 "Customize GROUP, which must be a customization group." 1047 "Customize GROUP, which must be a customization group."
1039 (interactive) 1048 (interactive (list (customize-read-group)))
1040 (and (null group)
1041 (or prompt-for-group (called-interactively-p))
1042 (let ((completion-ignore-case t))
1043 (setq group
1044 (completing-read "Customize group (default emacs): "
1045 obarray
1046 (lambda (symbol)
1047 (or (and (get symbol 'custom-loads)
1048 (not (get symbol 'custom-autoload)))
1049 (get symbol 'custom-group)))
1050 t))))
1051 (when (stringp group) 1049 (when (stringp group)
1052 (if (string-equal "" group) 1050 (if (string-equal "" group)
1053 (setq group 'emacs) 1051 (setq group 'emacs)
@@ -1055,25 +1053,21 @@ then prompt for the MODE to customize."
1055 (let ((name (format "*Customize Group: %s*" 1053 (let ((name (format "*Customize Group: %s*"
1056 (custom-unlispify-tag-name group)))) 1054 (custom-unlispify-tag-name group))))
1057 (if (get-buffer name) 1055 (if (get-buffer name)
1058 (if other-window 1056 (pop-to-buffer name)
1059 (let ((pop-up-windows t) 1057 (custom-buffer-create
1060 (same-window-buffer-names nil) 1058 (list (list group 'custom-group))
1061 (same-window-regexps nil)) 1059 name
1062 (pop-to-buffer name)) 1060 (concat " for group "
1063 (pop-to-buffer name)) 1061 (custom-unlispify-tag-name group))))))
1064 (funcall (if other-window
1065 'custom-buffer-create-other-window
1066 'custom-buffer-create)
1067 (list (list group 'custom-group))
1068 name
1069 (concat " for group "
1070 (custom-unlispify-tag-name group))))))
1071 1062
1072;;;###autoload 1063;;;###autoload
1073(defun customize-group-other-window (&optional group) 1064(defun customize-group-other-window (&optional group)
1074 "Customize GROUP, which must be a customization group, in another window." 1065 "Customize GROUP, which must be a customization group, in another window."
1075 (interactive) 1066 (interactive (list (customize-read-group)))
1076 (customize-group group t t)) 1067 (let ((pop-up-windows t)
1068 (same-window-buffer-names nil)
1069 (same-window-regexps nil))
1070 (customize-group group)))
1077 1071
1078;;;###autoload 1072;;;###autoload
1079(defalias 'customize-variable 'customize-option) 1073(defalias 'customize-variable 'customize-option)
@@ -1254,41 +1248,33 @@ Emacs that is associated with version VERSION of PACKAGE."
1254 (< minor1 minor2))))) 1248 (< minor1 minor2)))))
1255 1249
1256;;;###autoload 1250;;;###autoload
1257(defun customize-face (&optional face prompt-for-face other-window) 1251(defun customize-face (&optional face)
1258 "Customize FACE, which should be a face name or nil. 1252 "Customize FACE, which should be a face name or nil.
1259If FACE is nil, customize all faces. If FACE is actually a 1253If FACE is nil, customize all faces. If FACE is actually a
1260face-alias, customize the face it is aliased to. 1254face-alias, customize the face it is aliased to.
1261 1255
1262Interactively, when point is on text which has a face specified, 1256Interactively, when point is on text which has a face specified,
1263suggest to customize that face, if it's customizable." 1257suggest to customize that face, if it's customizable."
1264 (interactive) 1258 (interactive (list (read-face-name "Customize face" "all faces" t)))
1265 (and (null face)
1266 (or prompt-for-face (called-interactively-p))
1267 (setq face (read-face-name "Customize face" "all faces" t)))
1268 (if (member face '(nil "")) 1259 (if (member face '(nil ""))
1269 (setq face (face-list))) 1260 (setq face (face-list)))
1270 (if (and (listp face) (null (cdr face))) 1261 (if (and (listp face) (null (cdr face)))
1271 (setq face (car face))) 1262 (setq face (car face)))
1272 (let ((create-buffer-fn (if other-window 1263 (if (listp face)
1273 'custom-buffer-create-other-window 1264 (custom-buffer-create
1274 'custom-buffer-create))) 1265 (custom-sort-items
1275 (if (listp face) 1266 (mapcar (lambda (s) (list s 'custom-face)) face)
1276 (funcall create-buffer-fn 1267 t nil)
1277 (custom-sort-items 1268 "*Customize Faces*")
1278 (mapcar (lambda (s) 1269 ;; If FACE is actually an alias, customize the face it is aliased to.
1279 (list s 'custom-face)) 1270 (if (get face 'face-alias)
1280 face) 1271 (setq face (get face 'face-alias)))
1281 t nil) 1272 (unless (facep face)
1282 "*Customize Faces*") 1273 (error "Invalid face %S" face))
1283 ;; If FACE is actually an alias, customize the face it is aliased to. 1274 (custom-buffer-create
1284 (if (get face 'face-alias) 1275 (list (list face 'custom-face))
1285 (setq face (get face 'face-alias))) 1276 (format "*Customize Face: %s*"
1286 (unless (facep face) 1277 (custom-unlispify-tag-name face)))))
1287 (error "Invalid face %S" face))
1288 (funcall create-buffer-fn
1289 (list (list face 'custom-face))
1290 (format "*Customize Face: %s*"
1291 (custom-unlispify-tag-name face))))))
1292 1278
1293;;;###autoload 1279;;;###autoload
1294(defun customize-face-other-window (&optional face) 1280(defun customize-face-other-window (&optional face)
@@ -1297,8 +1283,11 @@ If FACE is actually a face-alias, customize the face it is aliased to.
1297 1283
1298Interactively, when point is on text which has a face specified, 1284Interactively, when point is on text which has a face specified,
1299suggest to customize that face, if it's customizable." 1285suggest to customize that face, if it's customizable."
1300 (interactive) 1286 (interactive (list (read-face-name "Customize face" "all faces" t)))
1301 (customize-face face t t)) 1287 (let ((pop-up-windows t)
1288 (same-window-buffer-names nil)
1289 (same-window-regexps nil))
1290 (customize-face face)))
1302 1291
1303(defalias 'customize-customized 'customize-unsaved) 1292(defalias 'customize-customized 'customize-unsaved)
1304 1293
@@ -4025,7 +4014,7 @@ Optional EVENT is the location for the menu."
4025 4014
4026(defun custom-group-save (widget) 4015(defun custom-group-save (widget)
4027 "Save all modified group members." 4016 "Save all modified group members."
4028 (dolist (child (children (widget-get widget :children))) 4017 (dolist (child (widget-get widget :children))
4029 (when (memq (widget-get child :custom-state) '(modified set)) 4018 (when (memq (widget-get child :custom-state) '(modified set))
4030 (widget-apply child :custom-save)))) 4019 (widget-apply child :custom-save))))
4031 4020
diff --git a/lisp/dired.el b/lisp/dired.el
index 12180856023..1a906093a7a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1247,7 +1247,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1247 (define-key map "$" 'dired-hide-subdir) 1247 (define-key map "$" 'dired-hide-subdir)
1248 (define-key map "\M-$" 'dired-hide-all) 1248 (define-key map "\M-$" 'dired-hide-all)
1249 ;; misc 1249 ;; misc
1250 (define-key map "\C-x\C-q" 'wdired-change-to-wdired-mode) 1250 (define-key map "\C-x\C-q" 'dired-toggle-read-only)
1251 (define-key map "?" 'dired-summary) 1251 (define-key map "?" 'dired-summary)
1252 (define-key map "\177" 'dired-unmark-backward) 1252 (define-key map "\177" 'dired-unmark-backward)
1253 (define-key map [remap undo] 'dired-undo) 1253 (define-key map [remap undo] 'dired-undo)
@@ -1353,7 +1353,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1353 (define-key map [menu-bar immediate create-directory] 1353 (define-key map [menu-bar immediate create-directory]
1354 '(menu-item "Create Directory..." dired-create-directory)) 1354 '(menu-item "Create Directory..." dired-create-directory))
1355 (define-key map [menu-bar immediate wdired-mode] 1355 (define-key map [menu-bar immediate wdired-mode]
1356 '(menu-item "Edit File Names" wdired-change-to-wdired-mode)) 1356 '(menu-item "Edit File Names" wdired-change-to-wdired-mode
1357 :filter (lambda (x) (if (eq major-mode 'dired-mode) x))))
1357 1358
1358 (define-key map [menu-bar regexp] 1359 (define-key map [menu-bar regexp]
1359 (cons "Regexp" (make-sparse-keymap "Regexp"))) 1360 (cons "Regexp" (make-sparse-keymap "Regexp")))
@@ -1656,6 +1657,16 @@ You can use it to recover marks, killed lines or subdirs."
1656 (message "Change in dired buffer undone. 1657 (message "Change in dired buffer undone.
1657Actual changes in files cannot be undone by Emacs.")) 1658Actual changes in files cannot be undone by Emacs."))
1658 1659
1660(defun dired-toggle-read-only ()
1661 "Edit dired buffer with Wdired, or set it read-only.
1662Call `wdired-change-to-wdired-mode' in dired buffers whose editing is
1663supported by Wdired (the major mode of the dired buffer is `dired-mode').
1664Otherwise, for buffers inheriting from dired-mode, call `toggle-read-only'."
1665 (interactive)
1666 (if (eq major-mode 'dired-mode)
1667 (wdired-change-to-wdired-mode)
1668 (toggle-read-only)))
1669
1659(defun dired-next-line (arg) 1670(defun dired-next-line (arg)
1660 "Move down lines then position at filename. 1671 "Move down lines then position at filename.
1661Optional prefix ARG says how many lines to move; default is one line." 1672Optional prefix ARG says how many lines to move; default is one line."
@@ -2360,7 +2371,7 @@ Optional argument means return a file name relative to `default-directory'."
2360 2371
2361;; Deleting files 2372;; Deleting files
2362 2373
2363(defcustom dired-recursive-deletes 'top ; Default only delete empty directories. 2374(defcustom dired-recursive-deletes 'top
2364 "*Decide whether recursive deletes are allowed. 2375 "*Decide whether recursive deletes are allowed.
2365A value of nil means no recursive deletes. 2376A value of nil means no recursive deletes.
2366`always' means delete recursively without asking. This is DANGEROUS! 2377`always' means delete recursively without asking. This is DANGEROUS!
@@ -2409,8 +2420,8 @@ Anything else, ask for each sub-directory."
2409 "In Dired, delete the files flagged for deletion. 2420 "In Dired, delete the files flagged for deletion.
2410If NOMESSAGE is non-nil, we don't display any message 2421If NOMESSAGE is non-nil, we don't display any message
2411if there are no flagged files. 2422if there are no flagged files.
2412`dired-recursive-deletes' controls whether 2423`dired-recursive-deletes' controls whether deletion of
2413deletion of non-empty directories is allowed." 2424non-empty directories is allowed."
2414 (interactive) 2425 (interactive)
2415 (let* ((dired-marker-char dired-del-marker) 2426 (let* ((dired-marker-char dired-del-marker)
2416 (regexp (dired-marker-regexp)) 2427 (regexp (dired-marker-regexp))
@@ -2427,8 +2438,8 @@ deletion of non-empty directories is allowed."
2427 2438
2428(defun dired-do-delete (&optional arg) 2439(defun dired-do-delete (&optional arg)
2429 "Delete all marked (or next ARG) files. 2440 "Delete all marked (or next ARG) files.
2430`dired-recursive-deletes' controls whether 2441`dired-recursive-deletes' controls whether deletion of
2431deletion of non-empty directories is allowed." 2442non-empty directories is allowed."
2432 ;; This is more consistent with the file marking feature than 2443 ;; This is more consistent with the file marking feature than
2433 ;; dired-do-flagged-delete. 2444 ;; dired-do-flagged-delete.
2434 (interactive "P") 2445 (interactive "P")
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index c6e80453d72..dbebf314798 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2586,13 +2586,21 @@ that property, or otherwise use `(&rest ad-subr-args)'."
2586 (natnump docstring)) 2586 (natnump docstring))
2587 docstring))) 2587 docstring)))
2588 2588
2589(defun ad-interactive-form (definition)
2590 "Return the interactive form of DEFINITION.
2591Like `interactive-form', but also works on pieces of advice."
2592 (interactive-form
2593 (if (ad-advice-p definition)
2594 (ad-lambda-expression definition)
2595 definition)))
2596
2589(defun ad-body-forms (definition) 2597(defun ad-body-forms (definition)
2590 "Return the list of body forms of DEFINITION." 2598 "Return the list of body forms of DEFINITION."
2591 (cond ((ad-compiled-p definition) 2599 (cond ((ad-compiled-p definition)
2592 nil) 2600 nil)
2593 ((consp definition) 2601 ((consp definition)
2594 (nthcdr (+ (if (ad-docstring definition) 1 0) 2602 (nthcdr (+ (if (ad-docstring definition) 1 0)
2595 (if (interactive-form definition) 1 0)) 2603 (if (ad-interactive-form definition) 1 0))
2596 (cdr (cdr (ad-lambda-expression definition))))))) 2604 (cdr (cdr (ad-lambda-expression definition)))))))
2597 2605
2598;; Matches the docstring of an advised definition. 2606;; Matches the docstring of an advised definition.
@@ -3024,7 +3032,7 @@ in any of these classes."
3024 (ad-get-enabled-advices function 'around) 3032 (ad-get-enabled-advices function 'around)
3025 (ad-get-enabled-advices function 'after))) 3033 (ad-get-enabled-advices function 'after)))
3026 (let ((interactive-form 3034 (let ((interactive-form
3027 (interactive-form (ad-advice-definition advice)))) 3035 (ad-interactive-form (ad-advice-definition advice))))
3028 (if interactive-form 3036 (if interactive-form
3029 ;; We found the first one, use it: 3037 ;; We found the first one, use it:
3030 (ad-do-return interactive-form))))) 3038 (ad-do-return interactive-form)))))
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 0931ba8635c..7538439d76c 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -44,9 +44,9 @@ A value of nil means to search whole buffer."
44 (const :tag "No limit"))) 44 (const :tag "No limit")))
45 45
46(defcustom copyright-regexp 46(defcustom copyright-regexp
47 "\\(©\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ 47 "\\(©\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
48\\|[Cc]opyright\\s *:?\\s *©\\)\ 48\\|[Cc]opyright\\s *:?\\s *©\\)\
49\\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" 49\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
50 "What your copyright notice looks like. 50 "What your copyright notice looks like.
51The second \\( \\) construct must match the years." 51The second \\( \\) construct must match the years."
52 :group 'copyright 52 :group 'copyright
@@ -93,7 +93,8 @@ When this is `function', only ask when called non-interactively."
93 (re-search-forward (concat "\\(" copyright-regexp 93 (re-search-forward (concat "\\(" copyright-regexp
94 "\\)\\([ \t]*\n\\)?.*\\(?:" 94 "\\)\\([ \t]*\n\\)?.*\\(?:"
95 copyright-names-regexp "\\)") 95 copyright-names-regexp "\\)")
96 (+ (point) copyright-limit) t) 96 (if copyright-limit (+ (point) copyright-limit))
97 t)
97 ;; In case the regexp is rejected. This is useful because 98 ;; In case the regexp is rejected. This is useful because
98 ;; copyright-update is typically called from before-save-hook where 99 ;; copyright-update is typically called from before-save-hook where
99 ;; such an error is very inconvenient for the user. 100 ;; such an error is very inconvenient for the user.
@@ -174,10 +175,11 @@ interactively."
174 (and copyright-current-gpl-version 175 (and copyright-current-gpl-version
175 ;; match the GPL version comment in .el files, including the 176 ;; match the GPL version comment in .el files, including the
176 ;; bilingual Esperanto one in two-column, and in texinfo.tex 177 ;; bilingual Esperanto one in two-column, and in texinfo.tex
177 (re-search-forward "\\(the Free Software Foundation;\ 178 (re-search-forward
179 "\\(the Free Software Foundation;\
178 either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\ 180 either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\
179version \\([0-9]+\\), or (at" 181version \\([0-9]+\\), or (at"
180 (+ (point) copyright-limit) t) 182 (if copyright-limit (+ (point) copyright-limit)) t)
181 (not (string= (match-string 3) copyright-current-gpl-version)) 183 (not (string= (match-string 3) copyright-current-gpl-version))
182 (or noquery 184 (or noquery
183 (y-or-n-p (concat "Replace GPL version by " 185 (y-or-n-p (concat "Replace GPL version by "
@@ -199,7 +201,8 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
199 (interactive) 201 (interactive)
200 (widen) 202 (widen)
201 (goto-char (point-min)) 203 (goto-char (point-min))
202 (if (re-search-forward copyright-regexp (+ (point) copyright-limit) t) 204 (if (re-search-forward copyright-regexp
205 (if copyright-limit (+ (point) copyright-limit)) t)
203 (let ((s (match-beginning 2)) 206 (let ((s (match-beginning 2))
204 (e (copy-marker (1+ (match-end 2)))) 207 (e (copy-marker (1+ (match-end 2))))
205 (p (make-marker)) 208 (p (make-marker))
@@ -239,7 +242,7 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
239 "Copyright (C) " `(substring (current-time-string) -4) " by " 242 "Copyright (C) " `(substring (current-time-string) -4) " by "
240 (or (getenv "ORGANIZATION") 243 (or (getenv "ORGANIZATION")
241 str) 244 str)
242 '(if (> (point) (+ (point-min) copyright-limit)) 245 '(if (and copyright-limit (> (point) (+ (point-min) copyright-limit)))
243 (message "Copyright extends beyond `copyright-limit' and won't be updated automatically.")) 246 (message "Copyright extends beyond `copyright-limit' and won't be updated automatically."))
244 comment-end \n) 247 comment-end \n)
245 248
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index d41c0af3d73..655677998e0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -56,6 +56,8 @@
56 (modify-syntax-entry i "_ " table) 56 (modify-syntax-entry i "_ " table)
57 (setq i (1+ i))) 57 (setq i (1+ i)))
58 (modify-syntax-entry ?\s " " table) 58 (modify-syntax-entry ?\s " " table)
59 ;; Non-break space acts as whitespace.
60 (modify-syntax-entry ?\x8a0 " " table)
59 (modify-syntax-entry ?\t " " table) 61 (modify-syntax-entry ?\t " " table)
60 (modify-syntax-entry ?\f " " table) 62 (modify-syntax-entry ?\f " " table)
61 (modify-syntax-entry ?\n "> " table) 63 (modify-syntax-entry ?\n "> " table)
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index ee4eb753926..a5b2a8100a8 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,9 @@
12007-07-30 Michael Olson <mwolson@gnu.org>
2
3 * erc-nicklist.el: Remove from the Emacs source tree. This file
4 is not release quality, and relies heavily on a module which
5 cannot be distributed with ERC due to licensing reasons.
6
12007-07-25 Glenn Morris <rgm@gnu.org> 72007-07-25 Glenn Morris <rgm@gnu.org>
2 8
3 * Relicense all FSF files to GPLv3 or later. 9 * Relicense all FSF files to GPLv3 or later.
diff --git a/lisp/erc/erc-nicklist.el b/lisp/erc/erc-nicklist.el
deleted file mode 100644
index b542c2a5e1d..00000000000
--- a/lisp/erc/erc-nicklist.el
+++ /dev/null
@@ -1,414 +0,0 @@
1;;; erc-nicklist.el --- Display channel nicknames in a side buffer.
2
3;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4
5;; Filename: erc-nicklist.el
6;; Author: Lawrence Mitchell <wence@gmx.li>
7;; Created: 2004-04-30
8;; Keywords: IRC chat client Internet
9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 3, or (at your option)
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25;; Boston, MA 02110-1301, USA.
26
27;;; Commentary:
28;;
29;; This provides a minimal mIRC style nicklist buffer for ERC. To
30;; activate, do M-x erc-nicklist RET in the channel buffer you want
31;; the nicklist to appear for. To close and quit the nicklist
32;; buffer, do M-x erc-nicklist-quit RET from within the nicklist buffer.
33;;
34;; TODO:
35;; o Somehow associate nicklist windows with channel windows so they
36;; appear together, and if one gets buried, then the other does.
37;;
38;; o Make "Query" and "Message" work.
39;;
40;; o Prettify the actual list of nicks in some way.
41;;
42;; o Add a proper erc-module that people can turn on and off, figure
43;; out a way of creating the nicklist window at an appropriate time
44;; --- probably in `erc-join-hook'.
45;;
46;; o Ensure XEmacs compatibility --- the mouse-menu support is likely
47;; broken.
48;;
49;; o Add option to display in a separate frame --- will again need to
50;; be able to associate the nicklist with the currently active
51;; channel buffer or something similar.
52;;
53;; o Allow toggling of visibility of nicklist via ERC commands.
54
55;;; History:
56;;
57
58;; Changes by Edgar Gonçalves <edgar.goncalves@inesc-id.pt>
59;; Jun 25 2005:
60;; - images are changed to a standard set of names.
61;; - /images now contain gaim's status icons.
62;; May 31 2005:
63;; - tooltips are improved. they try to access bbdb for a nice nick!
64;; Apr 26 2005:
65;; - erc-nicklist-channel-users-info was fixed (sorting bug)
66;; - Away names don't need parenthesis when using icons
67;; Apr 26 2005:
68;; - nicks can display icons of their connection type (msn, icq, for now)
69;; Mar 15 2005:
70;; - nicks now are different for unvoiced and op users
71;; - nicks now have tooltips displaying more info
72;; Mar 18 2005:
73;; - queries now work ok, both on menu and keyb shortcut RET.
74;; - nicklist is now sorted ignoring the case. Voiced nicks will
75;; appear according to `erc-nicklist-voiced-position'.
76
77;;; Code:
78
79(require 'erc)
80(condition-case nil
81 (require 'erc-bbdb)
82 (error nil))
83(eval-when-compile (require 'cl))
84
85(defgroup erc-nicklist nil
86 "Display a list of nicknames in a separate window."
87 :group 'erc)
88
89(defcustom erc-nicklist-use-icons t
90 "*If non-nil, display an icon instead of the name of the chat medium.
91By \"chat medium\", we mean IRC, AOL, MSN, ICQ, etc."
92 :group 'erc-nicklist
93 :type 'boolean)
94
95(defcustom erc-nicklist-icons-directory
96 (concat default-directory "images/")
97 "*Directory of the PNG files for chat icons.
98Icons are displayed if `erc-nicklist-use-icons' is non-nil."
99 :group 'erc-nicklist
100 :type 'directory)
101
102(defcustom erc-nicklist-voiced-position 'bottom
103 "*Position of voiced nicks in the nicklist.
104The value can be `top', `bottom' or nil (don't sort)."
105 :group 'erc-nicklist
106 :type '(choice
107 (const :tag "Top" 'top)
108 (const :tag "Bottom" 'bottom)
109 (const :tag "Mixed" nil)))
110
111(defcustom erc-nicklist-window-size 20.0
112 "*The size of the nicklist window.
113
114This specifies a percentage of the channel window width.
115
116A negative value means the nicklist window appears on the left of the
117channel window, and vice versa."
118 :group 'erc-nicklist
119 :type 'float)
120
121
122(defun erc-nicklist-buffer-name (&optional buffer)
123 "Return the buffer name for a nicklist associated with BUFFER.
124
125If BUFFER is nil, use the value of `current-buffer'."
126 (format " *%s-nicklist*" (buffer-name (or buffer (current-buffer)))))
127
128(defun erc-nicklist-make-window ()
129 "Create an ERC nicklist window.
130
131See also `erc-nicklist-window-size'."
132 (let ((width (floor (* (window-width) (/ erc-nicklist-window-size 100.0))))
133 (buffer (erc-nicklist-buffer-name))
134 window)
135 (split-window-horizontally (- width))
136 (setq window (next-window))
137 (set-window-buffer window (get-buffer-create buffer))
138 (with-current-buffer buffer
139 (set-window-dedicated-p window t))))
140
141
142(defvar erc-nicklist-images-alist '()
143 "Alist that maps a connection type to an icon.")
144
145(defun erc-nicklist-insert-medium-name-or-icon (host channel is-away)
146 "Inserts an icon or a string identifying the current host type.
147This is configured using `erc-nicklist-use-icons' and
148`erc-nicklist-icons-directory'."
149 ;; identify the network (for bitlebee usage):
150 (let ((bitlbee-p (save-match-data
151 (string-match "\\`&bitlbee\\b"
152 (buffer-name channel)))))
153 (cond ((and bitlbee-p
154 (string= "login.icq.com" host))
155 (if erc-nicklist-use-icons
156 (if is-away
157 (insert-image (cdr (assoc 'icq-away
158 erc-nicklist-images-alist)))
159 (insert-image (cdr (assoc 'icq
160 erc-nicklist-images-alist))))
161 (insert "ICQ")))
162 (bitlbee-p
163 (if erc-nicklist-use-icons
164 (if is-away
165 (insert-image (cdr (assoc 'msn-away
166 erc-nicklist-images-alist)))
167 (insert-image (cdr (assoc 'msn
168 erc-nicklist-images-alist))))
169 (insert "MSN")))
170 (t
171 (if erc-nicklist-use-icons
172 (if is-away
173 (insert-image (cdr (assoc 'irc-away
174 erc-nicklist-images-alist)))
175 (insert-image (cdr (assoc 'irc
176 erc-nicklist-images-alist))))
177 (insert "IRC"))))
178 (insert " ")))
179
180(defun erc-nicklist-search-for-nick (finger-host)
181 "Return the bitlbee-nick field for this contact given FINGER-HOST.
182Seach for the BBDB record of this contact. If not found, return nil."
183 (when (boundp 'erc-bbdb-bitlbee-name-field)
184 (let ((record (car
185 (erc-member-if
186 #'(lambda (r)
187 (let ((fingers (bbdb-record-finger-host r)))
188 (when fingers
189 (string-match finger-host
190 (car (bbdb-record-finger-host r))))))
191 (bbdb-records)))))
192 (when record
193 (bbdb-get-field record erc-bbdb-bitlbee-name-field)))))
194
195(defun erc-nicklist-insert-contents (channel)
196 "Insert the nicklist contents, with text properties and the optional images."
197 (setq buffer-read-only nil)
198 (erase-buffer)
199 (dolist (u (erc-nicklist-channel-users-info channel))
200 (let* ((server-user (car u))
201 (channel-user (cdr u))
202 (nick (erc-server-user-nickname server-user))
203 (host (erc-server-user-host server-user))
204 (login (erc-server-user-login server-user))
205 (full-name(erc-server-user-full-name server-user))
206 (info (erc-server-user-info server-user))
207 (channels (erc-server-user-buffers server-user))
208 (op (erc-channel-user-op channel-user))
209 (voice (erc-channel-user-voice channel-user))
210 (bbdb-nick (or (erc-nicklist-search-for-nick
211 (concat login "@" host))
212 ""))
213 (away-status (if voice "" "\n(Away)"))
214 (balloon-text (concat bbdb-nick (if (string= "" bbdb-nick)
215 "" "\n")
216 "Login: " login "@" host
217 away-status)))
218 (erc-nicklist-insert-medium-name-or-icon host channel (not voice))
219 (unless (or voice erc-nicklist-use-icons)
220 (setq nick (concat "(" nick ")")))
221 (when op
222 (setq nick (concat nick " (OP)")))
223 (insert (erc-propertize nick
224 'erc-nicklist-nick nick
225 'mouse-face 'highlight
226 'erc-nicklist-channel channel
227 'help-echo balloon-text)
228 "\n")))
229 (erc-nicklist-mode))
230
231
232(defun erc-nicklist ()
233 "Create an ERC nicklist buffer."
234 (interactive)
235 (let ((channel (current-buffer)))
236 (unless (or (not erc-nicklist-use-icons)
237 erc-nicklist-images-alist)
238 (setq erc-nicklist-images-alist
239 `((msn . ,(create-image (concat erc-nicklist-icons-directory
240 "msn-online.png")))
241 (msn-away . ,(create-image (concat erc-nicklist-icons-directory
242 "msn-offline.png")))
243 (irc . ,(create-image (concat erc-nicklist-icons-directory
244 "irc-online.png")))
245 (irc-away . ,(create-image (concat erc-nicklist-icons-directory
246 "irc-offline.png")))
247 (icq . ,(create-image (concat erc-nicklist-icons-directory
248 "icq-online.png")))
249 (icq-away . ,(create-image (concat erc-nicklist-icons-directory
250 "icq-offline.png"))))))
251 (erc-nicklist-make-window)
252 (with-current-buffer (get-buffer (erc-nicklist-buffer-name channel))
253 (erc-nicklist-insert-contents channel)))
254 (add-hook 'erc-channel-members-changed-hook #'erc-nicklist-update))
255
256(defun erc-nicklist-update ()
257 "Update the ERC nicklist buffer."
258 (let ((b (get-buffer (erc-nicklist-buffer-name)))
259 (channel (current-buffer)))
260 (when b
261 (with-current-buffer b
262 (erc-nicklist-insert-contents channel)))))
263
264(defvar erc-nicklist-mode-map
265 (let ((map (make-sparse-keymap)))
266 (define-key map (kbd "<down-mouse-3>") 'erc-nicklist-menu)
267 (define-key map "\C-j" 'erc-nicklist-kbd-menu)
268 (define-key map "q" 'erc-nicklist-quit)
269 (define-key map (kbd "RET") 'erc-nicklist-kbd-cmd-QUERY)
270 map)
271 "Keymap for `erc-nicklist-mode'.")
272
273(define-derived-mode erc-nicklist-mode fundamental-mode
274 "Nicklist"
275 "Major mode for the ERC nicklist buffer."
276 (setq buffer-read-only t))
277
278(defun erc-nicklist-call-erc-command (command point buffer window)
279 "Call an ERC COMMAND.
280
281Depending on what COMMAND is, it's called with one of POINT, BUFFER,
282or WINDOW as arguments."
283 (when command
284 (let* ((p (text-properties-at point))
285 (b (plist-get p 'erc-nicklist-channel)))
286 (if (memq command '(erc-nicklist-quit ignore))
287 (funcall command window)
288 ;; EEEK! Horrble, but it's the only way we can ensure the
289 ;; response goes to the correct buffer.
290 (erc-set-active-buffer b)
291 (switch-to-buffer-other-window b)
292 (funcall command (plist-get p 'erc-nicklist-nick))))))
293
294(defun erc-nicklist-cmd-QUERY (user &optional server)
295 "Opens a query buffer with USER."
296 ;; FIXME: find a way to switch to that buffer afterwards...
297 (let ((send (if server
298 (format "QUERY %s %s" user server)
299 (format "QUERY %s" user))))
300 (erc-cmd-QUERY user)
301 t))
302
303(defun erc-nicklist-kbd-cmd-QUERY (&optional window)
304 (interactive)
305 (let* ((p (text-properties-at (point)))
306 (server (plist-get p 'erc-nicklist-channel))
307 (nick (plist-get p 'erc-nicklist-nick))
308 (nick (or (and (string-match "(\\(.*\\))" nick)
309 (match-string 1 nick))
310 nick))
311 (nick (or (and (string-match "\\+\\(.*\\)" nick)
312 (match-string 1 nick))
313 nick))
314 (send (format "QUERY %s %s" nick server)))
315 (switch-to-buffer-other-window server)
316 (erc-cmd-QUERY nick)))
317
318
319(defvar erc-nicklist-menu
320 (let ((map (make-sparse-keymap "Action")))
321 (define-key map [erc-cmd-WHOIS]
322 '("Whois" . erc-cmd-WHOIS))
323 (define-key map [erc-cmd-DEOP]
324 '("Deop" . erc-cmd-DEOP))
325 (define-key map [erc-cmd-MSG]
326 '("Message" . erc-cmd-MSG)) ;; TODO!
327 (define-key map [erc-nicklist-cmd-QUERY]
328 '("Query" . erc-nicklist-kbd-cmd-QUERY))
329 (define-key map [ignore]
330 '("Cancel" . ignore))
331 (define-key map [erc-nicklist-quit]
332 '("Close nicklist" . erc-nicklist-quit))
333 map)
334 "Menu keymap for the ERC nicklist.")
335
336(defun erc-nicklist-quit (&optional window)
337 "Delete the ERC nicklist.
338
339Deletes WINDOW and stops updating the nicklist buffer."
340 (interactive)
341 (let ((b (window-buffer window)))
342 (with-current-buffer b
343 (set-buffer-modified-p nil)
344 (kill-this-buffer)
345 (remove-hook 'erc-channel-members-changed-hook 'erc-nicklist-update))))
346
347
348(defun erc-nicklist-kbd-menu ()
349 "Show the ERC nicklist menu."
350 (interactive)
351 (let* ((point (point))
352 (window (selected-window))
353 (buffer (current-buffer)))
354 (with-current-buffer buffer
355 (erc-nicklist-call-erc-command
356 (car (x-popup-menu point
357 erc-nicklist-menu))
358 point
359 buffer
360 window))))
361
362(defun erc-nicklist-menu (&optional arg)
363 "Show the ERC nicklist menu.
364
365ARG is a parametrized event (see `interactive')."
366 (interactive "e")
367 (let* ((point (nth 1 (cadr arg)))
368 (window (car (cadr arg)))
369 (buffer (window-buffer window)))
370 (with-current-buffer buffer
371 (erc-nicklist-call-erc-command
372 (car (x-popup-menu arg
373 erc-nicklist-menu))
374 point
375 buffer
376 window))))
377
378
379(defun erc-nicklist-channel-users-info (channel)
380 "Return a nick-sorted list of all users on CHANNEL.
381Result are elements in the form (SERVER-USER . CHANNEL-USER). The
382list has all the voiced users according to
383`erc-nicklist-voiced-position'."
384 (let* ((nicks (erc-sort-channel-users-alphabetically
385 (with-current-buffer channel (erc-get-channel-user-list)))))
386 (if erc-nicklist-voiced-position
387 (let ((voiced-nicks (erc-remove-if-not
388 #'(lambda (x)
389 (null (erc-channel-user-voice (cdr x))))
390 nicks))
391 (devoiced-nicks (erc-remove-if-not
392 #'(lambda (x)
393 (erc-channel-user-voice
394 (cdr x)))
395 nicks)))
396 (cond ((eq erc-nicklist-voiced-position 'top)
397 (append devoiced-nicks voiced-nicks))
398 ((eq erc-nicklist-voiced-position 'bottom)
399 (append voiced-nicks devoiced-nicks))))
400 nicks)))
401
402
403
404(provide 'erc-nicklist)
405
406;;; erc-nicklist.el ends here
407;;
408;; Local Variables:
409;; indent-tabs-mode: t
410;; tab-width: 8
411;; coding: utf-8
412;; End:
413
414;; arch-tag: db37a256-87a7-4544-bd90-e5f16c9f5ca5
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index c0c5c8dad2b..83ca62ca0de 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -2,6 +2,15 @@
2 2
3 * Relicense all FSF files to GPLv3 or later. 3 * Relicense all FSF files to GPLv3 or later.
4 4
52007-07-24 Katsumi Yamaoka <yamaoka@jpl.org>
6
7 * gnus-msg.el (gnus-summary-supersede-article)
8 (gnus-summary-resend-message-edit): Add Gcc header.
9 (gnus-summary-resend-bounced-mail): Ditto; search whole body for parent
10 article's Message-ID; refer parent article in summary buffer.
11
12 * message.el (message-bounce): Call mime-to-mml.
13
52007-07-21 Reiner Steib <Reiner.Steib@gmx.de> 142007-07-21 Reiner Steib <Reiner.Steib@gmx.de>
6 15
7 * mm-uu.el (mm-uu-type-alist): Refer to mm-uu-configure-list in doc 16 * mm-uu.el (mm-uu-type-alist): Refer to mm-uu-configure-list in doc
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 0789e25bc68..c9aedab7019 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -815,7 +815,10 @@ header line with the old Message-ID."
815 (set-buffer ,gnus-summary-buffer) 815 (set-buffer ,gnus-summary-buffer)
816 (gnus-cache-possibly-remove-article ,article nil nil nil t) 816 (gnus-cache-possibly-remove-article ,article nil nil nil t)
817 (gnus-summary-mark-as-read ,article gnus-canceled-mark))))) 817 (gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
818 message-send-actions)))) 818 message-send-actions)
819 ;; Add Gcc header.
820 (gnus-inews-insert-archive-gcc)
821 (gnus-inews-insert-gcc))))
819 822
820 823
821 824
@@ -1280,10 +1283,13 @@ composing a new message."
1280 (message-narrow-to-head-1) 1283 (message-narrow-to-head-1)
1281 ;; Gnus will generate a new one when sending. 1284 ;; Gnus will generate a new one when sending.
1282 (message-remove-header "Message-ID") 1285 (message-remove-header "Message-ID")
1283 (message-remove-header message-ignored-resent-headers t)
1284 ;; Remove unwanted headers. 1286 ;; Remove unwanted headers.
1287 (message-remove-header message-ignored-resent-headers t)
1285 (goto-char (point-max)) 1288 (goto-char (point-max))
1286 (insert mail-header-separator) 1289 (insert mail-header-separator)
1290 ;; Add Gcc header.
1291 (gnus-inews-insert-archive-gcc)
1292 (gnus-inews-insert-gcc)
1287 (goto-char (point-min)) 1293 (goto-char (point-min))
1288 (when (re-search-forward "^To:\\|^Newsgroups:" nil 'move) 1294 (when (re-search-forward "^To:\\|^Newsgroups:" nil 'move)
1289 (forward-char 1)) 1295 (forward-char 1))
@@ -1557,15 +1563,29 @@ If FETCH, try to fetch the article that this is a reply to, if indeed
1557this is a reply." 1563this is a reply."
1558 (interactive "P") 1564 (interactive "P")
1559 (gnus-summary-select-article t) 1565 (gnus-summary-select-article t)
1560 (set-buffer gnus-original-article-buffer) 1566 (let (summary-buffer parent)
1561 (gnus-setup-message 'compose-bounce 1567 (if fetch
1562 (let* ((references (mail-fetch-field "references")) 1568 (progn
1563 (parent (and references (gnus-parent-id references)))) 1569 (setq summary-buffer (current-buffer))
1570 (set-buffer gnus-original-article-buffer)
1571 (article-goto-body)
1572 (when (re-search-forward "^References:\n?" nil t)
1573 (while (memq (char-after) '(?\t ? ))
1574 (forward-line 1))
1575 (skip-chars-backward "\t\n ")
1576 (setq parent
1577 (gnus-parent-id (buffer-substring (match-end 0) (point))))))
1578 (set-buffer gnus-original-article-buffer))
1579 (gnus-setup-message 'compose-bounce
1564 (message-bounce) 1580 (message-bounce)
1581 ;; Add Gcc header.
1582 (gnus-inews-insert-archive-gcc)
1583 (gnus-inews-insert-gcc)
1565 ;; If there are references, we fetch the article we answered to. 1584 ;; If there are references, we fetch the article we answered to.
1566 (and fetch parent 1585 (when parent
1567 (gnus-summary-refer-article parent) 1586 (with-current-buffer summary-buffer
1568 (gnus-summary-show-all-headers))))) 1587 (gnus-summary-refer-article parent)
1588 (gnus-summary-show-all-headers))))))
1569 1589
1570;;; Gcc handling. 1590;;; Gcc handling.
1571 1591
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index b98c4eb5366..419fd07727c 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -6697,7 +6697,7 @@ you."
6697 (goto-char boundary) 6697 (goto-char boundary)
6698 (when (re-search-backward "^.?From .*\n" nil t) 6698 (when (re-search-backward "^.?From .*\n" nil t)
6699 (delete-region (match-beginning 0) (match-end 0))))) 6699 (delete-region (match-beginning 0) (match-end 0)))))
6700 (mm-enable-multibyte) 6700 (mime-to-mml)
6701 (save-restriction 6701 (save-restriction
6702 (message-narrow-to-head-1) 6702 (message-narrow-to-head-1)
6703 (message-remove-header message-ignored-bounced-headers t) 6703 (message-remove-header message-ignored-bounced-headers t)
diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el
index 256c7ee6a99..1d125e45d95 100644
--- a/lisp/mb-depth.el
+++ b/lisp/mb-depth.el
@@ -9,7 +9,7 @@
9 9
10;; GNU Emacs is free software; you can redistribute it and/or modify 10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by 11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option) 12;; the Free Software Foundation; either version 3, or (at your option)
13;; any later version. 13;; any later version.
14 14
15;; GNU Emacs is distributed in the hope that it will be useful, 15;; GNU Emacs is distributed in the hope that it will be useful,
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 96c4b3ecb9b..79b0b537837 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -1,4 +1,3 @@
1;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*-
2;;; tramp-cache.el --- file information caching for Tramp 1;;; tramp-cache.el --- file information caching for Tramp
3 2
4;; Copyright (C) 2000, 2005, 2006, 2007 by Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2005, 2006, 2007 by Free Software Foundation, Inc.
@@ -11,8 +10,8 @@
11 10
12;; GNU Emacs is free software; you can redistribute it and/or modify 11;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by 12;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 3 of the License, or 13;; the Free Software Foundation; either version 3, or (at your option)
15;; (at your option) any later version. 14;; any later version.
16 15
17;; GNU Emacs is distributed in the hope that it will be useful, 16;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lisp/net/tramp-fish.el b/lisp/net/tramp-fish.el
index 1752a09a285..f0db302abcb 100644
--- a/lisp/net/tramp-fish.el
+++ b/lisp/net/tramp-fish.el
@@ -1,4 +1,3 @@
1;;; -*- coding: iso-8859-1; -*-
2;;; tramp-fish.el --- Tramp access functions for FISH protocol 1;;; tramp-fish.el --- Tramp access functions for FISH protocol
3 2
4;; Copyright (C) 2006, 2007 Free Software Foundation, Inc. 3;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
@@ -10,8 +9,8 @@
10 9
11;; GNU Emacs is free software; you can redistribute it and/or modify 10;; GNU Emacs is free software; you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by 11;; it under the terms of the GNU General Public License as published by
13;; the Free Software Foundation; either version 3 of the License, or 12;; the Free Software Foundation; either version 3, or (at your option)
14;; (at your option) any later version. 13;; any later version.
15 14
16;; GNU Emacs is distributed in the hope that it will be useful, 15;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index e9caf47018f..f3d7a3aadf1 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -1,4 +1,4 @@
1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*- 1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4;; 2007 Free Software Foundation, Inc. 4;; 2007 Free Software Foundation, Inc.
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el
index 2cbb7ea377f..3ac496d8a09 100644
--- a/lisp/net/tramp-gw.el
+++ b/lisp/net/tramp-gw.el
@@ -1,4 +1,3 @@
1;;; -*- coding: iso-8859-1; -*-
2;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways 1;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways
3 2
4;; Copyright (C) 2007 Free Software Foundation, Inc. 3;; Copyright (C) 2007 Free Software Foundation, Inc.
@@ -10,8 +9,8 @@
10 9
11;; GNU Emacs is free software; you can redistribute it and/or modify 10;; GNU Emacs is free software; you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by 11;; it under the terms of the GNU General Public License as published by
13;; the Free Software Foundation; either version 3 of the License, or 12;; the Free Software Foundation; either version 3, or (at your option)
14;; (at your option) any later version. 13;; any later version.
15 14
16;; GNU Emacs is distributed in the hope that it will be useful, 15;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 22b6afa30e2..5dbf12955d7 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1,4 +1,4 @@
1;;; tramp-smb.el --- Tramp access functions for SMB servers -*- coding: iso-8859-1; -*- 1;;; tramp-smb.el --- Tramp access functions for SMB servers
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4;; 2007 Free Software Foundation, Inc. 4;; 2007 Free Software Foundation, Inc.
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el
index 71a76dd5c04..c399a0b211d 100644
--- a/lisp/net/tramp-uu.el
+++ b/lisp/net/tramp-uu.el
@@ -1,10 +1,10 @@
1;;; -*- coding: iso-2022-7bit; -*- 1;;; -*- coding: utf-8; -*-
2;;; tramp-uu.el --- uuencode in Lisp 2;;; tramp-uu.el --- uuencode in Lisp
3 3
4;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 4;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
5;; 2007 Free Software Foundation, Inc. 5;; 2007 Free Software Foundation, Inc.
6 6
7;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 7;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
8;; Keywords: comm, terminals 8;; Keywords: comm, terminals
9 9
10;; This file is free software; you can redistribute it and/or modify 10;; This file is free software; you can redistribute it and/or modify
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index fc4817dcdc1..5285b87313a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1,4 +1,4 @@
1;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*- 1;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
2;;; tramp.el --- Transparent Remote Access, Multiple Protocol 2;;; tramp.el --- Transparent Remote Access, Multiple Protocol
3 3
4;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -6,7 +6,7 @@
6 6
7;; (copyright statements below in code to be updated with the above notice) 7;; (copyright statements below in code to be updated with the above notice)
8 8
9;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 9;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
10;; Michael Albinus <michael.albinus@gmx.de> 10;; Michael Albinus <michael.albinus@gmx.de>
11;; Keywords: comm, processes 11;; Keywords: comm, processes
12 12
@@ -2448,6 +2448,7 @@ of."
2448 t 2448 t
2449 (let ((f (buffer-file-name))) 2449 (let ((f (buffer-file-name)))
2450 (with-parsed-tramp-file-name f nil 2450 (with-parsed-tramp-file-name f nil
2451 (tramp-flush-file-property v localname)
2451 (let* ((attr (file-attributes f)) 2452 (let* ((attr (file-attributes f))
2452 (modtime (nth 5 attr)) 2453 (modtime (nth 5 attr))
2453 (mt (visited-file-modtime))) 2454 (mt (visited-file-modtime)))
@@ -3713,7 +3714,7 @@ beginning of local filename are not substituted."
3713 (run-hooks 'tramp-handle-file-local-copy-hook) 3714 (run-hooks 'tramp-handle-file-local-copy-hook)
3714 tmpfil))) 3715 tmpfil)))
3715 3716
3716(defun tramp-handle-file-remote-p (file &optional identification connected) 3717(defun tramp-handle-file-remote-p (filename &optional identification connected)
3717 "Like `file-remote-p' for Tramp files." 3718 "Like `file-remote-p' for Tramp files."
3718 (when (tramp-tramp-file-p filename) 3719 (when (tramp-tramp-file-p filename)
3719 (with-parsed-tramp-file-name filename nil 3720 (with-parsed-tramp-file-name filename nil
@@ -7358,7 +7359,7 @@ please ensure that the buffers are attached to your email.\n\n")
7358;; transfer method to use. (Greg Stark) 7359;; transfer method to use. (Greg Stark)
7359;; * Remove unneeded parameters from methods. 7360;; * Remove unneeded parameters from methods.
7360;; * Invoke rsync once for copying a whole directory hierarchy. 7361;; * Invoke rsync once for copying a whole directory hierarchy.
7361;; (Francesco Potort,Al(B) 7362;; (Francesco Potortì)
7362;; * Make it work for different encodings, and for different file name 7363;; * Make it work for different encodings, and for different file name
7363;; encodings, too. (Daniel Pittman) 7364;; encodings, too. (Daniel Pittman)
7364;; * Clean up unused *tramp/foo* buffers after a while. (Pete Forman) 7365;; * Clean up unused *tramp/foo* buffers after a while. (Pete Forman)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 30d28a1e2c9..f10f08e1031 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -1,10 +1,10 @@
1;;; -*- mode: Emacs-Lisp; coding: iso-8859-1; -*- 1;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
2;;; trampver.el --- Transparent Remote Access, Multiple Protocol 2;;; trampver.el --- Transparent Remote Access, Multiple Protocol
3;;; lisp/trampver.el. Generated from trampver.el.in by configure. 3;;; lisp/trampver.el. Generated from trampver.el.in by configure.
4 4
5;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 5;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 7;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
8;; Keywords: comm, processes 8;; Keywords: comm, processes
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -30,14 +30,14 @@
30;; "autoconf && ./configure" to change them. (X)Emacs version check is defined 30;; "autoconf && ./configure" to change them. (X)Emacs version check is defined
31;; in macro AC_EMACS_INFO of aclocal.m4; should be changed only there. 31;; in macro AC_EMACS_INFO of aclocal.m4; should be changed only there.
32 32
33(defconst tramp-version "2.1.10" 33(defconst tramp-version "2.1.11-pre"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
37 "Email address to send bug reports to.") 37 "Email address to send bug reports to.")
38 38
39;; Check for (X)Emacs version. 39;; Check for (X)Emacs version.
40(let ((x (if (or (< emacs-major-version 21) (and (featurep 'xemacs) (< emacs-minor-version 4))) (format "Tramp 2.1.10 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version)))) "ok"))) 40(let ((x (if (or (< emacs-major-version 21) (and (featurep 'xemacs) (< emacs-minor-version 4))) (format "Tramp 2.1.11-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version)))) "ok")))
41 (unless (string-match "\\`ok\\'" x) (error x))) 41 (unless (string-match "\\`ok\\'" x) (error x)))
42 42
43(provide 'trampver) 43(provide 'trampver)
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 9c749c11b6a..c5d9c162520 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2875,6 +2875,14 @@ way."
2875(defconst c-lang-variable-inits (cc-eval-when-compile c-lang-variable-inits)) 2875(defconst c-lang-variable-inits (cc-eval-when-compile c-lang-variable-inits))
2876(defconst c-emacs-variable-inits (cc-eval-when-compile c-emacs-variable-inits)) 2876(defconst c-emacs-variable-inits (cc-eval-when-compile c-emacs-variable-inits))
2877 2877
2878;; Make the `c-lang-setvar' variables buffer local in the current buffer.
2879;; These are typically standard emacs variables such as `comment-start'.
2880(defmacro c-make-emacs-variables-local ()
2881 `(progn
2882 ,@(mapcar (lambda (init)
2883 `(make-local-variable ',(car init)))
2884 (cdr c-emacs-variable-inits))))
2885
2878(defun c-make-init-lang-vars-fun (mode) 2886(defun c-make-init-lang-vars-fun (mode)
2879 "Create a function that initializes all the language dependent variables 2887 "Create a function that initializes all the language dependent variables
2880for the given mode. 2888for the given mode.
@@ -2898,6 +2906,7 @@ accomplish that conveniently."
2898 ;; that could be in the result from `cl-macroexpand-all'. 2906 ;; that could be in the result from `cl-macroexpand-all'.
2899 (let ((c-buffer-is-cc-mode ',mode) 2907 (let ((c-buffer-is-cc-mode ',mode)
2900 current-var source-eval) 2908 current-var source-eval)
2909 (c-make-emacs-variables-local)
2901 (condition-case err 2910 (condition-case err
2902 2911
2903 (if (eq c-version-sym ',c-version-sym) 2912 (if (eq c-version-sym ',c-version-sym)
@@ -2956,6 +2965,7 @@ accomplish that conveniently."
2956 (init (append (cdr c-emacs-variable-inits) 2965 (init (append (cdr c-emacs-variable-inits)
2957 (cdr c-lang-variable-inits))) 2966 (cdr c-lang-variable-inits)))
2958 current-var) 2967 current-var)
2968 (c-make-emacs-variables-local)
2959 (condition-case err 2969 (condition-case err
2960 2970
2961 (while init 2971 (while init
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index f201f9bab6c..8669a41c2f0 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -154,21 +154,12 @@
154(defun c-leave-cc-mode-mode () 154(defun c-leave-cc-mode-mode ()
155 (setq c-buffer-is-cc-mode nil)) 155 (setq c-buffer-is-cc-mode nil))
156 156
157;; Make the `c-lang-setvar' variables buffer local in the current buffer.
158;; These are typically standard emacs variables such as `comment-start'.
159(defmacro c-make-emacs-variables-local ()
160 `(progn
161 ,@(mapcar (lambda (init)
162 `(make-local-variable ',(car init)))
163 (cdr c-emacs-variable-inits))))
164
165(defun c-init-language-vars-for (mode) 157(defun c-init-language-vars-for (mode)
166 "Initialize the language variables for one of the language modes 158 "Initialize the language variables for one of the language modes
167directly supported by CC Mode. This can be used instead of the 159directly supported by CC Mode. This can be used instead of the
168`c-init-language-vars' macro if the language you want to use is one of 160`c-init-language-vars' macro if the language you want to use is one of
169those, rather than a derived language defined through the language 161those, rather than a derived language defined through the language
170variable system (see \"cc-langs.el\")." 162variable system (see \"cc-langs.el\")."
171 (c-make-emacs-variables-local)
172 (cond ((eq mode 'c-mode) (c-init-language-vars c-mode)) 163 (cond ((eq mode 'c-mode) (c-init-language-vars c-mode))
173 ((eq mode 'c++-mode) (c-init-language-vars c++-mode)) 164 ((eq mode 'c++-mode) (c-init-language-vars c++-mode))
174 ((eq mode 'objc-mode) (c-init-language-vars objc-mode)) 165 ((eq mode 'objc-mode) (c-init-language-vars objc-mode))
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index ceb9a7b924d..2710066c2cd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2050,9 +2050,9 @@ The file-structure looks like this:
2050 ;; compilation-error-list) to point-min, but that was only meaningful for 2050 ;; compilation-error-list) to point-min, but that was only meaningful for
2051 ;; the internal uses of compilation-forget-errors: all calls from external 2051 ;; the internal uses of compilation-forget-errors: all calls from external
2052 ;; packages seem to be followed by a move of compilation-parsing-end to 2052 ;; packages seem to be followed by a move of compilation-parsing-end to
2053 ;; something equivalent to point-max. So we speculatively move 2053 ;; something equivalent to point-max. So we heuristically move
2054 ;; compilation-current-error to point-max (since the external package 2054 ;; compilation-current-error to point-max (since the external package
2055 ;; won't know that it should do it). --stef 2055 ;; won't know that it should do it). --Stef
2056 (setq compilation-current-error nil) 2056 (setq compilation-current-error nil)
2057 (let* ((proc (get-buffer-process (current-buffer))) 2057 (let* ((proc (get-buffer-process (current-buffer)))
2058 (mark (if proc (process-mark proc))) 2058 (mark (if proc (process-mark proc)))
@@ -2063,7 +2063,12 @@ The file-structure looks like this:
2063 ;; we need to put ours just before the insertion point rather 2063 ;; we need to put ours just before the insertion point rather
2064 ;; than at the insertion point. If that's not possible, then 2064 ;; than at the insertion point. If that's not possible, then
2065 ;; don't use a marker. --Stef 2065 ;; don't use a marker. --Stef
2066 (if (> pos (point-min)) (copy-marker (1- pos)) pos)))) 2066 (if (> pos (point-min)) (copy-marker (1- pos)) pos)))
2067 ;; Again, since this command is used in buffers that contain several
2068 ;; compilations, to set the beginning of "this compilation", it's a good
2069 ;; place to reset compilation-auto-jump-to-next.
2070 (set (make-local-variable 'compilation-auto-jump-to-next)
2071 compilation-auto-jump-to-first-error))
2067 2072
2068;;;###autoload 2073;;;###autoload
2069(add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode)) 2074(add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 1caa9ee2007..c3caa7e397c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1359,7 +1359,7 @@ buffer for a list of commands.)"
1359 (path (getenv "PYTHONPATH")) 1359 (path (getenv "PYTHONPATH"))
1360 (process-environment ; to import emacs.py 1360 (process-environment ; to import emacs.py
1361 (cons (concat "PYTHONPATH=" data-directory 1361 (cons (concat "PYTHONPATH=" data-directory
1362 (if path (concat ":" path))) 1362 (if path (concat path-separator path)))
1363 process-environment))) 1363 process-environment)))
1364 (apply 'make-comint-in-buffer "Python" 1364 (apply 'make-comint-in-buffer "Python"
1365 (if new (generate-new-buffer "*Python*") "*Python*") 1365 (if new (generate-new-buffer "*Python*") "*Python*")
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 62556b83a24..090e598e46c 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -6528,7 +6528,7 @@ Initialize global data for printing multi-byte characters.
6528 6528
6529(autoload (quote ps-mule-begin-job) "ps-mule" "\ 6529(autoload (quote ps-mule-begin-job) "ps-mule" "\
6530Start printing job for multi-byte chars between FROM and TO. 6530Start printing job for multi-byte chars between FROM and TO.
6531This checks if all multi-byte characters in the region are printable or not. 6531It checks if all multi-byte characters in the region are printable or not.
6532 6532
6533\(fn FROM TO)" nil nil) 6533\(fn FROM TO)" nil nil)
6534 6534
diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el
index 8afc92968d9..99c2f92cab0 100644
--- a/lisp/textmodes/bibtex-style.el
+++ b/lisp/textmodes/bibtex-style.el
@@ -7,7 +7,7 @@
7 7
8;; This file is free software; you can redistribute it and/or modify 8;; This file 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
10;; the Free Software Foundation; either version 2, or (at your option) 10;; the Free Software Foundation; either version 3, or (at your option)
11;; any later version. 11;; any later version.
12 12
13;; This file is distributed in the hope that it will be useful, 13;; This file is distributed in the hope that it will be useful,
diff --git a/lisp/textmodes/org-publish.el b/lisp/textmodes/org-publish.el
index 1afcee0182b..5a2a146dbaa 100644
--- a/lisp/textmodes/org-publish.el
+++ b/lisp/textmodes/org-publish.el
@@ -8,7 +8,7 @@
8 8
9;; This file is free software; you can redistribute it and/or modify 9;; This file is free software; you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by 10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation; either version 2, or (at your option) 11;; the Free Software Foundation; either version 3, or (at your option)
12;; any later version. 12;; any later version.
13 13
14;; This file is distributed in the hope that it will be useful, 14;; This file is distributed in the hope that it will be useful,
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index dc8004c25a8..6a8f930f00f 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -4,7 +4,7 @@
4 4
5;; NOTE: THIS IS A MODIFIED VERSION OF Dave Love's vc-bzr.el, 5;; NOTE: THIS IS A MODIFIED VERSION OF Dave Love's vc-bzr.el,
6;; which you can find at: http://www.loveshack.ukfsn.org/emacs/vc-bzr.el 6;; which you can find at: http://www.loveshack.ukfsn.org/emacs/vc-bzr.el
7;; I could not get in touch with Dave Love by email, so 7;; I could not get in touch with Dave Love by email, so
8;; I am releasing my changes separately. -- Riccardo 8;; I am releasing my changes separately. -- Riccardo
9 9
10;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com> 10;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com>
@@ -15,7 +15,7 @@
15 15
16;; This file is free software; you can redistribute it and/or modify 16;; This file is free software; you can redistribute it and/or modify
17;; it under the terms of the GNU General Public License as published by 17;; it under the terms of the GNU General Public License as published by
18;; the Free Software Foundation; either version 2, or (at your option) 18;; the Free Software Foundation; either version 3, or (at your option)
19;; any later version. 19;; any later version.
20 20
21;; This file is distributed in the hope that it will be useful, 21;; This file is distributed in the hope that it will be useful,
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 7e358ed0238..e4a9d26105a 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -260,7 +260,10 @@
260 260
261(defun vc-git-print-log (files &optional buffer) 261(defun vc-git-print-log (files &optional buffer)
262 "Get change log associated with FILES." 262 "Get change log associated with FILES."
263 (let ((coding-system-for-read git-commits-coding-system)) 263 (let ((coding-system-for-read git-commits-coding-system)
264 ;; Support both the old print-log interface that passes a
265 ;; single file, and the new one that passes a file list.
266 (flist (if (listp files) files (list files))))
264 ;; `vc-do-command' creates the buffer, but we need it before running 267 ;; `vc-do-command' creates the buffer, but we need it before running
265 ;; the command. 268 ;; the command.
266 (vc-setup-buffer buffer) 269 (vc-setup-buffer buffer)
@@ -273,7 +276,7 @@
273 ;; "git rev-list" on each file separately to make sure that each 276 ;; "git rev-list" on each file separately to make sure that each
274 ;; file gets a "File:" header before the corresponding 277 ;; file gets a "File:" header before the corresponding
275 ;; log. Maybe there is a way to do this with one command... 278 ;; log. Maybe there is a way to do this with one command...
276 (dolist (file files) 279 (dolist (file flist)
277 (with-current-buffer 280 (with-current-buffer
278 buffer 281 buffer
279 (insert "File: " (file-name-nondirectory file) "\n")) 282 (insert "File: " (file-name-nondirectory file) "\n"))
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el
index 727aaf072e1..d8a7ec0dd46 100644
--- a/lisp/vc-hg.el
+++ b/lisp/vc-hg.el
@@ -148,7 +148,7 @@
148(defun vc-hg-registered (file) 148(defun vc-hg-registered (file)
149 "Return non-nil if FILE is registered with hg." 149 "Return non-nil if FILE is registered with hg."
150 (when (vc-hg-root file) ; short cut 150 (when (vc-hg-root file) ; short cut
151 (vc-hg-state file))) ; expensive 151 (vc-file-setprop file 'vc-state (vc-hg-state file)))) ; expensive
152 152
153(defun vc-hg-state (file) 153(defun vc-hg-state (file)
154 "Hg-specific version of `vc-state'." 154 "Hg-specific version of `vc-state'."
@@ -303,12 +303,12 @@
303 (buffer-substring-no-properties (point-min) (point-max)))))) 303 (buffer-substring-no-properties (point-min) (point-max))))))
304 304
305;; Modelled after the similar function in vc-cvs.el 305;; Modelled after the similar function in vc-cvs.el
306;; (defun vc-hg-revision-completion-table (file) 306(defun vc-hg-revision-completion-table (file)
307;; (lexical-let ((file file) 307 (lexical-let ((file file)
308;; table) 308 table)
309;; (setq table (lazy-completion-table 309 (setq table (lazy-completion-table
310;; table (lambda () (vc-hg-revision-table file)))) 310 table (lambda () (vc-hg-revision-table file))))
311;; table)) 311 table))
312 312
313(defun vc-hg-diff-tree (file &optional oldvers newvers buffer) 313(defun vc-hg-diff-tree (file &optional oldvers newvers buffer)
314 (vc-hg-diff (list file) oldvers newvers buffer)) 314 (vc-hg-diff (list file) oldvers newvers buffer))
diff --git a/lisp/vc.el b/lisp/vc.el
index 08baa16e6b4..5030fb64471 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -2233,8 +2233,13 @@ There is a special command, `*l', to mark all files currently locked."
2233 (set (make-local-variable 'dired-actual-switches) 2233 (set (make-local-variable 'dired-actual-switches)
2234 vc-dired-switches)) 2234 vc-dired-switches))
2235 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display) 2235 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display)
2236 (setq mode-name (concat mode-name (symbol-name (vc-responsible-backend 2236 (let ((backend-name (symbol-name (vc-responsible-backend
2237 default-directory)))) 2237 default-directory))))
2238 (setq mode-name (concat mode-name backend-name))
2239 ;; Add menu after `vc-dired-mode-map' has `dired-mode-map' as the parent.
2240 (let ((vc-dire-menu-map (copy-keymap vc-menu-map)))
2241 (define-key-after (lookup-key vc-dired-mode-map [menu-bar]) [vc]
2242 (cons backend-name vc-dire-menu-map) 'subdir)))
2238 (setq vc-dired-mode t)) 2243 (setq vc-dired-mode t))
2239 2244
2240(defun vc-dired-toggle-terse-mode () 2245(defun vc-dired-toggle-terse-mode ()
@@ -2284,7 +2289,7 @@ This code, like dired, assumes UNIX -l format."
2284 "Reformat the listing according to version control. 2289 "Reformat the listing according to version control.
2285Called by dired after any portion of a vc-dired buffer has been read in." 2290Called by dired after any portion of a vc-dired buffer has been read in."
2286 (message "Getting version information... ") 2291 (message "Getting version information... ")
2287 (let (subdir filename (buffer-read-only nil)) 2292 (let (subdir filename (inhibit-read-only t))
2288 (goto-char (point-min)) 2293 (goto-char (point-min))
2289 (while (not (eobp)) 2294 (while (not (eobp))
2290 (cond 2295 (cond
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 0abb8647ce0..960d8990983 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -175,6 +175,7 @@ program `dired-chmod-program', which must exist."
175 (define-key map "\C-c\C-c" 'wdired-finish-edit) 175 (define-key map "\C-c\C-c" 'wdired-finish-edit)
176 (define-key map "\C-c\C-k" 'wdired-abort-changes) 176 (define-key map "\C-c\C-k" 'wdired-abort-changes)
177 (define-key map "\C-c\C-[" 'wdired-abort-changes) 177 (define-key map "\C-c\C-[" 'wdired-abort-changes)
178 (define-key map "\C-x\C-q" 'wdired-exit)
178 (define-key map "\C-m" 'ignore) 179 (define-key map "\C-m" 'ignore)
179 (define-key map "\C-j" 'ignore) 180 (define-key map "\C-j" 'ignore)
180 (define-key map "\C-o" 'ignore) 181 (define-key map "\C-o" 'ignore)
@@ -423,6 +424,22 @@ non-nil means return old filename."
423 (set-buffer-modified-p nil) 424 (set-buffer-modified-p nil)
424 (setq buffer-undo-list nil)) 425 (setq buffer-undo-list nil))
425 426
427(defun wdired-exit ()
428 "Exit wdired and return to dired mode.
429Just return to dired mode if there are no changes. Otherwise,
430ask a yes-or-no question whether to save or cancel changes,
431and proceed depending on the answer."
432 (interactive)
433 (if (buffer-modified-p)
434 (if (y-or-n-p (format "Buffer %s modified; save changes? "
435 (current-buffer)))
436 (wdired-finish-edit)
437 (wdired-abort-changes))
438 (wdired-change-to-dired-mode)
439 (set-buffer-modified-p nil)
440 (setq buffer-undo-list nil)
441 (message "(No changes need to be saved)")))
442
426;; Rename a file, searching it in a modified dired buffer, in order 443;; Rename a file, searching it in a modified dired buffer, in order
427;; to be able to use `dired-do-create-files-regexp' and get its 444;; to be able to use `dired-do-create-files-regexp' and get its
428;; "benefits". 445;; "benefits".
diff --git a/lispintro/ChangeLog b/lispintro/ChangeLog
index 2452be826fc..33c4faa6edd 100644
--- a/lispintro/ChangeLog
+++ b/lispintro/ChangeLog
@@ -1,3 +1,8 @@
12007-07-30 Robert J. Chassell <bob@rattlesnake.com>
2
3 * emacs-lisp-intro.texi: Fix typo on line 5173, change `thee' to
4 `these'.
5
12007-07-25 Glenn Morris <rgm@gnu.org> 62007-07-25 Glenn Morris <rgm@gnu.org>
2 7
3 * Relicense all FSF files to GPLv3 or later. 8 * Relicense all FSF files to GPLv3 or later.
diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi
index 0318ac5d361..a08d7a6979a 100644
--- a/lispintro/emacs-lisp-intro.texi
+++ b/lispintro/emacs-lisp-intro.texi
@@ -5170,7 +5170,7 @@ Function Interactive}.) The expression reads as follows:
5170 5170
5171@noindent 5171@noindent
5172This expression is not one with letters standing for parts, as 5172This expression is not one with letters standing for parts, as
5173described earlier. Instead, it starts a list with thee parts. 5173described earlier. Instead, it starts a list with these parts:
5174 5174
5175The first part of the list is an expression to read the name of a 5175The first part of the list is an expression to read the name of a
5176buffer and return it as a string. That is @code{read-buffer}. The 5176buffer and return it as a string. That is @code{read-buffer}. The
diff --git a/man/ChangeLog b/man/ChangeLog
index 08ba464789a..703b3d3441f 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,9 +1,29 @@
12007-07-29 Michael Albinus <michael.albinus@gmx.de>
2
3 * tramp.texi (Frequently Asked Questions): Point to mode line
4 extension in Emacs 23.1.
5
6 * trampver.texi: Update release number.
7
82007-07-27 Glenn Morris <rgm@gnu.org>
9
10 * calc.texi (Copying)
11 * emacs.texi (Copying): Include license text from gpl.texi, rather than
12 in-line.
13
14 * gpl.texi: New file with text of GPL.
15 * Makefile.in (EMACSSOURCES): Add gpl.texi.
16
12007-07-26 Dan Nicolaescu <dann@ics.uci.edu> 172007-07-26 Dan Nicolaescu <dann@ics.uci.edu>
2 18
3 * vc2-xtra.texi (Customizing VC): Add GIT. 19 * vc2-xtra.texi (Customizing VC): Add GIT and HG.
4 20
5 * dired.texi (Wdired): Mention C-x C-q key binding. 21 * dired.texi (Wdired): Mention C-x C-q key binding.
6 22
232007-07-28 Nick Roberts <nickrob@snap.net.nz>
24
25 * building.texi (GDB Graphical Interface): Qualify use of "M-x gdba".
26
72007-07-25 Glenn Morris <rgm@gnu.org> 272007-07-25 Glenn Morris <rgm@gnu.org>
8 28
9 * calc.texi (Copying) 29 * calc.texi (Copying)
diff --git a/man/Makefile.in b/man/Makefile.in
index f52ac990b7c..00088b74b51 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -76,6 +76,7 @@ EMACS_XTRA=\
76EMACSSOURCES= \ 76EMACSSOURCES= \
77 ${srcdir}/emacs.texi \ 77 ${srcdir}/emacs.texi \
78 ${srcdir}/doclicense.texi \ 78 ${srcdir}/doclicense.texi \
79 ${srcdir}/gpl.texi \
79 ${srcdir}/screen.texi \ 80 ${srcdir}/screen.texi \
80 ${srcdir}/commands.texi \ 81 ${srcdir}/commands.texi \
81 ${srcdir}/entering.texi \ 82 ${srcdir}/entering.texi \
diff --git a/man/building.texi b/man/building.texi
index 82ee57e8592..62e5f7b4316 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -832,7 +832,9 @@ session, or the custom variable @code{gud-gdb-command-name} for all
832future sessions. You need to use text command mode to debug multiple 832future sessions. You need to use text command mode to debug multiple
833programs within one Emacs session. If you have customized 833programs within one Emacs session. If you have customized
834@code{gud-gdb-command-name} in this way, you can use @kbd{M-x gdba} to 834@code{gud-gdb-command-name} in this way, you can use @kbd{M-x gdba} to
835invoke GDB in graphical mode. 835invoke GDB in graphical mode. Moreover, this command succeeds where
836@kbd{M-x gdb} fails, such as when your @file{.gdbinit} file contains
837executable GDB commands.
836 838
837@menu 839@menu
838* GDB-UI Layout:: Control the number of displayed buffers. 840* GDB-UI Layout:: Control the number of displayed buffers.
diff --git a/man/calc.texi b/man/calc.texi
index 9209a6c9d70..3085e2e8dd8 100644
--- a/man/calc.texi
+++ b/man/calc.texi
@@ -34466,724 +34466,7 @@ list and also call @code{make-local-variable} itself.
34466 34466
34467@node Copying, GNU Free Documentation License, Programming, Top 34467@node Copying, GNU Free Documentation License, Programming, Top
34468@appendix GNU GENERAL PUBLIC LICENSE 34468@appendix GNU GENERAL PUBLIC LICENSE
34469@c The GNU General Public License. 34469@include gpl.texi
34470@center Version 3, 29 June 2007
34471
34472@c This file is intended to be included within another document,
34473@c hence no sectioning command or @node.
34474
34475@display
34476Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
34477
34478Everyone is permitted to copy and distribute verbatim copies of this
34479license document, but changing it is not allowed.
34480@end display
34481
34482@heading Preamble
34483
34484The GNU General Public License is a free, copyleft license for
34485software and other kinds of works.
34486
34487The licenses for most software and other practical works are designed
34488to take away your freedom to share and change the works. By contrast,
34489the GNU General Public License is intended to guarantee your freedom
34490to share and change all versions of a program---to make sure it remains
34491free software for all its users. We, the Free Software Foundation,
34492use the GNU General Public License for most of our software; it
34493applies also to any other work released this way by its authors. You
34494can apply it to your programs, too.
34495
34496When we speak of free software, we are referring to freedom, not
34497price. Our General Public Licenses are designed to make sure that you
34498have the freedom to distribute copies of free software (and charge for
34499them if you wish), that you receive source code or can get it if you
34500want it, that you can change the software or use pieces of it in new
34501free programs, and that you know you can do these things.
34502
34503To protect your rights, we need to prevent others from denying you
34504these rights or asking you to surrender the rights. Therefore, you
34505have certain responsibilities if you distribute copies of the
34506software, or if you modify it: responsibilities to respect the freedom
34507of others.
34508
34509For example, if you distribute copies of such a program, whether
34510gratis or for a fee, you must pass on to the recipients the same
34511freedoms that you received. You must make sure that they, too,
34512receive or can get the source code. And you must show them these
34513terms so they know their rights.
34514
34515Developers that use the GNU GPL protect your rights with two steps:
34516(1) assert copyright on the software, and (2) offer you this License
34517giving you legal permission to copy, distribute and/or modify it.
34518
34519For the developers' and authors' protection, the GPL clearly explains
34520that there is no warranty for this free software. For both users' and
34521authors' sake, the GPL requires that modified versions be marked as
34522changed, so that their problems will not be attributed erroneously to
34523authors of previous versions.
34524
34525Some devices are designed to deny users access to install or run
34526modified versions of the software inside them, although the
34527manufacturer can do so. This is fundamentally incompatible with the
34528aim of protecting users' freedom to change the software. The
34529systematic pattern of such abuse occurs in the area of products for
34530individuals to use, which is precisely where it is most unacceptable.
34531Therefore, we have designed this version of the GPL to prohibit the
34532practice for those products. If such problems arise substantially in
34533other domains, we stand ready to extend this provision to those
34534domains in future versions of the GPL, as needed to protect the
34535freedom of users.
34536
34537Finally, every program is threatened constantly by software patents.
34538States should not allow patents to restrict development and use of
34539software on general-purpose computers, but in those that do, we wish
34540to avoid the special danger that patents applied to a free program
34541could make it effectively proprietary. To prevent this, the GPL
34542assures that patents cannot be used to render the program non-free.
34543
34544The precise terms and conditions for copying, distribution and
34545modification follow.
34546
34547@heading TERMS AND CONDITIONS
34548
34549@enumerate 0
34550@item Definitions.
34551
34552``This License'' refers to version 3 of the GNU General Public License.
34553
34554``Copyright'' also means copyright-like laws that apply to other kinds
34555of works, such as semiconductor masks.
34556
34557``The Program'' refers to any copyrightable work licensed under this
34558License. Each licensee is addressed as ``you''. ``Licensees'' and
34559``recipients'' may be individuals or organizations.
34560
34561To ``modify'' a work means to copy from or adapt all or part of the work
34562in a fashion requiring copyright permission, other than the making of
34563an exact copy. The resulting work is called a ``modified version'' of
34564the earlier work or a work ``based on'' the earlier work.
34565
34566A ``covered work'' means either the unmodified Program or a work based
34567on the Program.
34568
34569To ``propagate'' a work means to do anything with it that, without
34570permission, would make you directly or secondarily liable for
34571infringement under applicable copyright law, except executing it on a
34572computer or modifying a private copy. Propagation includes copying,
34573distribution (with or without modification), making available to the
34574public, and in some countries other activities as well.
34575
34576To ``convey'' a work means any kind of propagation that enables other
34577parties to make or receive copies. Mere interaction with a user
34578through a computer network, with no transfer of a copy, is not
34579conveying.
34580
34581An interactive user interface displays ``Appropriate Legal Notices'' to
34582the extent that it includes a convenient and prominently visible
34583feature that (1) displays an appropriate copyright notice, and (2)
34584tells the user that there is no warranty for the work (except to the
34585extent that warranties are provided), that licensees may convey the
34586work under this License, and how to view a copy of this License. If
34587the interface presents a list of user commands or options, such as a
34588menu, a prominent item in the list meets this criterion.
34589
34590@item Source Code.
34591
34592The ``source code'' for a work means the preferred form of the work for
34593making modifications to it. ``Object code'' means any non-source form
34594of a work.
34595
34596A ``Standard Interface'' means an interface that either is an official
34597standard defined by a recognized standards body, or, in the case of
34598interfaces specified for a particular programming language, one that
34599is widely used among developers working in that language.
34600
34601The ``System Libraries'' of an executable work include anything, other
34602than the work as a whole, that (a) is included in the normal form of
34603packaging a Major Component, but which is not part of that Major
34604Component, and (b) serves only to enable use of the work with that
34605Major Component, or to implement a Standard Interface for which an
34606implementation is available to the public in source code form. A
34607``Major Component'', in this context, means a major essential component
34608(kernel, window system, and so on) of the specific operating system
34609(if any) on which the executable work runs, or a compiler used to
34610produce the work, or an object code interpreter used to run it.
34611
34612The ``Corresponding Source'' for a work in object code form means all
34613the source code needed to generate, install, and (for an executable
34614work) run the object code and to modify the work, including scripts to
34615control those activities. However, it does not include the work's
34616System Libraries, or general-purpose tools or generally available free
34617programs which are used unmodified in performing those activities but
34618which are not part of the work. For example, Corresponding Source
34619includes interface definition files associated with source files for
34620the work, and the source code for shared libraries and dynamically
34621linked subprograms that the work is specifically designed to require,
34622such as by intimate data communication or control flow between those
34623subprograms and other parts of the work.
34624
34625The Corresponding Source need not include anything that users can
34626regenerate automatically from other parts of the Corresponding Source.
34627
34628The Corresponding Source for a work in source code form is that same
34629work.
34630
34631@item Basic Permissions.
34632
34633All rights granted under this License are granted for the term of
34634copyright on the Program, and are irrevocable provided the stated
34635conditions are met. This License explicitly affirms your unlimited
34636permission to run the unmodified Program. The output from running a
34637covered work is covered by this License only if the output, given its
34638content, constitutes a covered work. This License acknowledges your
34639rights of fair use or other equivalent, as provided by copyright law.
34640
34641You may make, run and propagate covered works that you do not convey,
34642without conditions so long as your license otherwise remains in force.
34643You may convey covered works to others for the sole purpose of having
34644them make modifications exclusively for you, or provide you with
34645facilities for running those works, provided that you comply with the
34646terms of this License in conveying all material for which you do not
34647control copyright. Those thus making or running the covered works for
34648you must do so exclusively on your behalf, under your direction and
34649control, on terms that prohibit them from making any copies of your
34650copyrighted material outside their relationship with you.
34651
34652Conveying under any other circumstances is permitted solely under the
34653conditions stated below. Sublicensing is not allowed; section 10
34654makes it unnecessary.
34655
34656@item Protecting Users' Legal Rights From Anti-Circumvention Law.
34657
34658No covered work shall be deemed part of an effective technological
34659measure under any applicable law fulfilling obligations under article
3466011 of the WIPO copyright treaty adopted on 20 December 1996, or
34661similar laws prohibiting or restricting circumvention of such
34662measures.
34663
34664When you convey a covered work, you waive any legal power to forbid
34665circumvention of technological measures to the extent such
34666circumvention is effected by exercising rights under this License with
34667respect to the covered work, and you disclaim any intention to limit
34668operation or modification of the work as a means of enforcing, against
34669the work's users, your or third parties' legal rights to forbid
34670circumvention of technological measures.
34671
34672@item Conveying Verbatim Copies.
34673
34674You may convey verbatim copies of the Program's source code as you
34675receive it, in any medium, provided that you conspicuously and
34676appropriately publish on each copy an appropriate copyright notice;
34677keep intact all notices stating that this License and any
34678non-permissive terms added in accord with section 7 apply to the code;
34679keep intact all notices of the absence of any warranty; and give all
34680recipients a copy of this License along with the Program.
34681
34682You may charge any price or no price for each copy that you convey,
34683and you may offer support or warranty protection for a fee.
34684
34685@item Conveying Modified Source Versions.
34686
34687You may convey a work based on the Program, or the modifications to
34688produce it from the Program, in the form of source code under the
34689terms of section 4, provided that you also meet all of these
34690conditions:
34691
34692@enumerate a
34693@item
34694The work must carry prominent notices stating that you modified it,
34695and giving a relevant date.
34696
34697@item
34698The work must carry prominent notices stating that it is released
34699under this License and any conditions added under section 7. This
34700requirement modifies the requirement in section 4 to ``keep intact all
34701notices''.
34702
34703@item
34704You must license the entire work, as a whole, under this License to
34705anyone who comes into possession of a copy. This License will
34706therefore apply, along with any applicable section 7 additional terms,
34707to the whole of the work, and all its parts, regardless of how they
34708are packaged. This License gives no permission to license the work in
34709any other way, but it does not invalidate such permission if you have
34710separately received it.
34711
34712@item
34713If the work has interactive user interfaces, each must display
34714Appropriate Legal Notices; however, if the Program has interactive
34715interfaces that do not display Appropriate Legal Notices, your work
34716need not make them do so.
34717@end enumerate
34718
34719A compilation of a covered work with other separate and independent
34720works, which are not by their nature extensions of the covered work,
34721and which are not combined with it such as to form a larger program,
34722in or on a volume of a storage or distribution medium, is called an
34723``aggregate'' if the compilation and its resulting copyright are not
34724used to limit the access or legal rights of the compilation's users
34725beyond what the individual works permit. Inclusion of a covered work
34726in an aggregate does not cause this License to apply to the other
34727parts of the aggregate.
34728
34729@item Conveying Non-Source Forms.
34730
34731You may convey a covered work in object code form under the terms of
34732sections 4 and 5, provided that you also convey the machine-readable
34733Corresponding Source under the terms of this License, in one of these
34734ways:
34735
34736@enumerate a
34737@item
34738Convey the object code in, or embodied in, a physical product
34739(including a physical distribution medium), accompanied by the
34740Corresponding Source fixed on a durable physical medium customarily
34741used for software interchange.
34742
34743@item
34744Convey the object code in, or embodied in, a physical product
34745(including a physical distribution medium), accompanied by a written
34746offer, valid for at least three years and valid for as long as you
34747offer spare parts or customer support for that product model, to give
34748anyone who possesses the object code either (1) a copy of the
34749Corresponding Source for all the software in the product that is
34750covered by this License, on a durable physical medium customarily used
34751for software interchange, for a price no more than your reasonable
34752cost of physically performing this conveying of source, or (2) access
34753to copy the Corresponding Source from a network server at no charge.
34754
34755@item
34756Convey individual copies of the object code with a copy of the written
34757offer to provide the Corresponding Source. This alternative is
34758allowed only occasionally and noncommercially, and only if you
34759received the object code with such an offer, in accord with subsection
347606b.
34761
34762@item
34763Convey the object code by offering access from a designated place
34764(gratis or for a charge), and offer equivalent access to the
34765Corresponding Source in the same way through the same place at no
34766further charge. You need not require recipients to copy the
34767Corresponding Source along with the object code. If the place to copy
34768the object code is a network server, the Corresponding Source may be
34769on a different server (operated by you or a third party) that supports
34770equivalent copying facilities, provided you maintain clear directions
34771next to the object code saying where to find the Corresponding Source.
34772Regardless of what server hosts the Corresponding Source, you remain
34773obligated to ensure that it is available for as long as needed to
34774satisfy these requirements.
34775
34776@item
34777Convey the object code using peer-to-peer transmission, provided you
34778inform other peers where the object code and Corresponding Source of
34779the work are being offered to the general public at no charge under
34780subsection 6d.
34781
34782@end enumerate
34783
34784A separable portion of the object code, whose source code is excluded
34785from the Corresponding Source as a System Library, need not be
34786included in conveying the object code work.
34787
34788A ``User Product'' is either (1) a ``consumer product'', which means any
34789tangible personal property which is normally used for personal,
34790family, or household purposes, or (2) anything designed or sold for
34791incorporation into a dwelling. In determining whether a product is a
34792consumer product, doubtful cases shall be resolved in favor of
34793coverage. For a particular product received by a particular user,
34794``normally used'' refers to a typical or common use of that class of
34795product, regardless of the status of the particular user or of the way
34796in which the particular user actually uses, or expects or is expected
34797to use, the product. A product is a consumer product regardless of
34798whether the product has substantial commercial, industrial or
34799non-consumer uses, unless such uses represent the only significant
34800mode of use of the product.
34801
34802``Installation Information'' for a User Product means any methods,
34803procedures, authorization keys, or other information required to
34804install and execute modified versions of a covered work in that User
34805Product from a modified version of its Corresponding Source. The
34806information must suffice to ensure that the continued functioning of
34807the modified object code is in no case prevented or interfered with
34808solely because modification has been made.
34809
34810If you convey an object code work under this section in, or with, or
34811specifically for use in, a User Product, and the conveying occurs as
34812part of a transaction in which the right of possession and use of the
34813User Product is transferred to the recipient in perpetuity or for a
34814fixed term (regardless of how the transaction is characterized), the
34815Corresponding Source conveyed under this section must be accompanied
34816by the Installation Information. But this requirement does not apply
34817if neither you nor any third party retains the ability to install
34818modified object code on the User Product (for example, the work has
34819been installed in ROM).
34820
34821The requirement to provide Installation Information does not include a
34822requirement to continue to provide support service, warranty, or
34823updates for a work that has been modified or installed by the
34824recipient, or for the User Product in which it has been modified or
34825installed. Access to a network may be denied when the modification
34826itself materially and adversely affects the operation of the network
34827or violates the rules and protocols for communication across the
34828network.
34829
34830Corresponding Source conveyed, and Installation Information provided,
34831in accord with this section must be in a format that is publicly
34832documented (and with an implementation available to the public in
34833source code form), and must require no special password or key for
34834unpacking, reading or copying.
34835
34836@item Additional Terms.
34837
34838``Additional permissions'' are terms that supplement the terms of this
34839License by making exceptions from one or more of its conditions.
34840Additional permissions that are applicable to the entire Program shall
34841be treated as though they were included in this License, to the extent
34842that they are valid under applicable law. If additional permissions
34843apply only to part of the Program, that part may be used separately
34844under those permissions, but the entire Program remains governed by
34845this License without regard to the additional permissions.
34846
34847When you convey a copy of a covered work, you may at your option
34848remove any additional permissions from that copy, or from any part of
34849it. (Additional permissions may be written to require their own
34850removal in certain cases when you modify the work.) You may place
34851additional permissions on material, added by you to a covered work,
34852for which you have or can give appropriate copyright permission.
34853
34854Notwithstanding any other provision of this License, for material you
34855add to a covered work, you may (if authorized by the copyright holders
34856of that material) supplement the terms of this License with terms:
34857
34858@enumerate a
34859@item
34860Disclaiming warranty or limiting liability differently from the terms
34861of sections 15 and 16 of this License; or
34862
34863@item
34864Requiring preservation of specified reasonable legal notices or author
34865attributions in that material or in the Appropriate Legal Notices
34866displayed by works containing it; or
34867
34868@item
34869Prohibiting misrepresentation of the origin of that material, or
34870requiring that modified versions of such material be marked in
34871reasonable ways as different from the original version; or
34872
34873@item
34874Limiting the use for publicity purposes of names of licensors or
34875authors of the material; or
34876
34877@item
34878Declining to grant rights under trademark law for use of some trade
34879names, trademarks, or service marks; or
34880
34881@item
34882Requiring indemnification of licensors and authors of that material by
34883anyone who conveys the material (or modified versions of it) with
34884contractual assumptions of liability to the recipient, for any
34885liability that these contractual assumptions directly impose on those
34886licensors and authors.
34887@end enumerate
34888
34889All other non-permissive additional terms are considered ``further
34890restrictions'' within the meaning of section 10. If the Program as you
34891received it, or any part of it, contains a notice stating that it is
34892governed by this License along with a term that is a further
34893restriction, you may remove that term. If a license document contains
34894a further restriction but permits relicensing or conveying under this
34895License, you may add to a covered work material governed by the terms
34896of that license document, provided that the further restriction does
34897not survive such relicensing or conveying.
34898
34899If you add terms to a covered work in accord with this section, you
34900must place, in the relevant source files, a statement of the
34901additional terms that apply to those files, or a notice indicating
34902where to find the applicable terms.
34903
34904Additional terms, permissive or non-permissive, may be stated in the
34905form of a separately written license, or stated as exceptions; the
34906above requirements apply either way.
34907
34908@item Termination.
34909
34910You may not propagate or modify a covered work except as expressly
34911provided under this License. Any attempt otherwise to propagate or
34912modify it is void, and will automatically terminate your rights under
34913this License (including any patent licenses granted under the third
34914paragraph of section 11).
34915
34916However, if you cease all violation of this License, then your license
34917from a particular copyright holder is reinstated (a) provisionally,
34918unless and until the copyright holder explicitly and finally
34919terminates your license, and (b) permanently, if the copyright holder
34920fails to notify you of the violation by some reasonable means prior to
3492160 days after the cessation.
34922
34923Moreover, your license from a particular copyright holder is
34924reinstated permanently if the copyright holder notifies you of the
34925violation by some reasonable means, this is the first time you have
34926received notice of violation of this License (for any work) from that
34927copyright holder, and you cure the violation prior to 30 days after
34928your receipt of the notice.
34929
34930Termination of your rights under this section does not terminate the
34931licenses of parties who have received copies or rights from you under
34932this License. If your rights have been terminated and not permanently
34933reinstated, you do not qualify to receive new licenses for the same
34934material under section 10.
34935
34936@item Acceptance Not Required for Having Copies.
34937
34938You are not required to accept this License in order to receive or run
34939a copy of the Program. Ancillary propagation of a covered work
34940occurring solely as a consequence of using peer-to-peer transmission
34941to receive a copy likewise does not require acceptance. However,
34942nothing other than this License grants you permission to propagate or
34943modify any covered work. These actions infringe copyright if you do
34944not accept this License. Therefore, by modifying or propagating a
34945covered work, you indicate your acceptance of this License to do so.
34946
34947@item Automatic Licensing of Downstream Recipients.
34948
34949Each time you convey a covered work, the recipient automatically
34950receives a license from the original licensors, to run, modify and
34951propagate that work, subject to this License. You are not responsible
34952for enforcing compliance by third parties with this License.
34953
34954An ``entity transaction'' is a transaction transferring control of an
34955organization, or substantially all assets of one, or subdividing an
34956organization, or merging organizations. If propagation of a covered
34957work results from an entity transaction, each party to that
34958transaction who receives a copy of the work also receives whatever
34959licenses to the work the party's predecessor in interest had or could
34960give under the previous paragraph, plus a right to possession of the
34961Corresponding Source of the work from the predecessor in interest, if
34962the predecessor has it or can get it with reasonable efforts.
34963
34964You may not impose any further restrictions on the exercise of the
34965rights granted or affirmed under this License. For example, you may
34966not impose a license fee, royalty, or other charge for exercise of
34967rights granted under this License, and you may not initiate litigation
34968(including a cross-claim or counterclaim in a lawsuit) alleging that
34969any patent claim is infringed by making, using, selling, offering for
34970sale, or importing the Program or any portion of it.
34971
34972@item Patents.
34973
34974A ``contributor'' is a copyright holder who authorizes use under this
34975License of the Program or a work on which the Program is based. The
34976work thus licensed is called the contributor's ``contributor version''.
34977
34978A contributor's ``essential patent claims'' are all patent claims owned
34979or controlled by the contributor, whether already acquired or
34980hereafter acquired, that would be infringed by some manner, permitted
34981by this License, of making, using, or selling its contributor version,
34982but do not include claims that would be infringed only as a
34983consequence of further modification of the contributor version. For
34984purposes of this definition, ``control'' includes the right to grant
34985patent sublicenses in a manner consistent with the requirements of
34986this License.
34987
34988Each contributor grants you a non-exclusive, worldwide, royalty-free
34989patent license under the contributor's essential patent claims, to
34990make, use, sell, offer for sale, import and otherwise run, modify and
34991propagate the contents of its contributor version.
34992
34993In the following three paragraphs, a ``patent license'' is any express
34994agreement or commitment, however denominated, not to enforce a patent
34995(such as an express permission to practice a patent or covenant not to
34996sue for patent infringement). To ``grant'' such a patent license to a
34997party means to make such an agreement or commitment not to enforce a
34998patent against the party.
34999
35000If you convey a covered work, knowingly relying on a patent license,
35001and the Corresponding Source of the work is not available for anyone
35002to copy, free of charge and under the terms of this License, through a
35003publicly available network server or other readily accessible means,
35004then you must either (1) cause the Corresponding Source to be so
35005available, or (2) arrange to deprive yourself of the benefit of the
35006patent license for this particular work, or (3) arrange, in a manner
35007consistent with the requirements of this License, to extend the patent
35008license to downstream recipients. ``Knowingly relying'' means you have
35009actual knowledge that, but for the patent license, your conveying the
35010covered work in a country, or your recipient's use of the covered work
35011in a country, would infringe one or more identifiable patents in that
35012country that you have reason to believe are valid.
35013
35014If, pursuant to or in connection with a single transaction or
35015arrangement, you convey, or propagate by procuring conveyance of, a
35016covered work, and grant a patent license to some of the parties
35017receiving the covered work authorizing them to use, propagate, modify
35018or convey a specific copy of the covered work, then the patent license
35019you grant is automatically extended to all recipients of the covered
35020work and works based on it.
35021
35022A patent license is ``discriminatory'' if it does not include within the
35023scope of its coverage, prohibits the exercise of, or is conditioned on
35024the non-exercise of one or more of the rights that are specifically
35025granted under this License. You may not convey a covered work if you
35026are a party to an arrangement with a third party that is in the
35027business of distributing software, under which you make payment to the
35028third party based on the extent of your activity of conveying the
35029work, and under which the third party grants, to any of the parties
35030who would receive the covered work from you, a discriminatory patent
35031license (a) in connection with copies of the covered work conveyed by
35032you (or copies made from those copies), or (b) primarily for and in
35033connection with specific products or compilations that contain the
35034covered work, unless you entered into that arrangement, or that patent
35035license was granted, prior to 28 March 2007.
35036
35037Nothing in this License shall be construed as excluding or limiting
35038any implied license or other defenses to infringement that may
35039otherwise be available to you under applicable patent law.
35040
35041@item No Surrender of Others' Freedom.
35042
35043If conditions are imposed on you (whether by court order, agreement or
35044otherwise) that contradict the conditions of this License, they do not
35045excuse you from the conditions of this License. If you cannot convey
35046a covered work so as to satisfy simultaneously your obligations under
35047this License and any other pertinent obligations, then as a
35048consequence you may not convey it at all. For example, if you agree
35049to terms that obligate you to collect a royalty for further conveying
35050from those to whom you convey the Program, the only way you could
35051satisfy both those terms and this License would be to refrain entirely
35052from conveying the Program.
35053
35054@item Use with the GNU Affero General Public License.
35055
35056Notwithstanding any other provision of this License, you have
35057permission to link or combine any covered work with a work licensed
35058under version 3 of the GNU Affero General Public License into a single
35059combined work, and to convey the resulting work. The terms of this
35060License will continue to apply to the part which is the covered work,
35061but the special requirements of the GNU Affero General Public License,
35062section 13, concerning interaction through a network will apply to the
35063combination as such.
35064
35065@item Revised Versions of this License.
35066
35067The Free Software Foundation may publish revised and/or new versions
35068of the GNU General Public License from time to time. Such new
35069versions will be similar in spirit to the present version, but may
35070differ in detail to address new problems or concerns.
35071
35072Each version is given a distinguishing version number. If the Program
35073specifies that a certain numbered version of the GNU General Public
35074License ``or any later version'' applies to it, you have the option of
35075following the terms and conditions either of that numbered version or
35076of any later version published by the Free Software Foundation. If
35077the Program does not specify a version number of the GNU General
35078Public License, you may choose any version ever published by the Free
35079Software Foundation.
35080
35081If the Program specifies that a proxy can decide which future versions
35082of the GNU General Public License can be used, that proxy's public
35083statement of acceptance of a version permanently authorizes you to
35084choose that version for the Program.
35085
35086Later license versions may give you additional or different
35087permissions. However, no additional obligations are imposed on any
35088author or copyright holder as a result of your choosing to follow a
35089later version.
35090
35091@item Disclaimer of Warranty.
35092
35093THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
35094APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
35095HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
35096WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
35097LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
35098A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
35099PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
35100DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
35101CORRECTION.
35102
35103@item Limitation of Liability.
35104
35105IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
35106WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
35107CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
35108INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
35109ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
35110NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
35111LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
35112TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
35113PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
35114
35115@item Interpretation of Sections 15 and 16.
35116
35117If the disclaimer of warranty and limitation of liability provided
35118above cannot be given local legal effect according to their terms,
35119reviewing courts shall apply local law that most closely approximates
35120an absolute waiver of all civil liability in connection with the
35121Program, unless a warranty or assumption of liability accompanies a
35122copy of the Program in return for a fee.
35123
35124@end enumerate
35125
35126@heading END OF TERMS AND CONDITIONS
35127
35128@heading How to Apply These Terms to Your New Programs
35129
35130If you develop a new program, and you want it to be of the greatest
35131possible use to the public, the best way to achieve this is to make it
35132free software which everyone can redistribute and change under these
35133terms.
35134
35135To do so, attach the following notices to the program. It is safest
35136to attach them to the start of each source file to most effectively
35137state the exclusion of warranty; and each file should have at least
35138the ``copyright'' line and a pointer to where the full notice is found.
35139
35140@smallexample
35141@var{one line to give the program's name and a brief idea of what it does.}
35142Copyright (C) @var{year} @var{name of author}
35143
35144This program is free software: you can redistribute it and/or modify
35145it under the terms of the GNU General Public License as published by
35146the Free Software Foundation, either version 3 of the License, or (at
35147your option) any later version.
35148
35149This program is distributed in the hope that it will be useful, but
35150WITHOUT ANY WARRANTY; without even the implied warranty of
35151MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35152General Public License for more details.
35153
35154You should have received a copy of the GNU General Public License
35155along with this program. If not, see @url{http://www.gnu.org/licenses/}.
35156@end smallexample
35157
35158Also add information on how to contact you by electronic and paper mail.
35159
35160If the program does terminal interaction, make it output a short
35161notice like this when it starts in an interactive mode:
35162
35163@smallexample
35164@var{program} Copyright (C) @var{year} @var{name of author}
35165This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
35166This is free software, and you are welcome to redistribute it
35167under certain conditions; type @samp{show c} for details.
35168@end smallexample
35169
35170The hypothetical commands @samp{show w} and @samp{show c} should show
35171the appropriate parts of the General Public License. Of course, your
35172program's commands might be different; for a GUI interface, you would
35173use an ``about box''.
35174
35175You should also get your employer (if you work as a programmer) or school,
35176if any, to sign a ``copyright disclaimer'' for the program, if necessary.
35177For more information on this, and how to apply and follow the GNU GPL, see
35178@url{http://www.gnu.org/licenses/}.
35179
35180The GNU General Public License does not permit incorporating your
35181program into proprietary programs. If your program is a subroutine
35182library, you may consider it more useful to permit linking proprietary
35183applications with the library. If this is what you want to do, use
35184the GNU Lesser General Public License instead of this License. But
35185first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
35186
35187 34470
35188@node GNU Free Documentation License, Customizing Calc, Copying, Top 34471@node GNU Free Documentation License, Customizing Calc, Copying, Top
35189@appendix GNU Free Documentation License 34472@appendix GNU Free Documentation License
diff --git a/man/emacs.texi b/man/emacs.texi
index 3b9484dcc06..7e1adb115b4 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -1297,724 +1297,7 @@ while running shell commands.
1297 1297
1298@node Copying, GNU Free Documentation License, Service, Top 1298@node Copying, GNU Free Documentation License, Service, Top
1299@appendix GNU GENERAL PUBLIC LICENSE 1299@appendix GNU GENERAL PUBLIC LICENSE
1300@c The GNU General Public License. 1300@include gpl.texi
1301@center Version 3, 29 June 2007
1302
1303@c This file is intended to be included within another document,
1304@c hence no sectioning command or @node.
1305
1306@display
1307Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
1308
1309Everyone is permitted to copy and distribute verbatim copies of this
1310license document, but changing it is not allowed.
1311@end display
1312
1313@heading Preamble
1314
1315The GNU General Public License is a free, copyleft license for
1316software and other kinds of works.
1317
1318The licenses for most software and other practical works are designed
1319to take away your freedom to share and change the works. By contrast,
1320the GNU General Public License is intended to guarantee your freedom
1321to share and change all versions of a program---to make sure it remains
1322free software for all its users. We, the Free Software Foundation,
1323use the GNU General Public License for most of our software; it
1324applies also to any other work released this way by its authors. You
1325can apply it to your programs, too.
1326
1327When we speak of free software, we are referring to freedom, not
1328price. Our General Public Licenses are designed to make sure that you
1329have the freedom to distribute copies of free software (and charge for
1330them if you wish), that you receive source code or can get it if you
1331want it, that you can change the software or use pieces of it in new
1332free programs, and that you know you can do these things.
1333
1334To protect your rights, we need to prevent others from denying you
1335these rights or asking you to surrender the rights. Therefore, you
1336have certain responsibilities if you distribute copies of the
1337software, or if you modify it: responsibilities to respect the freedom
1338of others.
1339
1340For example, if you distribute copies of such a program, whether
1341gratis or for a fee, you must pass on to the recipients the same
1342freedoms that you received. You must make sure that they, too,
1343receive or can get the source code. And you must show them these
1344terms so they know their rights.
1345
1346Developers that use the GNU GPL protect your rights with two steps:
1347(1) assert copyright on the software, and (2) offer you this License
1348giving you legal permission to copy, distribute and/or modify it.
1349
1350For the developers' and authors' protection, the GPL clearly explains
1351that there is no warranty for this free software. For both users' and
1352authors' sake, the GPL requires that modified versions be marked as
1353changed, so that their problems will not be attributed erroneously to
1354authors of previous versions.
1355
1356Some devices are designed to deny users access to install or run
1357modified versions of the software inside them, although the
1358manufacturer can do so. This is fundamentally incompatible with the
1359aim of protecting users' freedom to change the software. The
1360systematic pattern of such abuse occurs in the area of products for
1361individuals to use, which is precisely where it is most unacceptable.
1362Therefore, we have designed this version of the GPL to prohibit the
1363practice for those products. If such problems arise substantially in
1364other domains, we stand ready to extend this provision to those
1365domains in future versions of the GPL, as needed to protect the
1366freedom of users.
1367
1368Finally, every program is threatened constantly by software patents.
1369States should not allow patents to restrict development and use of
1370software on general-purpose computers, but in those that do, we wish
1371to avoid the special danger that patents applied to a free program
1372could make it effectively proprietary. To prevent this, the GPL
1373assures that patents cannot be used to render the program non-free.
1374
1375The precise terms and conditions for copying, distribution and
1376modification follow.
1377
1378@heading TERMS AND CONDITIONS
1379
1380@enumerate 0
1381@item Definitions.
1382
1383``This License'' refers to version 3 of the GNU General Public License.
1384
1385``Copyright'' also means copyright-like laws that apply to other kinds
1386of works, such as semiconductor masks.
1387
1388``The Program'' refers to any copyrightable work licensed under this
1389License. Each licensee is addressed as ``you''. ``Licensees'' and
1390``recipients'' may be individuals or organizations.
1391
1392To ``modify'' a work means to copy from or adapt all or part of the work
1393in a fashion requiring copyright permission, other than the making of
1394an exact copy. The resulting work is called a ``modified version'' of
1395the earlier work or a work ``based on'' the earlier work.
1396
1397A ``covered work'' means either the unmodified Program or a work based
1398on the Program.
1399
1400To ``propagate'' a work means to do anything with it that, without
1401permission, would make you directly or secondarily liable for
1402infringement under applicable copyright law, except executing it on a
1403computer or modifying a private copy. Propagation includes copying,
1404distribution (with or without modification), making available to the
1405public, and in some countries other activities as well.
1406
1407To ``convey'' a work means any kind of propagation that enables other
1408parties to make or receive copies. Mere interaction with a user
1409through a computer network, with no transfer of a copy, is not
1410conveying.
1411
1412An interactive user interface displays ``Appropriate Legal Notices'' to
1413the extent that it includes a convenient and prominently visible
1414feature that (1) displays an appropriate copyright notice, and (2)
1415tells the user that there is no warranty for the work (except to the
1416extent that warranties are provided), that licensees may convey the
1417work under this License, and how to view a copy of this License. If
1418the interface presents a list of user commands or options, such as a
1419menu, a prominent item in the list meets this criterion.
1420
1421@item Source Code.
1422
1423The ``source code'' for a work means the preferred form of the work for
1424making modifications to it. ``Object code'' means any non-source form
1425of a work.
1426
1427A ``Standard Interface'' means an interface that either is an official
1428standard defined by a recognized standards body, or, in the case of
1429interfaces specified for a particular programming language, one that
1430is widely used among developers working in that language.
1431
1432The ``System Libraries'' of an executable work include anything, other
1433than the work as a whole, that (a) is included in the normal form of
1434packaging a Major Component, but which is not part of that Major
1435Component, and (b) serves only to enable use of the work with that
1436Major Component, or to implement a Standard Interface for which an
1437implementation is available to the public in source code form. A
1438``Major Component'', in this context, means a major essential component
1439(kernel, window system, and so on) of the specific operating system
1440(if any) on which the executable work runs, or a compiler used to
1441produce the work, or an object code interpreter used to run it.
1442
1443The ``Corresponding Source'' for a work in object code form means all
1444the source code needed to generate, install, and (for an executable
1445work) run the object code and to modify the work, including scripts to
1446control those activities. However, it does not include the work's
1447System Libraries, or general-purpose tools or generally available free
1448programs which are used unmodified in performing those activities but
1449which are not part of the work. For example, Corresponding Source
1450includes interface definition files associated with source files for
1451the work, and the source code for shared libraries and dynamically
1452linked subprograms that the work is specifically designed to require,
1453such as by intimate data communication or control flow between those
1454subprograms and other parts of the work.
1455
1456The Corresponding Source need not include anything that users can
1457regenerate automatically from other parts of the Corresponding Source.
1458
1459The Corresponding Source for a work in source code form is that same
1460work.
1461
1462@item Basic Permissions.
1463
1464All rights granted under this License are granted for the term of
1465copyright on the Program, and are irrevocable provided the stated
1466conditions are met. This License explicitly affirms your unlimited
1467permission to run the unmodified Program. The output from running a
1468covered work is covered by this License only if the output, given its
1469content, constitutes a covered work. This License acknowledges your
1470rights of fair use or other equivalent, as provided by copyright law.
1471
1472You may make, run and propagate covered works that you do not convey,
1473without conditions so long as your license otherwise remains in force.
1474You may convey covered works to others for the sole purpose of having
1475them make modifications exclusively for you, or provide you with
1476facilities for running those works, provided that you comply with the
1477terms of this License in conveying all material for which you do not
1478control copyright. Those thus making or running the covered works for
1479you must do so exclusively on your behalf, under your direction and
1480control, on terms that prohibit them from making any copies of your
1481copyrighted material outside their relationship with you.
1482
1483Conveying under any other circumstances is permitted solely under the
1484conditions stated below. Sublicensing is not allowed; section 10
1485makes it unnecessary.
1486
1487@item Protecting Users' Legal Rights From Anti-Circumvention Law.
1488
1489No covered work shall be deemed part of an effective technological
1490measure under any applicable law fulfilling obligations under article
149111 of the WIPO copyright treaty adopted on 20 December 1996, or
1492similar laws prohibiting or restricting circumvention of such
1493measures.
1494
1495When you convey a covered work, you waive any legal power to forbid
1496circumvention of technological measures to the extent such
1497circumvention is effected by exercising rights under this License with
1498respect to the covered work, and you disclaim any intention to limit
1499operation or modification of the work as a means of enforcing, against
1500the work's users, your or third parties' legal rights to forbid
1501circumvention of technological measures.
1502
1503@item Conveying Verbatim Copies.
1504
1505You may convey verbatim copies of the Program's source code as you
1506receive it, in any medium, provided that you conspicuously and
1507appropriately publish on each copy an appropriate copyright notice;
1508keep intact all notices stating that this License and any
1509non-permissive terms added in accord with section 7 apply to the code;
1510keep intact all notices of the absence of any warranty; and give all
1511recipients a copy of this License along with the Program.
1512
1513You may charge any price or no price for each copy that you convey,
1514and you may offer support or warranty protection for a fee.
1515
1516@item Conveying Modified Source Versions.
1517
1518You may convey a work based on the Program, or the modifications to
1519produce it from the Program, in the form of source code under the
1520terms of section 4, provided that you also meet all of these
1521conditions:
1522
1523@enumerate a
1524@item
1525The work must carry prominent notices stating that you modified it,
1526and giving a relevant date.
1527
1528@item
1529The work must carry prominent notices stating that it is released
1530under this License and any conditions added under section 7. This
1531requirement modifies the requirement in section 4 to ``keep intact all
1532notices''.
1533
1534@item
1535You must license the entire work, as a whole, under this License to
1536anyone who comes into possession of a copy. This License will
1537therefore apply, along with any applicable section 7 additional terms,
1538to the whole of the work, and all its parts, regardless of how they
1539are packaged. This License gives no permission to license the work in
1540any other way, but it does not invalidate such permission if you have
1541separately received it.
1542
1543@item
1544If the work has interactive user interfaces, each must display
1545Appropriate Legal Notices; however, if the Program has interactive
1546interfaces that do not display Appropriate Legal Notices, your work
1547need not make them do so.
1548@end enumerate
1549
1550A compilation of a covered work with other separate and independent
1551works, which are not by their nature extensions of the covered work,
1552and which are not combined with it such as to form a larger program,
1553in or on a volume of a storage or distribution medium, is called an
1554``aggregate'' if the compilation and its resulting copyright are not
1555used to limit the access or legal rights of the compilation's users
1556beyond what the individual works permit. Inclusion of a covered work
1557in an aggregate does not cause this License to apply to the other
1558parts of the aggregate.
1559
1560@item Conveying Non-Source Forms.
1561
1562You may convey a covered work in object code form under the terms of
1563sections 4 and 5, provided that you also convey the machine-readable
1564Corresponding Source under the terms of this License, in one of these
1565ways:
1566
1567@enumerate a
1568@item
1569Convey the object code in, or embodied in, a physical product
1570(including a physical distribution medium), accompanied by the
1571Corresponding Source fixed on a durable physical medium customarily
1572used for software interchange.
1573
1574@item
1575Convey the object code in, or embodied in, a physical product
1576(including a physical distribution medium), accompanied by a written
1577offer, valid for at least three years and valid for as long as you
1578offer spare parts or customer support for that product model, to give
1579anyone who possesses the object code either (1) a copy of the
1580Corresponding Source for all the software in the product that is
1581covered by this License, on a durable physical medium customarily used
1582for software interchange, for a price no more than your reasonable
1583cost of physically performing this conveying of source, or (2) access
1584to copy the Corresponding Source from a network server at no charge.
1585
1586@item
1587Convey individual copies of the object code with a copy of the written
1588offer to provide the Corresponding Source. This alternative is
1589allowed only occasionally and noncommercially, and only if you
1590received the object code with such an offer, in accord with subsection
15916b.
1592
1593@item
1594Convey the object code by offering access from a designated place
1595(gratis or for a charge), and offer equivalent access to the
1596Corresponding Source in the same way through the same place at no
1597further charge. You need not require recipients to copy the
1598Corresponding Source along with the object code. If the place to copy
1599the object code is a network server, the Corresponding Source may be
1600on a different server (operated by you or a third party) that supports
1601equivalent copying facilities, provided you maintain clear directions
1602next to the object code saying where to find the Corresponding Source.
1603Regardless of what server hosts the Corresponding Source, you remain
1604obligated to ensure that it is available for as long as needed to
1605satisfy these requirements.
1606
1607@item
1608Convey the object code using peer-to-peer transmission, provided you
1609inform other peers where the object code and Corresponding Source of
1610the work are being offered to the general public at no charge under
1611subsection 6d.
1612
1613@end enumerate
1614
1615A separable portion of the object code, whose source code is excluded
1616from the Corresponding Source as a System Library, need not be
1617included in conveying the object code work.
1618
1619A ``User Product'' is either (1) a ``consumer product'', which means any
1620tangible personal property which is normally used for personal,
1621family, or household purposes, or (2) anything designed or sold for
1622incorporation into a dwelling. In determining whether a product is a
1623consumer product, doubtful cases shall be resolved in favor of
1624coverage. For a particular product received by a particular user,
1625``normally used'' refers to a typical or common use of that class of
1626product, regardless of the status of the particular user or of the way
1627in which the particular user actually uses, or expects or is expected
1628to use, the product. A product is a consumer product regardless of
1629whether the product has substantial commercial, industrial or
1630non-consumer uses, unless such uses represent the only significant
1631mode of use of the product.
1632
1633``Installation Information'' for a User Product means any methods,
1634procedures, authorization keys, or other information required to
1635install and execute modified versions of a covered work in that User
1636Product from a modified version of its Corresponding Source. The
1637information must suffice to ensure that the continued functioning of
1638the modified object code is in no case prevented or interfered with
1639solely because modification has been made.
1640
1641If you convey an object code work under this section in, or with, or
1642specifically for use in, a User Product, and the conveying occurs as
1643part of a transaction in which the right of possession and use of the
1644User Product is transferred to the recipient in perpetuity or for a
1645fixed term (regardless of how the transaction is characterized), the
1646Corresponding Source conveyed under this section must be accompanied
1647by the Installation Information. But this requirement does not apply
1648if neither you nor any third party retains the ability to install
1649modified object code on the User Product (for example, the work has
1650been installed in ROM).
1651
1652The requirement to provide Installation Information does not include a
1653requirement to continue to provide support service, warranty, or
1654updates for a work that has been modified or installed by the
1655recipient, or for the User Product in which it has been modified or
1656installed. Access to a network may be denied when the modification
1657itself materially and adversely affects the operation of the network
1658or violates the rules and protocols for communication across the
1659network.
1660
1661Corresponding Source conveyed, and Installation Information provided,
1662in accord with this section must be in a format that is publicly
1663documented (and with an implementation available to the public in
1664source code form), and must require no special password or key for
1665unpacking, reading or copying.
1666
1667@item Additional Terms.
1668
1669``Additional permissions'' are terms that supplement the terms of this
1670License by making exceptions from one or more of its conditions.
1671Additional permissions that are applicable to the entire Program shall
1672be treated as though they were included in this License, to the extent
1673that they are valid under applicable law. If additional permissions
1674apply only to part of the Program, that part may be used separately
1675under those permissions, but the entire Program remains governed by
1676this License without regard to the additional permissions.
1677
1678When you convey a copy of a covered work, you may at your option
1679remove any additional permissions from that copy, or from any part of
1680it. (Additional permissions may be written to require their own
1681removal in certain cases when you modify the work.) You may place
1682additional permissions on material, added by you to a covered work,
1683for which you have or can give appropriate copyright permission.
1684
1685Notwithstanding any other provision of this License, for material you
1686add to a covered work, you may (if authorized by the copyright holders
1687of that material) supplement the terms of this License with terms:
1688
1689@enumerate a
1690@item
1691Disclaiming warranty or limiting liability differently from the terms
1692of sections 15 and 16 of this License; or
1693
1694@item
1695Requiring preservation of specified reasonable legal notices or author
1696attributions in that material or in the Appropriate Legal Notices
1697displayed by works containing it; or
1698
1699@item
1700Prohibiting misrepresentation of the origin of that material, or
1701requiring that modified versions of such material be marked in
1702reasonable ways as different from the original version; or
1703
1704@item
1705Limiting the use for publicity purposes of names of licensors or
1706authors of the material; or
1707
1708@item
1709Declining to grant rights under trademark law for use of some trade
1710names, trademarks, or service marks; or
1711
1712@item
1713Requiring indemnification of licensors and authors of that material by
1714anyone who conveys the material (or modified versions of it) with
1715contractual assumptions of liability to the recipient, for any
1716liability that these contractual assumptions directly impose on those
1717licensors and authors.
1718@end enumerate
1719
1720All other non-permissive additional terms are considered ``further
1721restrictions'' within the meaning of section 10. If the Program as you
1722received it, or any part of it, contains a notice stating that it is
1723governed by this License along with a term that is a further
1724restriction, you may remove that term. If a license document contains
1725a further restriction but permits relicensing or conveying under this
1726License, you may add to a covered work material governed by the terms
1727of that license document, provided that the further restriction does
1728not survive such relicensing or conveying.
1729
1730If you add terms to a covered work in accord with this section, you
1731must place, in the relevant source files, a statement of the
1732additional terms that apply to those files, or a notice indicating
1733where to find the applicable terms.
1734
1735Additional terms, permissive or non-permissive, may be stated in the
1736form of a separately written license, or stated as exceptions; the
1737above requirements apply either way.
1738
1739@item Termination.
1740
1741You may not propagate or modify a covered work except as expressly
1742provided under this License. Any attempt otherwise to propagate or
1743modify it is void, and will automatically terminate your rights under
1744this License (including any patent licenses granted under the third
1745paragraph of section 11).
1746
1747However, if you cease all violation of this License, then your license
1748from a particular copyright holder is reinstated (a) provisionally,
1749unless and until the copyright holder explicitly and finally
1750terminates your license, and (b) permanently, if the copyright holder
1751fails to notify you of the violation by some reasonable means prior to
175260 days after the cessation.
1753
1754Moreover, your license from a particular copyright holder is
1755reinstated permanently if the copyright holder notifies you of the
1756violation by some reasonable means, this is the first time you have
1757received notice of violation of this License (for any work) from that
1758copyright holder, and you cure the violation prior to 30 days after
1759your receipt of the notice.
1760
1761Termination of your rights under this section does not terminate the
1762licenses of parties who have received copies or rights from you under
1763this License. If your rights have been terminated and not permanently
1764reinstated, you do not qualify to receive new licenses for the same
1765material under section 10.
1766
1767@item Acceptance Not Required for Having Copies.
1768
1769You are not required to accept this License in order to receive or run
1770a copy of the Program. Ancillary propagation of a covered work
1771occurring solely as a consequence of using peer-to-peer transmission
1772to receive a copy likewise does not require acceptance. However,
1773nothing other than this License grants you permission to propagate or
1774modify any covered work. These actions infringe copyright if you do
1775not accept this License. Therefore, by modifying or propagating a
1776covered work, you indicate your acceptance of this License to do so.
1777
1778@item Automatic Licensing of Downstream Recipients.
1779
1780Each time you convey a covered work, the recipient automatically
1781receives a license from the original licensors, to run, modify and
1782propagate that work, subject to this License. You are not responsible
1783for enforcing compliance by third parties with this License.
1784
1785An ``entity transaction'' is a transaction transferring control of an
1786organization, or substantially all assets of one, or subdividing an
1787organization, or merging organizations. If propagation of a covered
1788work results from an entity transaction, each party to that
1789transaction who receives a copy of the work also receives whatever
1790licenses to the work the party's predecessor in interest had or could
1791give under the previous paragraph, plus a right to possession of the
1792Corresponding Source of the work from the predecessor in interest, if
1793the predecessor has it or can get it with reasonable efforts.
1794
1795You may not impose any further restrictions on the exercise of the
1796rights granted or affirmed under this License. For example, you may
1797not impose a license fee, royalty, or other charge for exercise of
1798rights granted under this License, and you may not initiate litigation
1799(including a cross-claim or counterclaim in a lawsuit) alleging that
1800any patent claim is infringed by making, using, selling, offering for
1801sale, or importing the Program or any portion of it.
1802
1803@item Patents.
1804
1805A ``contributor'' is a copyright holder who authorizes use under this
1806License of the Program or a work on which the Program is based. The
1807work thus licensed is called the contributor's ``contributor version''.
1808
1809A contributor's ``essential patent claims'' are all patent claims owned
1810or controlled by the contributor, whether already acquired or
1811hereafter acquired, that would be infringed by some manner, permitted
1812by this License, of making, using, or selling its contributor version,
1813but do not include claims that would be infringed only as a
1814consequence of further modification of the contributor version. For
1815purposes of this definition, ``control'' includes the right to grant
1816patent sublicenses in a manner consistent with the requirements of
1817this License.
1818
1819Each contributor grants you a non-exclusive, worldwide, royalty-free
1820patent license under the contributor's essential patent claims, to
1821make, use, sell, offer for sale, import and otherwise run, modify and
1822propagate the contents of its contributor version.
1823
1824In the following three paragraphs, a ``patent license'' is any express
1825agreement or commitment, however denominated, not to enforce a patent
1826(such as an express permission to practice a patent or covenant not to
1827sue for patent infringement). To ``grant'' such a patent license to a
1828party means to make such an agreement or commitment not to enforce a
1829patent against the party.
1830
1831If you convey a covered work, knowingly relying on a patent license,
1832and the Corresponding Source of the work is not available for anyone
1833to copy, free of charge and under the terms of this License, through a
1834publicly available network server or other readily accessible means,
1835then you must either (1) cause the Corresponding Source to be so
1836available, or (2) arrange to deprive yourself of the benefit of the
1837patent license for this particular work, or (3) arrange, in a manner
1838consistent with the requirements of this License, to extend the patent
1839license to downstream recipients. ``Knowingly relying'' means you have
1840actual knowledge that, but for the patent license, your conveying the
1841covered work in a country, or your recipient's use of the covered work
1842in a country, would infringe one or more identifiable patents in that
1843country that you have reason to believe are valid.
1844
1845If, pursuant to or in connection with a single transaction or
1846arrangement, you convey, or propagate by procuring conveyance of, a
1847covered work, and grant a patent license to some of the parties
1848receiving the covered work authorizing them to use, propagate, modify
1849or convey a specific copy of the covered work, then the patent license
1850you grant is automatically extended to all recipients of the covered
1851work and works based on it.
1852
1853A patent license is ``discriminatory'' if it does not include within the
1854scope of its coverage, prohibits the exercise of, or is conditioned on
1855the non-exercise of one or more of the rights that are specifically
1856granted under this License. You may not convey a covered work if you
1857are a party to an arrangement with a third party that is in the
1858business of distributing software, under which you make payment to the
1859third party based on the extent of your activity of conveying the
1860work, and under which the third party grants, to any of the parties
1861who would receive the covered work from you, a discriminatory patent
1862license (a) in connection with copies of the covered work conveyed by
1863you (or copies made from those copies), or (b) primarily for and in
1864connection with specific products or compilations that contain the
1865covered work, unless you entered into that arrangement, or that patent
1866license was granted, prior to 28 March 2007.
1867
1868Nothing in this License shall be construed as excluding or limiting
1869any implied license or other defenses to infringement that may
1870otherwise be available to you under applicable patent law.
1871
1872@item No Surrender of Others' Freedom.
1873
1874If conditions are imposed on you (whether by court order, agreement or
1875otherwise) that contradict the conditions of this License, they do not
1876excuse you from the conditions of this License. If you cannot convey
1877a covered work so as to satisfy simultaneously your obligations under
1878this License and any other pertinent obligations, then as a
1879consequence you may not convey it at all. For example, if you agree
1880to terms that obligate you to collect a royalty for further conveying
1881from those to whom you convey the Program, the only way you could
1882satisfy both those terms and this License would be to refrain entirely
1883from conveying the Program.
1884
1885@item Use with the GNU Affero General Public License.
1886
1887Notwithstanding any other provision of this License, you have
1888permission to link or combine any covered work with a work licensed
1889under version 3 of the GNU Affero General Public License into a single
1890combined work, and to convey the resulting work. The terms of this
1891License will continue to apply to the part which is the covered work,
1892but the special requirements of the GNU Affero General Public License,
1893section 13, concerning interaction through a network will apply to the
1894combination as such.
1895
1896@item Revised Versions of this License.
1897
1898The Free Software Foundation may publish revised and/or new versions
1899of the GNU General Public License from time to time. Such new
1900versions will be similar in spirit to the present version, but may
1901differ in detail to address new problems or concerns.
1902
1903Each version is given a distinguishing version number. If the Program
1904specifies that a certain numbered version of the GNU General Public
1905License ``or any later version'' applies to it, you have the option of
1906following the terms and conditions either of that numbered version or
1907of any later version published by the Free Software Foundation. If
1908the Program does not specify a version number of the GNU General
1909Public License, you may choose any version ever published by the Free
1910Software Foundation.
1911
1912If the Program specifies that a proxy can decide which future versions
1913of the GNU General Public License can be used, that proxy's public
1914statement of acceptance of a version permanently authorizes you to
1915choose that version for the Program.
1916
1917Later license versions may give you additional or different
1918permissions. However, no additional obligations are imposed on any
1919author or copyright holder as a result of your choosing to follow a
1920later version.
1921
1922@item Disclaimer of Warranty.
1923
1924THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
1925APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
1926HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
1927WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
1928LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1929A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
1930PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
1931DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
1932CORRECTION.
1933
1934@item Limitation of Liability.
1935
1936IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1937WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
1938CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1939INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
1940ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
1941NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
1942LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
1943TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
1944PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
1945
1946@item Interpretation of Sections 15 and 16.
1947
1948If the disclaimer of warranty and limitation of liability provided
1949above cannot be given local legal effect according to their terms,
1950reviewing courts shall apply local law that most closely approximates
1951an absolute waiver of all civil liability in connection with the
1952Program, unless a warranty or assumption of liability accompanies a
1953copy of the Program in return for a fee.
1954
1955@end enumerate
1956
1957@heading END OF TERMS AND CONDITIONS
1958
1959@heading How to Apply These Terms to Your New Programs
1960
1961If you develop a new program, and you want it to be of the greatest
1962possible use to the public, the best way to achieve this is to make it
1963free software which everyone can redistribute and change under these
1964terms.
1965
1966To do so, attach the following notices to the program. It is safest
1967to attach them to the start of each source file to most effectively
1968state the exclusion of warranty; and each file should have at least
1969the ``copyright'' line and a pointer to where the full notice is found.
1970
1971@smallexample
1972@var{one line to give the program's name and a brief idea of what it does.}
1973Copyright (C) @var{year} @var{name of author}
1974
1975This program is free software: you can redistribute it and/or modify
1976it under the terms of the GNU General Public License as published by
1977the Free Software Foundation, either version 3 of the License, or (at
1978your option) any later version.
1979
1980This program is distributed in the hope that it will be useful, but
1981WITHOUT ANY WARRANTY; without even the implied warranty of
1982MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1983General Public License for more details.
1984
1985You should have received a copy of the GNU General Public License
1986along with this program. If not, see @url{http://www.gnu.org/licenses/}.
1987@end smallexample
1988
1989Also add information on how to contact you by electronic and paper mail.
1990
1991If the program does terminal interaction, make it output a short
1992notice like this when it starts in an interactive mode:
1993
1994@smallexample
1995@var{program} Copyright (C) @var{year} @var{name of author}
1996This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
1997This is free software, and you are welcome to redistribute it
1998under certain conditions; type @samp{show c} for details.
1999@end smallexample
2000
2001The hypothetical commands @samp{show w} and @samp{show c} should show
2002the appropriate parts of the General Public License. Of course, your
2003program's commands might be different; for a GUI interface, you would
2004use an ``about box''.
2005
2006You should also get your employer (if you work as a programmer) or school,
2007if any, to sign a ``copyright disclaimer'' for the program, if necessary.
2008For more information on this, and how to apply and follow the GNU GPL, see
2009@url{http://www.gnu.org/licenses/}.
2010
2011The GNU General Public License does not permit incorporating your
2012program into proprietary programs. If your program is a subroutine
2013library, you may consider it more useful to permit linking proprietary
2014applications with the library. If this is what you want to do, use
2015the GNU Lesser General Public License instead of this License. But
2016first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
2017
2018 1301
2019@node GNU Free Documentation License, Emacs Invocation, Copying, Top 1302@node GNU Free Documentation License, Emacs Invocation, Copying, Top
2020@appendix GNU Free Documentation License 1303@appendix GNU Free Documentation License
diff --git a/man/gpl.texi b/man/gpl.texi
new file mode 100644
index 00000000000..5b416d3cb41
--- /dev/null
+++ b/man/gpl.texi
@@ -0,0 +1,721 @@
1@c The GNU General Public License.
2@center Version 3, 29 June 2007
3
4@c This file is intended to be included within another document,
5@c hence no sectioning command or @node.
6
7@display
8Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
9
10Everyone is permitted to copy and distribute verbatim copies of this
11license document, but changing it is not allowed.
12@end display
13
14@heading Preamble
15
16The GNU General Public License is a free, copyleft license for
17software and other kinds of works.
18
19The licenses for most software and other practical works are designed
20to take away your freedom to share and change the works. By contrast,
21the GNU General Public License is intended to guarantee your freedom
22to share and change all versions of a program---to make sure it remains
23free software for all its users. We, the Free Software Foundation,
24use the GNU General Public License for most of our software; it
25applies also to any other work released this way by its authors. You
26can apply it to your programs, too.
27
28When we speak of free software, we are referring to freedom, not
29price. Our General Public Licenses are designed to make sure that you
30have the freedom to distribute copies of free software (and charge for
31them if you wish), that you receive source code or can get it if you
32want it, that you can change the software or use pieces of it in new
33free programs, and that you know you can do these things.
34
35To protect your rights, we need to prevent others from denying you
36these rights or asking you to surrender the rights. Therefore, you
37have certain responsibilities if you distribute copies of the
38software, or if you modify it: responsibilities to respect the freedom
39of others.
40
41For example, if you distribute copies of such a program, whether
42gratis or for a fee, you must pass on to the recipients the same
43freedoms that you received. You must make sure that they, too,
44receive or can get the source code. And you must show them these
45terms so they know their rights.
46
47Developers that use the GNU GPL protect your rights with two steps:
48(1) assert copyright on the software, and (2) offer you this License
49giving you legal permission to copy, distribute and/or modify it.
50
51For the developers' and authors' protection, the GPL clearly explains
52that there is no warranty for this free software. For both users' and
53authors' sake, the GPL requires that modified versions be marked as
54changed, so that their problems will not be attributed erroneously to
55authors of previous versions.
56
57Some devices are designed to deny users access to install or run
58modified versions of the software inside them, although the
59manufacturer can do so. This is fundamentally incompatible with the
60aim of protecting users' freedom to change the software. The
61systematic pattern of such abuse occurs in the area of products for
62individuals to use, which is precisely where it is most unacceptable.
63Therefore, we have designed this version of the GPL to prohibit the
64practice for those products. If such problems arise substantially in
65other domains, we stand ready to extend this provision to those
66domains in future versions of the GPL, as needed to protect the
67freedom of users.
68
69Finally, every program is threatened constantly by software patents.
70States should not allow patents to restrict development and use of
71software on general-purpose computers, but in those that do, we wish
72to avoid the special danger that patents applied to a free program
73could make it effectively proprietary. To prevent this, the GPL
74assures that patents cannot be used to render the program non-free.
75
76The precise terms and conditions for copying, distribution and
77modification follow.
78
79@heading TERMS AND CONDITIONS
80
81@enumerate 0
82@item Definitions.
83
84``This License'' refers to version 3 of the GNU General Public License.
85
86``Copyright'' also means copyright-like laws that apply to other kinds
87of works, such as semiconductor masks.
88
89``The Program'' refers to any copyrightable work licensed under this
90License. Each licensee is addressed as ``you''. ``Licensees'' and
91``recipients'' may be individuals or organizations.
92
93To ``modify'' a work means to copy from or adapt all or part of the work
94in a fashion requiring copyright permission, other than the making of
95an exact copy. The resulting work is called a ``modified version'' of
96the earlier work or a work ``based on'' the earlier work.
97
98A ``covered work'' means either the unmodified Program or a work based
99on the Program.
100
101To ``propagate'' a work means to do anything with it that, without
102permission, would make you directly or secondarily liable for
103infringement under applicable copyright law, except executing it on a
104computer or modifying a private copy. Propagation includes copying,
105distribution (with or without modification), making available to the
106public, and in some countries other activities as well.
107
108To ``convey'' a work means any kind of propagation that enables other
109parties to make or receive copies. Mere interaction with a user
110through a computer network, with no transfer of a copy, is not
111conveying.
112
113An interactive user interface displays ``Appropriate Legal Notices'' to
114the extent that it includes a convenient and prominently visible
115feature that (1) displays an appropriate copyright notice, and (2)
116tells the user that there is no warranty for the work (except to the
117extent that warranties are provided), that licensees may convey the
118work under this License, and how to view a copy of this License. If
119the interface presents a list of user commands or options, such as a
120menu, a prominent item in the list meets this criterion.
121
122@item Source Code.
123
124The ``source code'' for a work means the preferred form of the work for
125making modifications to it. ``Object code'' means any non-source form
126of a work.
127
128A ``Standard Interface'' means an interface that either is an official
129standard defined by a recognized standards body, or, in the case of
130interfaces specified for a particular programming language, one that
131is widely used among developers working in that language.
132
133The ``System Libraries'' of an executable work include anything, other
134than the work as a whole, that (a) is included in the normal form of
135packaging a Major Component, but which is not part of that Major
136Component, and (b) serves only to enable use of the work with that
137Major Component, or to implement a Standard Interface for which an
138implementation is available to the public in source code form. A
139``Major Component'', in this context, means a major essential component
140(kernel, window system, and so on) of the specific operating system
141(if any) on which the executable work runs, or a compiler used to
142produce the work, or an object code interpreter used to run it.
143
144The ``Corresponding Source'' for a work in object code form means all
145the source code needed to generate, install, and (for an executable
146work) run the object code and to modify the work, including scripts to
147control those activities. However, it does not include the work's
148System Libraries, or general-purpose tools or generally available free
149programs which are used unmodified in performing those activities but
150which are not part of the work. For example, Corresponding Source
151includes interface definition files associated with source files for
152the work, and the source code for shared libraries and dynamically
153linked subprograms that the work is specifically designed to require,
154such as by intimate data communication or control flow between those
155subprograms and other parts of the work.
156
157The Corresponding Source need not include anything that users can
158regenerate automatically from other parts of the Corresponding Source.
159
160The Corresponding Source for a work in source code form is that same
161work.
162
163@item Basic Permissions.
164
165All rights granted under this License are granted for the term of
166copyright on the Program, and are irrevocable provided the stated
167conditions are met. This License explicitly affirms your unlimited
168permission to run the unmodified Program. The output from running a
169covered work is covered by this License only if the output, given its
170content, constitutes a covered work. This License acknowledges your
171rights of fair use or other equivalent, as provided by copyright law.
172
173You may make, run and propagate covered works that you do not convey,
174without conditions so long as your license otherwise remains in force.
175You may convey covered works to others for the sole purpose of having
176them make modifications exclusively for you, or provide you with
177facilities for running those works, provided that you comply with the
178terms of this License in conveying all material for which you do not
179control copyright. Those thus making or running the covered works for
180you must do so exclusively on your behalf, under your direction and
181control, on terms that prohibit them from making any copies of your
182copyrighted material outside their relationship with you.
183
184Conveying under any other circumstances is permitted solely under the
185conditions stated below. Sublicensing is not allowed; section 10
186makes it unnecessary.
187
188@item Protecting Users' Legal Rights From Anti-Circumvention Law.
189
190No covered work shall be deemed part of an effective technological
191measure under any applicable law fulfilling obligations under article
19211 of the WIPO copyright treaty adopted on 20 December 1996, or
193similar laws prohibiting or restricting circumvention of such
194measures.
195
196When you convey a covered work, you waive any legal power to forbid
197circumvention of technological measures to the extent such
198circumvention is effected by exercising rights under this License with
199respect to the covered work, and you disclaim any intention to limit
200operation or modification of the work as a means of enforcing, against
201the work's users, your or third parties' legal rights to forbid
202circumvention of technological measures.
203
204@item Conveying Verbatim Copies.
205
206You may convey verbatim copies of the Program's source code as you
207receive it, in any medium, provided that you conspicuously and
208appropriately publish on each copy an appropriate copyright notice;
209keep intact all notices stating that this License and any
210non-permissive terms added in accord with section 7 apply to the code;
211keep intact all notices of the absence of any warranty; and give all
212recipients a copy of this License along with the Program.
213
214You may charge any price or no price for each copy that you convey,
215and you may offer support or warranty protection for a fee.
216
217@item Conveying Modified Source Versions.
218
219You may convey a work based on the Program, or the modifications to
220produce it from the Program, in the form of source code under the
221terms of section 4, provided that you also meet all of these
222conditions:
223
224@enumerate a
225@item
226The work must carry prominent notices stating that you modified it,
227and giving a relevant date.
228
229@item
230The work must carry prominent notices stating that it is released
231under this License and any conditions added under section 7. This
232requirement modifies the requirement in section 4 to ``keep intact all
233notices''.
234
235@item
236You must license the entire work, as a whole, under this License to
237anyone who comes into possession of a copy. This License will
238therefore apply, along with any applicable section 7 additional terms,
239to the whole of the work, and all its parts, regardless of how they
240are packaged. This License gives no permission to license the work in
241any other way, but it does not invalidate such permission if you have
242separately received it.
243
244@item
245If the work has interactive user interfaces, each must display
246Appropriate Legal Notices; however, if the Program has interactive
247interfaces that do not display Appropriate Legal Notices, your work
248need not make them do so.
249@end enumerate
250
251A compilation of a covered work with other separate and independent
252works, which are not by their nature extensions of the covered work,
253and which are not combined with it such as to form a larger program,
254in or on a volume of a storage or distribution medium, is called an
255``aggregate'' if the compilation and its resulting copyright are not
256used to limit the access or legal rights of the compilation's users
257beyond what the individual works permit. Inclusion of a covered work
258in an aggregate does not cause this License to apply to the other
259parts of the aggregate.
260
261@item Conveying Non-Source Forms.
262
263You may convey a covered work in object code form under the terms of
264sections 4 and 5, provided that you also convey the machine-readable
265Corresponding Source under the terms of this License, in one of these
266ways:
267
268@enumerate a
269@item
270Convey the object code in, or embodied in, a physical product
271(including a physical distribution medium), accompanied by the
272Corresponding Source fixed on a durable physical medium customarily
273used for software interchange.
274
275@item
276Convey the object code in, or embodied in, a physical product
277(including a physical distribution medium), accompanied by a written
278offer, valid for at least three years and valid for as long as you
279offer spare parts or customer support for that product model, to give
280anyone who possesses the object code either (1) a copy of the
281Corresponding Source for all the software in the product that is
282covered by this License, on a durable physical medium customarily used
283for software interchange, for a price no more than your reasonable
284cost of physically performing this conveying of source, or (2) access
285to copy the Corresponding Source from a network server at no charge.
286
287@item
288Convey individual copies of the object code with a copy of the written
289offer to provide the Corresponding Source. This alternative is
290allowed only occasionally and noncommercially, and only if you
291received the object code with such an offer, in accord with subsection
2926b.
293
294@item
295Convey the object code by offering access from a designated place
296(gratis or for a charge), and offer equivalent access to the
297Corresponding Source in the same way through the same place at no
298further charge. You need not require recipients to copy the
299Corresponding Source along with the object code. If the place to copy
300the object code is a network server, the Corresponding Source may be
301on a different server (operated by you or a third party) that supports
302equivalent copying facilities, provided you maintain clear directions
303next to the object code saying where to find the Corresponding Source.
304Regardless of what server hosts the Corresponding Source, you remain
305obligated to ensure that it is available for as long as needed to
306satisfy these requirements.
307
308@item
309Convey the object code using peer-to-peer transmission, provided you
310inform other peers where the object code and Corresponding Source of
311the work are being offered to the general public at no charge under
312subsection 6d.
313
314@end enumerate
315
316A separable portion of the object code, whose source code is excluded
317from the Corresponding Source as a System Library, need not be
318included in conveying the object code work.
319
320A ``User Product'' is either (1) a ``consumer product'', which means any
321tangible personal property which is normally used for personal,
322family, or household purposes, or (2) anything designed or sold for
323incorporation into a dwelling. In determining whether a product is a
324consumer product, doubtful cases shall be resolved in favor of
325coverage. For a particular product received by a particular user,
326``normally used'' refers to a typical or common use of that class of
327product, regardless of the status of the particular user or of the way
328in which the particular user actually uses, or expects or is expected
329to use, the product. A product is a consumer product regardless of
330whether the product has substantial commercial, industrial or
331non-consumer uses, unless such uses represent the only significant
332mode of use of the product.
333
334``Installation Information'' for a User Product means any methods,
335procedures, authorization keys, or other information required to
336install and execute modified versions of a covered work in that User
337Product from a modified version of its Corresponding Source. The
338information must suffice to ensure that the continued functioning of
339the modified object code is in no case prevented or interfered with
340solely because modification has been made.
341
342If you convey an object code work under this section in, or with, or
343specifically for use in, a User Product, and the conveying occurs as
344part of a transaction in which the right of possession and use of the
345User Product is transferred to the recipient in perpetuity or for a
346fixed term (regardless of how the transaction is characterized), the
347Corresponding Source conveyed under this section must be accompanied
348by the Installation Information. But this requirement does not apply
349if neither you nor any third party retains the ability to install
350modified object code on the User Product (for example, the work has
351been installed in ROM).
352
353The requirement to provide Installation Information does not include a
354requirement to continue to provide support service, warranty, or
355updates for a work that has been modified or installed by the
356recipient, or for the User Product in which it has been modified or
357installed. Access to a network may be denied when the modification
358itself materially and adversely affects the operation of the network
359or violates the rules and protocols for communication across the
360network.
361
362Corresponding Source conveyed, and Installation Information provided,
363in accord with this section must be in a format that is publicly
364documented (and with an implementation available to the public in
365source code form), and must require no special password or key for
366unpacking, reading or copying.
367
368@item Additional Terms.
369
370``Additional permissions'' are terms that supplement the terms of this
371License by making exceptions from one or more of its conditions.
372Additional permissions that are applicable to the entire Program shall
373be treated as though they were included in this License, to the extent
374that they are valid under applicable law. If additional permissions
375apply only to part of the Program, that part may be used separately
376under those permissions, but the entire Program remains governed by
377this License without regard to the additional permissions.
378
379When you convey a copy of a covered work, you may at your option
380remove any additional permissions from that copy, or from any part of
381it. (Additional permissions may be written to require their own
382removal in certain cases when you modify the work.) You may place
383additional permissions on material, added by you to a covered work,
384for which you have or can give appropriate copyright permission.
385
386Notwithstanding any other provision of this License, for material you
387add to a covered work, you may (if authorized by the copyright holders
388of that material) supplement the terms of this License with terms:
389
390@enumerate a
391@item
392Disclaiming warranty or limiting liability differently from the terms
393of sections 15 and 16 of this License; or
394
395@item
396Requiring preservation of specified reasonable legal notices or author
397attributions in that material or in the Appropriate Legal Notices
398displayed by works containing it; or
399
400@item
401Prohibiting misrepresentation of the origin of that material, or
402requiring that modified versions of such material be marked in
403reasonable ways as different from the original version; or
404
405@item
406Limiting the use for publicity purposes of names of licensors or
407authors of the material; or
408
409@item
410Declining to grant rights under trademark law for use of some trade
411names, trademarks, or service marks; or
412
413@item
414Requiring indemnification of licensors and authors of that material by
415anyone who conveys the material (or modified versions of it) with
416contractual assumptions of liability to the recipient, for any
417liability that these contractual assumptions directly impose on those
418licensors and authors.
419@end enumerate
420
421All other non-permissive additional terms are considered ``further
422restrictions'' within the meaning of section 10. If the Program as you
423received it, or any part of it, contains a notice stating that it is
424governed by this License along with a term that is a further
425restriction, you may remove that term. If a license document contains
426a further restriction but permits relicensing or conveying under this
427License, you may add to a covered work material governed by the terms
428of that license document, provided that the further restriction does
429not survive such relicensing or conveying.
430
431If you add terms to a covered work in accord with this section, you
432must place, in the relevant source files, a statement of the
433additional terms that apply to those files, or a notice indicating
434where to find the applicable terms.
435
436Additional terms, permissive or non-permissive, may be stated in the
437form of a separately written license, or stated as exceptions; the
438above requirements apply either way.
439
440@item Termination.
441
442You may not propagate or modify a covered work except as expressly
443provided under this License. Any attempt otherwise to propagate or
444modify it is void, and will automatically terminate your rights under
445this License (including any patent licenses granted under the third
446paragraph of section 11).
447
448However, if you cease all violation of this License, then your license
449from a particular copyright holder is reinstated (a) provisionally,
450unless and until the copyright holder explicitly and finally
451terminates your license, and (b) permanently, if the copyright holder
452fails to notify you of the violation by some reasonable means prior to
45360 days after the cessation.
454
455Moreover, your license from a particular copyright holder is
456reinstated permanently if the copyright holder notifies you of the
457violation by some reasonable means, this is the first time you have
458received notice of violation of this License (for any work) from that
459copyright holder, and you cure the violation prior to 30 days after
460your receipt of the notice.
461
462Termination of your rights under this section does not terminate the
463licenses of parties who have received copies or rights from you under
464this License. If your rights have been terminated and not permanently
465reinstated, you do not qualify to receive new licenses for the same
466material under section 10.
467
468@item Acceptance Not Required for Having Copies.
469
470You are not required to accept this License in order to receive or run
471a copy of the Program. Ancillary propagation of a covered work
472occurring solely as a consequence of using peer-to-peer transmission
473to receive a copy likewise does not require acceptance. However,
474nothing other than this License grants you permission to propagate or
475modify any covered work. These actions infringe copyright if you do
476not accept this License. Therefore, by modifying or propagating a
477covered work, you indicate your acceptance of this License to do so.
478
479@item Automatic Licensing of Downstream Recipients.
480
481Each time you convey a covered work, the recipient automatically
482receives a license from the original licensors, to run, modify and
483propagate that work, subject to this License. You are not responsible
484for enforcing compliance by third parties with this License.
485
486An ``entity transaction'' is a transaction transferring control of an
487organization, or substantially all assets of one, or subdividing an
488organization, or merging organizations. If propagation of a covered
489work results from an entity transaction, each party to that
490transaction who receives a copy of the work also receives whatever
491licenses to the work the party's predecessor in interest had or could
492give under the previous paragraph, plus a right to possession of the
493Corresponding Source of the work from the predecessor in interest, if
494the predecessor has it or can get it with reasonable efforts.
495
496You may not impose any further restrictions on the exercise of the
497rights granted or affirmed under this License. For example, you may
498not impose a license fee, royalty, or other charge for exercise of
499rights granted under this License, and you may not initiate litigation
500(including a cross-claim or counterclaim in a lawsuit) alleging that
501any patent claim is infringed by making, using, selling, offering for
502sale, or importing the Program or any portion of it.
503
504@item Patents.
505
506A ``contributor'' is a copyright holder who authorizes use under this
507License of the Program or a work on which the Program is based. The
508work thus licensed is called the contributor's ``contributor version''.
509
510A contributor's ``essential patent claims'' are all patent claims owned
511or controlled by the contributor, whether already acquired or
512hereafter acquired, that would be infringed by some manner, permitted
513by this License, of making, using, or selling its contributor version,
514but do not include claims that would be infringed only as a
515consequence of further modification of the contributor version. For
516purposes of this definition, ``control'' includes the right to grant
517patent sublicenses in a manner consistent with the requirements of
518this License.
519
520Each contributor grants you a non-exclusive, worldwide, royalty-free
521patent license under the contributor's essential patent claims, to
522make, use, sell, offer for sale, import and otherwise run, modify and
523propagate the contents of its contributor version.
524
525In the following three paragraphs, a ``patent license'' is any express
526agreement or commitment, however denominated, not to enforce a patent
527(such as an express permission to practice a patent or covenant not to
528sue for patent infringement). To ``grant'' such a patent license to a
529party means to make such an agreement or commitment not to enforce a
530patent against the party.
531
532If you convey a covered work, knowingly relying on a patent license,
533and the Corresponding Source of the work is not available for anyone
534to copy, free of charge and under the terms of this License, through a
535publicly available network server or other readily accessible means,
536then you must either (1) cause the Corresponding Source to be so
537available, or (2) arrange to deprive yourself of the benefit of the
538patent license for this particular work, or (3) arrange, in a manner
539consistent with the requirements of this License, to extend the patent
540license to downstream recipients. ``Knowingly relying'' means you have
541actual knowledge that, but for the patent license, your conveying the
542covered work in a country, or your recipient's use of the covered work
543in a country, would infringe one or more identifiable patents in that
544country that you have reason to believe are valid.
545
546If, pursuant to or in connection with a single transaction or
547arrangement, you convey, or propagate by procuring conveyance of, a
548covered work, and grant a patent license to some of the parties
549receiving the covered work authorizing them to use, propagate, modify
550or convey a specific copy of the covered work, then the patent license
551you grant is automatically extended to all recipients of the covered
552work and works based on it.
553
554A patent license is ``discriminatory'' if it does not include within the
555scope of its coverage, prohibits the exercise of, or is conditioned on
556the non-exercise of one or more of the rights that are specifically
557granted under this License. You may not convey a covered work if you
558are a party to an arrangement with a third party that is in the
559business of distributing software, under which you make payment to the
560third party based on the extent of your activity of conveying the
561work, and under which the third party grants, to any of the parties
562who would receive the covered work from you, a discriminatory patent
563license (a) in connection with copies of the covered work conveyed by
564you (or copies made from those copies), or (b) primarily for and in
565connection with specific products or compilations that contain the
566covered work, unless you entered into that arrangement, or that patent
567license was granted, prior to 28 March 2007.
568
569Nothing in this License shall be construed as excluding or limiting
570any implied license or other defenses to infringement that may
571otherwise be available to you under applicable patent law.
572
573@item No Surrender of Others' Freedom.
574
575If conditions are imposed on you (whether by court order, agreement or
576otherwise) that contradict the conditions of this License, they do not
577excuse you from the conditions of this License. If you cannot convey
578a covered work so as to satisfy simultaneously your obligations under
579this License and any other pertinent obligations, then as a
580consequence you may not convey it at all. For example, if you agree
581to terms that obligate you to collect a royalty for further conveying
582from those to whom you convey the Program, the only way you could
583satisfy both those terms and this License would be to refrain entirely
584from conveying the Program.
585
586@item Use with the GNU Affero General Public License.
587
588Notwithstanding any other provision of this License, you have
589permission to link or combine any covered work with a work licensed
590under version 3 of the GNU Affero General Public License into a single
591combined work, and to convey the resulting work. The terms of this
592License will continue to apply to the part which is the covered work,
593but the special requirements of the GNU Affero General Public License,
594section 13, concerning interaction through a network will apply to the
595combination as such.
596
597@item Revised Versions of this License.
598
599The Free Software Foundation may publish revised and/or new versions
600of the GNU General Public License from time to time. Such new
601versions will be similar in spirit to the present version, but may
602differ in detail to address new problems or concerns.
603
604Each version is given a distinguishing version number. If the Program
605specifies that a certain numbered version of the GNU General Public
606License ``or any later version'' applies to it, you have the option of
607following the terms and conditions either of that numbered version or
608of any later version published by the Free Software Foundation. If
609the Program does not specify a version number of the GNU General
610Public License, you may choose any version ever published by the Free
611Software Foundation.
612
613If the Program specifies that a proxy can decide which future versions
614of the GNU General Public License can be used, that proxy's public
615statement of acceptance of a version permanently authorizes you to
616choose that version for the Program.
617
618Later license versions may give you additional or different
619permissions. However, no additional obligations are imposed on any
620author or copyright holder as a result of your choosing to follow a
621later version.
622
623@item Disclaimer of Warranty.
624
625THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
626APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
627HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
628WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
629LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
630A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
631PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
632DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
633CORRECTION.
634
635@item Limitation of Liability.
636
637IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
638WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
639CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
640INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
641ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
642NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
643LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
644TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
645PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
646
647@item Interpretation of Sections 15 and 16.
648
649If the disclaimer of warranty and limitation of liability provided
650above cannot be given local legal effect according to their terms,
651reviewing courts shall apply local law that most closely approximates
652an absolute waiver of all civil liability in connection with the
653Program, unless a warranty or assumption of liability accompanies a
654copy of the Program in return for a fee.
655
656@end enumerate
657
658@heading END OF TERMS AND CONDITIONS
659
660@heading How to Apply These Terms to Your New Programs
661
662If you develop a new program, and you want it to be of the greatest
663possible use to the public, the best way to achieve this is to make it
664free software which everyone can redistribute and change under these
665terms.
666
667To do so, attach the following notices to the program. It is safest
668to attach them to the start of each source file to most effectively
669state the exclusion of warranty; and each file should have at least
670the ``copyright'' line and a pointer to where the full notice is found.
671
672@smallexample
673@var{one line to give the program's name and a brief idea of what it does.}
674Copyright (C) @var{year} @var{name of author}
675
676This program is free software: you can redistribute it and/or modify
677it under the terms of the GNU General Public License as published by
678the Free Software Foundation, either version 3 of the License, or (at
679your option) any later version.
680
681This program is distributed in the hope that it will be useful, but
682WITHOUT ANY WARRANTY; without even the implied warranty of
683MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
684General Public License for more details.
685
686You should have received a copy of the GNU General Public License
687along with this program. If not, see @url{http://www.gnu.org/licenses/}.
688@end smallexample
689
690Also add information on how to contact you by electronic and paper mail.
691
692If the program does terminal interaction, make it output a short
693notice like this when it starts in an interactive mode:
694
695@smallexample
696@var{program} Copyright (C) @var{year} @var{name of author}
697This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
698This is free software, and you are welcome to redistribute it
699under certain conditions; type @samp{show c} for details.
700@end smallexample
701
702The hypothetical commands @samp{show w} and @samp{show c} should show
703the appropriate parts of the General Public License. Of course, your
704program's commands might be different; for a GUI interface, you would
705use an ``about box''.
706
707You should also get your employer (if you work as a programmer) or school,
708if any, to sign a ``copyright disclaimer'' for the program, if necessary.
709For more information on this, and how to apply and follow the GNU GPL, see
710@url{http://www.gnu.org/licenses/}.
711
712The GNU General Public License does not permit incorporating your
713program into proprietary programs. If your program is a subroutine
714library, you may consider it more useful to permit linking proprietary
715applications with the library. If this is what you want to do, use
716the GNU Lesser General Public License instead of this License. But
717first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
718
719@ignore
720 arch-tag: 0c4a2556-f87e-464f-9b1d-efd920fcaf67
721@end ignore
diff --git a/man/tramp.texi b/man/tramp.texi
index 235f0b65254..fc425c8e342 100644
--- a/man/tramp.texi
+++ b/man/tramp.texi
@@ -2451,7 +2451,7 @@ of the operations, or one could try to improve their performance.
2451Use an external transfer method, like @option{scpc}. 2451Use an external transfer method, like @option{scpc}.
2452 2452
2453Use caching. This is already enabled by default. Information about 2453Use caching. This is already enabled by default. Information about
2454the remote host as well as the remote files are cached for reuse. Th 2454the remote host as well as the remote files are cached for reuse. The
2455information about remote hosts is kept in the file specified in 2455information about remote hosts is kept in the file specified in
2456@code{tramp-persistency-file-name}. Keep this file. 2456@code{tramp-persistency-file-name}. Keep this file.
2457 2457
@@ -2632,7 +2632,11 @@ should put it into your @file{~/.emacs}:
2632 my-mode-line-buffer-identification))) 2632 my-mode-line-buffer-identification)))
2633@end lisp 2633@end lisp
2634 2634
2635Since @value{emacsname} 23, the @code{:eval} clause can be simplified: 2635Since @value{emacsname} 23.1, the mode line contains an indication if
2636@code{default-directory} for the current buffer is on a remote host.
2637The corresponding tooltip includes the name of that host. If you
2638still want the host name as part of the mode line, you can use the
2639example above, but the @code{:eval} clause can be simplified:
2636 2640
2637@lisp 2641@lisp
2638 '(:eval 2642 '(:eval
diff --git a/man/trampver.texi b/man/trampver.texi
index 877488c63e6..4ed196a80f0 100644
--- a/man/trampver.texi
+++ b/man/trampver.texi
@@ -4,12 +4,12 @@
4@c In the Tramp CVS, the version number is auto-frobbed from 4@c In the Tramp CVS, the version number is auto-frobbed from
5@c configure.ac, so you should edit that file and run 5@c configure.ac, so you should edit that file and run
6@c "autoconf && ./configure" to change the version number. 6@c "autoconf && ./configure" to change the version number.
7@set trampver 2.1.10 7@set trampver 2.1.11-pre
8 8
9@c Other flags from configuration 9@c Other flags from configuration
10@set instprefix /usr/local 10@set instprefix /usr/local
11@set lispdir /usr/local/share/emacs/site-lisp 11@set lispdir /usr/local/share/emacs/site-lisp
12@set infodir /usr/local/share/info 12@set infodir /usr/local/info
13 13
14@c Formatting of the tramp program name consistent. 14@c Formatting of the tramp program name consistent.
15@set tramp @sc{tramp} 15@set tramp @sc{tramp}
diff --git a/src/ChangeLog b/src/ChangeLog
index d8668be9400..8c6d978a09f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,45 @@
12007-07-30 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * puresize.h (BASE_PURESIZE): Increase to 1130000.
4
52007-07-30 Richard Stallman <rms@gnu.org>
6
7 * lread.c (readevalloop, read1): Treat NBSP as whitespace.
8
92007-07-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
10
11 * gmalloc.c (__malloc_initialize): Remove pthread_once. Not needed.
12
132007-07-28 Nick Roberts <nickrob@snap.net.nz>
14
15 * xdisp.c (decode_mode_spec): Use '@' instead of 'R' to test for
16 remote default-directory.
17
18 * buffer.c (mode-line-format): Update doc string.
19
202007-07-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
21
22 * w32term.c (w32_draw_fringe_bitmap): Extend fringe background to
23 scroll bar gap.
24 (x_scroll_bar_create): Set bar->fringe_extended_p.
25 (w32_set_vertical_scroll_bar): Put leftmost/rightmost scroll bars
26 on frame edge. Check fringe background extension. Don't clear
27 extended fringe background area.
28
29 * w32term.h (struct scroll_bar): New member fringe_extended_p.
30 (w32_fill_area): Enclose multiple statements with do ... while (0).
31
32 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
33 Extend fringe background to scroll bar gap.
34 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]:
35 Set bar->fringe_extended_p.
36 (XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
37 Put leftmost/rightmost scroll bars on frame edge. Check fringe
38 background extension. Don't clear extended fringe background area.
39
40 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
41 New member fringe_extended_p.
42
12007-07-25 Glenn Morris <rgm@gnu.org> 432007-07-25 Glenn Morris <rgm@gnu.org>
2 44
3 * Relicense all FSF files to GPLv3 or later. 45 * Relicense all FSF files to GPLv3 or later.
diff --git a/src/buffer.c b/src/buffer.c
index 0f38851e9eb..3a2b9460c17 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5517,12 +5517,12 @@ A string is printed verbatim in the mode line except for %-constructs:
5517 %P -- print percent of buffer above bottom of window, perhaps plus Top, 5517 %P -- print percent of buffer above bottom of window, perhaps plus Top,
5518 or print Bottom or All. 5518 or print Bottom or All.
5519 %n -- print Narrow if appropriate. 5519 %n -- print Narrow if appropriate.
5520 %R -- print R or hyphen. R means that default-directory is on a
5521 remote machine.
5522 %t -- visited file is text or binary (if OS supports this distinction). 5520 %t -- visited file is text or binary (if OS supports this distinction).
5523 %z -- print mnemonics of keyboard, terminal, and buffer coding systems. 5521 %z -- print mnemonics of keyboard, terminal, and buffer coding systems.
5524 %Z -- like %z, but including the end-of-line format. 5522 %Z -- like %z, but including the end-of-line format.
5525 %e -- print error message about full memory. 5523 %e -- print error message about full memory.
5524 %@ -- print @ or hyphen. @ means that default-directory is on a
5525 remote machine.
5526 %[ -- print one [ for each recursive editing level. %] similar. 5526 %[ -- print one [ for each recursive editing level. %] similar.
5527 %% -- print %. %- -- print infinitely many dashes. 5527 %% -- print %. %- -- print infinitely many dashes.
5528Decimal digits after the % specify field width to which to pad. */); 5528Decimal digits after the % specify field width to which to pad. */);
diff --git a/src/gmalloc.c b/src/gmalloc.c
index fcd9f655321..cf79b9159f2 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -561,7 +561,6 @@ register_heapinfo ()
561} 561}
562 562
563#ifdef USE_PTHREAD 563#ifdef USE_PTHREAD
564static pthread_once_t malloc_init_once_control = PTHREAD_ONCE_INIT;
565pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; 564pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
566pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; 565pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
567#endif 566#endif
@@ -607,18 +606,16 @@ malloc_initialize_1 ()
607 return; 606 return;
608} 607}
609 608
610/* Set everything up and remember that we have. */ 609/* Set everything up and remember that we have.
610 main will call malloc which calls this function. That is before any threads
611 or signal handlers has been set up, so we don't need thread protection. */
611int 612int
612__malloc_initialize () 613__malloc_initialize ()
613{ 614{
614#ifdef USE_PTHREAD
615 pthread_once (&malloc_init_once_control, malloc_initialize_1);
616#else
617 if (__malloc_initialized) 615 if (__malloc_initialized)
618 return 0; 616 return 0;
619 617
620 malloc_initialize_1 (); 618 malloc_initialize_1 ();
621#endif
622 619
623 return __malloc_initialized; 620 return __malloc_initialized;
624} 621}
diff --git a/src/lread.c b/src/lread.c
index c74b45fbd5d..6ca7121b363 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1697,7 +1697,8 @@ readevalloop (readcharfun, stream, sourcename, evalfun,
1697 } 1697 }
1698 1698
1699 /* Ignore whitespace here, so we can detect eof. */ 1699 /* Ignore whitespace here, so we can detect eof. */
1700 if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r') 1700 if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r'
1701 || c == 0x8a0) /* NBSP */
1701 goto read_next; 1702 goto read_next;
1702 1703
1703 if (!NILP (Vpurify_flag) && c == '(') 1704 if (!NILP (Vpurify_flag) && c == '(')
@@ -2808,7 +2809,9 @@ read1 (readcharfun, pch, first_in_list)
2808 } 2809 }
2809 default: 2810 default:
2810 default_label: 2811 default_label:
2811 if (c <= 040) goto retry; 2812 if (c <= 040) goto retry;
2813 if (c == 0x8a0) /* NBSP */
2814 goto retry;
2812 { 2815 {
2813 char *p = read_buffer; 2816 char *p = read_buffer;
2814 int quoted = 0; 2817 int quoted = 0;
@@ -2817,6 +2820,7 @@ read1 (readcharfun, pch, first_in_list)
2817 char *end = read_buffer + read_buffer_size; 2820 char *end = read_buffer + read_buffer_size;
2818 2821
2819 while (c > 040 2822 while (c > 040
2823 && c != 0x8a0 /* NBSP */
2820 && (c >= 0200 2824 && (c >= 0200
2821 || (!index ("\"';()[]#", c) 2825 || (!index ("\"';()[]#", c)
2822 && !(!first_in_list && c == '`') 2826 && !(!first_in_list && c == '`')
diff --git a/src/puresize.h b/src/puresize.h
index 49cb9b1b387..c6456730075 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -43,7 +43,7 @@ Boston, MA 02110-1301, USA. */
43#endif 43#endif
44 44
45#ifndef BASE_PURESIZE 45#ifndef BASE_PURESIZE
46#define BASE_PURESIZE (1120000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) 46#define BASE_PURESIZE (1130000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
47#endif 47#endif
48 48
49/* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ 49/* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */
diff --git a/src/w32term.c b/src/w32term.c
index 78fcb35f6c4..ddb98070b87 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -713,6 +713,60 @@ w32_draw_fringe_bitmap (w, row, p)
713 713
714 hdc = get_frame_dc (f); 714 hdc = get_frame_dc (f);
715 715
716 if (!p->overlay_p)
717 {
718 int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny;
719
720 /* If the fringe is adjacent to the left (right) scroll bar of a
721 leftmost (rightmost, respectively) window, then extend its
722 background to the gap between the fringe and the bar. */
723 if ((WINDOW_LEFTMOST_P (w)
724 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
725 || (WINDOW_RIGHTMOST_P (w)
726 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
727 {
728 int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
729
730 if (sb_width > 0)
731 {
732 int left = WINDOW_SCROLL_BAR_AREA_X (w);
733 int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
734 * FRAME_COLUMN_WIDTH (f));
735
736 if (bx < 0)
737 {
738 /* Bitmap fills the fringe. */
739 if (left + width == p->x)
740 bx = left + sb_width;
741 else if (p->x + p->wd == left)
742 bx = left;
743 if (bx >= 0)
744 {
745 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
746
747 nx = width - sb_width;
748 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
749 row->y));
750 ny = row->visible_height;
751 }
752 }
753 else
754 {
755 if (left + width == bx)
756 {
757 bx = left + sb_width;
758 nx += width - sb_width;
759 }
760 else if (bx + nx == left)
761 nx += width - sb_width;
762 }
763 }
764 }
765
766 if (bx >= 0 && nx > 0)
767 w32_fill_area (f, hdc, face->background, bx, by, nx, ny);
768 }
769
716 /* Must clip because of partially visible lines. */ 770 /* Must clip because of partially visible lines. */
717 rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); 771 rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y);
718 if (p->y < rowY) 772 if (p->y < rowY)
@@ -730,12 +784,6 @@ w32_draw_fringe_bitmap (w, row, p)
730 else 784 else
731 w32_clip_to_row (w, row, -1, hdc); 785 w32_clip_to_row (w, row, -1, hdc);
732 786
733 if (p->bx >= 0 && !p->overlay_p)
734 {
735 w32_fill_area (f, hdc, face->background,
736 p->bx, p->by, p->nx, p->ny);
737 }
738
739 if (p->which && p->which < max_fringe_bmp) 787 if (p->which && p->which < max_fringe_bmp)
740 { 788 {
741 HBITMAP pixmap = fringe_bmp[p->which]; 789 HBITMAP pixmap = fringe_bmp[p->which];
@@ -4072,6 +4120,7 @@ x_scroll_bar_create (w, top, left, width, height)
4072 XSETINT (bar->start, 0); 4120 XSETINT (bar->start, 0);
4073 XSETINT (bar->end, 0); 4121 XSETINT (bar->end, 0);
4074 bar->dragging = Qnil; 4122 bar->dragging = Qnil;
4123 bar->fringe_extended_p = Qnil;
4075 4124
4076 /* Requires geometry to be set before call to create the real window */ 4125 /* Requires geometry to be set before call to create the real window */
4077 4126
@@ -4135,6 +4184,7 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
4135 struct scroll_bar *bar; 4184 struct scroll_bar *bar;
4136 int top, height, left, sb_left, width, sb_width; 4185 int top, height, left, sb_left, width, sb_width;
4137 int window_y, window_height; 4186 int window_y, window_height;
4187 int fringe_extended_p;
4138 4188
4139 /* Get window dimensions. */ 4189 /* Get window dimensions. */
4140 window_box (w, -1, 0, &window_y, 0, &window_height); 4190 window_box (w, -1, 0, &window_y, 0, &window_height);
@@ -4154,9 +4204,20 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
4154 4204
4155 /* Compute the left edge of the scroll bar. */ 4205 /* Compute the left edge of the scroll bar. */
4156 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) 4206 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))
4157 sb_left = left + width - sb_width - (width - sb_width) / 2; 4207 sb_left = left + (WINDOW_RIGHTMOST_P (w) ? width - sb_width : 0);
4208 else
4209 sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width);
4210
4211 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
4212 fringe_extended_p = (WINDOW_LEFTMOST_P (w)
4213 && WINDOW_LEFT_FRINGE_WIDTH (w)
4214 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
4215 || WINDOW_LEFT_MARGIN_COLS (w) == 0));
4158 else 4216 else
4159 sb_left = left + (width - sb_width) / 2; 4217 fringe_extended_p = (WINDOW_RIGHTMOST_P (w)
4218 && WINDOW_RIGHT_FRINGE_WIDTH (w)
4219 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
4220 || WINDOW_RIGHT_MARGIN_COLS (w) == 0));
4160 4221
4161 /* Does the scroll bar exist yet? */ 4222 /* Does the scroll bar exist yet? */
4162 if (NILP (w->vertical_scroll_bar)) 4223 if (NILP (w->vertical_scroll_bar))
@@ -4166,7 +4227,10 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
4166 if (width > 0 && height > 0) 4227 if (width > 0 && height > 0)
4167 { 4228 {
4168 hdc = get_frame_dc (f); 4229 hdc = get_frame_dc (f);
4169 w32_clear_area (f, hdc, left, top, width, height); 4230 if (fringe_extended_p)
4231 w32_clear_area (f, hdc, sb_left, top, sb_width, height);
4232 else
4233 w32_clear_area (f, hdc, left, top, width, height);
4170 release_frame_dc (f, hdc); 4234 release_frame_dc (f, hdc);
4171 } 4235 }
4172 UNBLOCK_INPUT; 4236 UNBLOCK_INPUT;
@@ -4185,7 +4249,8 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
4185 if ( XINT (bar->left) == sb_left 4249 if ( XINT (bar->left) == sb_left
4186 && XINT (bar->top) == top 4250 && XINT (bar->top) == top
4187 && XINT (bar->width) == sb_width 4251 && XINT (bar->width) == sb_width
4188 && XINT (bar->height) == height ) 4252 && XINT (bar->height) == height
4253 && !NILP (bar->fringe_extended_p) == fringe_extended_p )
4189 { 4254 {
4190 /* Redraw after clear_frame. */ 4255 /* Redraw after clear_frame. */
4191 if (!my_show_window (f, hwnd, SW_NORMAL)) 4256 if (!my_show_window (f, hwnd, SW_NORMAL))
@@ -4202,11 +4267,10 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
4202 hdc = get_frame_dc (f); 4267 hdc = get_frame_dc (f);
4203 /* Since Windows scroll bars are smaller than the space reserved 4268 /* Since Windows scroll bars are smaller than the space reserved
4204 for them on the frame, we have to clear "under" them. */ 4269 for them on the frame, we have to clear "under" them. */
4205 w32_clear_area (f, hdc, 4270 if (fringe_extended_p)
4206 left, 4271 w32_clear_area (f, hdc, sb_left, top, sb_width, height);
4207 top, 4272 else
4208 width, 4273 w32_clear_area (f, hdc, left, top, width, height);
4209 height);
4210 release_frame_dc (f, hdc); 4274 release_frame_dc (f, hdc);
4211 } 4275 }
4212 /* Make sure scroll bar is "visible" before moving, to ensure the 4276 /* Make sure scroll bar is "visible" before moving, to ensure the
@@ -4236,6 +4300,8 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
4236 UNBLOCK_INPUT; 4300 UNBLOCK_INPUT;
4237 } 4301 }
4238 } 4302 }
4303 bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil;
4304
4239 w32_set_scroll_bar_thumb (bar, portion, position, whole); 4305 w32_set_scroll_bar_thumb (bar, portion, position, whole);
4240 4306
4241 XSETVECTOR (w->vertical_scroll_bar, bar); 4307 XSETVECTOR (w->vertical_scroll_bar, bar);
diff --git a/src/w32term.h b/src/w32term.h
index 2febf4a33c7..d100cbee222 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -497,6 +497,10 @@ struct scroll_bar {
497 place where the user grabbed it. If the handle isn't currently 497 place where the user grabbed it. If the handle isn't currently
498 being dragged, this is Qnil. */ 498 being dragged, this is Qnil. */
499 Lisp_Object dragging; 499 Lisp_Object dragging;
500
501 /* t if the background of the fringe that is adjacent to a scroll
502 bar is extended to the gap between the fringe and the bar. */
503 Lisp_Object fringe_extended_p;
500}; 504};
501 505
502/* The number of elements a vector holding a struct scroll_bar needs. */ 506/* The number of elements a vector holding a struct scroll_bar needs. */
@@ -586,14 +590,14 @@ extern void w32_fill_rect ();
586extern void w32_clear_window (); 590extern void w32_clear_window ();
587 591
588#define w32_fill_area(f,hdc,pix,x,y,nx,ny) \ 592#define w32_fill_area(f,hdc,pix,x,y,nx,ny) \
589{ \ 593do { \
590 RECT rect; \ 594 RECT rect; \
591 rect.left = x; \ 595 rect.left = x; \
592 rect.top = y; \ 596 rect.top = y; \
593 rect.right = x + nx; \ 597 rect.right = x + nx; \
594 rect.bottom = y + ny; \ 598 rect.bottom = y + ny; \
595 w32_fill_rect (f,hdc,pix,&rect); \ 599 w32_fill_rect (f,hdc,pix,&rect); \
596} 600} while (0)
597 601
598#define w32_clear_rect(f,hdc,lprect) \ 602#define w32_clear_rect(f,hdc,lprect) \
599w32_fill_rect (f,hdc,f->output_data.x->background_pixel,lprect) 603w32_fill_rect (f,hdc,f->output_data.x->background_pixel,lprect)
diff --git a/src/xdisp.c b/src/xdisp.c
index 9d9c40410ba..f18bfc020af 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18144,7 +18144,7 @@ decode_mode_spec (w, c, field_width, precision, multibyte)
18144#endif 18144#endif
18145 break; 18145 break;
18146 18146
18147 case 'R': 18147 case '@':
18148 { 18148 {
18149 Lisp_Object val; 18149 Lisp_Object val;
18150 val = call1 (intern ("file-remote-p"), current_buffer->directory); 18150 val = call1 (intern ("file-remote-p"), current_buffer->directory);
diff --git a/src/xterm.c b/src/xterm.c
index 7ab663f5882..9c1e884c5ad 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -725,8 +725,10 @@ x_draw_fringe_bitmap (w, row, p)
725 else 725 else
726 x_clip_to_row (w, row, -1, gc); 726 x_clip_to_row (w, row, -1, gc);
727 727
728 if (p->bx >= 0 && !p->overlay_p) 728 if (!p->overlay_p)
729 { 729 {
730 int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny;
731
730 /* In case the same realized face is used for fringes and 732 /* In case the same realized face is used for fringes and
731 for something displayed in the text (e.g. face `region' on 733 for something displayed in the text (e.g. face `region' on
732 mono-displays, the fill style may have been changed to 734 mono-displays, the fill style may have been changed to
@@ -736,8 +738,55 @@ x_draw_fringe_bitmap (w, row, p)
736 else 738 else
737 XSetForeground (display, face->gc, face->background); 739 XSetForeground (display, face->gc, face->background);
738 740
739 XFillRectangle (display, window, face->gc, 741#ifdef USE_TOOLKIT_SCROLL_BARS
740 p->bx, p->by, p->nx, p->ny); 742 /* If the fringe is adjacent to the left (right) scroll bar of a
743 leftmost (rightmost, respectively) window, then extend its
744 background to the gap between the fringe and the bar. */
745 if ((WINDOW_LEFTMOST_P (w)
746 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
747 || (WINDOW_RIGHTMOST_P (w)
748 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
749 {
750 int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
751
752 if (sb_width > 0)
753 {
754 int left = WINDOW_SCROLL_BAR_AREA_X (w);
755 int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
756 * FRAME_COLUMN_WIDTH (f));
757
758 if (bx < 0)
759 {
760 /* Bitmap fills the fringe. */
761 if (left + width == p->x)
762 bx = left + sb_width;
763 else if (p->x + p->wd == left)
764 bx = left;
765 if (bx >= 0)
766 {
767 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
768
769 nx = width - sb_width;
770 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
771 row->y));
772 ny = row->visible_height;
773 }
774 }
775 else
776 {
777 if (left + width == bx)
778 {
779 bx = left + sb_width;
780 nx += width - sb_width;
781 }
782 else if (bx + nx == left)
783 nx += width - sb_width;
784 }
785 }
786 }
787#endif
788 if (bx >= 0 && nx > 0)
789 XFillRectangle (display, window, face->gc, bx, by, nx, ny);
741 790
742 if (!face->stipple) 791 if (!face->stipple)
743 XSetForeground (display, face->gc, face->foreground); 792 XSetForeground (display, face->gc, face->foreground);
@@ -5025,6 +5074,9 @@ x_scroll_bar_create (w, top, left, width, height)
5025 XSETINT (bar->start, 0); 5074 XSETINT (bar->start, 0);
5026 XSETINT (bar->end, 0); 5075 XSETINT (bar->end, 0);
5027 bar->dragging = Qnil; 5076 bar->dragging = Qnil;
5077#ifdef USE_TOOLKIT_SCROLL_BARS
5078 bar->fringe_extended_p = Qnil;
5079#endif
5028 5080
5029 /* Add bar to its frame's list of scroll bars. */ 5081 /* Add bar to its frame's list of scroll bars. */
5030 bar->next = FRAME_SCROLL_BARS (f); 5082 bar->next = FRAME_SCROLL_BARS (f);
@@ -5217,6 +5269,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
5217 struct scroll_bar *bar; 5269 struct scroll_bar *bar;
5218 int top, height, left, sb_left, width, sb_width; 5270 int top, height, left, sb_left, width, sb_width;
5219 int window_y, window_height; 5271 int window_y, window_height;
5272#ifdef USE_TOOLKIT_SCROLL_BARS
5273 int fringe_extended_p;
5274#endif
5220 5275
5221 /* Get window dimensions. */ 5276 /* Get window dimensions. */
5222 window_box (w, -1, 0, &window_y, 0, &window_height); 5277 window_box (w, -1, 0, &window_y, 0, &window_height);
@@ -5237,15 +5292,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
5237 /* Compute the left edge of the scroll bar. */ 5292 /* Compute the left edge of the scroll bar. */
5238#ifdef USE_TOOLKIT_SCROLL_BARS 5293#ifdef USE_TOOLKIT_SCROLL_BARS
5239 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) 5294 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))
5240 sb_left = (left + 5295 sb_left = left + (WINDOW_RIGHTMOST_P (w) ? width - sb_width : 0);
5241 (WINDOW_RIGHTMOST_P (w)
5242 ? width - sb_width - (width - sb_width) / 2
5243 : 0));
5244 else 5296 else
5245 sb_left = (left + 5297 sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width);
5246 (WINDOW_LEFTMOST_P (w)
5247 ? (width - sb_width) / 2
5248 : width - sb_width));
5249#else 5298#else
5250 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) 5299 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))
5251 sb_left = left + width - sb_width; 5300 sb_left = left + width - sb_width;
@@ -5253,14 +5302,33 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
5253 sb_left = left; 5302 sb_left = left;
5254#endif 5303#endif
5255 5304
5305#ifdef USE_TOOLKIT_SCROLL_BARS
5306 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
5307 fringe_extended_p = (WINDOW_LEFTMOST_P (w)
5308 && WINDOW_LEFT_FRINGE_WIDTH (w)
5309 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
5310 || WINDOW_LEFT_MARGIN_COLS (w) == 0));
5311 else
5312 fringe_extended_p = (WINDOW_RIGHTMOST_P (w)
5313 && WINDOW_RIGHT_FRINGE_WIDTH (w)
5314 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
5315 || WINDOW_RIGHT_MARGIN_COLS (w) == 0));
5316#endif
5317
5256 /* Does the scroll bar exist yet? */ 5318 /* Does the scroll bar exist yet? */
5257 if (NILP (w->vertical_scroll_bar)) 5319 if (NILP (w->vertical_scroll_bar))
5258 { 5320 {
5259 if (width > 0 && height > 0) 5321 if (width > 0 && height > 0)
5260 { 5322 {
5261 BLOCK_INPUT; 5323 BLOCK_INPUT;
5262 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5324#ifdef USE_TOOLKIT_SCROLL_BARS
5263 left, top, width, height, False); 5325 if (fringe_extended_p)
5326 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5327 sb_left, top, sb_width, height, False);
5328 else
5329#endif
5330 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5331 left, top, width, height, False);
5264 UNBLOCK_INPUT; 5332 UNBLOCK_INPUT;
5265 } 5333 }
5266 5334
@@ -5287,13 +5355,19 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
5287#ifdef USE_TOOLKIT_SCROLL_BARS 5355#ifdef USE_TOOLKIT_SCROLL_BARS
5288 5356
5289 /* Move/size the scroll bar widget. */ 5357 /* Move/size the scroll bar widget. */
5290 if (mask) 5358 if (mask || !NILP (bar->fringe_extended_p) != fringe_extended_p)
5291 { 5359 {
5292 /* Since toolkit scroll bars are smaller than the space reserved 5360 /* Since toolkit scroll bars are smaller than the space reserved
5293 for them on the frame, we have to clear "under" them. */ 5361 for them on the frame, we have to clear "under" them. */
5294 if (width > 0 && height > 0) 5362 if (width > 0 && height > 0)
5295 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5363 {
5296 left, top, width, height, False); 5364 if (fringe_extended_p)
5365 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5366 sb_left, top, sb_width, height, False);
5367 else
5368 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5369 left, top, width, height, False);
5370 }
5297#ifdef USE_GTK 5371#ifdef USE_GTK
5298 xg_update_scrollbar_pos (f, 5372 xg_update_scrollbar_pos (f,
5299 SCROLL_BAR_X_WINDOW (bar), 5373 SCROLL_BAR_X_WINDOW (bar),
@@ -5368,6 +5442,8 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
5368 } 5442 }
5369 5443
5370#ifdef USE_TOOLKIT_SCROLL_BARS 5444#ifdef USE_TOOLKIT_SCROLL_BARS
5445 bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil;
5446
5371 x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); 5447 x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
5372#else /* not USE_TOOLKIT_SCROLL_BARS */ 5448#else /* not USE_TOOLKIT_SCROLL_BARS */
5373 /* Set the scroll bar's current state, unless we're currently being 5449 /* Set the scroll bar's current state, unless we're currently being
diff --git a/src/xterm.h b/src/xterm.h
index 7fa02cc066b..a0b4704e13f 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -818,6 +818,12 @@ struct scroll_bar
818 place where the user grabbed it. If the handle isn't currently 818 place where the user grabbed it. If the handle isn't currently
819 being dragged, this is Qnil. */ 819 being dragged, this is Qnil. */
820 Lisp_Object dragging; 820 Lisp_Object dragging;
821
822#ifdef USE_TOOLKIT_SCROLL_BARS
823 /* t if the background of the fringe that is adjacent to a scroll
824 bar is extended to the gap between the fringe and the bar. */
825 Lisp_Object fringe_extended_p;
826#endif
821}; 827};
822 828
823/* The number of elements a vector holding a struct scroll_bar needs. */ 829/* The number of elements a vector holding a struct scroll_bar needs. */