aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-02-24 22:48:10 +0000
committerKaroly Lorentey2004-02-24 22:48:10 +0000
commite39e96544557e39200234f3f855f6567f9ea6bff (patch)
treebb2802ee28d62c72d61f46f88d089d268809a120
parent1cbfd764118c2fed03fc96fe6b9aad3555270c96 (diff)
parent92f5fba2d661eb84fa67e0190cd617aa57f51f34 (diff)
downloademacs-e39e96544557e39200234f3f855f6567f9ea6bff.tar.gz
emacs-e39e96544557e39200234f3f855f6567f9ea6bff.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-108 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-109 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-110 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-111 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-112 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-94
-rw-r--r--etc/NEWS10
-rw-r--r--lisp/ChangeLog67
-rw-r--r--lisp/abbrev.el15
-rw-r--r--lisp/calendar/calendar.el21
-rw-r--r--lisp/calendar/diary-lib.el6
-rw-r--r--lisp/ffap.el8
-rw-r--r--lisp/gdb-ui.el36
-rw-r--r--lisp/play/animate.el12
-rw-r--r--lisp/progmodes/gud.el17
-rw-r--r--lisp/saveplace.el63
-rw-r--r--lisp/startup.el98
-rw-r--r--lisp/textmodes/texinfo.el14
-rw-r--r--lisp/vcursor.el9
-rw-r--r--lispref/ChangeLog29
-rw-r--r--lispref/abbrevs.texi113
-rw-r--r--lispref/calendar.texi2
-rw-r--r--lispref/frames.texi1
-rw-r--r--lispref/syntax.texi70
-rw-r--r--lispref/text.texi200
-rw-r--r--lispref/tips.texi2
-rw-r--r--man/ChangeLog18
-rw-r--r--man/building.texi11
-rw-r--r--man/cmdargs.texi119
-rw-r--r--src/ChangeLog23
-rw-r--r--src/abbrev.c3
-rw-r--r--src/emacs.c121
-rw-r--r--src/w32term.c46
27 files changed, 720 insertions, 414 deletions
diff --git a/etc/NEWS b/etc/NEWS
index abc0f04d424..a9ac7ea2956 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -88,6 +88,15 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
88 88
89* Changes in Emacs 21.4 89* Changes in Emacs 21.4
90 90
91---
92** The saveplace.el package now filters out unreadable files.
93When you exit Emacs, the saved positions in visited files no longer
94include files that aren't readable, e.g. files that don't exist.
95Customize the new option `save-place-forget-unreadable-files' to nil
96to get the old behavior. The new options `save-place-save-skipped'
97and `save-place-skip-check-regexp' allow further fine-tuning of this
98feature.
99
91** On window systems, lines which are exactly as wide as the window 100** On window systems, lines which are exactly as wide as the window
92(not counting the final newline character) are no longer broken into 101(not counting the final newline character) are no longer broken into
93two lines on the display (with just the newline on the second line). 102two lines on the display (with just the newline on the second line).
@@ -1871,6 +1880,7 @@ before saving buffers. This allows packages to perform various final
1871tasks, for example; it can be used by the copyright package to make 1880tasks, for example; it can be used by the copyright package to make
1872sure saved files have the current year in any copyright headers. 1881sure saved files have the current year in any copyright headers.
1873 1882
1883+++
1874** The function `insert-for-yank' now supports strings where the 1884** The function `insert-for-yank' now supports strings where the
1875`yank-handler' property does not span the first character of the 1885`yank-handler' property does not span the first character of the
1876string. The old behavior is available if you call 1886string. The old behavior is available if you call
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7a1f7e0ec17..9bf1ae47cc1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,68 @@
12004-02-23 Luc Teirlinck <teirllm@auburn.edu>
2
3 * abbrev.el (write-abbrev-file): Make argument optional. Doc fix.
4 (abbrev-prefix-mark): Doc fix.
5
62004-02-23 Nick Roberts <nick@nick.uklinux.net>
7
8 * gdb-ui.el (gud-watch): Load tooltip, if necessary.
9 (gdb-var-create-handler): Force speedbar-update-flag to be non-nil.
10 (gdb-var-delete): Make interactive (really).
11 (gdb-edit-value): Make non-interactive.
12
13 * progmodes/gud.el (gud-install-speedbar-variables): Bind
14 gdb-var-delete to "D".
15 (gud-speedbar-menu-items): Add gdb-var-delete and, indirectly,
16 gdb-edit-value.
17 (gud-speedbar-buttons): Remove gdb-var-delete from tag-line.
18 (gud-gdb-marker-filter): Add comment for annotations.
19
202004-02-23 Glenn Morris <gmorris@ast.cam.ac.uk>
21
22 * calendar/calendar.el (generate-calendar)
23 (calendar-read-date): Prevent display of BC calendars once more -
24 reverts 2003-10-01 change.
25 (generate-calendar-month): Doc fix.
26
272004-02-03 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change)
28
29 * calendar/diary-lib.el (fancy-diary-display): Don't rely on
30 return value of increment-calendar-month.
31
322004-02-21 Stephen Compall <s11@member.fsf.org>
33
34 * saveplace.el (save-place-forget-unreadable-files)
35 (save-place-save-skipped, save-place-skip-check-regexp): New
36 defcustoms.
37 (save-place-forget-unreadable-files): New function.
38 (save-place-alist-to-file): Use it to filter out files that are
39 no longer readable.
40
41 * textmodes/texinfo.el (texinfo-insert-@item): Look for the
42 current Texinfo environment, using the same method as in
43 `texinfo-insert-@end', and insert a space rather than a newline if
44 point in a @table environment.
45
462004-02-21 Juri Linkov <juri@jurta.org>
47
48 * ffap.el (ffap-file-at-point): Try parent directories.
49
502004-02-21 Klaus Zeitler <kzeitler@lucent.com>
51
52 * vcursor.el (vcursor-modifiers): New defcustom.
53 (vcursor-cs-binding): Use vcursor-modifiers instead of a
54 hard-coded list.
55
562004-02-21 Masatake YAMATO <jet@gyve.org>
57
58 * play/animate.el (animate-birthday-present): Accept names other
59 than `Sarah', too.
60
612004-02-21 Juri Linkov <juri@jurta.org>
62
63 * startup.el: Remove table of command line arguments from the
64 Commentary section.
65
12004-02-20 John Wiegley <johnw@newartisans.com> 662004-02-20 John Wiegley <johnw@newartisans.com>
2 67
3 * eshell/em-pred.el (eshell-modifier-alist): Changed the "eval 68 * eshell/em-pred.el (eshell-modifier-alist): Changed the "eval
@@ -164,7 +229,7 @@
164 229
165 * newcomment.el (uncomment-region): Allow eob as comment end. 230 * newcomment.el (uncomment-region): Allow eob as comment end.
166 231
1672004-02-16 Jari Aalto <jari.aalto@poboxes.com> (tiny change) 2322004-02-16 Jari Aalto <jari.aalto@poboxes.com>
168 233
169 * filecache.el: All message and error commands now use prefix 234 * filecache.el: All message and error commands now use prefix
170 "Filecache:" to make it easy to read *Messages* buffer. 235 "Filecache:" to make it easy to read *Messages* buffer.
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 13c1f71099a..1e3eea0e359 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -201,10 +201,13 @@ Does not display any message."
201 ;(interactive "fRead abbrev file: ") 201 ;(interactive "fRead abbrev file: ")
202 (read-abbrev-file file t)) 202 (read-abbrev-file file t))
203 203
204(defun write-abbrev-file (file) 204(defun write-abbrev-file (&optional file)
205 "Write all abbrev definitions to a file of Lisp code. 205 "Write all user-level abbrev definitions to a file of Lisp code.
206This does not include system abbrevs; it includes only the abbrev tables
207listed in listed in `abbrev-table-name-list'.
206The file written can be loaded in another session to define the same abbrevs. 208The file written can be loaded in another session to define the same abbrevs.
207The argument FILE is the file name to write." 209The argument FILE is the file name to write. If omitted or nil, the file
210specified in `abbrev-file-name' is used."
208 (interactive 211 (interactive
209 (list 212 (list
210 (read-file-name "Write abbrev file: " 213 (read-file-name "Write abbrev file: "
@@ -307,7 +310,11 @@ Expands the abbreviation after defining it."
307 "Mark current point as the beginning of an abbrev. 310 "Mark current point as the beginning of an abbrev.
308Abbrev to be expanded starts here rather than at beginning of word. 311Abbrev to be expanded starts here rather than at beginning of word.
309This way, you can expand an abbrev with a prefix: insert the prefix, 312This way, you can expand an abbrev with a prefix: insert the prefix,
310use this command, then insert the abbrev." 313use this command, then insert the abbrev. This command inserts a
314temporary hyphen after the prefix \(until the intended abbrev
315expansion occurs).
316If the prefix is itself an abbrev, this command expands it, unless
317ARG is non-nil. Interactively, ARG is the prefix argument."
311 (interactive "P") 318 (interactive "P")
312 (or arg (expand-abbrev)) 319 (or arg (expand-abbrev))
313 (setq abbrev-start-location (point-marker) 320 (setq abbrev-start-location (point-marker)
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index a0644f54aa2..c1277ca5132 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1924,12 +1924,15 @@ Or, for optional MON, YR."
1924 (run-hooks 'today-invisible-calendar-hook))))) 1924 (run-hooks 'today-invisible-calendar-hook)))))
1925 1925
1926(defun generate-calendar (month year) 1926(defun generate-calendar (month year)
1927 "Generate a three-month Gregorian calendar centered around MONTH, YEAR. 1927 "Generate a three-month Gregorian calendar centered around MONTH, YEAR."
1928A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. 1928;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on.
1929Note that while calendars can be displayed for years BC, some functions (eg 1929;;; Note that while calendars for years BC could be displayed as it
1930motion, complex holiday functions) will not work correctly for such dates." 1930;;; stands, almost all other calendar functions (eg holidays) would
1931 (setq displayed-month month) 1931;;; at best have unpredictable results for such dates.
1932 (setq displayed-year year) 1932 (if (< (+ month (* 12 (1- year))) 2)
1933 (error "Months before February, 1 AD are not available"))
1934 (setq displayed-month month
1935 displayed-year year)
1933 (erase-buffer) 1936 (erase-buffer)
1934 (increment-calendar-month month year -1) 1937 (increment-calendar-month month year -1)
1935 (calendar-for-loop i from 0 to 2 do 1938 (calendar-for-loop i from 0 to 2 do
@@ -1941,7 +1944,7 @@ motion, complex holiday functions) will not work correctly for such dates."
1941The calendar is inserted at the top of the buffer in which point is currently 1944The calendar is inserted at the top of the buffer in which point is currently
1942located, but indented INDENT spaces. The indentation is done from the first 1945located, but indented INDENT spaces. The indentation is done from the first
1943character on the line and does not disturb the first INDENT characters on the 1946character on the line and does not disturb the first INDENT characters on the
1944line. A negative YEAR is interpreted as BC; -1 being 1 BC, and so on." 1947line."
1945 (let* ((blank-days;; at start of month 1948 (let* ((blank-days;; at start of month
1946 (mod 1949 (mod
1947 (- (calendar-day-of-week (list month 1 year)) 1950 (- (calendar-day-of-week (list month 1 year))
@@ -2538,8 +2541,8 @@ If optional NODAY is t, does not ask for day, but just returns
2538\(month nil year); if NODAY is any other non-nil value the value returned is 2541\(month nil year); if NODAY is any other non-nil value the value returned is
2539\(month year)" 2542\(month year)"
2540 (let* ((year (calendar-read 2543 (let* ((year (calendar-read
2541 "Year: " 2544 "Year (>0): "
2542 (lambda (x) (not (zerop x))) 2545 (lambda (x) (> x 0))
2543 (int-to-string (extract-calendar-year 2546 (int-to-string (extract-calendar-year
2544 (calendar-current-date))))) 2547 (calendar-current-date)))))
2545 (month-array calendar-month-name-array) 2548 (month-array calendar-month-name-array)
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index bb4ea20f804..f4150ee0825 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -587,8 +587,10 @@ This function is provided for optional use as the `diary-display-hook'."
587 (extract-calendar-month date)) 587 (extract-calendar-month date))
588 (setq holiday-list-last-year 588 (setq holiday-list-last-year
589 (extract-calendar-year date)) 589 (extract-calendar-year date))
590 (increment-calendar-month 590 (progn
591 holiday-list-last-month holiday-list-last-year 1) 591 (increment-calendar-month
592 holiday-list-last-month holiday-list-last-year 1)
593 t)
592 (setq holiday-list 594 (setq holiday-list
593 (let ((displayed-month holiday-list-last-month) 595 (let ((displayed-month holiday-list-last-month)
594 (displayed-year holiday-list-last-year)) 596 (displayed-year holiday-list-last-year))
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 668700a5c1f..27abd52f563 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1185,6 +1185,14 @@ which may actually result in an url rather than a filename."
1185 remote-dir (substring name (match-end 1))))) 1185 remote-dir (substring name (match-end 1)))))
1186 (ffap-file-exists-string 1186 (ffap-file-exists-string
1187 (ffap-replace-file-component remote-dir name)))))) 1187 (ffap-replace-file-component remote-dir name))))))
1188 ;; Try all parent directories by deleting the trailing directory
1189 ;; name until existing directory is found or name stops changing
1190 ((let ((dir name))
1191 (while (and dir
1192 (not (ffap-file-exists-string dir))
1193 (not (equal dir (setq dir (file-name-directory
1194 (directory-file-name dir)))))))
1195 (ffap-file-exists-string dir)))
1188 ) 1196 )
1189 (set-match-data data)))) 1197 (set-match-data data))))
1190 1198
diff --git a/lisp/gdb-ui.el b/lisp/gdb-ui.el
index 60ac57dd10f..32cce04c239 100644
--- a/lisp/gdb-ui.el
+++ b/lisp/gdb-ui.el
@@ -188,6 +188,7 @@ speedbar."
188(defun gud-watch () 188(defun gud-watch ()
189 "Watch expression at point." 189 "Watch expression at point."
190 (interactive) 190 (interactive)
191 (require 'tooltip)
191 (let ((expr (tooltip-identifier-from-point (point)))) 192 (let ((expr (tooltip-identifier-from-point (point))))
192 (if (and (string-equal gdb-current-language "c") 193 (if (and (string-equal gdb-current-language "c")
193 gdb-use-colon-colon-notation) 194 gdb-use-colon-colon-notation)
@@ -214,6 +215,7 @@ speedbar."
214 (match-string 3) 215 (match-string 3)
215 nil nil))) 216 nil nil)))
216 (push var gdb-var-list) 217 (push var gdb-var-list)
218 (setq speedbar-update-flag t)
217 (speedbar 1) 219 (speedbar 1)
218 (if (equal (nth 2 var) "0") 220 (if (equal (nth 2 var) "0")
219 (gdb-enqueue-input 221 (gdb-enqueue-input
@@ -304,26 +306,28 @@ speedbar."
304 (gdb-set-pending-triggers 306 (gdb-set-pending-triggers
305 (delq 'gdb-var-update (gdb-get-pending-triggers)))) 307 (delq 'gdb-var-update (gdb-get-pending-triggers))))
306 308
307(defun gdb-var-delete (text token indent) 309(defun gdb-var-delete ()
308 "Delete watched expression." 310 "Delete watched expression from the speedbar."
309 (interactive) 311 (interactive)
310 (when (eq indent 0) 312 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
311 (string-match "\\(\\S-+\\)" text) 313 (let ((text (speedbar-line-text)))
312 (let* ((expr (match-string 1 text)) 314 (string-match "\\(\\S-+\\)" text)
313 (var (assoc expr gdb-var-list)) 315 (let* ((expr (match-string 1 text))
314 (varnum (cadr var))) 316 (var (assoc expr gdb-var-list))
315 (gdb-enqueue-input 317 (varnum (cadr var)))
316 (list (concat "server interpreter mi \"-var-delete " varnum "\"\n") 318 (unless (string-match "\\." varnum)
317 'ignore)) 319 (gdb-enqueue-input
318 (setq gdb-var-list (delq var gdb-var-list)) 320 (list (concat "server interpreter mi \"-var-delete "
319 (dolist (varchild gdb-var-list) 321 varnum "\"\n")
320 (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild)) 322 'ignore))
321 (setq gdb-var-list (delq varchild gdb-var-list))))) 323 (setq gdb-var-list (delq var gdb-var-list))
322 (setq gdb-var-changed t))) 324 (dolist (varchild gdb-var-list)
325 (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild))
326 (setq gdb-var-list (delq varchild gdb-var-list))))
327 (setq gdb-var-changed t))))))
323 328
324(defun gdb-edit-value (text token indent) 329(defun gdb-edit-value (text token indent)
325 "Assign a value to a variable displayed in the speedbar" 330 "Assign a value to a variable displayed in the speedbar"
326 (interactive)
327 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) 331 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
328 (varnum (cadr var)) (value)) 332 (varnum (cadr var)) (value))
329 (setq value (read-string "New value: ")) 333 (setq value (read-string "New value: "))
diff --git a/lisp/play/animate.el b/lisp/play/animate.el
index 40c4696dc08..23e7939f47a 100644
--- a/lisp/play/animate.el
+++ b/lisp/play/animate.el
@@ -151,11 +151,13 @@ Strings will be separated from each other by SPACE lines."
151 (setq list-of-strings (cdr list-of-strings))))) 151 (setq list-of-strings (cdr list-of-strings)))))
152 152
153;;;###autoload 153;;;###autoload
154(defun animate-birthday-present () 154(defun animate-birthday-present (&optional name)
155 "Display Sarah's birthday present in a new buffer." 155 "Display one's birthday present in a new buffer.
156 (interactive) 156You can specify the one's name by NAME; the default value is \"Sarah\"."
157 (interactive (list (read-string "Name (default \"Sarah\"): "
158 nil nil "Sarah")))
157 ;; Make a suitable buffer to display the birthday present in. 159 ;; Make a suitable buffer to display the birthday present in.
158 (switch-to-buffer (get-buffer-create "*Sarah*")) 160 (switch-to-buffer (get-buffer-create (format "*%s*" name)))
159 (erase-buffer) 161 (erase-buffer)
160 ;; Display the empty buffer. 162 ;; Display the empty buffer.
161 (sit-for 0) 163 (sit-for 0)
@@ -164,7 +166,7 @@ Strings will be separated from each other by SPACE lines."
164 (setq indent-tabs-mode nil) 166 (setq indent-tabs-mode nil)
165 167
166 (animate-string "Happy Birthday," 6) 168 (animate-string "Happy Birthday," 6)
167 (animate-string "Sarah" 7) 169 (animate-string (format "%s" name) 7)
168 170
169 (sit-for 1) 171 (sit-for 1)
170 172
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index de68d012470..ff04c05edff 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -305,11 +305,18 @@ t means that there is no stack, and we are in display-file mode.")
305 305
306 (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) 306 (define-key gud-speedbar-key-map "j" 'speedbar-edit-line)
307 (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) 307 (define-key gud-speedbar-key-map "e" 'speedbar-edit-line)
308 (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line))) 308 (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line)
309 (define-key gud-speedbar-key-map "D" 'gdb-var-delete)))
310
309 311
310(defvar gud-speedbar-menu-items 312(defvar gud-speedbar-menu-items
311 ;; Note to self. Add expand, and turn off items when not available. 313 ;; Note to self. Add expand, and turn off items when not available.
312 '(["Jump to stack frame" speedbar-edit-line t]) 314 '(["Jump to stack frame" speedbar-edit-line
315 (with-current-buffer gud-comint-buffer (not (eq gud-minor-mode 'gdba)))]
316 ["Edit value" speedbar-edit-line
317 (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))]
318 ["Delete expression" gdb-var-delete
319 (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))])
313 "Additional menu items to add to the speedbar frame.") 320 "Additional menu items to add to the speedbar frame.")
314 321
315;; Make sure our special speedbar mode is loaded 322;; Make sure our special speedbar mode is loaded
@@ -353,8 +360,7 @@ off the specialized speedbar mode."
353 (speedbar-make-tag-line 'bracket char 360 (speedbar-make-tag-line 'bracket char
354 'gdb-speedbar-expand-node varnum 361 'gdb-speedbar-expand-node varnum
355 (concat (car var) "\t" (nth 3 var)) 362 (concat (car var) "\t" (nth 3 var))
356 'gdb-var-delete 363 nil nil nil depth)))
357 nil nil depth)))
358 (setq var-list (cdr var-list)))) 364 (setq var-list (cdr var-list))))
359 (setq gdb-var-changed nil))) 365 (setq gdb-var-changed nil)))
360 (t (if (and (save-excursion 366 (t (if (and (save-excursion
@@ -450,10 +456,13 @@ off the specialized speedbar mode."
450 ;; Set the accumulator to the remaining text. 456 ;; Set the accumulator to the remaining text.
451 gud-marker-acc (substring gud-marker-acc (match-end 0)))) 457 gud-marker-acc (substring gud-marker-acc (match-end 0))))
452 458
459 ;; Check for annotations and change gud-minor-mode to 'gdba if
460 ;; they are found.
453 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) 461 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc)
454 (when (string-equal (match-string 1 gud-marker-acc) "prompt") 462 (when (string-equal (match-string 1 gud-marker-acc) "prompt")
455 (require 'gdb-ui) 463 (require 'gdb-ui)
456 (gdb-prompt nil)) 464 (gdb-prompt nil))
465
457 (setq 466 (setq
458 ;; Append any text before the marker to the output we're going 467 ;; Append any text before the marker to the output we're going
459 ;; to return - we don't include the marker in this text. 468 ;; to return - we don't include the marker in this text.
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index d8706de70e8..3e40f118a41 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -94,6 +94,40 @@ value of `version-control'."
94 (const :tag "No Limit" nil)) 94 (const :tag "No Limit" nil))
95 :group 'save-place) 95 :group 'save-place)
96 96
97(defcustom save-place-forget-unreadable-files t
98 "Non-nil means forget place in unreadable files.
99
100The filenames in `save-place-alist' that do not match
101`save-place-skip-check-regexp' are filtered through
102`file-readable-p'. if nil, their alist entries are removed.
103
104You may do this anytime by calling the complementary function,
105`save-place-forget-unreadable-files'. When this option is turned on,
106this happens automatically before saving `save-place-alist' to
107`save-place-file'."
108 :type 'boolean :group 'save-place)
109
110(defcustom save-place-save-skipped t
111 "If non-nil, remember files matching `save-place-skip-check-regexp'.
112
113When filtering `save-place-alist' for unreadable files, some will not
114be checked, based on said regexp, and instead saved or forgotten based
115on this flag."
116 :type 'boolean :group 'save-place)
117
118(defcustom save-place-skip-check-regexp
119 ;; thanks to ange-ftp-name-format
120 "\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)"
121 "Regexp whose file names shall not be checked for readability.
122
123When forgetting unreadable files, file names matching this regular
124expression shall not be checked for readability, but instead be
125subject to `save-place-save-skipped'.
126
127Files for which such a check may be inconvenient include those on
128removable and network volumes."
129 :type 'regexp :group 'save-place)
130
97(defun toggle-save-place (&optional parg) 131(defun toggle-save-place (&optional parg)
98 "Toggle whether to save your place in this file between sessions. 132 "Toggle whether to save your place in this file between sessions.
99If this mode is enabled, point is recorded when you kill the buffer 133If this mode is enabled, point is recorded when you kill the buffer
@@ -138,12 +172,41 @@ To save places automatically in all files, put this in your `.emacs' file:
138 (cons (cons buffer-file-name position) 172 (cons (cons buffer-file-name position)
139 save-place-alist))))))) 173 save-place-alist)))))))
140 174
175(defun save-place-forget-unreadable-files ()
176 "Remove unreadable files from `save-place-alist'.
177For each entry in the alist, if `file-readable-p' returns nil for the
178filename, remove the entry. Save the new alist \(as the first pair
179may have changed\) back to `save-place-alist'."
180 (interactive)
181 ;; the following was adapted from an in-place filtering function,
182 ;; `filter-mod', used in the original.
183 (unless (null save-place-alist) ;says it better than `when'
184 ;; first, check all except first
185 (let ((fmprev save-place-alist) (fmcur (cdr save-place-alist)))
186 (while fmcur ;not null
187 ;; a value is only saved when it becomes FMPREV.
188 (if (if (string-match save-place-skip-check-regexp (caar fmcur))
189 save-place-save-skipped
190 (file-readable-p (caar fmcur)))
191 (setq fmprev fmcur)
192 (setcdr fmprev (cdr fmcur)))
193 (setq fmcur (cdr fmcur))))
194 ;; test first pair, keep it if OK, otherwise 2nd element, which
195 ;; may be '()
196 (unless (if (string-match save-place-skip-check-regexp
197 (caar save-place-alist))
198 save-place-save-skipped
199 (file-readable-p (caar save-place-alist)))
200 (setq save-place-alist (cdr save-place-alist)))))
201
141(defun save-place-alist-to-file () 202(defun save-place-alist-to-file ()
142 (let ((file (expand-file-name save-place-file))) 203 (let ((file (expand-file-name save-place-file)))
143 (save-excursion 204 (save-excursion
144 (message "Saving places to %s..." file) 205 (message "Saving places to %s..." file)
145 (set-buffer (get-buffer-create " *Saved Places*")) 206 (set-buffer (get-buffer-create " *Saved Places*"))
146 (delete-region (point-min) (point-max)) 207 (delete-region (point-min) (point-max))
208 (when save-place-forget-unreadable-files
209 (save-place-forget-unreadable-files))
147 (print save-place-alist (current-buffer)) 210 (print save-place-alist (current-buffer))
148 (let ((version-control 211 (let ((version-control
149 (cond 212 (cond
diff --git a/lisp/startup.el b/lisp/startup.el
index 3d03d3b68c7..e79ea4407b1 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -25,101 +25,9 @@
25 25
26;;; Commentary: 26;;; Commentary:
27 27
28;; This file parses the command line and gets Emacs running. Options on 28;; This file parses the command line and gets Emacs running. Options
29;; the command line are handled in precedence order. The order is the 29;; on the command line are handled in precedence order. For priorities
30;; one in the list below; first described means first handled. Options 30;; see the structure standard_args in the emacs.c file.
31;; within each category (delimited by a bar) are handled in the order
32;; encountered on the command line.
33
34;; -------------------------
35;; -version Print Emacs version to stderr, then exit
36;; --version successfully right away.
37;; This option is handled by emacs.c
38;; -------------------------
39;; -help Print a short usage description and exit
40;; --help successfully right away.
41;; This option is handled by emacs.c
42;; -------------------------
43;; -nl Do not use shared memory (for systems that
44;; -no-shared-memory support this) for the dumped Emacs data.
45;; This option is handled by emacs.c
46;;
47;; -map For VMS.
48;; --map-data This option is handled by emacs.c
49;; -------------------------
50;; -t FILE Use FILE as the name of the terminal.
51;; --terminal FILE Using this implies "-nw" also.
52;; This option is handled by emacs.c
53;; -------------------------
54;; -d DISPNAME Use DISPNAME as the name of the X
55;; -display DISPNAME display for the initial frame.
56;; --display DISPNAME This option is handled by emacs.c
57;; -------------------------
58;; -nw Do not use a windows system (but use the
59;; --no-window-system terminal instead.)
60;; This option is handled by emacs.c
61;; -------------------------
62;; -batch Execute noninteractively (messages go to stdout,
63;; --batch variable noninteractive set to t)
64;; This option is handled by emacs.c
65;; -------------------------
66;; -q Do not load user's init file and do not load
67;; -no-init-file "default.el". Regardless of this switch,
68;; --no-init-file "site-start" is still loaded.
69;; -------------------------
70;; -no-site-file Do not load "site-start.el". (This is the ONLY
71;; --no-site-file way to prevent loading that file.)
72;; -------------------------
73;; -no-splash Don't display a splash screen on startup.
74;; --no-splash
75;; -------------------------
76;; -u USER Load USER's init file instead of the init
77;; -user USER file belonging to the user starting Emacs.
78;; --user USER
79;; -------------------------
80;; -debug-init Don't catch errors in init files; let the
81;; --debug-init debugger run.
82;; -------------------------
83;; -i ICONTYPE Set type of icon using when Emacs is
84;; -itype ICONTYPE iconified under X.
85;; --icon-type ICONTYPE This option is passed on to term/x-win.el
86;;
87;; -iconic Start Emacs iconified.
88;; --iconic This option is passed on to term/x-win.el
89;; -------------------------
90;; Various X options for colors/fonts/geometry/title etc.
91;; These options are passed on to term/x-win.el which see.
92;; -------------------------
93;; FILE Visit FILE.
94;; -visit FILE
95;; --visit FILE
96;; -file FILE
97;; --file FILE
98;;
99;; -L DIRNAME Add DIRNAME to load-path
100;; -directory DIRNAME
101;; --directory DIRNAME
102;;
103;; -l FILE Load and execute the Emacs lisp code
104;; -load FILE in FILE.
105;; --load FILE
106;;
107;; -f FUNC Execute Emacs lisp function FUNC with
108;; -funcall FUNC no arguments. The "-e" form is outdated
109;; --funcall FUNC and should not be used. (It's a typo
110;; -e FUNC promoted to a feature.)
111;;
112;; -eval FORM Execute Emacs lisp form FORM.
113;; --eval FORM
114;; -execute EXPR
115;; --execute EXPR
116;;
117;; -insert FILE Insert the contents of FILE into buffer.
118;; --insert FILE
119;; -------------------------
120;; -kill Kill (exit) Emacs right away.
121;; --kill
122;; -------------------------
123 31
124;;; Code: 32;;; Code:
125 33
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 3c5559897b4..8e5b94114a3 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -803,10 +803,18 @@ The default is not to surround any existing words with the braces."
803 (texinfo-insert-@-with-arg "file" arg)) 803 (texinfo-insert-@-with-arg "file" arg))
804 804
805(defun texinfo-insert-@item () 805(defun texinfo-insert-@item ()
806 "Insert the string `@item' in a Texinfo buffer." 806 "Insert the string `@item' in a Texinfo buffer.
807If in a table defined by @table, follow said string with a space.
808Otherwise, follow with a newline."
807 (interactive) 809 (interactive)
808 (insert "@item") 810 (insert "@item"
809 (newline)) 811 (if (equal (ignore-errors
812 (save-excursion
813 (texinfo-last-unended-begin)
814 (match-string 1)))
815 "table")
816 ? ;space
817 ?\n)))
810 818
811(defun texinfo-insert-@kbd (&optional arg) 819(defun texinfo-insert-@kbd (&optional arg)
812 "Insert a `@kbd{...}' command in a Texinfo buffer. 820 "Insert a `@kbd{...}' command in a Texinfo buffer.
diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index 6d06dbdb9dc..4de92f02f0b 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -314,7 +314,7 @@
314;; - The logic in vcursor-find-window is rather complicated and 314;; - The logic in vcursor-find-window is rather complicated and
315;; therefore bug-prone, though in practice it seems to work OK. 315;; therefore bug-prone, though in practice it seems to work OK.
316;; 316;;
317;; Possible enhnacements: 317;; Possible enhancements:
318;; It would be easy to implement vcursor-push (save vcursor position 318;; It would be easy to implement vcursor-push (save vcursor position
319;; as mark and deactivate) and vcursor-pop (deactivate vcursor and 319;; as mark and deactivate) and vcursor-pop (deactivate vcursor and
320;; move to last pushed position) functions. 320;; move to last pushed position) functions.
@@ -342,9 +342,14 @@ disable the vcursor."
342 :type '(choice (const t) (const nil) (const copy)) 342 :type '(choice (const t) (const nil) (const copy))
343 :group 'vcursor) 343 :group 'vcursor)
344 344
345(defcustom vcursor-modifiers (list 'control 'shift)
346 "*A list of modifiers that are used to define vcursor key bindings."
347 :type '(repeat symbol)
348 :group 'vcursor)
349
345;; Needed for defcustom, must be up here 350;; Needed for defcustom, must be up here
346(defun vcursor-cs-binding (base &optional meta) 351(defun vcursor-cs-binding (base &optional meta)
347 (vector (let ((key (list 'control 'shift (intern base)))) 352 (vector (let ((key (append vcursor-modifiers (list (intern base)))))
348 (if meta 353 (if meta
349 (cons 'meta key) 354 (cons 'meta key)
350 key)))) 355 key))))
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 5879c3a4596..fb88d2736d5 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,32 @@
12004-02-23 Luc Teirlinck <teirllm@auburn.edu>
2
3 * abbrevs.texi: Various corrections and clarifications in addition
4 to the following:
5 (Abbrev Tables): Delete add-abbrev (as suggested by RMS).
6
72004-02-22 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change)
8
9 * calendar.texi (Holiday Customizing): Quote arg of holiday-sexp.
10
112004-02-21 Luc Teirlinck <teirllm@auburn.edu>
12
13 * text.texi: Various small changes in addition to the following:
14 (User-Level Deletion): Mention optional BACKWARD-ONLY argument
15 to delete-horizontal-space.
16 (Kill Functions, Yanking, Low-Level Kill Ring): clarify and correct
17 description of yank-handler text property at various places.
18
19 * frames.texi (Window System Selections): Add anchor.
20
21 * syntax.texi (Syntax Table Functions): Clarify and correct
22 descriptions of make-syntax-table and copy-syntax-table.
23 (Motion and Syntax): Clarify SYNTAXES argument to
24 skip-syntax-forward.
25 (Parsing Expressions): Mention that the return value of
26 parse-partial-sexp is currently a list of ten rather than nine
27 elements.
28 (Categories): Various corrections and clarifications.
29
12004-02-17 Luc Teirlinck <teirllm@auburn.edu> 302004-02-17 Luc Teirlinck <teirllm@auburn.edu>
2 31
3 * markers.texi (Marker Insertion Types): Minor change. 32 * markers.texi (Marker Insertion Types): Minor change.
diff --git a/lispref/abbrevs.texi b/lispref/abbrevs.texi
index f123a3e1411..33ebecd70e5 100644
--- a/lispref/abbrevs.texi
+++ b/lispref/abbrevs.texi
@@ -24,12 +24,17 @@ each abbreviation. The symbol's name is the abbreviation; its value
24is the expansion; its function definition is the hook function to do 24is the expansion; its function definition is the hook function to do
25the expansion (@pxref{Defining Abbrevs}); its property list cell 25the expansion (@pxref{Defining Abbrevs}); its property list cell
26typically contains the use count, the number of times the abbreviation 26typically contains the use count, the number of times the abbreviation
27has been expanded. (Alternatively, the use count is on the 27has been expanded. Alternatively, the use count is on the
28@code{count} property and the system-abbrev flag is on the 28@code{count} property and the system-abbrev flag is on the
29@code{system-type} property.) Because these symbols are not interned 29@code{system-type} property. Abbrevs with a non-@code{nil}
30in the usual obarray, they will never appear as the result of reading 30@code{system-type} property are called ``system'' abbrevs. They are
31a Lisp expression; in fact, normally they are never used except by the 31usually defined by modes or packages, instead of by the user, and are
32code that handles abbrevs. Therefore, it is safe to use them in an 32treated specially in certain respects.
33
34Because the symbols used for abbrevs are not interned in the usual
35obarray, they will never appear as the result of reading a Lisp
36expression; in fact, normally they are never used except by the code
37that handles abbrevs. Therefore, it is safe to use them in an
33extremely nonstandard way. @xref{Creating Symbols}. 38extremely nonstandard way. @xref{Creating Symbols}.
34 39
35 For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev 40 For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev
@@ -82,7 +87,9 @@ leaving it empty. It always returns @code{nil}.
82 87
83@defun copy-abbrev-table table 88@defun copy-abbrev-table table
84This function returns a copy of abbrev table @var{table}---a new 89This function returns a copy of abbrev table @var{table}---a new
85abbrev table that contains the same abbrev definitions. 90abbrev table that contains the same abbrev definitions. The only
91difference between @var{table} and the returned copy is that this
92function sets the property lists of all copied abbrevs to 0.
86@end defun 93@end defun
87 94
88@defun define-abbrev-table tabname definitions 95@defun define-abbrev-table tabname definitions
@@ -90,8 +97,16 @@ This function defines @var{tabname} (a symbol) as an abbrev table
90name, i.e., as a variable whose value is an abbrev table. It defines 97name, i.e., as a variable whose value is an abbrev table. It defines
91abbrevs in the table according to @var{definitions}, a list of 98abbrevs in the table according to @var{definitions}, a list of
92elements of the form @code{(@var{abbrevname} @var{expansion} 99elements of the form @code{(@var{abbrevname} @var{expansion}
93@var{hook} @var{usecount} @r{[}@var{system-flag}@r{]})}. The return 100@var{hook} @var{usecount} @var{system-flag})}. If an element of
94value is always @code{nil}. 101@var{definitions} has length less than five, omitted elements default
102to @code{nil}. A value of @code{nil} for @var{usecount} is equivalent
103to zero. The return value is always @code{nil}.
104
105If this function is called more than once for the same @var{tabname},
106subsequent calls add the definitions in @var{definitions} to
107@var{tabname}, rather than overriding the entire original contents.
108(A subsequent call only overrides abbrevs explicitly redefined or
109undefined in @var{definitions}.)
95@end defun 110@end defun
96 111
97@defvar abbrev-table-name-list 112@defvar abbrev-table-name-list
@@ -105,38 +120,24 @@ named @var{name}. The argument @var{name} is a symbol whose value is an
105abbrev table. The return value is always @code{nil}. 120abbrev table. The return value is always @code{nil}.
106 121
107If @var{human} is non-@code{nil}, the description is human-oriented. 122If @var{human} is non-@code{nil}, the description is human-oriented.
108Otherwise the description is a Lisp expression---a call to 123System abbrevs are listed and identified as such. Otherwise the
109@code{define-abbrev-table} that would define @var{name} exactly as it 124description is a Lisp expression---a call to @code{define-abbrev-table}
110is currently defined. 125that would define @var{name} as it is currently defined, but without
126the system abbrevs. (The mode or package using @var{name} is supposed
127to add these to @var{name} separately.)
111@end defun 128@end defun
112 129
113@node Defining Abbrevs, Abbrev Files, Abbrev Tables, Abbrevs 130@node Defining Abbrevs, Abbrev Files, Abbrev Tables, Abbrevs
114@comment node-name, next, previous, up 131@comment node-name, next, previous, up
115@section Defining Abbrevs 132@section Defining Abbrevs
116 133 @code{define-abbrev} is the low-level basic function for defining an
117 These functions define an abbrev in a specified abbrev table. 134abbrev in a specified abbrev table. When major modes predefine
118@code{define-abbrev} is the low-level basic function, while 135standard abbrevs, they should call @code{define-abbrev} and specify
119@code{add-abbrev} is used by commands that ask for information from 136@code{t} for @var{system-flag}.
120the user. When major modes predefine standard abbrevs, they should
121call @code{define-abbrev} and specify @code{t} for @var{system-flag}.
122
123@defun add-abbrev table type arg
124This function adds an abbreviation to abbrev table @var{table} based on
125information from the user. The argument @var{type} is a string
126describing in English the kind of abbrev this will be (typically,
127@code{"global"} or @code{"mode-specific"}); this is used in prompting
128the user. The argument @var{arg} is the number of words in the
129expansion.
130
131The return value is the symbol that internally represents the new
132abbrev, or @code{nil} if the user declines to confirm redefining an
133existing abbrev.
134@end defun
135 137
136@defun define-abbrev table name expansion &optional hook count system-flag 138@defun define-abbrev table name expansion &optional hook count system-flag
137This function defines an abbrev named @var{name}, in @var{table}, to 139This function defines an abbrev named @var{name}, in @var{table}, to
138expand to @var{expansion} and call @var{hook}. The return value is a 140expand to @var{expansion} and call @var{hook}. The return value is
139symbol that represents the abbrev inside Emacs; its name is
140@var{name}. 141@var{name}.
141 142
142The value of @var{count}, if specified, initializes the abbrev's 143The value of @var{count}, if specified, initializes the abbrev's
@@ -210,9 +211,10 @@ This function does not display any messages. It returns @code{nil}.
210@end defun 211@end defun
211 212
212@defopt save-abbrevs 213@defopt save-abbrevs
213A non-@code{nil} value for @code{save-abbrev} means that Emacs should 214A non-@code{nil} value for @code{save-abbrevs} means that Emacs should
214save abbrevs when files are saved. @code{abbrev-file-name} specifies 215offer the user to save abbrevs when files are saved. If the value is
215the file to save the abbrevs in. 216@code{silently}, Emacs saves the abbrevs without asking the user.
217@code{abbrev-file-name} specifies the file to save the abbrevs in.
216@end defopt 218@end defopt
217 219
218@defvar abbrevs-changed 220@defvar abbrevs-changed
@@ -222,11 +224,11 @@ various Emacs commands to offer to save your abbrevs.
222@end defvar 224@end defvar
223 225
224@deffn Command write-abbrev-file &optional filename 226@deffn Command write-abbrev-file &optional filename
225Save all abbrev definitions (except ``system'' abbrevs), in all abbrev 227Save all abbrev definitions (except ``system'' abbrevs), for all abbrev
226tables, in the file @var{filename}, in the form of a Lisp program that 228tables listed in @code{abbrev-table-name-list}, in the file
227when loaded will define the same abbrevs. If @var{filename} is 229@var{filename}, in the form of a Lisp program that when loaded will
228@code{nil} or omitted, @code{abbrev-file-name} is used. This function 230define the same abbrevs. If @var{filename} is @code{nil} or omitted,
229returns @code{nil}. 231@code{abbrev-file-name} is used. This function returns @code{nil}.
230@end deffn 232@end deffn
231 233
232@node Abbrev Expansion, Standard Abbrev Tables, Abbrev Files, Abbrevs 234@node Abbrev Expansion, Standard Abbrev Tables, Abbrev Files, Abbrevs
@@ -249,9 +251,10 @@ abbrev table.
249 251
250@defun abbrev-expansion abbrev &optional table 252@defun abbrev-expansion abbrev &optional table
251This function returns the string that @var{abbrev} would expand into (as 253This function returns the string that @var{abbrev} would expand into (as
252defined by the abbrev tables used for the current buffer). The optional 254defined by the abbrev tables used for the current buffer). If
253argument @var{table} specifies the abbrev table to use, as in 255@var{abbrev} is not a valid abbrev, the function returns @code{nil}.
254@code{abbrev-symbol}. 256The optional argument @var{table} specifies the abbrev table to use,
257as in @code{abbrev-symbol}.
255@end defun 258@end defun
256 259
257@deffn Command expand-abbrev 260@deffn Command expand-abbrev
@@ -266,10 +269,15 @@ returns @code{nil} even though expansion did occur.
266@end deffn 269@end deffn
267 270
268@deffn Command abbrev-prefix-mark &optional arg 271@deffn Command abbrev-prefix-mark &optional arg
269Mark current point as the beginning of an abbrev. The next call to 272This command marks current point as the beginning of an abbrev. The
270@code{expand-abbrev} will use the text from here to point (where it is 273next call to @code{expand-abbrev} will use the text from here to point
271then) as the abbrev to expand, rather than using the previous word as 274(where it is then) as the abbrev to expand, rather than using the
272usual. 275previous word as usual.
276
277First, this command expands any abbrev before point, unless @var{arg}
278is non-@code{nil}. (Interactively, @var{arg} is the prefix argument.)
279Then it inserts a hyphen before point, to indicate the start of the
280next abbrev to be expanded. The actual expansion removes the hyphen.
273@end deffn 281@end deffn
274 282
275@defopt abbrev-all-caps 283@defopt abbrev-all-caps
@@ -280,11 +288,12 @@ expansion.
280@end defopt 288@end defopt
281 289
282@defvar abbrev-start-location 290@defvar abbrev-start-location
283This is the buffer position for @code{expand-abbrev} to use as the start 291This is a marker pointing to the buffer position for
284of the next abbrev to be expanded. (@code{nil} means use the word 292@code{expand-abbrev} to use as the start of the next abbrev to be
285before point instead.) @code{abbrev-start-location} is set to 293expanded. (@code{nil} means use the word before point instead.)
286@code{nil} each time @code{expand-abbrev} is called. This variable is 294@code{abbrev-start-location} is set to @code{nil} each time
287also set by @code{abbrev-prefix-mark}. 295@code{expand-abbrev} is called. This variable is also set by
296@code{abbrev-prefix-mark}.
288@end defvar 297@end defvar
289 298
290@defvar abbrev-start-location-buffer 299@defvar abbrev-start-location-buffer
diff --git a/lispref/calendar.texi b/lispref/calendar.texi
index 709f80f6b8b..f132ea8868b 100644
--- a/lispref/calendar.texi
+++ b/lispref/calendar.texi
@@ -255,7 +255,7 @@ occur on the first Tuesday after the first Monday in November of years
255divisible by 4: 255divisible by 4:
256 256
257@smallexample 257@smallexample
258(holiday-sexp (if (= 0 (% year 4)) 258(holiday-sexp '(if (= 0 (% year 4))
259 (calendar-gregorian-from-absolute 259 (calendar-gregorian-from-absolute
260 (1+ (calendar-dayname-on-or-before 260 (1+ (calendar-dayname-on-or-before
261 1 (+ 6 (calendar-absolute-from-gregorian 261 1 (+ 6 (calendar-absolute-from-gregorian
diff --git a/lispref/frames.texi b/lispref/frames.texi
index 02cc1e68f8d..0be4c525822 100644
--- a/lispref/frames.texi
+++ b/lispref/frames.texi
@@ -1503,6 +1503,7 @@ This function returns the contents of cut buffer number @var{n}.
1503If omitted @var{n} defaults to 0. 1503If omitted @var{n} defaults to 0.
1504@end defun 1504@end defun
1505 1505
1506@anchor{Definition of x-set-cut-buffer}
1506@defun x-set-cut-buffer string &optional push 1507@defun x-set-cut-buffer string &optional push
1507This function stores @var{string} into the first cut buffer (cut buffer 1508This function stores @var{string} into the first cut buffer (cut buffer
15080). If @var{push} is @code{nil}, only the first cut buffer is changed. 15090). If @var{push} is @code{nil}, only the first cut buffer is changed.
diff --git a/lispref/syntax.texi b/lispref/syntax.texi
index b2955400c8f..2628b42812e 100644
--- a/lispref/syntax.texi
+++ b/lispref/syntax.texi
@@ -397,10 +397,13 @@ prefix (@samp{'}). @xref{Motion and Syntax}.
397 In this section we describe functions for creating, accessing and 397 In this section we describe functions for creating, accessing and
398altering syntax tables. 398altering syntax tables.
399 399
400@defun make-syntax-table 400@defun make-syntax-table &optional table
401This function creates a new syntax table. It inherits the syntax for 401This function creates a new syntax table, with all values initialized
402letters and control characters from the standard syntax table. For 402to @code{nil}. If @var{table} is non-@code{nil}, it becomes the
403other characters, the syntax is copied from the standard syntax table. 403parent of the new syntax table, otherwise the standard syntax table is
404the parent. Like all char-tables, a syntax table inherits from its
405parent. Thus the original syntax of all characters in the returned
406syntax table is determined by the parent. @xref{Char-Tables}.
404 407
405Most major mode syntax tables are created in this way. 408Most major mode syntax tables are created in this way.
406@end defun 409@end defun
@@ -408,7 +411,7 @@ Most major mode syntax tables are created in this way.
408@defun copy-syntax-table &optional table 411@defun copy-syntax-table &optional table
409This function constructs a copy of @var{table} and returns it. If 412This function constructs a copy of @var{table} and returns it. If
410@var{table} is not supplied (or is @code{nil}), it returns a copy of the 413@var{table} is not supplied (or is @code{nil}), it returns a copy of the
411current syntax table. Otherwise, an error is signaled if @var{table} is 414standard syntax table. Otherwise, an error is signaled if @var{table} is
412not a syntax table. 415not a syntax table.
413@end defun 416@end defun
414 417
@@ -425,7 +428,7 @@ This function always returns @code{nil}. The old syntax information in
425the table for this character is discarded. 428the table for this character is discarded.
426 429
427An error is signaled if the first character of the syntax descriptor is not 430An error is signaled if the first character of the syntax descriptor is not
428one of the twelve syntax class designator characters. An error is also 431one of the seventeen syntax class designator characters. An error is also
429signaled if @var{char} is not a character. 432signaled if @var{char} is not a character.
430 433
431@example 434@example
@@ -559,10 +562,11 @@ table.
559have certain syntax classes. 562have certain syntax classes.
560 563
561@defun skip-syntax-forward syntaxes &optional limit 564@defun skip-syntax-forward syntaxes &optional limit
562This function moves point forward across characters having syntax classes 565This function moves point forward across characters having syntax
563mentioned in @var{syntaxes}. It stops when it encounters the end of 566classes mentioned in @var{syntaxes} (a string of syntax code
564the buffer, or position @var{limit} (if specified), or a character it is 567characters). It stops when it encounters the end of the buffer, or
565not supposed to skip. 568position @var{limit} (if specified), or a character it is not supposed
569to skip.
566 570
567If @var{syntaxes} starts with @samp{^}, then the function skips 571If @var{syntaxes} starts with @samp{^}, then the function skips
568characters whose syntax is @emph{not} in @var{syntaxes}. 572characters whose syntax is @emph{not} in @var{syntaxes}.
@@ -697,9 +701,10 @@ that can be nested.
697The minimum parenthesis depth encountered during this scan. 701The minimum parenthesis depth encountered during this scan.
698 702
699@item 703@item
700What kind of comment is active: @code{nil} for a comment of style ``a'', 704What kind of comment is active: @code{nil} for a comment of style
701@code{t} for a comment of style ``b'', and @code{syntax-table} for 705``a'' or when not inside a comment, @code{t} for a comment of style
702a comment that should be ended by a generic comment delimiter character. 706``b'', and @code{syntax-table} for a comment that should be ended by a
707generic comment delimiter character.
703 708
704@item 709@item
705The string or comment start position. While inside a comment, this is 710The string or comment start position. While inside a comment, this is
@@ -710,6 +715,12 @@ this element is @code{nil}.
710 715
711Elements 0, 3, 4, 5 and 7 are significant in the argument @var{state}. 716Elements 0, 3, 4, 5 and 7 are significant in the argument @var{state}.
712 717
718Actually, the return value is currently a list of ten, rather than
719nine, elements and @var{state} is allowed to be a list of ten elements
720as well. However, the meaning of the tenth element is subject to
721change and only the first eight elements of @var{state} need to be
722specified.
723
713@cindex indenting with parentheses 724@cindex indenting with parentheses
714This function is most often used to compute indentation for languages 725This function is most often used to compute indentation for languages
715that have nested parentheses. 726that have nested parentheses.
@@ -757,11 +768,11 @@ of what the syntax table says about them. (However, text properties
757can still override the syntax.) 768can still override the syntax.)
758@end defvar 769@end defvar
759 770
760@defvar parse-sexp-ignore-comments 771@defopt parse-sexp-ignore-comments
761@cindex skipping comments 772@cindex skipping comments
762If the value is non-@code{nil}, then comments are treated as 773If the value is non-@code{nil}, then comments are treated as
763whitespace by the functions in this section and by @code{forward-sexp}. 774whitespace by the functions in this section and by @code{forward-sexp}.
764@end defvar 775@end defopt
765 776
766@vindex parse-sexp-lookup-properties 777@vindex parse-sexp-lookup-properties
767The behaviour of @code{parse-partial-sexp} is also affected by 778The behaviour of @code{parse-partial-sexp} is also affected by
@@ -951,12 +962,12 @@ belongs to. In this category set, if the element at index @var{cat} is
951@code{t}, that means category @var{cat} is a member of the set, and that 962@code{t}, that means category @var{cat} is a member of the set, and that
952character @var{c} belongs to category @var{cat}. 963character @var{c} belongs to category @var{cat}.
953 964
965For the next three functions, the optional argument @var{table}
966defaults to the current buffer's category table.
967
954@defun define-category char docstring &optional table 968@defun define-category char docstring &optional table
955This function defines a new category, with name @var{char} and 969This function defines a new category, with name @var{char} and
956documentation @var{docstring}. 970documentation @var{docstring}, for the category table @var{table},
957
958The new category is defined for category table @var{table}, which
959defaults to the current buffer's category table.
960@end defun 971@end defun
961 972
962@defun category-docstring category &optional table 973@defun category-docstring category &optional table
@@ -971,7 +982,7 @@ in category table @var{table}.
971@end example 982@end example
972@end defun 983@end defun
973 984
974@defun get-unused-category table 985@defun get-unused-category &optional table
975This function returns a category name (a character) which is not 986This function returns a category name (a character) which is not
976currently defined in @var{table}. If all possible categories are in use 987currently defined in @var{table}. If all possible categories are in use
977in @var{table}, it returns @code{nil}. 988in @var{table}, it returns @code{nil}.
@@ -993,7 +1004,7 @@ This function returns the standard category table.
993@defun copy-category-table &optional table 1004@defun copy-category-table &optional table
994This function constructs a copy of @var{table} and returns it. If 1005This function constructs a copy of @var{table} and returns it. If
995@var{table} is not supplied (or is @code{nil}), it returns a copy of the 1006@var{table} is not supplied (or is @code{nil}), it returns a copy of the
996current category table. Otherwise, an error is signaled if @var{table} 1007standard category table. Otherwise, an error is signaled if @var{table}
997is not a category table. 1008is not a category table.
998@end defun 1009@end defun
999 1010
@@ -1023,11 +1034,11 @@ other categories.
1023@end defun 1034@end defun
1024 1035
1025@defun char-category-set char 1036@defun char-category-set char
1026This function returns the category set for character @var{char}. This 1037This function returns the category set for character @var{char} in the
1027is the bool-vector which records which categories the character 1038current buffer's category table. This is the bool-vector which
1028@var{char} belongs to. The function @code{char-category-set} does not 1039records which categories the character @var{char} belongs to. The
1029allocate storage, because it returns the same bool-vector that exists in 1040function @code{char-category-set} does not allocate storage, because
1030the category table. 1041it returns the same bool-vector that exists in the category table.
1031 1042
1032@example 1043@example
1033(char-category-set ?a) 1044(char-category-set ?a)
@@ -1056,10 +1067,11 @@ But if @var{reset} is non-@code{nil}, then it deletes @var{category}
1056instead. 1067instead.
1057@end defun 1068@end defun
1058 1069
1059@deffn Command describe-categories 1070@deffn Command describe-categories &optional buffer-or-name
1060This function describes the category specifications in the current 1071This function describes the category specifications in the current
1061category table. The descriptions are inserted in a buffer, which is 1072category table. It inserts the descriptions in a buffer, and then
1062then displayed. 1073displays that buffer. If @var{buffer-or-name} is non-@code{nil}, it
1074describes the category table of that buffer instead.
1063@end deffn 1075@end deffn
1064 1076
1065@ignore 1077@ignore
diff --git a/lispref/text.texi b/lispref/text.texi
index b6e477e6651..413c10e29c1 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -58,7 +58,7 @@ the character after point.
58 position stored in a register. 58 position stored in a register.
59* Base 64:: Conversion to or from base 64 encoding. 59* Base 64:: Conversion to or from base 64 encoding.
60* MD5 Checksum:: Compute the MD5 ``message digest''/``checksum''. 60* MD5 Checksum:: Compute the MD5 ``message digest''/``checksum''.
61* Atomic Changes:: Installing several buffer changs ``atomically''. 61* Atomic Changes:: Installing several buffer changes ``atomically''.
62* Change Hooks:: Supplying functions to be run when text is changed. 62* Change Hooks:: Supplying functions to be run when text is changed.
63@end menu 63@end menu
64 64
@@ -69,6 +69,9 @@ the character after point.
69Several simple functions are described here. See also @code{looking-at} 69Several simple functions are described here. See also @code{looking-at}
70in @ref{Regexp Search}. 70in @ref{Regexp Search}.
71 71
72In the following four functions, ``beginning'' or ``end'' of buffer
73refers to the beginning or end of the accessible portion.
74
72@defun char-after &optional position 75@defun char-after &optional position
73This function returns the character in the current buffer at (i.e., 76This function returns the character in the current buffer at (i.e.,
74immediately after) position @var{position}. If @var{position} is out of 77immediately after) position @var{position}. If @var{position} is out of
@@ -230,9 +233,9 @@ This is the contents of buffer foo
230This function returns the symbol (or word) at or near point, as a string. 233This function returns the symbol (or word) at or near point, as a string.
231The return value includes no text properties. 234The return value includes no text properties.
232 235
233The optional argument @var{really-word} is non-@code{nil}, it finds a 236If the optional argument @var{really-word} is non-@code{nil}, it finds a
234word; otherwise, it finds a symbol (which includes word characters and 237word; otherwise, it finds a symbol (which includes both word
235both symbol constituent characters). 238characters and symbol constituent characters).
236 239
237If the optional argument @var{strict} is non-@code{nil}, then point 240If the optional argument @var{strict} is non-@code{nil}, then point
238must be in or next to the symbol or word---if no symbol or word is 241must be in or next to the symbol or word---if no symbol or word is
@@ -273,10 +276,10 @@ copying them into strings first.
273@defun compare-buffer-substrings buffer1 start1 end1 buffer2 start2 end2 276@defun compare-buffer-substrings buffer1 start1 end1 buffer2 start2 end2
274This function lets you compare two substrings of the same buffer or two 277This function lets you compare two substrings of the same buffer or two
275different buffers. The first three arguments specify one substring, 278different buffers. The first three arguments specify one substring,
276giving a buffer and two positions within the buffer. The last three 279giving a buffer (or a buffer name) and two positions within the
277arguments specify the other substring in the same way. You can use 280buffer. The last three arguments specify the other substring in the
278@code{nil} for @var{buffer1}, @var{buffer2}, or both to stand for the 281same way. You can use @code{nil} for @var{buffer1}, @var{buffer2}, or
279current buffer. 282both to stand for the current buffer.
280 283
281The value is negative if the first substring is less, positive if the 284The value is negative if the first substring is less, positive if the
282first is greater, and zero if they are equal. The absolute value of 285first is greater, and zero if they are equal. The absolute value of
@@ -360,8 +363,7 @@ overlay.
360@defun insert-char character count &optional inherit 363@defun insert-char character count &optional inherit
361This function inserts @var{count} instances of @var{character} into the 364This function inserts @var{count} instances of @var{character} into the
362current buffer before point. The argument @var{count} should be a 365current buffer before point. The argument @var{count} should be a
363number (@code{nil} means 1), and @var{character} must be a character. 366number, and @var{character} must be a character. The value is @code{nil}.
364The value is @code{nil}.
365 367
366This function does not convert unibyte character codes 128 through 255 368This function does not convert unibyte character codes 128 through 255
367to multibyte characters, not even if the current buffer is a multibyte 369to multibyte characters, not even if the current buffer is a multibyte
@@ -375,7 +377,7 @@ insertion point. @xref{Sticky Properties}.
375@defun insert-buffer-substring from-buffer-or-name &optional start end 377@defun insert-buffer-substring from-buffer-or-name &optional start end
376This function inserts a portion of buffer @var{from-buffer-or-name} 378This function inserts a portion of buffer @var{from-buffer-or-name}
377(which must already exist) into the current buffer before point. The 379(which must already exist) into the current buffer before point. The
378text inserted is the region from @var{start} and @var{end}. (These 380text inserted is the region between @var{start} and @var{end}. (These
379arguments default to the beginning and end of the accessible portion of 381arguments default to the beginning and end of the accessible portion of
380that buffer.) This function returns @code{nil}. 382that buffer.) This function returns @code{nil}.
381 383
@@ -418,9 +420,10 @@ commands intended primarily for the user but useful also in Lisp
418programs. 420programs.
419 421
420@deffn Command insert-buffer from-buffer-or-name 422@deffn Command insert-buffer from-buffer-or-name
421This command inserts the entire contents of @var{from-buffer-or-name} 423This command inserts the entire accessible contents of
422(which must exist) into the current buffer after point. It leaves 424@var{from-buffer-or-name} (which must exist) into the current buffer
423the mark after the inserted text. The value is @code{nil}. 425after point. It leaves the mark after the inserted text. The value
426is @code{nil}.
424@end deffn 427@end deffn
425 428
426@deffn Command self-insert-command count 429@deffn Command self-insert-command count
@@ -501,11 +504,11 @@ yanked, but can be reinserted using the undo mechanism (@pxref{Undo}).
501Some deletion functions do save text in the kill ring in some special 504Some deletion functions do save text in the kill ring in some special
502cases. 505cases.
503 506
504 All of the deletion functions operate on the current buffer, and all 507 All of the deletion functions operate on the current buffer.
505return a value of @code{nil}.
506 508
507@deffn Command erase-buffer 509@deffn Command erase-buffer
508This function deletes the entire text of the current buffer, leaving it 510This function deletes the entire text of the current buffer
511(@emph{not} just the accessible portion), leaving it
509empty. If the buffer is read-only, it signals a @code{buffer-read-only} 512empty. If the buffer is read-only, it signals a @code{buffer-read-only}
510error; if some of the text in it is read-only, it signals a 513error; if some of the text in it is read-only, it signals a
511@code{text-read-only} error. Otherwise, it deletes the text without 514@code{text-read-only} error. Otherwise, it deletes the text without
@@ -591,8 +594,9 @@ The value returned is always @code{nil}.
591This option specifies how @code{backward-delete-char-untabify} should 594This option specifies how @code{backward-delete-char-untabify} should
592deal with whitespace. Possible values include @code{untabify}, the 595deal with whitespace. Possible values include @code{untabify}, the
593default, meaning convert a tab to many spaces and delete one; 596default, meaning convert a tab to many spaces and delete one;
594@code{hungry}, meaning delete all the whitespace characters before point 597@code{hungry}, meaning delete all tabs and spaces before point with
595with one command, and @code{nil}, meaning do nothing special for 598one command; @code{all} meaning delete all tabs, spaces and newlines
599before point, and @code{nil}, meaning do nothing special for
596whitespace characters. 600whitespace characters.
597@end defopt 601@end defopt
598 602
@@ -603,11 +607,14 @@ whitespace characters.
603commands intended primarily for the user but useful also in Lisp 607commands intended primarily for the user but useful also in Lisp
604programs. 608programs.
605 609
606@deffn Command delete-horizontal-space 610@deffn Command delete-horizontal-space &optional backward-only
607@cindex deleting whitespace 611@cindex deleting whitespace
608This function deletes all spaces and tabs around point. It returns 612This function deletes all spaces and tabs around point. It returns
609@code{nil}. 613@code{nil}.
610 614
615If @var{backward-only} is non-@code{nil}, the function deletes
616spaces and tabs before point, but not after point.
617
611In the following examples, we call @code{delete-horizontal-space} four 618In the following examples, we call @code{delete-horizontal-space} four
612times, once on each line, with point between the second and third 619times, once on each line, with point between the second and third
613characters on the line each time. 620characters on the line each time.
@@ -673,9 +680,10 @@ After the lines are joined, the function @code{fixup-whitespace} is
673responsible for deciding whether to leave a space at the junction. 680responsible for deciding whether to leave a space at the junction.
674@end deffn 681@end deffn
675 682
676@defun fixup-whitespace 683@deffn Command fixup-whitespace
677This function replaces all the whitespace surrounding point with either 684This function replaces all the horizontal whitespace surrounding point
678one space or no space, according to the context. It returns @code{nil}. 685with either one space or no space, according to the context. It
686returns @code{nil}.
679 687
680At the beginning or end of a line, the appropriate amount of space is 688At the beginning or end of a line, the appropriate amount of space is
681none. Before a character with close parenthesis syntax, or after a 689none. Before a character with close parenthesis syntax, or after a
@@ -709,7 +717,7 @@ This has too many spaces at the start of (this list)
709---------- Buffer: foo ---------- 717---------- Buffer: foo ----------
710@end group 718@end group
711@end smallexample 719@end smallexample
712@end defun 720@end deffn
713 721
714@deffn Command just-one-space 722@deffn Command just-one-space
715@comment !!SourceFile simple.el 723@comment !!SourceFile simple.el
@@ -722,7 +730,7 @@ This function deletes blank lines surrounding point. If point is on a
722blank line with one or more blank lines before or after it, then all but 730blank line with one or more blank lines before or after it, then all but
723one of them are deleted. If point is on an isolated blank line, then it 731one of them are deleted. If point is on an isolated blank line, then it
724is deleted. If point is on a nonblank line, the command deletes all 732is deleted. If point is on a nonblank line, the command deletes all
725blank lines following it. 733blank lines immediately following it.
726 734
727A blank line is defined as a line containing only tabs and spaces. 735A blank line is defined as a line containing only tabs and spaces.
728 736
@@ -771,7 +779,7 @@ would be difficult to change the terminology now.
771* Yanking:: How yanking is done. 779* Yanking:: How yanking is done.
772* Yank Commands:: Commands that access the kill ring. 780* Yank Commands:: Commands that access the kill ring.
773* Low-Level Kill Ring:: Functions and variables for kill ring access. 781* Low-Level Kill Ring:: Functions and variables for kill ring access.
774* Internals of Kill Ring:: Variables that hold kill-ring data. 782* Internals of Kill Ring:: Variables that hold kill ring data.
775@end menu 783@end menu
776 784
777@node Kill Ring Concepts 785@node Kill Ring Concepts
@@ -791,7 +799,7 @@ new entry automatically deletes the last entry.
791 799
792 When kill commands are interwoven with other commands, each kill 800 When kill commands are interwoven with other commands, each kill
793command makes a new entry in the kill ring. Multiple kill commands in 801command makes a new entry in the kill ring. Multiple kill commands in
794succession build up a single kill-ring entry, which would be yanked as a 802succession build up a single kill ring entry, which would be yanked as a
795unit; the second and subsequent consecutive kill commands add text to 803unit; the second and subsequent consecutive kill commands add text to
796the entry made by the first one. 804the entry made by the first one.
797 805
@@ -828,8 +836,10 @@ This is convenient because it lets the user use a series of kill
828commands to copy text from a read-only buffer into the kill ring. 836commands to copy text from a read-only buffer into the kill ring.
829 837
830If @var{yank-handler} is non-@code{nil}, this puts that value onto 838If @var{yank-handler} is non-@code{nil}, this puts that value onto
831the string of killed text, as a @code{yank-handler} property. 839the string of killed text, as a @code{yank-handler} text property.
832@xref{Yanking}. 840@xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, any
841@code{yank-handler} properties present on the killed text are copied
842onto the kill ring, like other text properties.
833@end deffn 843@end deffn
834 844
835@defopt kill-read-only-ok 845@defopt kill-read-only-ok
@@ -841,9 +851,7 @@ updating the kill ring but not changing the buffer.
841@deffn Command copy-region-as-kill start end 851@deffn Command copy-region-as-kill start end
842This command saves the region defined by @var{start} and @var{end} on 852This command saves the region defined by @var{start} and @var{end} on
843the kill ring (including text properties), but does not delete the text 853the kill ring (including text properties), but does not delete the text
844from the buffer. It returns @code{nil}. It also indicates the extent 854from the buffer. It returns @code{nil}.
845of the text copied by moving the cursor momentarily, or by displaying a
846message in the echo area.
847 855
848The command does not set @code{this-command} to @code{kill-region}, so a 856The command does not set @code{this-command} to @code{kill-region}, so a
849subsequent kill command does not append to the same kill ring entry. 857subsequent kill command does not append to the same kill ring entry.
@@ -865,9 +873,9 @@ text that they copy into the buffer.
865@defun insert-for-yank string 873@defun insert-for-yank string
866This function normally works like @code{insert} except that it doesn't 874This function normally works like @code{insert} except that it doesn't
867insert the text properties in the @code{yank-excluded-properties} 875insert the text properties in the @code{yank-excluded-properties}
868list. However, if the first character of @var{string} has a 876list. However, if any part of @var{string} has a non-@code{nil}
869non-@code{nil}@code{yank-handler} text property, that property 877@code{yank-handler} text property, that property can do various
870can do various special processing on the text being inserted. 878special processing on that part of the text being inserted.
871@end defun 879@end defun
872 880
873@defun insert-buffer-substring-as-yank buf &optional start end 881@defun insert-buffer-substring-as-yank buf &optional start end
@@ -876,12 +884,11 @@ doesn't insert the text properties in the
876@code{yank-excluded-properties} list. 884@code{yank-excluded-properties} list.
877@end defun 885@end defun
878 886
879 You can put a @code{yank-handler} text property on the text to 887 You can put a @code{yank-handler} text property on all or part of
880control how it will be inserted if it is yanked. The 888the text to control how it will be inserted if it is yanked. The
881@code{insert-for-yank} function looks for a @code{yank-handler} 889@code{insert-for-yank} function looks for that property. The property
882property on the first character in its @var{string} argument. The 890value must be a list of one to four elements, with the following
883property value must be a list of one to four elements, with the 891format (where elements after the first may be omitted):
884following format (where elements after the first may be omitted):
885 892
886@example 893@example
887(@var{function} @var{param} @var{noexclude} @var{undo}) 894(@var{function} @var{param} @var{noexclude} @var{undo})
@@ -891,15 +898,16 @@ following format (where elements after the first may be omitted):
891 898
892@table @var 899@table @var
893@item function 900@item function
894When @var{function} is present and non-nil, it is called instead of 901When @var{function} is present and non-@code{nil}, it is called instead of
895@code{insert} to insert the string. @var{function} takes one 902@code{insert} to insert the string. @var{function} takes one
896argument---the string to insert. 903argument---the string to insert.
897 904
898@item param 905@item param
899If @var{param} is present and non-@code{nil}, it replaces @var{string} 906If @var{param} is present and non-@code{nil}, it replaces @var{string}
900as the object passed to @var{function} (or @code{insert}); for 907(or the part of @var{string} being processed) as the object passed to
901example, if @var{function} is @code{yank-rectangle}, @var{param} 908@var{function} (or @code{insert}); for example, if @var{function} is
902should be a list of strings to insert as a rectangle. 909@code{yank-rectangle}, @var{param} should be a list of strings to
910insert as a rectangle.
903 911
904@item noexclude 912@item noexclude
905If @var{noexclude} is present and non-@code{nil}, the normal removal of the 913If @var{noexclude} is present and non-@code{nil}, the normal removal of the
@@ -908,7 +916,7 @@ responsible for removing those properties. This may be necessary
908if @var{function} adjusts point before or after inserting the object. 916if @var{function} adjusts point before or after inserting the object.
909 917
910@item undo 918@item undo
911If @var{undo} is present and non-nil, it is a function that will be 919If @var{undo} is present and non-@code{nil}, it is a function that will be
912called by @code{yank-pop} to undo the insertion of the current object. 920called by @code{yank-pop} to undo the insertion of the current object.
913It is called with two arguments, the start and end of the current 921It is called with two arguments, the start and end of the current
914region. @var{function} can set @code{yank-undo-function} to override 922region. @var{function} can set @code{yank-undo-function} to override
@@ -924,23 +932,29 @@ from the kill ring. The text properties are copied too.
924 932
925@deffn Command yank &optional arg 933@deffn Command yank &optional arg
926@cindex inserting killed text 934@cindex inserting killed text
927This command inserts before point the text in the first entry in the 935This command inserts before point the text at the front of the
928kill ring. It positions the mark at the beginning of that text, and 936kill ring. It positions the mark at the beginning of that text, and
929point at the end. 937point at the end.
930 938
931If @var{arg} is a list (which occurs interactively when the user 939If @var{arg} is a non-@code{nil} list (which occurs interactively when
932types @kbd{C-u} with no digits), then @code{yank} inserts the text as 940the user types @kbd{C-u} with no digits), then @code{yank} inserts the
933described above, but puts point before the yanked text and puts the mark 941text as described above, but puts point before the yanked text and
934after it. 942puts the mark after it.
935 943
936If @var{arg} is a number, then @code{yank} inserts the @var{arg}th most 944If @var{arg} is a number, then @code{yank} inserts the @var{arg}th
937recently killed text---the @var{arg}th element of the kill ring list. 945most recently killed text---the @var{arg}th element of the kill ring
946list, counted cyclically from the front, which is considered the
947first element for this purpose.
938 948
939@code{yank} does not alter the contents of the kill ring or rotate it. 949@code{yank} does not alter the contents of the kill ring, unless it
940It returns @code{nil}. 950used text provided by another program, in which case it pushes that text
951onto the kill ring. However if @var{arg} is an integer different from
952one, it rotates the kill ring to place the yanked string at the front.
953
954@code{yank} returns @code{nil}.
941@end deffn 955@end deffn
942 956
943@deffn Command yank-pop arg 957@deffn Command yank-pop &optional arg
944This command replaces the just-yanked entry from the kill ring with a 958This command replaces the just-yanked entry from the kill ring with a
945different entry from the kill ring. 959different entry from the kill ring.
946 960
@@ -949,6 +963,8 @@ This is allowed only immediately after a @code{yank} or another
949inserted by yanking. @code{yank-pop} deletes that text and inserts in 963inserted by yanking. @code{yank-pop} deletes that text and inserts in
950its place a different piece of killed text. It does not add the deleted 964its place a different piece of killed text. It does not add the deleted
951text to the kill ring, since it is already in the kill ring somewhere. 965text to the kill ring, since it is already in the kill ring somewhere.
966It does however rotate the kill ring to place the newly yanked string at
967the front.
952 968
953If @var{arg} is @code{nil}, then the replacement text is the previous 969If @var{arg} is @code{nil}, then the replacement text is the previous
954element of the kill ring. If @var{arg} is numeric, the replacement is 970element of the kill ring. If @var{arg} is numeric, the replacement is
@@ -966,7 +982,8 @@ The return value is always @code{nil}.
966If this variable is non-@code{nil}, the function @code{yank-pop} uses 982If this variable is non-@code{nil}, the function @code{yank-pop} uses
967its value instead of @code{delete-region} to delete the text 983its value instead of @code{delete-region} to delete the text
968inserted by the previous @code{yank} or 984inserted by the previous @code{yank} or
969@code{yank-pop} command. 985@code{yank-pop} command. The value must be a function of two
986arguments, the start and end of the current region.
970 987
971The function @code{insert-for-yank} automatically sets this variable 988The function @code{insert-for-yank} automatically sets this variable
972according to the @var{undo} element of the @code{yank-handler} 989according to the @var{undo} element of the @code{yank-handler}
@@ -992,27 +1009,44 @@ returns the @var{n}th kill, counting from the current yanking pointer.
992 1009
993If @var{n} is zero, indicating a request for the latest kill, 1010If @var{n} is zero, indicating a request for the latest kill,
994@code{current-kill} calls the value of 1011@code{current-kill} calls the value of
995@code{interprogram-paste-function} (documented below) before consulting 1012@code{interprogram-paste-function} (documented below) before
996the kill ring. 1013consulting the kill ring. If that value is a function and calling it
997@end defun 1014returns a string, @code{current-kill} pushes that string onto the kill
998 1015ring and returns it. It also sets the yanking pointer to point to
999@defun kill-new string &optional yank-handler 1016that new entry, regardless of the value of @var{do-not-move}.
1000This function puts the text @var{string} into the kill ring as a new 1017Otherwise, @code{current-kill} does not treat a zero value for @var{n}
1001entry at the front of the ring. It discards the oldest entry if 1018specially: it returns the entry pointed at by the yanking pointer and
1002appropriate. It also invokes the value of 1019does not move the yanking pointer.
1020@end defun
1021
1022@defun kill-new string &optional replace yank-handler
1023This function pushes the text @var{string} onto the kill ring and
1024makes the yanking pointer point to it. It discards the oldest entry
1025if appropriate. It also invokes the value of
1003@code{interprogram-cut-function} (see below). 1026@code{interprogram-cut-function} (see below).
1004 1027
1028If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the
1029first element of the kill ring with @var{string}, rather than pushing
1030@var{string} onto the kill ring.
1031
1005If @var{yank-handler} is non-@code{nil}, this puts that value onto 1032If @var{yank-handler} is non-@code{nil}, this puts that value onto
1006the string of killed text, as a @code{yank-handler} property. 1033the string of killed text, as a @code{yank-handler} property.
1007@xref{Yanking}. 1034@xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, then
1035@code{kill-new} copies any @code{yank-handler} properties present on
1036@var{string} onto the kill ring, as it does with other text properties.
1008@end defun 1037@end defun
1009 1038
1010@defun kill-append string before-p &optional yank-handler 1039@defun kill-append string before-p &optional yank-handler
1011This function appends the text @var{string} to the first entry in the 1040This function appends the text @var{string} to the first entry in the
1012kill ring. Normally @var{string} goes at the end of the entry, but if 1041kill ring and makes the yanking pointer point to the combined entry.
1042Normally @var{string} goes at the end of the entry, but if
1013@var{before-p} is non-@code{nil}, it goes at the beginning. This 1043@var{before-p} is non-@code{nil}, it goes at the beginning. This
1014function also invokes the value of @code{interprogram-cut-function} (see 1044function also invokes the value of @code{interprogram-cut-function}
1015below). This handles @var{yank-handler} just like @code{kill-new}. 1045(see below). This handles @var{yank-handler} just like
1046@code{kill-new}, except that if @var{yank-handler} is different from
1047the @code{yank-handler} property of the first entry of the kill ring,
1048@code{kill-append} pushes the concatenated string onto the kill ring,
1049instead of replacing the original first entry with it.
1016@end defun 1050@end defun
1017 1051
1018@defvar interprogram-paste-function 1052@defvar interprogram-paste-function
@@ -1023,7 +1057,7 @@ programs, when you are using a window system. Its value should be
1023If the value is a function, @code{current-kill} calls it to get the 1057If the value is a function, @code{current-kill} calls it to get the
1024``most recent kill''. If the function returns a non-@code{nil} value, 1058``most recent kill''. If the function returns a non-@code{nil} value,
1025then that value is used as the ``most recent kill''. If it returns 1059then that value is used as the ``most recent kill''. If it returns
1026@code{nil}, then the first element of @code{kill-ring} is used. 1060@code{nil}, then the front of the kill ring is used.
1027 1061
1028The normal use of this hook is to get the window system's primary 1062The normal use of this hook is to get the window system's primary
1029selection as the most recent kill, even if the selection belongs to 1063selection as the most recent kill, even if the selection belongs to
@@ -1033,13 +1067,17 @@ another application. @xref{Window System Selections}.
1033@defvar interprogram-cut-function 1067@defvar interprogram-cut-function
1034This variable provides a way of communicating killed text to other 1068This variable provides a way of communicating killed text to other
1035programs, when you are using a window system. Its value should be 1069programs, when you are using a window system. Its value should be
1036@code{nil} or a function of one argument. 1070@code{nil} or a function of one required and one optional argument.
1037 1071
1038If the value is a function, @code{kill-new} and @code{kill-append} call 1072If the value is a function, @code{kill-new} and @code{kill-append} call
1039it with the new first element of the kill ring as an argument. 1073it with the new first element of the kill ring as the first argument.
1074The second, optional, argument has the same meaning as the @var{push}
1075argument to @code{x-set-cut-buffer} (@pxref{Definition of
1076x-set-cut-buffer}) and only affects the second and later cut buffers.
1040 1077
1041The normal use of this hook is to set the window system's primary 1078The normal use of this hook is to set the window system's primary
1042selection from the newly killed text. @xref{Window System Selections}. 1079selection (and first cut buffer) from the newly killed text.
1080@xref{Window System Selections}.
1043@end defvar 1081@end defvar
1044 1082
1045@node Internals of Kill Ring 1083@node Internals of Kill Ring
@@ -1112,7 +1150,7 @@ that @kbd{C-y} should yank.
1112@defopt kill-ring-max 1150@defopt kill-ring-max
1113The value of this variable is the maximum length to which the kill 1151The value of this variable is the maximum length to which the kill
1114ring can grow, before elements are thrown away at the end. The default 1152ring can grow, before elements are thrown away at the end. The default
1115value for @code{kill-ring-max} is 30. 1153value for @code{kill-ring-max} is 60.
1116@end defopt 1154@end defopt
1117 1155
1118@node Undo 1156@node Undo
@@ -1149,7 +1187,9 @@ buffer.
1149@item (@var{text} . @var{position}) 1187@item (@var{text} . @var{position})
1150This kind of element indicates how to reinsert text that was deleted. 1188This kind of element indicates how to reinsert text that was deleted.
1151The deleted text itself is the string @var{text}. The place to 1189The deleted text itself is the string @var{text}. The place to
1152reinsert it is @code{(abs @var{position})}. 1190reinsert it is @code{(abs @var{position})}. If @var{position} is
1191positive, point was at the beginning of the deleted text, otherwise it
1192was at the end.
1153 1193
1154@item (t @var{high} . @var{low}) 1194@item (t @var{high} . @var{low})
1155This kind of element indicates that an unmodified buffer became 1195This kind of element indicates that an unmodified buffer became
@@ -1241,13 +1281,13 @@ In an interactive call, @var{buffer-or-name} is the current buffer.
1241You cannot specify any other buffer. 1281You cannot specify any other buffer.
1242@end deffn 1282@end deffn
1243 1283
1244@deffn Command buffer-disable-undo &optional buffer 1284@deffn Command buffer-disable-undo &optional buffer-or-name
1245@deffnx Command buffer-flush-undo &optional buffer 1285@deffnx Command buffer-flush-undo &optional buffer-or-name
1246@cindex disable undo 1286@cindex disable undo
1247This function discards the undo list of @var{buffer}, and disables 1287This function discards the undo list of @var{buffer-or-name}, and disables
1248further recording of undo information. As a result, it is no longer 1288further recording of undo information. As a result, it is no longer
1249possible to undo either previous changes or any subsequent changes. If 1289possible to undo either previous changes or any subsequent changes. If
1250the undo list of @var{buffer} is already disabled, this function 1290the undo list of @var{buffer-or-name} is already disabled, this function
1251has no effect. 1291has no effect.
1252 1292
1253This function returns @code{nil}. 1293This function returns @code{nil}.
@@ -3935,7 +3975,7 @@ changed text, its length is simply the difference between the first two
3935arguments. 3975arguments.
3936@end defvar 3976@end defvar
3937 3977
3938 Output of messges into the @samp{*Messages*} buffer does not 3978 Output of messages into the @samp{*Messages*} buffer does not
3939call these functions. 3979call these functions.
3940 3980
3941@defmac combine-after-change-calls body... 3981@defmac combine-after-change-calls body...
diff --git a/lispref/tips.texi b/lispref/tips.texi
index e917a90b0e4..18d62e9f458 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -538,7 +538,7 @@ important arguments.
538 538
539@item 539@item
540For consistency, phrase the verb in the first sentence of a function's 540For consistency, phrase the verb in the first sentence of a function's
541documentation string as an imperative--for instance, use ``Return the 541documentation string as an imperative---for instance, use ``Return the
542cons of A and B.'' in preference to ``Returns the cons of A and B@.'' 542cons of A and B.'' in preference to ``Returns the cons of A and B@.''
543Usually it looks good to do likewise for the rest of the first 543Usually it looks good to do likewise for the rest of the first
544paragraph. Subsequent paragraphs usually look better if each sentence 544paragraph. Subsequent paragraphs usually look better if each sentence
diff --git a/man/ChangeLog b/man/ChangeLog
index 02c2aed55a9..9d95b6bae45 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,21 @@
12004-02-23 Nick Roberts <nick@nick.uklinux.net>
2
3 * building.texi (Watch Expressions): Update.
4
52004-02-21 Juri Linkov <juri@jurta.org>
6
7 * cmdargs.texi (Action Arguments): Add alias --find-file. Add
8 --directory, --help, --version. Move text about command-line-args
9 to Command Arguments.
10 (Initial Options): Remove alias -batch. Add @cindex for --script.
11 Fix @cindex for -q. Add --no-desktop. Add alias --no-multibyte,
12 --no-unibyte.
13 (Window Size X): Join -g and --geometry. Add @cindex.
14 (Borders X): Fix @cindex for -ib. Add @cindex for -bw.
15 (Title X): Remove alias -title.
16 (Icons X): Remove alias -iconic.
17 (Misc X): New node.
18
12004-02-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 192004-02-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 20
3 * frames.texi (Drag and drop): Add Motif to list of supported 21 * frames.texi (Drag and drop): Add Motif to list of supported
diff --git a/man/building.texi b/man/building.texi
index 1613357684d..2985a04895c 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -705,7 +705,7 @@ on the tag to the left of the expression.
705@kindex RET @r{(GDB speedbar)} 705@kindex RET @r{(GDB speedbar)}
706@findex gdb-var-delete 706@findex gdb-var-delete
707With the cursor over the root expression of a complex data type, type 707With the cursor over the root expression of a complex data type, type
708@key{RET} or click @kbd{Mouse-2} to delete it from the speedbar 708@key{D} to delete it from the speedbar
709(@code{gdb-var-delete}). 709(@code{gdb-var-delete}).
710 710
711@findex gdb-edit-value 711@findex gdb-edit-value
@@ -714,13 +714,16 @@ data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit
714its value. A prompt for a new value appears in the mini-buffer 714its value. A prompt for a new value appears in the mini-buffer
715(@code{gdb-edit-value}). 715(@code{gdb-edit-value}).
716 716
717If you set the variable @code{gdb-show-changed-values} to a 717If you set the variable @code{gdb-show-changed-values} to
718non-@code{nil} value, then Emacs will use font-lock-warning-face to 718non-@code{nil} (the default value), then Emacs will use
719display values that have recently changed in the speedbar. 719font-lock-warning-face to display values that have recently changed in
720the speedbar.
720 721
721If you set the variable @code{gdb-use-colon-colon-notation} to a 722If you set the variable @code{gdb-use-colon-colon-notation} to a
722non-@code{nil} value, then, in C, Emacs will use the 723non-@code{nil} value, then, in C, Emacs will use the
723FUNCTION::VARIABLE format to display variables in the speedbar. 724FUNCTION::VARIABLE format to display variables in the speedbar.
725Since this does not work for variables defined in compound statements,
726the default value is @code{nil}.
724 727
725@node Other Buffers 728@node Other Buffers
726@subsubsection Other Buffers 729@subsubsection Other Buffers
diff --git a/man/cmdargs.texi b/man/cmdargs.texi
index b273fb15bf9..3daf96f0d00 100644
--- a/man/cmdargs.texi
+++ b/man/cmdargs.texi
@@ -1,5 +1,5 @@
1@c This is part of the Emacs manual. 1@c This is part of the Emacs manual.
2@c Copyright (C) 1985,86,87,93,94,95,1997,2001, 2003 Free Software Foundation, Inc. 2@c Copyright (C) 1985,86,87,93,94,95,97,2001,03,2004 Free Software Foundation, Inc.
3@c See file emacs.texi for copying conditions. 3@c See file emacs.texi for copying conditions.
4@node Command Arguments, X Resources, Service, Top 4@node Command Arguments, X Resources, Service, Top
5@appendix Command Line Arguments 5@appendix Command Line Arguments
@@ -46,27 +46,33 @@ and the tables below always show an equal sign.
46 46
47@cindex initial options (command line) 47@cindex initial options (command line)
48@cindex action options (command line) 48@cindex action options (command line)
49@vindex command-line-args
49 Most options specify how to initialize Emacs, or set parameters for 50 Most options specify how to initialize Emacs, or set parameters for
50the Emacs session. We call them @dfn{initial options}. A few options 51the Emacs session. We call them @dfn{initial options}. A few options
51specify things to do: for example, load libraries, call functions, or 52specify things to do: for example, load libraries, call functions, or
52terminate Emacs. These are called @dfn{action options}. These and file 53terminate Emacs. These are called @dfn{action options}. These and file
53names together are called @dfn{action arguments}. Emacs processes all 54names together are called @dfn{action arguments}. Emacs processes all
54the action arguments in the order they are written. 55the action arguments in the order they are written. The @file{.emacs} file
56can access the values of the action arguments as the elements of a list in
57the variable @code{command-line-args}.
58
59
55 60
56@menu 61@menu
57* Action Arguments:: Arguments to visit files, load libraries, 62* Action Arguments:: Arguments to visit files, load libraries,
58 and call functions. 63 and call functions.
59* Initial Options:: Arguments that take effect while starting Emacs. 64* Initial Options:: Arguments that take effect while starting Emacs.
60* Command Example:: Examples of using command line arguments. 65* Command Example:: Examples of using command line arguments.
61* Resume Arguments:: Specifying arguments when you resume a running Emacs. 66* Resume Arguments:: Specifying arguments when you resume a running Emacs.
62* Environment:: Environment variables that Emacs uses. 67* Environment:: Environment variables that Emacs uses.
63* Display X:: Changing the default display and using remote login. 68* Display X:: Changing the default display and using remote login.
64* Font X:: Choosing a font for text, under X. 69* Font X:: Choosing a font for text, under X.
65* Colors:: Choosing display colors. 70* Colors:: Choosing display colors.
66* Window Size X:: Start-up window size, under X. 71* Window Size X:: Start-up window size, under X.
67* Borders X:: Internal and external borders, under X. 72* Borders X:: Internal and external borders, under X.
68* Title X:: Specifying the initial frame's title. 73* Title X:: Specifying the initial frame's title.
69* Icons X:: Choosing what sort of icon to use, under X. 74* Icons X:: Choosing what sort of icon to use, under X.
75* Misc X:: Other display options.
70@end menu 76@end menu
71 77
72@node Action Arguments 78@node Action Arguments
@@ -76,10 +82,12 @@ the action arguments in the order they are written.
76 82
77@table @samp 83@table @samp
78@item @var{file} 84@item @var{file}
79@opindex --visit
80@itemx --visit=@var{file}
81@opindex --file 85@opindex --file
82@itemx --file=@var{file} 86@itemx --file=@var{file}
87@opindex --find-file
88@itemx --find-file=@var{file}
89@opindex --visit
90@itemx --visit=@var{file}
83@cindex visiting files, command-line argument 91@cindex visiting files, command-line argument
84@vindex inhibit-startup-buffer-menu 92@vindex inhibit-startup-buffer-menu
85Visit @var{file} using @code{find-file}. @xref{Visiting}. 93Visit @var{file} using @code{find-file}. @xref{Visiting}.
@@ -107,6 +115,12 @@ Load a Lisp library named @var{file} with the function @code{load}.
107directory, or in the Emacs library search path as specified 115directory, or in the Emacs library search path as specified
108with @env{EMACSLOADPATH} (@pxref{General Variables}). 116with @env{EMACSLOADPATH} (@pxref{General Variables}).
109 117
118@item -L @var{dir}
119@opindex -L
120@itemx --directory=@var{dir}
121@opindex --directory
122Add directory @var{dir} to the variable @code{load-path}.
123
110@item -f @var{function} 124@item -f @var{function}
111@opindex -f 125@opindex -f
112@itemx --funcall=@var{function} 126@itemx --funcall=@var{function}
@@ -133,13 +147,16 @@ what @kbd{M-x insert-file} does. @xref{Misc File Ops}.
133@item --kill 147@item --kill
134@opindex --kill 148@opindex --kill
135Exit from Emacs without asking for confirmation. 149Exit from Emacs without asking for confirmation.
136@end table
137 150
138@vindex command-line-args 151@item --help
139 The init file can access the values of the action arguments as the 152@opindex --help
140elements of a list in the variable @code{command-line-args}. The init 153Print a usage message listing all available options, then exit
141file can override the normal processing of the action arguments, or 154successfully.
142define new ones, by reading and setting this variable. 155
156@item --version
157@opindex --version
158Print Emacs version, then exit successfully.
159@end table
143 160
144@node Initial Options 161@node Initial Options
145@appendixsec Initial Options 162@appendixsec Initial Options
@@ -162,6 +179,7 @@ of these files or substitute other files for them.
162@opindex --terminal 179@opindex --terminal
163@cindex device for Emacs terminal I/O 180@cindex device for Emacs terminal I/O
164Use @var{device} as the device for terminal input and output. 181Use @var{device} as the device for terminal input and output.
182@samp{--terminal} implies @samp{--no-window-system}.
165 183
166@item -d @var{display} 184@item -d @var{display}
167@opindex -d 185@opindex -d
@@ -205,6 +223,7 @@ been explicitly requested.
205 223
206@item --script @var{file} 224@item --script @var{file}
207@opindex --script 225@opindex --script
226@cindex script mode
208Run Emacs in batch mode, like @samp{--batch}, and then read and 227Run Emacs in batch mode, like @samp{--batch}, and then read and
209execute the Lisp code in @var{file}. 228execute the Lisp code in @var{file}.
210 229
@@ -224,11 +243,12 @@ comment delimiter.
224@opindex -q 243@opindex -q
225@itemx --no-init-file 244@itemx --no-init-file
226@opindex --no-init-file 245@opindex --no-init-file
227@cindex bypassing init and site-start file 246@cindex bypassing init and @file{default.el} file
228@cindex init file, not loading 247@cindex init file, not loading
229@cindex @file{default.el} file, not loading 248@cindex @file{default.el} file, not loading
230Do not load your Emacs init file @file{~/.emacs}, or @file{default.el} 249Do not load your Emacs init file @file{~/.emacs}, or @file{default.el}
231either. When invoked like this, Emacs does not allow saving options 250either. Regardless of this switch, @file{site-start.el} is still loaded.
251When invoked like this, Emacs does not allow saving options
232changed with the @kbd{M-x customize} command and its variants. 252changed with the @kbd{M-x customize} command and its variants.
233@xref{Easy Customization}. 253@xref{Easy Customization}.
234 254
@@ -236,7 +256,7 @@ changed with the @kbd{M-x customize} command and its variants.
236@opindex --no-site-file 256@opindex --no-site-file
237@cindex @file{site-start.el} file, not loading 257@cindex @file{site-start.el} file, not loading
238Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u} 258Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u}
239and @samp{-batch} have no effect on the loading of this file---this is 259and @samp{--batch} have no effect on the loading of this file---this is
240the only option that blocks it. 260the only option that blocks it.
241 261
242@item --no-splash 262@item --no-splash
@@ -245,6 +265,10 @@ the only option that blocks it.
245Do not display a splash screen on startup; this is equivalent to 265Do not display a splash screen on startup; this is equivalent to
246setting the variable @code{inhibit-startup-message} to non-@code{nil}. 266setting the variable @code{inhibit-startup-message} to non-@code{nil}.
247 267
268@item --no-desktop
269@opindex --no-desktop
270Do not reload any saved desktop. @xref{Saving Emacs Sessions}.
271
248@item -u @var{user} 272@item -u @var{user}
249@opindex -u 273@opindex -u
250@itemx --user=@var{user} 274@itemx --user=@var{user}
@@ -260,6 +284,8 @@ Enable the Emacs Lisp debugger for errors in the init file.
260 284
261@item --unibyte 285@item --unibyte
262@opindex --unibyte 286@opindex --unibyte
287@itemx --no-multibyte
288@opindex --no-multibyte
263@cindex unibyte operation, command-line argument 289@cindex unibyte operation, command-line argument
264Do almost everything with single-byte buffers and strings. 290Do almost everything with single-byte buffers and strings.
265All buffers and strings are unibyte unless you (or a Lisp program) 291All buffers and strings are unibyte unless you (or a Lisp program)
@@ -270,6 +296,8 @@ variable @env{EMACS_UNIBYTE} has the same effect.
270 296
271@item --multibyte 297@item --multibyte
272@opindex --multibyte 298@opindex --multibyte
299@itemx --no-unibyte
300@opindex --no-unibyte
273Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs 301Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs
274uses multibyte characters by default, as usual. 302uses multibyte characters by default, as usual.
275@end table 303@end table
@@ -290,7 +318,7 @@ emacs -batch foo.c -l hack-c -f save-buffer >& log
290This says to visit @file{foo.c}, load @file{hack-c.el} (which makes 318This says to visit @file{foo.c}, load @file{hack-c.el} (which makes
291changes in the visited file), save @file{foo.c} (note that 319changes in the visited file), save @file{foo.c} (note that
292@code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and 320@code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and
293then exit back to the shell (because of @samp{-batch}). @samp{-batch} 321then exit back to the shell (because of @samp{--batch}). @samp{--batch}
294also guarantees there will be no problem redirecting output to 322also guarantees there will be no problem redirecting output to
295@file{log}, because Emacs will not assume that it has a display terminal 323@file{log}, because Emacs will not assume that it has a display terminal
296to work with. 324to work with.
@@ -944,14 +972,13 @@ position of the initial Emacs frame:
944@table @samp 972@table @samp
945@item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} 973@item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
946@opindex -g 974@opindex -g
975@itemx --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
976@opindex --geometry
977@cindex geometry, command-line argument
947Specify the size @var{width} and @var{height} (measured in character 978Specify the size @var{width} and @var{height} (measured in character
948columns and lines), and positions @var{xoffset} and @var{yoffset} 979columns and lines), and positions @var{xoffset} and @var{yoffset}
949(measured in pixels). This applies to all frames. 980(measured in pixels). This applies to all frames.
950 981
951@item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
952@opindex --geometry
953This is another way of writing the same thing.
954
955@item -fs 982@item -fs
956@opindex -fs 983@opindex -fs
957@itemx --fullscreen 984@itemx --fullscreen
@@ -1029,7 +1056,7 @@ specification assuming there is a tool bar, and then your
1029@file{~/.emacs} file disables the tool bar, you will end up with a 1056@file{~/.emacs} file disables the tool bar, you will end up with a
1030frame geometry different from what you asked for. To get the intended 1057frame geometry different from what you asked for. To get the intended
1031size with no tool bar, use an X resource to specify ``no tool bar'' 1058size with no tool bar, use an X resource to specify ``no tool bar''
1032(@pxref{Table of Resources});then Emacs will already know there's no 1059(@pxref{Table of Resources}); then Emacs will already know there's no
1033tool bar when it processes the specified geometry. 1060tool bar when it processes the specified geometry.
1034 1061
1035 When using one of @samp{--fullscreen}, @samp{--fullwidth} or 1062 When using one of @samp{--fullscreen}, @samp{--fullwidth} or
@@ -1057,13 +1084,15 @@ you can click on to move or iconify the window.
1057@opindex -ib 1084@opindex -ib
1058@itemx --internal-border=@var{width} 1085@itemx --internal-border=@var{width}
1059@opindex --internal-border 1086@opindex --internal-border
1060@cindex border width, command-line argument 1087@cindex internal border width, command-line argument
1061Specify @var{width} as the width of the internal border, in pixels. 1088Specify @var{width} as the width of the internal border (between the text
1089and the main border), in pixels.
1062 1090
1063@item -bw @var{width} 1091@item -bw @var{width}
1064@opindex -bw 1092@opindex -bw
1065@itemx --border-width=@var{width} 1093@itemx --border-width=@var{width}
1066@opindex --border-width 1094@opindex --border-width
1095@cindex main border width, command-line argument
1067Specify @var{width} as the width of the main border, in pixels. 1096Specify @var{width} as the width of the main border, in pixels.
1068@end table 1097@end table
1069 1098
@@ -1091,11 +1120,10 @@ there is more than one frame).
1091line option: 1120line option:
1092 1121
1093@table @samp 1122@table @samp
1094@item -title @var{title} 1123@item -T @var{title}
1095@opindex --title
1096@itemx --title=@var{title}
1097@itemx -T @var{title}
1098@opindex -T 1124@opindex -T
1125@itemx --title=@var{title}
1126@opindex --title
1099@cindex frame title, command-line argument 1127@cindex frame title, command-line argument
1100Specify @var{title} as the title for the initial Emacs frame. 1128Specify @var{title} as the title for the initial Emacs frame.
1101@end table 1129@end table
@@ -1138,6 +1166,35 @@ rather than showing a frame right away. In this situation, the icon
1138is the only indication that Emacs has started; the text frame doesn't 1166is the only indication that Emacs has started; the text frame doesn't
1139appear until you deiconify it. 1167appear until you deiconify it.
1140 1168
1169@node Misc X
1170@appendixsec Other Display Options
1171
1172@table @samp
1173@item -hb
1174@opindex -hb
1175@itemx --horizontal-scroll-bars
1176@opindex --horizontal-scroll-bars
1177@cindex horizontal scroll bars, command-line argument
1178Enable horizontal scroll bars.
1179
1180@item -vb
1181@opindex -vb
1182@itemx --vertical-scroll-bars
1183@opindex --vertical-scroll-bars
1184@cindex vertical scroll bars, command-line argument
1185Enable vertical scroll bars.
1186
1187@item -lsp @var{pixels}
1188@opindex -lsp
1189@itemx --line-spacing=@var{pixels}
1190@opindex --line-spacing
1191@cindex line spacing, command-line argument
1192Specify @var{pixels} as additional space to put between lines, in pixels.
1193@end table
1194
1195 The @samp{--xrm} option (@pxref{Resources}) specifies additional
1196X resource values.
1197
1141@ignore 1198@ignore
1142 arch-tag: fffecd9e-7329-4a51-a3cc-dd4a9889340e 1199 arch-tag: fffecd9e-7329-4a51-a3cc-dd4a9889340e
1143@end ignore 1200@end ignore
diff --git a/src/ChangeLog b/src/ChangeLog
index a25239d88a3..1a2f7f4e20b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,26 @@
12004-02-23 Luc Teirlinck <teirllm@auburn.edu>
2
3 * abbrev.c (Finsert_abbrev_table_description): Doc fix.
4
52004-02-22 Jason Rumney <jasonr@gnu.org>
6
7 * w32term.c (w32_draw_fringe_bitmap): Draw overlaid bitmaps
8 correctly over other bitmaps.
9
102004-02-21 Eli Zaretskii <eliz@elta.co.il>
11
12 * emacs.c (USAGE1): Split into two halves.
13 (USAGE2): Second half of the old USAGE1.
14 (USAGE3): Renamed from USAGE2.
15 (USAGE4): Renamed from USAGE3.
16
172004-02-21 Juri Linkov <juri@jurta.org>
18
19 * emacs.c (USAGE1): Add --no-desktop. Move --display from USAGE2.
20 Fix --multibyte. Move --help, --version to USAGE2. Add alias
21 --file. Fix -f, -l. Sort options. Untabify.
22 (USAGE2): Add -hb. Fix --name, --title. Sort options. Untabify.
23
12004-02-19 Luc Teirlinck <teirllm@auburn.edu> 242004-02-19 Luc Teirlinck <teirllm@auburn.edu>
2 25
3 * category.c (Fdefine_category, Fcategory_docstring) 26 * category.c (Fdefine_category, Fcategory_docstring)
diff --git a/src/abbrev.c b/src/abbrev.c
index 1cf06946631..41e329ac95d 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -540,7 +540,8 @@ is inserted. Otherwise the description is an expression,
540a call to `define-abbrev-table', which would 540a call to `define-abbrev-table', which would
541define the abbrev table NAME exactly as it is currently defined. 541define the abbrev table NAME exactly as it is currently defined.
542 542
543Abbrevs marked as "system abbrevs" are omitted. */) 543Abbrevs marked as "system abbrevs" are normally omitted. However, if
544READABLE is non-nil, they are listed. */)
544 (name, readable) 545 (name, readable)
545 Lisp_Object name, readable; 546 Lisp_Object name, readable;
546{ 547{
diff --git a/src/emacs.c b/src/emacs.c
index 20c6295e2e2..96fd323c42a 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -221,6 +221,8 @@ int initial_argc;
221static void sort_args (); 221static void sort_args ();
222void syms_of_emacs (); 222void syms_of_emacs ();
223 223
224/* MSVC needs each string be shorter than 2048 bytes, so the usage
225 strings below are split to not overflow this limit. */
224#define USAGE1 "\ 226#define USAGE1 "\
225Usage: %s [OPTION-OR-FILENAME]...\n\ 227Usage: %s [OPTION-OR-FILENAME]...\n\
226\n\ 228\n\
@@ -233,66 +235,71 @@ read the main documentation for these command-line arguments.\n\
233\n\ 235\n\
234Initialization options:\n\ 236Initialization options:\n\
235\n\ 237\n\
236--batch do not do interactive display; implies -q\n\ 238--batch do not do interactive display; implies -q\n\
237--script FILE run FILE as an Emacs Lisp script.\n\ 239--debug-init enable Emacs Lisp debugger for init file\n\
238--debug-init enable Emacs Lisp debugger during init file\n\ 240--display, -d DISPLAY use X server DISPLAY\n\
239--help display this help message and exit\n\ 241--multibyte, --no-unibyte inhibit the effect of EMACS_UNIBYTE\n\
240--multibyte, --no-unibyte run Emacs in multibyte mode\n\ 242--no-desktop do not load a saved desktop\n\
241--no-init-file, -q load neither ~/.emacs nor default.el\n\ 243--no-init-file, -q load neither ~/.emacs nor default.el\n\
242--no-shared-memory, -nl do not use shared memory\n\ 244--no-shared-memory, -nl do not use shared memory\n\
243--no-site-file do not load site-start.el\n\ 245--no-site-file do not load site-start.el\n\
244--no-splash do not display a splash screen on startup\n\ 246--no-splash do not display a splash screen on startup\n\
245--no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ 247--no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\
246--terminal, -t DEVICE use DEVICE for terminal I/O\n\ 248--script FILE run FILE as an Emacs Lisp script\n\
249--terminal, -t DEVICE use DEVICE for terminal I/O\n\
247--unibyte, --no-multibyte run Emacs in unibyte mode\n\ 250--unibyte, --no-multibyte run Emacs in unibyte mode\n\
248--user, -u USER load ~USER/.emacs instead of your own\n\ 251--user, -u USER load ~USER/.emacs instead of your own\n\
249--version display version information and exit\n\ 252\n%s"
250\n\ 253
254#define USAGE2 "\
251Action options:\n\ 255Action options:\n\
252\n\ 256\n\
253FILE visit FILE using find-file\n\ 257FILE visit FILE using find-file\n\
254+LINE FILE visit FILE using find-file, then go to line LINE\n\ 258+LINE FILE visit FILE using find-file, then go to line LINE\n\
255+LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ 259+LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\
256 column COLUMN\n\ 260 column COLUMN\n\
257--directory, -L DIR add DIR to variable load-path\n\ 261--directory, -L DIR add DIR to variable load-path\n\
258--eval EXPR evaluate Emacs Lisp expression EXPR\n\ 262--eval EXPR evaluate Emacs Lisp expression EXPR\n\
259--execute EXPR evaluate Emacs Lisp expression EXPR\n\ 263--execute EXPR evaluate Emacs Lisp expression EXPR\n\
260--find-file FILE visit FILE\n\ 264--file FILE visit FILE using find-file\n\
261--funcall, -f FUNC call Emacs function FUNC with no arguments\n\ 265--find-file FILE visit FILE using find-file\n\
262--insert FILE insert contents of FILE into current buffer\n\ 266--funcall, -f FUNC call Emacs Lisp function FUNC with no arguments\n\
263--kill exit without asking for confirmation\n\ 267--insert FILE insert contents of FILE into current buffer\n\
264--load, -l FILE load FILE of Emacs Lisp code using the load function\n\ 268--kill exit without asking for confirmation\n\
265--visit FILE visit FILE\n\ 269--load, -l FILE load Emacs Lisp FILE using the load function\n\
270--visit FILE visit FILE using find-file\n\
266\n" 271\n"
267 272
268#define USAGE2 "\ 273#define USAGE3 "\
269Display options:\n\ 274Display options:\n\
270\n\ 275\n\
271--background-color, -bg COLOR window background color\n\ 276--background-color, -bg COLOR window background color\n\
272--border-color, -bd COLOR main border color\n\ 277--border-color, -bd COLOR main border color\n\
273--border-width, -bw WIDTH width of main border\n\ 278--border-width, -bw WIDTH width of main border\n\
274--color=MODE color mode for character terminals;\n\ 279--color MODE color mode for character terminals;\n\
275 MODE defaults to `auto', and can also\n\ 280 MODE defaults to `auto', and can also\n\
276 be `never', `auto', `always',\n\ 281 be `never', `auto', `always',\n\
277 or a mode name like `ansi8'\n\ 282 or a mode name like `ansi8'\n\
278--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ 283--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\
279--display, -d DISPLAY use X server DISPLAY\n\ 284--font, -fn FONT default font; must be fixed-width\n\
280--font, -fn FONT default font; must be fixed-width\n\ 285--foreground-color, -fg COLOR window foreground color\n\
281--foreground-color, -fg COLOR window foreground color\n\ 286--fullheight, -fh make the first frame high as the screen\n\
282--fullscreen, -fs make first frame fullscreen\n\ 287--fullscreen, -fs make first frame fullscreen\n\
283--fullwidth, -fw make the first frame wide as the screen\n\ 288--fullwidth, -fw make the first frame wide as the screen\n\
284--fullheight, -fh make the first frame high as the screen\n\ 289--geometry, -g GEOMETRY window geometry\n\
285--geometry, -g GEOMETRY window geometry\n\ 290--horizontal-scroll-bars, -hb enable horizontal scroll bars\n\
286--iconic start Emacs in iconified state\n\ 291--icon-type, -i use picture of gnu for Emacs icon\n\
287--icon-type, -i use picture of gnu for Emacs icon\n\ 292--iconic start Emacs in iconified state\n\
288--internal-border, -ib WIDTH width between text and main border\n\ 293--internal-border, -ib WIDTH width between text and main border\n\
289--line-spacing, -lsp PIXELS additional space to put between lines\n\ 294--line-spacing, -lsp PIXELS additional space to put between lines\n\
290--mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ 295--mouse-color, -ms COLOR mouse cursor color in Emacs window\n\
291--name NAME title of main Emacs window\n\ 296--name NAME title for initial Emacs frame\n\
292--reverse-video, -r, -rv switch foreground and background\n\ 297--reverse-video, -r, -rv switch foreground and background\n\
293--title, -T, -wn TITLE title for Emacs windows\n\ 298--title, -T TITLE title for initial Emacs frame\n\
294--vertical-scroll-bars, -vb enable vertical scroll bars\n\ 299--vertical-scroll-bars, -vb enable vertical scroll bars\n\
295--xrm XRESOURCES set additional X resources\n\ 300--xrm XRESOURCES set additional X resources\n\
301--help display this help and exit\n\
302--version output version information and exit\n\
296\n\ 303\n\
297You can generally also specify long option names with a single -; for\n\ 304You can generally also specify long option names with a single -; for\n\
298example, -batch as well as --batch. You can use any unambiguous\n\ 305example, -batch as well as --batch. You can use any unambiguous\n\
@@ -302,7 +309,7 @@ Various environment variables and window system resources also affect\n\
302Emacs' operation. See the main documentation.\n\ 309Emacs' operation. See the main documentation.\n\
303\n" 310\n"
304 311
305#define USAGE3 "\ 312#define USAGE4 "\
306Report bugs to %s. First, please see the Bugs\n\ 313Report bugs to %s. First, please see the Bugs\n\
307section of the Emacs manual or the file BUGS.\n" 314section of the Emacs manual or the file BUGS.\n"
308 315
@@ -1062,9 +1069,9 @@ main (argc, argv
1062 /* Handle the --help option, which gives a usage message. */ 1069 /* Handle the --help option, which gives a usage message. */
1063 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) 1070 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args))
1064 { 1071 {
1065 printf (USAGE1, argv[0]); 1072 printf (USAGE1, argv[0], USAGE2);
1066 printf (USAGE2); 1073 printf (USAGE3);
1067 printf (USAGE3, bug_reporting_address ()); 1074 printf (USAGE4, bug_reporting_address ());
1068 exit (0); 1075 exit (0);
1069 } 1076 }
1070 1077
diff --git a/src/w32term.c b/src/w32term.c
index 82db82826e8..92d508691cd 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -715,29 +715,41 @@ w32_draw_fringe_bitmap (w, row, p)
715 SaveDC (hdc); 715 SaveDC (hdc);
716 716
717 horig_obj = SelectObject (compat_hdc, pixmap); 717 horig_obj = SelectObject (compat_hdc, pixmap);
718 SetTextColor (hdc, face->background);
719 SetBkColor (hdc, p->cursor_p
720 ? (p->overlay_p ? face->background
721 : f->output_data.w32->cursor_pixel)
722 : face->foreground);
723 718
724 /* Paint overlays transparently. */ 719 /* Paint overlays transparently. */
725 if (p->overlay_p) 720 if (p->overlay_p)
726 { 721 {
727 BitBlt (hdc, p->x, p->y, p->wd, p->h, 722 HBRUSH h_brush, h_orig_brush;
728 compat_hdc, 0, p->dh, 723
729 DSTINVERT); 724 SetTextColor (hdc, BLACK_PIX_DEFAULT (f));
730 BitBlt (hdc, p->x, p->y, p->wd, p->h, 725 SetBkColor (hdc, WHITE_PIX_DEFAULT (f));
731 compat_hdc, 0, p->dh, 726 h_brush = CreateSolidBrush (face->foreground);
732 MERGEPAINT); 727 h_orig_brush = SelectObject (hdc, h_brush);
733 BitBlt (hdc, p->x, p->y, p->wd, p->h, 728
734 compat_hdc, 0, p->dh, 729 BitBlt (hdc, p->x, p->y, p->wd, p->h,
735 DSTINVERT); 730 compat_hdc, 0, p->dh,
731 DSTINVERT);
732 BitBlt (hdc, p->x, p->y, p->wd, p->h,
733 compat_hdc, 0, p->dh,
734 0x2E064A);
735 BitBlt (hdc, p->x, p->y, p->wd, p->h,
736 compat_hdc, 0, p->dh,
737 DSTINVERT);
738
739 SelectObject (hdc, h_orig_brush);
740 DeleteObject (h_brush);
736 } 741 }
737 else 742 else
738 BitBlt (hdc, p->x, p->y, p->wd, p->h, 743 {
739 compat_hdc, 0, p->dh, 744 SetTextColor (hdc, face->background);
740 SRCCOPY); 745 SetBkColor (hdc, (p->cursor_p
746 ? f->output_data.w32->cursor_pixel
747 : face->foreground));
748
749 BitBlt (hdc, p->x, p->y, p->wd, p->h,
750 compat_hdc, 0, p->dh,
751 SRCCOPY);
752 }
741 753
742 SelectObject (compat_hdc, horig_obj); 754 SelectObject (compat_hdc, horig_obj);
743 DeleteDC (compat_hdc); 755 DeleteDC (compat_hdc);