Mercurial > emacs
changeset 83054:bc4c00966ad3
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 24 Feb 2004 22:48:10 +0000 |
parents | 84bfe7168c06 (current diff) 8025b7d4aa49 (diff) |
children | e6b7cd8486dd |
files | lisp/ChangeLog lisp/startup.el src/emacs.c src/w32term.c |
diffstat | 27 files changed, 720 insertions(+), 414 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/NEWS Tue Feb 24 18:00:36 2004 +0000 +++ b/etc/NEWS Tue Feb 24 22:48:10 2004 +0000 @@ -88,6 +88,15 @@ * Changes in Emacs 21.4 +--- +** The saveplace.el package now filters out unreadable files. +When you exit Emacs, the saved positions in visited files no longer +include files that aren't readable, e.g. files that don't exist. +Customize the new option `save-place-forget-unreadable-files' to nil +to get the old behavior. The new options `save-place-save-skipped' +and `save-place-skip-check-regexp' allow further fine-tuning of this +feature. + ** On window systems, lines which are exactly as wide as the window (not counting the final newline character) are no longer broken into two lines on the display (with just the newline on the second line). @@ -1871,6 +1880,7 @@ tasks, for example; it can be used by the copyright package to make sure saved files have the current year in any copyright headers. ++++ ** The function `insert-for-yank' now supports strings where the `yank-handler' property does not span the first character of the string. The old behavior is available if you call
--- a/lisp/ChangeLog Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/ChangeLog Tue Feb 24 22:48:10 2004 +0000 @@ -1,3 +1,68 @@ +2004-02-23 Luc Teirlinck <teirllm@auburn.edu> + + * abbrev.el (write-abbrev-file): Make argument optional. Doc fix. + (abbrev-prefix-mark): Doc fix. + +2004-02-23 Nick Roberts <nick@nick.uklinux.net> + + * gdb-ui.el (gud-watch): Load tooltip, if necessary. + (gdb-var-create-handler): Force speedbar-update-flag to be non-nil. + (gdb-var-delete): Make interactive (really). + (gdb-edit-value): Make non-interactive. + + * progmodes/gud.el (gud-install-speedbar-variables): Bind + gdb-var-delete to "D". + (gud-speedbar-menu-items): Add gdb-var-delete and, indirectly, + gdb-edit-value. + (gud-speedbar-buttons): Remove gdb-var-delete from tag-line. + (gud-gdb-marker-filter): Add comment for annotations. + +2004-02-23 Glenn Morris <gmorris@ast.cam.ac.uk> + + * calendar/calendar.el (generate-calendar) + (calendar-read-date): Prevent display of BC calendars once more - + reverts 2003-10-01 change. + (generate-calendar-month): Doc fix. + +2004-02-03 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change) + + * calendar/diary-lib.el (fancy-diary-display): Don't rely on + return value of increment-calendar-month. + +2004-02-21 Stephen Compall <s11@member.fsf.org> + + * saveplace.el (save-place-forget-unreadable-files) + (save-place-save-skipped, save-place-skip-check-regexp): New + defcustoms. + (save-place-forget-unreadable-files): New function. + (save-place-alist-to-file): Use it to filter out files that are + no longer readable. + + * textmodes/texinfo.el (texinfo-insert-@item): Look for the + current Texinfo environment, using the same method as in + `texinfo-insert-@end', and insert a space rather than a newline if + point in a @table environment. + +2004-02-21 Juri Linkov <juri@jurta.org> + + * ffap.el (ffap-file-at-point): Try parent directories. + +2004-02-21 Klaus Zeitler <kzeitler@lucent.com> + + * vcursor.el (vcursor-modifiers): New defcustom. + (vcursor-cs-binding): Use vcursor-modifiers instead of a + hard-coded list. + +2004-02-21 Masatake YAMATO <jet@gyve.org> + + * play/animate.el (animate-birthday-present): Accept names other + than `Sarah', too. + +2004-02-21 Juri Linkov <juri@jurta.org> + + * startup.el: Remove table of command line arguments from the + Commentary section. + 2004-02-20 John Wiegley <johnw@newartisans.com> * eshell/em-pred.el (eshell-modifier-alist): Changed the "eval @@ -164,7 +229,7 @@ * newcomment.el (uncomment-region): Allow eob as comment end. -2004-02-16 Jari Aalto <jari.aalto@poboxes.com> (tiny change) +2004-02-16 Jari Aalto <jari.aalto@poboxes.com> * filecache.el: All message and error commands now use prefix "Filecache:" to make it easy to read *Messages* buffer.
--- a/lisp/abbrev.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/abbrev.el Tue Feb 24 22:48:10 2004 +0000 @@ -201,10 +201,13 @@ ;(interactive "fRead abbrev file: ") (read-abbrev-file file t)) -(defun write-abbrev-file (file) - "Write all abbrev definitions to a file of Lisp code. +(defun write-abbrev-file (&optional file) + "Write all user-level abbrev definitions to a file of Lisp code. +This does not include system abbrevs; it includes only the abbrev tables +listed in listed in `abbrev-table-name-list'. The file written can be loaded in another session to define the same abbrevs. -The argument FILE is the file name to write." +The argument FILE is the file name to write. If omitted or nil, the file +specified in `abbrev-file-name' is used." (interactive (list (read-file-name "Write abbrev file: " @@ -307,7 +310,11 @@ "Mark current point as the beginning of an abbrev. Abbrev to be expanded starts here rather than at beginning of word. This way, you can expand an abbrev with a prefix: insert the prefix, -use this command, then insert the abbrev." +use this command, then insert the abbrev. This command inserts a +temporary hyphen after the prefix \(until the intended abbrev +expansion occurs). +If the prefix is itself an abbrev, this command expands it, unless +ARG is non-nil. Interactively, ARG is the prefix argument." (interactive "P") (or arg (expand-abbrev)) (setq abbrev-start-location (point-marker)
--- a/lisp/calendar/calendar.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/calendar/calendar.el Tue Feb 24 22:48:10 2004 +0000 @@ -1924,12 +1924,15 @@ (run-hooks 'today-invisible-calendar-hook))))) (defun generate-calendar (month year) - "Generate a three-month Gregorian calendar centered around MONTH, YEAR. -A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. -Note that while calendars can be displayed for years BC, some functions (eg -motion, complex holiday functions) will not work correctly for such dates." - (setq displayed-month month) - (setq displayed-year year) + "Generate a three-month Gregorian calendar centered around MONTH, YEAR." +;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. +;;; Note that while calendars for years BC could be displayed as it +;;; stands, almost all other calendar functions (eg holidays) would +;;; at best have unpredictable results for such dates. + (if (< (+ month (* 12 (1- year))) 2) + (error "Months before February, 1 AD are not available")) + (setq displayed-month month + displayed-year year) (erase-buffer) (increment-calendar-month month year -1) (calendar-for-loop i from 0 to 2 do @@ -1941,7 +1944,7 @@ The calendar is inserted at the top of the buffer in which point is currently located, but indented INDENT spaces. The indentation is done from the first character on the line and does not disturb the first INDENT characters on the -line. A negative YEAR is interpreted as BC; -1 being 1 BC, and so on." +line." (let* ((blank-days;; at start of month (mod (- (calendar-day-of-week (list month 1 year)) @@ -2538,8 +2541,8 @@ \(month nil year); if NODAY is any other non-nil value the value returned is \(month year)" (let* ((year (calendar-read - "Year: " - (lambda (x) (not (zerop x))) + "Year (>0): " + (lambda (x) (> x 0)) (int-to-string (extract-calendar-year (calendar-current-date))))) (month-array calendar-month-name-array)
--- a/lisp/calendar/diary-lib.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/calendar/diary-lib.el Tue Feb 24 22:48:10 2004 +0000 @@ -587,8 +587,10 @@ (extract-calendar-month date)) (setq holiday-list-last-year (extract-calendar-year date)) - (increment-calendar-month - holiday-list-last-month holiday-list-last-year 1) + (progn + (increment-calendar-month + holiday-list-last-month holiday-list-last-year 1) + t) (setq holiday-list (let ((displayed-month holiday-list-last-month) (displayed-year holiday-list-last-year))
--- a/lisp/ffap.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/ffap.el Tue Feb 24 22:48:10 2004 +0000 @@ -1185,6 +1185,14 @@ remote-dir (substring name (match-end 1))))) (ffap-file-exists-string (ffap-replace-file-component remote-dir name)))))) + ;; Try all parent directories by deleting the trailing directory + ;; name until existing directory is found or name stops changing + ((let ((dir name)) + (while (and dir + (not (ffap-file-exists-string dir)) + (not (equal dir (setq dir (file-name-directory + (directory-file-name dir))))))) + (ffap-file-exists-string dir))) ) (set-match-data data))))
--- a/lisp/gdb-ui.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/gdb-ui.el Tue Feb 24 22:48:10 2004 +0000 @@ -188,6 +188,7 @@ (defun gud-watch () "Watch expression at point." (interactive) + (require 'tooltip) (let ((expr (tooltip-identifier-from-point (point)))) (if (and (string-equal gdb-current-language "c") gdb-use-colon-colon-notation) @@ -214,6 +215,7 @@ (match-string 3) nil nil))) (push var gdb-var-list) + (setq speedbar-update-flag t) (speedbar 1) (if (equal (nth 2 var) "0") (gdb-enqueue-input @@ -304,26 +306,28 @@ (gdb-set-pending-triggers (delq 'gdb-var-update (gdb-get-pending-triggers)))) -(defun gdb-var-delete (text token indent) - "Delete watched expression." +(defun gdb-var-delete () + "Delete watched expression from the speedbar." (interactive) - (when (eq indent 0) - (string-match "\\(\\S-+\\)" text) - (let* ((expr (match-string 1 text)) - (var (assoc expr gdb-var-list)) - (varnum (cadr var))) - (gdb-enqueue-input - (list (concat "server interpreter mi \"-var-delete " varnum "\"\n") - 'ignore)) - (setq gdb-var-list (delq var gdb-var-list)) - (dolist (varchild gdb-var-list) - (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild)) - (setq gdb-var-list (delq varchild gdb-var-list))))) - (setq gdb-var-changed t))) + (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) + (let ((text (speedbar-line-text))) + (string-match "\\(\\S-+\\)" text) + (let* ((expr (match-string 1 text)) + (var (assoc expr gdb-var-list)) + (varnum (cadr var))) + (unless (string-match "\\." varnum) + (gdb-enqueue-input + (list (concat "server interpreter mi \"-var-delete " + varnum "\"\n") + 'ignore)) + (setq gdb-var-list (delq var gdb-var-list)) + (dolist (varchild gdb-var-list) + (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild)) + (setq gdb-var-list (delq varchild gdb-var-list)))) + (setq gdb-var-changed t)))))) (defun gdb-edit-value (text token indent) "Assign a value to a variable displayed in the speedbar" - (interactive) (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) (varnum (cadr var)) (value)) (setq value (read-string "New value: "))
--- a/lisp/play/animate.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/play/animate.el Tue Feb 24 22:48:10 2004 +0000 @@ -151,11 +151,13 @@ (setq list-of-strings (cdr list-of-strings))))) ;;;###autoload -(defun animate-birthday-present () - "Display Sarah's birthday present in a new buffer." - (interactive) +(defun animate-birthday-present (&optional name) + "Display one's birthday present in a new buffer. +You can specify the one's name by NAME; the default value is \"Sarah\"." + (interactive (list (read-string "Name (default \"Sarah\"): " + nil nil "Sarah"))) ;; Make a suitable buffer to display the birthday present in. - (switch-to-buffer (get-buffer-create "*Sarah*")) + (switch-to-buffer (get-buffer-create (format "*%s*" name))) (erase-buffer) ;; Display the empty buffer. (sit-for 0) @@ -164,7 +166,7 @@ (setq indent-tabs-mode nil) (animate-string "Happy Birthday," 6) - (animate-string "Sarah" 7) + (animate-string (format "%s" name) 7) (sit-for 1)
--- a/lisp/progmodes/gud.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/progmodes/gud.el Tue Feb 24 22:48:10 2004 +0000 @@ -305,11 +305,18 @@ (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) - (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line))) + (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) + (define-key gud-speedbar-key-map "D" 'gdb-var-delete))) + (defvar gud-speedbar-menu-items ;; Note to self. Add expand, and turn off items when not available. - '(["Jump to stack frame" speedbar-edit-line t]) + '(["Jump to stack frame" speedbar-edit-line + (with-current-buffer gud-comint-buffer (not (eq gud-minor-mode 'gdba)))] + ["Edit value" speedbar-edit-line + (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))] + ["Delete expression" gdb-var-delete + (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))]) "Additional menu items to add to the speedbar frame.") ;; Make sure our special speedbar mode is loaded @@ -353,8 +360,7 @@ (speedbar-make-tag-line 'bracket char 'gdb-speedbar-expand-node varnum (concat (car var) "\t" (nth 3 var)) - 'gdb-var-delete - nil nil depth))) + nil nil nil depth))) (setq var-list (cdr var-list)))) (setq gdb-var-changed nil))) (t (if (and (save-excursion @@ -450,10 +456,13 @@ ;; Set the accumulator to the remaining text. gud-marker-acc (substring gud-marker-acc (match-end 0)))) + ;; Check for annotations and change gud-minor-mode to 'gdba if + ;; they are found. (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) (when (string-equal (match-string 1 gud-marker-acc) "prompt") (require 'gdb-ui) (gdb-prompt nil)) + (setq ;; Append any text before the marker to the output we're going ;; to return - we don't include the marker in this text.
--- a/lisp/saveplace.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/saveplace.el Tue Feb 24 22:48:10 2004 +0000 @@ -94,6 +94,40 @@ (const :tag "No Limit" nil)) :group 'save-place) +(defcustom save-place-forget-unreadable-files t + "Non-nil means forget place in unreadable files. + +The filenames in `save-place-alist' that do not match +`save-place-skip-check-regexp' are filtered through +`file-readable-p'. if nil, their alist entries are removed. + +You may do this anytime by calling the complementary function, +`save-place-forget-unreadable-files'. When this option is turned on, +this happens automatically before saving `save-place-alist' to +`save-place-file'." + :type 'boolean :group 'save-place) + +(defcustom save-place-save-skipped t + "If non-nil, remember files matching `save-place-skip-check-regexp'. + +When filtering `save-place-alist' for unreadable files, some will not +be checked, based on said regexp, and instead saved or forgotten based +on this flag." + :type 'boolean :group 'save-place) + +(defcustom save-place-skip-check-regexp + ;; thanks to ange-ftp-name-format + "\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)" + "Regexp whose file names shall not be checked for readability. + +When forgetting unreadable files, file names matching this regular +expression shall not be checked for readability, but instead be +subject to `save-place-save-skipped'. + +Files for which such a check may be inconvenient include those on +removable and network volumes." + :type 'regexp :group 'save-place) + (defun toggle-save-place (&optional parg) "Toggle whether to save your place in this file between sessions. If this mode is enabled, point is recorded when you kill the buffer @@ -138,12 +172,41 @@ (cons (cons buffer-file-name position) save-place-alist))))))) +(defun save-place-forget-unreadable-files () + "Remove unreadable files from `save-place-alist'. +For each entry in the alist, if `file-readable-p' returns nil for the +filename, remove the entry. Save the new alist \(as the first pair +may have changed\) back to `save-place-alist'." + (interactive) + ;; the following was adapted from an in-place filtering function, + ;; `filter-mod', used in the original. + (unless (null save-place-alist) ;says it better than `when' + ;; first, check all except first + (let ((fmprev save-place-alist) (fmcur (cdr save-place-alist))) + (while fmcur ;not null + ;; a value is only saved when it becomes FMPREV. + (if (if (string-match save-place-skip-check-regexp (caar fmcur)) + save-place-save-skipped + (file-readable-p (caar fmcur))) + (setq fmprev fmcur) + (setcdr fmprev (cdr fmcur))) + (setq fmcur (cdr fmcur)))) + ;; test first pair, keep it if OK, otherwise 2nd element, which + ;; may be '() + (unless (if (string-match save-place-skip-check-regexp + (caar save-place-alist)) + save-place-save-skipped + (file-readable-p (caar save-place-alist))) + (setq save-place-alist (cdr save-place-alist))))) + (defun save-place-alist-to-file () (let ((file (expand-file-name save-place-file))) (save-excursion (message "Saving places to %s..." file) (set-buffer (get-buffer-create " *Saved Places*")) (delete-region (point-min) (point-max)) + (when save-place-forget-unreadable-files + (save-place-forget-unreadable-files)) (print save-place-alist (current-buffer)) (let ((version-control (cond
--- a/lisp/startup.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/startup.el Tue Feb 24 22:48:10 2004 +0000 @@ -25,101 +25,9 @@ ;;; Commentary: -;; This file parses the command line and gets Emacs running. Options on -;; the command line are handled in precedence order. The order is the -;; one in the list below; first described means first handled. Options -;; within each category (delimited by a bar) are handled in the order -;; encountered on the command line. - -;; ------------------------- -;; -version Print Emacs version to stderr, then exit -;; --version successfully right away. -;; This option is handled by emacs.c -;; ------------------------- -;; -help Print a short usage description and exit -;; --help successfully right away. -;; This option is handled by emacs.c -;; ------------------------- -;; -nl Do not use shared memory (for systems that -;; -no-shared-memory support this) for the dumped Emacs data. -;; This option is handled by emacs.c -;; -;; -map For VMS. -;; --map-data This option is handled by emacs.c -;; ------------------------- -;; -t FILE Use FILE as the name of the terminal. -;; --terminal FILE Using this implies "-nw" also. -;; This option is handled by emacs.c -;; ------------------------- -;; -d DISPNAME Use DISPNAME as the name of the X -;; -display DISPNAME display for the initial frame. -;; --display DISPNAME This option is handled by emacs.c -;; ------------------------- -;; -nw Do not use a windows system (but use the -;; --no-window-system terminal instead.) -;; This option is handled by emacs.c -;; ------------------------- -;; -batch Execute noninteractively (messages go to stdout, -;; --batch variable noninteractive set to t) -;; This option is handled by emacs.c -;; ------------------------- -;; -q Do not load user's init file and do not load -;; -no-init-file "default.el". Regardless of this switch, -;; --no-init-file "site-start" is still loaded. -;; ------------------------- -;; -no-site-file Do not load "site-start.el". (This is the ONLY -;; --no-site-file way to prevent loading that file.) -;; ------------------------- -;; -no-splash Don't display a splash screen on startup. -;; --no-splash -;; ------------------------- -;; -u USER Load USER's init file instead of the init -;; -user USER file belonging to the user starting Emacs. -;; --user USER -;; ------------------------- -;; -debug-init Don't catch errors in init files; let the -;; --debug-init debugger run. -;; ------------------------- -;; -i ICONTYPE Set type of icon using when Emacs is -;; -itype ICONTYPE iconified under X. -;; --icon-type ICONTYPE This option is passed on to term/x-win.el -;; -;; -iconic Start Emacs iconified. -;; --iconic This option is passed on to term/x-win.el -;; ------------------------- -;; Various X options for colors/fonts/geometry/title etc. -;; These options are passed on to term/x-win.el which see. -;; ------------------------- -;; FILE Visit FILE. -;; -visit FILE -;; --visit FILE -;; -file FILE -;; --file FILE -;; -;; -L DIRNAME Add DIRNAME to load-path -;; -directory DIRNAME -;; --directory DIRNAME -;; -;; -l FILE Load and execute the Emacs lisp code -;; -load FILE in FILE. -;; --load FILE -;; -;; -f FUNC Execute Emacs lisp function FUNC with -;; -funcall FUNC no arguments. The "-e" form is outdated -;; --funcall FUNC and should not be used. (It's a typo -;; -e FUNC promoted to a feature.) -;; -;; -eval FORM Execute Emacs lisp form FORM. -;; --eval FORM -;; -execute EXPR -;; --execute EXPR -;; -;; -insert FILE Insert the contents of FILE into buffer. -;; --insert FILE -;; ------------------------- -;; -kill Kill (exit) Emacs right away. -;; --kill -;; ------------------------- +;; This file parses the command line and gets Emacs running. Options +;; on the command line are handled in precedence order. For priorities +;; see the structure standard_args in the emacs.c file. ;;; Code:
--- a/lisp/textmodes/texinfo.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/textmodes/texinfo.el Tue Feb 24 22:48:10 2004 +0000 @@ -803,10 +803,18 @@ (texinfo-insert-@-with-arg "file" arg)) (defun texinfo-insert-@item () - "Insert the string `@item' in a Texinfo buffer." + "Insert the string `@item' in a Texinfo buffer. +If in a table defined by @table, follow said string with a space. +Otherwise, follow with a newline." (interactive) - (insert "@item") - (newline)) + (insert "@item" + (if (equal (ignore-errors + (save-excursion + (texinfo-last-unended-begin) + (match-string 1))) + "table") + ? ;space + ?\n))) (defun texinfo-insert-@kbd (&optional arg) "Insert a `@kbd{...}' command in a Texinfo buffer.
--- a/lisp/vcursor.el Tue Feb 24 18:00:36 2004 +0000 +++ b/lisp/vcursor.el Tue Feb 24 22:48:10 2004 +0000 @@ -314,7 +314,7 @@ ;; - The logic in vcursor-find-window is rather complicated and ;; therefore bug-prone, though in practice it seems to work OK. ;; -;; Possible enhnacements: +;; Possible enhancements: ;; It would be easy to implement vcursor-push (save vcursor position ;; as mark and deactivate) and vcursor-pop (deactivate vcursor and ;; move to last pushed position) functions. @@ -342,9 +342,14 @@ :type '(choice (const t) (const nil) (const copy)) :group 'vcursor) +(defcustom vcursor-modifiers (list 'control 'shift) + "*A list of modifiers that are used to define vcursor key bindings." + :type '(repeat symbol) + :group 'vcursor) + ;; Needed for defcustom, must be up here (defun vcursor-cs-binding (base &optional meta) - (vector (let ((key (list 'control 'shift (intern base)))) + (vector (let ((key (append vcursor-modifiers (list (intern base))))) (if meta (cons 'meta key) key))))
--- a/lispref/ChangeLog Tue Feb 24 18:00:36 2004 +0000 +++ b/lispref/ChangeLog Tue Feb 24 22:48:10 2004 +0000 @@ -1,3 +1,32 @@ +2004-02-23 Luc Teirlinck <teirllm@auburn.edu> + + * abbrevs.texi: Various corrections and clarifications in addition + to the following: + (Abbrev Tables): Delete add-abbrev (as suggested by RMS). + +2004-02-22 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change) + + * calendar.texi (Holiday Customizing): Quote arg of holiday-sexp. + +2004-02-21 Luc Teirlinck <teirllm@auburn.edu> + + * text.texi: Various small changes in addition to the following: + (User-Level Deletion): Mention optional BACKWARD-ONLY argument + to delete-horizontal-space. + (Kill Functions, Yanking, Low-Level Kill Ring): clarify and correct + description of yank-handler text property at various places. + + * frames.texi (Window System Selections): Add anchor. + + * syntax.texi (Syntax Table Functions): Clarify and correct + descriptions of make-syntax-table and copy-syntax-table. + (Motion and Syntax): Clarify SYNTAXES argument to + skip-syntax-forward. + (Parsing Expressions): Mention that the return value of + parse-partial-sexp is currently a list of ten rather than nine + elements. + (Categories): Various corrections and clarifications. + 2004-02-17 Luc Teirlinck <teirllm@auburn.edu> * markers.texi (Marker Insertion Types): Minor change.
--- a/lispref/abbrevs.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/lispref/abbrevs.texi Tue Feb 24 22:48:10 2004 +0000 @@ -24,12 +24,17 @@ is the expansion; its function definition is the hook function to do the expansion (@pxref{Defining Abbrevs}); its property list cell typically contains the use count, the number of times the abbreviation -has been expanded. (Alternatively, the use count is on the +has been expanded. Alternatively, the use count is on the @code{count} property and the system-abbrev flag is on the -@code{system-type} property.) Because these symbols are not interned -in the usual obarray, they will never appear as the result of reading -a Lisp expression; in fact, normally they are never used except by the -code that handles abbrevs. Therefore, it is safe to use them in an +@code{system-type} property. Abbrevs with a non-@code{nil} +@code{system-type} property are called ``system'' abbrevs. They are +usually defined by modes or packages, instead of by the user, and are +treated specially in certain respects. + +Because the symbols used for abbrevs are not interned in the usual +obarray, they will never appear as the result of reading a Lisp +expression; in fact, normally they are never used except by the code +that handles abbrevs. Therefore, it is safe to use them in an extremely nonstandard way. @xref{Creating Symbols}. For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev @@ -82,7 +87,9 @@ @defun copy-abbrev-table table This function returns a copy of abbrev table @var{table}---a new -abbrev table that contains the same abbrev definitions. +abbrev table that contains the same abbrev definitions. The only +difference between @var{table} and the returned copy is that this +function sets the property lists of all copied abbrevs to 0. @end defun @defun define-abbrev-table tabname definitions @@ -90,8 +97,16 @@ name, i.e., as a variable whose value is an abbrev table. It defines abbrevs in the table according to @var{definitions}, a list of elements of the form @code{(@var{abbrevname} @var{expansion} -@var{hook} @var{usecount} @r{[}@var{system-flag}@r{]})}. The return -value is always @code{nil}. +@var{hook} @var{usecount} @var{system-flag})}. If an element of +@var{definitions} has length less than five, omitted elements default +to @code{nil}. A value of @code{nil} for @var{usecount} is equivalent +to zero. The return value is always @code{nil}. + +If this function is called more than once for the same @var{tabname}, +subsequent calls add the definitions in @var{definitions} to +@var{tabname}, rather than overriding the entire original contents. +(A subsequent call only overrides abbrevs explicitly redefined or +undefined in @var{definitions}.) @end defun @defvar abbrev-table-name-list @@ -105,38 +120,24 @@ abbrev table. The return value is always @code{nil}. If @var{human} is non-@code{nil}, the description is human-oriented. -Otherwise the description is a Lisp expression---a call to -@code{define-abbrev-table} that would define @var{name} exactly as it -is currently defined. +System abbrevs are listed and identified as such. Otherwise the +description is a Lisp expression---a call to @code{define-abbrev-table} +that would define @var{name} as it is currently defined, but without +the system abbrevs. (The mode or package using @var{name} is supposed +to add these to @var{name} separately.) @end defun @node Defining Abbrevs, Abbrev Files, Abbrev Tables, Abbrevs @comment node-name, next, previous, up @section Defining Abbrevs - - These functions define an abbrev in a specified abbrev table. -@code{define-abbrev} is the low-level basic function, while -@code{add-abbrev} is used by commands that ask for information from -the user. When major modes predefine standard abbrevs, they should -call @code{define-abbrev} and specify @code{t} for @var{system-flag}. - -@defun add-abbrev table type arg -This function adds an abbreviation to abbrev table @var{table} based on -information from the user. The argument @var{type} is a string -describing in English the kind of abbrev this will be (typically, -@code{"global"} or @code{"mode-specific"}); this is used in prompting -the user. The argument @var{arg} is the number of words in the -expansion. - -The return value is the symbol that internally represents the new -abbrev, or @code{nil} if the user declines to confirm redefining an -existing abbrev. -@end defun + @code{define-abbrev} is the low-level basic function for defining an +abbrev in a specified abbrev table. When major modes predefine +standard abbrevs, they should call @code{define-abbrev} and specify +@code{t} for @var{system-flag}. @defun define-abbrev table name expansion &optional hook count system-flag This function defines an abbrev named @var{name}, in @var{table}, to -expand to @var{expansion} and call @var{hook}. The return value is a -symbol that represents the abbrev inside Emacs; its name is +expand to @var{expansion} and call @var{hook}. The return value is @var{name}. The value of @var{count}, if specified, initializes the abbrev's @@ -210,9 +211,10 @@ @end defun @defopt save-abbrevs -A non-@code{nil} value for @code{save-abbrev} means that Emacs should -save abbrevs when files are saved. @code{abbrev-file-name} specifies -the file to save the abbrevs in. +A non-@code{nil} value for @code{save-abbrevs} means that Emacs should +offer the user to save abbrevs when files are saved. If the value is +@code{silently}, Emacs saves the abbrevs without asking the user. +@code{abbrev-file-name} specifies the file to save the abbrevs in. @end defopt @defvar abbrevs-changed @@ -222,11 +224,11 @@ @end defvar @deffn Command write-abbrev-file &optional filename -Save all abbrev definitions (except ``system'' abbrevs), in all abbrev -tables, in the file @var{filename}, in the form of a Lisp program that -when loaded will define the same abbrevs. If @var{filename} is -@code{nil} or omitted, @code{abbrev-file-name} is used. This function -returns @code{nil}. +Save all abbrev definitions (except ``system'' abbrevs), for all abbrev +tables listed in @code{abbrev-table-name-list}, in the file +@var{filename}, in the form of a Lisp program that when loaded will +define the same abbrevs. If @var{filename} is @code{nil} or omitted, +@code{abbrev-file-name} is used. This function returns @code{nil}. @end deffn @node Abbrev Expansion, Standard Abbrev Tables, Abbrev Files, Abbrevs @@ -249,9 +251,10 @@ @defun abbrev-expansion abbrev &optional table This function returns the string that @var{abbrev} would expand into (as -defined by the abbrev tables used for the current buffer). The optional -argument @var{table} specifies the abbrev table to use, as in -@code{abbrev-symbol}. +defined by the abbrev tables used for the current buffer). If +@var{abbrev} is not a valid abbrev, the function returns @code{nil}. +The optional argument @var{table} specifies the abbrev table to use, +as in @code{abbrev-symbol}. @end defun @deffn Command expand-abbrev @@ -266,10 +269,15 @@ @end deffn @deffn Command abbrev-prefix-mark &optional arg -Mark current point as the beginning of an abbrev. The next call to -@code{expand-abbrev} will use the text from here to point (where it is -then) as the abbrev to expand, rather than using the previous word as -usual. +This command marks current point as the beginning of an abbrev. The +next call to @code{expand-abbrev} will use the text from here to point +(where it is then) as the abbrev to expand, rather than using the +previous word as usual. + +First, this command expands any abbrev before point, unless @var{arg} +is non-@code{nil}. (Interactively, @var{arg} is the prefix argument.) +Then it inserts a hyphen before point, to indicate the start of the +next abbrev to be expanded. The actual expansion removes the hyphen. @end deffn @defopt abbrev-all-caps @@ -280,11 +288,12 @@ @end defopt @defvar abbrev-start-location -This is the buffer position for @code{expand-abbrev} to use as the start -of the next abbrev to be expanded. (@code{nil} means use the word -before point instead.) @code{abbrev-start-location} is set to -@code{nil} each time @code{expand-abbrev} is called. This variable is -also set by @code{abbrev-prefix-mark}. +This is a marker pointing to the buffer position for +@code{expand-abbrev} to use as the start of the next abbrev to be +expanded. (@code{nil} means use the word before point instead.) +@code{abbrev-start-location} is set to @code{nil} each time +@code{expand-abbrev} is called. This variable is also set by +@code{abbrev-prefix-mark}. @end defvar @defvar abbrev-start-location-buffer
--- a/lispref/calendar.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/lispref/calendar.texi Tue Feb 24 22:48:10 2004 +0000 @@ -255,7 +255,7 @@ divisible by 4: @smallexample -(holiday-sexp (if (= 0 (% year 4)) +(holiday-sexp '(if (= 0 (% year 4)) (calendar-gregorian-from-absolute (1+ (calendar-dayname-on-or-before 1 (+ 6 (calendar-absolute-from-gregorian
--- a/lispref/frames.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/lispref/frames.texi Tue Feb 24 22:48:10 2004 +0000 @@ -1503,6 +1503,7 @@ If omitted @var{n} defaults to 0. @end defun +@anchor{Definition of x-set-cut-buffer} @defun x-set-cut-buffer string &optional push This function stores @var{string} into the first cut buffer (cut buffer 0). If @var{push} is @code{nil}, only the first cut buffer is changed.
--- a/lispref/syntax.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/lispref/syntax.texi Tue Feb 24 22:48:10 2004 +0000 @@ -397,10 +397,13 @@ In this section we describe functions for creating, accessing and altering syntax tables. -@defun make-syntax-table -This function creates a new syntax table. It inherits the syntax for -letters and control characters from the standard syntax table. For -other characters, the syntax is copied from the standard syntax table. +@defun make-syntax-table &optional table +This function creates a new syntax table, with all values initialized +to @code{nil}. If @var{table} is non-@code{nil}, it becomes the +parent of the new syntax table, otherwise the standard syntax table is +the parent. Like all char-tables, a syntax table inherits from its +parent. Thus the original syntax of all characters in the returned +syntax table is determined by the parent. @xref{Char-Tables}. Most major mode syntax tables are created in this way. @end defun @@ -408,7 +411,7 @@ @defun copy-syntax-table &optional table This function constructs a copy of @var{table} and returns it. If @var{table} is not supplied (or is @code{nil}), it returns a copy of the -current syntax table. Otherwise, an error is signaled if @var{table} is +standard syntax table. Otherwise, an error is signaled if @var{table} is not a syntax table. @end defun @@ -425,7 +428,7 @@ the table for this character is discarded. An error is signaled if the first character of the syntax descriptor is not -one of the twelve syntax class designator characters. An error is also +one of the seventeen syntax class designator characters. An error is also signaled if @var{char} is not a character. @example @@ -559,10 +562,11 @@ have certain syntax classes. @defun skip-syntax-forward syntaxes &optional limit -This function moves point forward across characters having syntax classes -mentioned in @var{syntaxes}. It stops when it encounters the end of -the buffer, or position @var{limit} (if specified), or a character it is -not supposed to skip. +This function moves point forward across characters having syntax +classes mentioned in @var{syntaxes} (a string of syntax code +characters). It stops when it encounters the end of the buffer, or +position @var{limit} (if specified), or a character it is not supposed +to skip. If @var{syntaxes} starts with @samp{^}, then the function skips characters whose syntax is @emph{not} in @var{syntaxes}. @@ -697,9 +701,10 @@ The minimum parenthesis depth encountered during this scan. @item -What kind of comment is active: @code{nil} for a comment of style ``a'', -@code{t} for a comment of style ``b'', and @code{syntax-table} for -a comment that should be ended by a generic comment delimiter character. +What kind of comment is active: @code{nil} for a comment of style +``a'' or when not inside a comment, @code{t} for a comment of style +``b'', and @code{syntax-table} for a comment that should be ended by a +generic comment delimiter character. @item The string or comment start position. While inside a comment, this is @@ -710,6 +715,12 @@ Elements 0, 3, 4, 5 and 7 are significant in the argument @var{state}. +Actually, the return value is currently a list of ten, rather than +nine, elements and @var{state} is allowed to be a list of ten elements +as well. However, the meaning of the tenth element is subject to +change and only the first eight elements of @var{state} need to be +specified. + @cindex indenting with parentheses This function is most often used to compute indentation for languages that have nested parentheses. @@ -757,11 +768,11 @@ can still override the syntax.) @end defvar -@defvar parse-sexp-ignore-comments +@defopt parse-sexp-ignore-comments @cindex skipping comments If the value is non-@code{nil}, then comments are treated as whitespace by the functions in this section and by @code{forward-sexp}. -@end defvar +@end defopt @vindex parse-sexp-lookup-properties The behaviour of @code{parse-partial-sexp} is also affected by @@ -951,12 +962,12 @@ @code{t}, that means category @var{cat} is a member of the set, and that character @var{c} belongs to category @var{cat}. +For the next three functions, the optional argument @var{table} +defaults to the current buffer's category table. + @defun define-category char docstring &optional table This function defines a new category, with name @var{char} and -documentation @var{docstring}. - -The new category is defined for category table @var{table}, which -defaults to the current buffer's category table. +documentation @var{docstring}, for the category table @var{table}, @end defun @defun category-docstring category &optional table @@ -971,7 +982,7 @@ @end example @end defun -@defun get-unused-category table +@defun get-unused-category &optional table This function returns a category name (a character) which is not currently defined in @var{table}. If all possible categories are in use in @var{table}, it returns @code{nil}. @@ -993,7 +1004,7 @@ @defun copy-category-table &optional table This function constructs a copy of @var{table} and returns it. If @var{table} is not supplied (or is @code{nil}), it returns a copy of the -current category table. Otherwise, an error is signaled if @var{table} +standard category table. Otherwise, an error is signaled if @var{table} is not a category table. @end defun @@ -1023,11 +1034,11 @@ @end defun @defun char-category-set char -This function returns the category set for character @var{char}. This -is the bool-vector which records which categories the character -@var{char} belongs to. The function @code{char-category-set} does not -allocate storage, because it returns the same bool-vector that exists in -the category table. +This function returns the category set for character @var{char} in the +current buffer's category table. This is the bool-vector which +records which categories the character @var{char} belongs to. The +function @code{char-category-set} does not allocate storage, because +it returns the same bool-vector that exists in the category table. @example (char-category-set ?a) @@ -1056,10 +1067,11 @@ instead. @end defun -@deffn Command describe-categories +@deffn Command describe-categories &optional buffer-or-name This function describes the category specifications in the current -category table. The descriptions are inserted in a buffer, which is -then displayed. +category table. It inserts the descriptions in a buffer, and then +displays that buffer. If @var{buffer-or-name} is non-@code{nil}, it +describes the category table of that buffer instead. @end deffn @ignore
--- a/lispref/text.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/lispref/text.texi Tue Feb 24 22:48:10 2004 +0000 @@ -58,7 +58,7 @@ position stored in a register. * Base 64:: Conversion to or from base 64 encoding. * MD5 Checksum:: Compute the MD5 ``message digest''/``checksum''. -* Atomic Changes:: Installing several buffer changs ``atomically''. +* Atomic Changes:: Installing several buffer changes ``atomically''. * Change Hooks:: Supplying functions to be run when text is changed. @end menu @@ -69,6 +69,9 @@ Several simple functions are described here. See also @code{looking-at} in @ref{Regexp Search}. +In the following four functions, ``beginning'' or ``end'' of buffer +refers to the beginning or end of the accessible portion. + @defun char-after &optional position This function returns the character in the current buffer at (i.e., immediately after) position @var{position}. If @var{position} is out of @@ -230,9 +233,9 @@ This function returns the symbol (or word) at or near point, as a string. The return value includes no text properties. -The optional argument @var{really-word} is non-@code{nil}, it finds a -word; otherwise, it finds a symbol (which includes word characters and -both symbol constituent characters). +If the optional argument @var{really-word} is non-@code{nil}, it finds a +word; otherwise, it finds a symbol (which includes both word +characters and symbol constituent characters). If the optional argument @var{strict} is non-@code{nil}, then point must be in or next to the symbol or word---if no symbol or word is @@ -273,10 +276,10 @@ @defun compare-buffer-substrings buffer1 start1 end1 buffer2 start2 end2 This function lets you compare two substrings of the same buffer or two different buffers. The first three arguments specify one substring, -giving a buffer and two positions within the buffer. The last three -arguments specify the other substring in the same way. You can use -@code{nil} for @var{buffer1}, @var{buffer2}, or both to stand for the -current buffer. +giving a buffer (or a buffer name) and two positions within the +buffer. The last three arguments specify the other substring in the +same way. You can use @code{nil} for @var{buffer1}, @var{buffer2}, or +both to stand for the current buffer. The value is negative if the first substring is less, positive if the first is greater, and zero if they are equal. The absolute value of @@ -360,8 +363,7 @@ @defun insert-char character count &optional inherit This function inserts @var{count} instances of @var{character} into the current buffer before point. The argument @var{count} should be a -number (@code{nil} means 1), and @var{character} must be a character. -The value is @code{nil}. +number, and @var{character} must be a character. The value is @code{nil}. This function does not convert unibyte character codes 128 through 255 to multibyte characters, not even if the current buffer is a multibyte @@ -375,7 +377,7 @@ @defun insert-buffer-substring from-buffer-or-name &optional start end This function inserts a portion of buffer @var{from-buffer-or-name} (which must already exist) into the current buffer before point. The -text inserted is the region from @var{start} and @var{end}. (These +text inserted is the region between @var{start} and @var{end}. (These arguments default to the beginning and end of the accessible portion of that buffer.) This function returns @code{nil}. @@ -418,9 +420,10 @@ programs. @deffn Command insert-buffer from-buffer-or-name -This command inserts the entire contents of @var{from-buffer-or-name} -(which must exist) into the current buffer after point. It leaves -the mark after the inserted text. The value is @code{nil}. +This command inserts the entire accessible contents of +@var{from-buffer-or-name} (which must exist) into the current buffer +after point. It leaves the mark after the inserted text. The value +is @code{nil}. @end deffn @deffn Command self-insert-command count @@ -501,11 +504,11 @@ Some deletion functions do save text in the kill ring in some special cases. - All of the deletion functions operate on the current buffer, and all -return a value of @code{nil}. + All of the deletion functions operate on the current buffer. @deffn Command erase-buffer -This function deletes the entire text of the current buffer, leaving it +This function deletes the entire text of the current buffer +(@emph{not} just the accessible portion), leaving it empty. If the buffer is read-only, it signals a @code{buffer-read-only} error; if some of the text in it is read-only, it signals a @code{text-read-only} error. Otherwise, it deletes the text without @@ -591,8 +594,9 @@ This option specifies how @code{backward-delete-char-untabify} should deal with whitespace. Possible values include @code{untabify}, the default, meaning convert a tab to many spaces and delete one; -@code{hungry}, meaning delete all the whitespace characters before point -with one command, and @code{nil}, meaning do nothing special for +@code{hungry}, meaning delete all tabs and spaces before point with +one command; @code{all} meaning delete all tabs, spaces and newlines +before point, and @code{nil}, meaning do nothing special for whitespace characters. @end defopt @@ -603,11 +607,14 @@ commands intended primarily for the user but useful also in Lisp programs. -@deffn Command delete-horizontal-space +@deffn Command delete-horizontal-space &optional backward-only @cindex deleting whitespace This function deletes all spaces and tabs around point. It returns @code{nil}. +If @var{backward-only} is non-@code{nil}, the function deletes +spaces and tabs before point, but not after point. + In the following examples, we call @code{delete-horizontal-space} four times, once on each line, with point between the second and third characters on the line each time. @@ -673,9 +680,10 @@ responsible for deciding whether to leave a space at the junction. @end deffn -@defun fixup-whitespace -This function replaces all the whitespace surrounding point with either -one space or no space, according to the context. It returns @code{nil}. +@deffn Command fixup-whitespace +This function replaces all the horizontal whitespace surrounding point +with either one space or no space, according to the context. It +returns @code{nil}. At the beginning or end of a line, the appropriate amount of space is none. Before a character with close parenthesis syntax, or after a @@ -709,7 +717,7 @@ ---------- Buffer: foo ---------- @end group @end smallexample -@end defun +@end deffn @deffn Command just-one-space @comment !!SourceFile simple.el @@ -722,7 +730,7 @@ blank line with one or more blank lines before or after it, then all but one of them are deleted. If point is on an isolated blank line, then it is deleted. If point is on a nonblank line, the command deletes all -blank lines following it. +blank lines immediately following it. A blank line is defined as a line containing only tabs and spaces. @@ -771,7 +779,7 @@ * Yanking:: How yanking is done. * Yank Commands:: Commands that access the kill ring. * Low-Level Kill Ring:: Functions and variables for kill ring access. -* Internals of Kill Ring:: Variables that hold kill-ring data. +* Internals of Kill Ring:: Variables that hold kill ring data. @end menu @node Kill Ring Concepts @@ -791,7 +799,7 @@ When kill commands are interwoven with other commands, each kill command makes a new entry in the kill ring. Multiple kill commands in -succession build up a single kill-ring entry, which would be yanked as a +succession build up a single kill ring entry, which would be yanked as a unit; the second and subsequent consecutive kill commands add text to the entry made by the first one. @@ -828,8 +836,10 @@ commands to copy text from a read-only buffer into the kill ring. If @var{yank-handler} is non-@code{nil}, this puts that value onto -the string of killed text, as a @code{yank-handler} property. -@xref{Yanking}. +the string of killed text, as a @code{yank-handler} text property. +@xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, any +@code{yank-handler} properties present on the killed text are copied +onto the kill ring, like other text properties. @end deffn @defopt kill-read-only-ok @@ -841,9 +851,7 @@ @deffn Command copy-region-as-kill start end This command saves the region defined by @var{start} and @var{end} on the kill ring (including text properties), but does not delete the text -from the buffer. It returns @code{nil}. It also indicates the extent -of the text copied by moving the cursor momentarily, or by displaying a -message in the echo area. +from the buffer. It returns @code{nil}. The command does not set @code{this-command} to @code{kill-region}, so a subsequent kill command does not append to the same kill ring entry. @@ -865,9 +873,9 @@ @defun insert-for-yank string This function normally works like @code{insert} except that it doesn't insert the text properties in the @code{yank-excluded-properties} -list. However, if the first character of @var{string} has a -non-@code{nil}@code{yank-handler} text property, that property -can do various special processing on the text being inserted. +list. However, if any part of @var{string} has a non-@code{nil} +@code{yank-handler} text property, that property can do various +special processing on that part of the text being inserted. @end defun @defun insert-buffer-substring-as-yank buf &optional start end @@ -876,12 +884,11 @@ @code{yank-excluded-properties} list. @end defun - You can put a @code{yank-handler} text property on the text to -control how it will be inserted if it is yanked. The -@code{insert-for-yank} function looks for a @code{yank-handler} -property on the first character in its @var{string} argument. The -property value must be a list of one to four elements, with the -following format (where elements after the first may be omitted): + You can put a @code{yank-handler} text property on all or part of +the text to control how it will be inserted if it is yanked. The +@code{insert-for-yank} function looks for that property. The property +value must be a list of one to four elements, with the following +format (where elements after the first may be omitted): @example (@var{function} @var{param} @var{noexclude} @var{undo}) @@ -891,15 +898,16 @@ @table @var @item function -When @var{function} is present and non-nil, it is called instead of +When @var{function} is present and non-@code{nil}, it is called instead of @code{insert} to insert the string. @var{function} takes one argument---the string to insert. @item param If @var{param} is present and non-@code{nil}, it replaces @var{string} -as the object passed to @var{function} (or @code{insert}); for -example, if @var{function} is @code{yank-rectangle}, @var{param} -should be a list of strings to insert as a rectangle. +(or the part of @var{string} being processed) as the object passed to +@var{function} (or @code{insert}); for example, if @var{function} is +@code{yank-rectangle}, @var{param} should be a list of strings to +insert as a rectangle. @item noexclude If @var{noexclude} is present and non-@code{nil}, the normal removal of the @@ -908,7 +916,7 @@ if @var{function} adjusts point before or after inserting the object. @item undo -If @var{undo} is present and non-nil, it is a function that will be +If @var{undo} is present and non-@code{nil}, it is a function that will be called by @code{yank-pop} to undo the insertion of the current object. It is called with two arguments, the start and end of the current region. @var{function} can set @code{yank-undo-function} to override @@ -924,23 +932,29 @@ @deffn Command yank &optional arg @cindex inserting killed text -This command inserts before point the text in the first entry in the +This command inserts before point the text at the front of the kill ring. It positions the mark at the beginning of that text, and point at the end. -If @var{arg} is a list (which occurs interactively when the user -types @kbd{C-u} with no digits), then @code{yank} inserts the text as -described above, but puts point before the yanked text and puts the mark -after it. - -If @var{arg} is a number, then @code{yank} inserts the @var{arg}th most -recently killed text---the @var{arg}th element of the kill ring list. - -@code{yank} does not alter the contents of the kill ring or rotate it. -It returns @code{nil}. +If @var{arg} is a non-@code{nil} list (which occurs interactively when +the user types @kbd{C-u} with no digits), then @code{yank} inserts the +text as described above, but puts point before the yanked text and +puts the mark after it. + +If @var{arg} is a number, then @code{yank} inserts the @var{arg}th +most recently killed text---the @var{arg}th element of the kill ring +list, counted cyclically from the front, which is considered the +first element for this purpose. + +@code{yank} does not alter the contents of the kill ring, unless it +used text provided by another program, in which case it pushes that text +onto the kill ring. However if @var{arg} is an integer different from +one, it rotates the kill ring to place the yanked string at the front. + +@code{yank} returns @code{nil}. @end deffn -@deffn Command yank-pop arg +@deffn Command yank-pop &optional arg This command replaces the just-yanked entry from the kill ring with a different entry from the kill ring. @@ -949,6 +963,8 @@ inserted by yanking. @code{yank-pop} deletes that text and inserts in its place a different piece of killed text. It does not add the deleted text to the kill ring, since it is already in the kill ring somewhere. +It does however rotate the kill ring to place the newly yanked string at +the front. If @var{arg} is @code{nil}, then the replacement text is the previous element of the kill ring. If @var{arg} is numeric, the replacement is @@ -966,7 +982,8 @@ If this variable is non-@code{nil}, the function @code{yank-pop} uses its value instead of @code{delete-region} to delete the text inserted by the previous @code{yank} or -@code{yank-pop} command. +@code{yank-pop} command. The value must be a function of two +arguments, the start and end of the current region. The function @code{insert-for-yank} automatically sets this variable according to the @var{undo} element of the @code{yank-handler} @@ -992,27 +1009,44 @@ If @var{n} is zero, indicating a request for the latest kill, @code{current-kill} calls the value of -@code{interprogram-paste-function} (documented below) before consulting -the kill ring. +@code{interprogram-paste-function} (documented below) before +consulting the kill ring. If that value is a function and calling it +returns a string, @code{current-kill} pushes that string onto the kill +ring and returns it. It also sets the yanking pointer to point to +that new entry, regardless of the value of @var{do-not-move}. +Otherwise, @code{current-kill} does not treat a zero value for @var{n} +specially: it returns the entry pointed at by the yanking pointer and +does not move the yanking pointer. @end defun -@defun kill-new string &optional yank-handler -This function puts the text @var{string} into the kill ring as a new -entry at the front of the ring. It discards the oldest entry if -appropriate. It also invokes the value of +@defun kill-new string &optional replace yank-handler +This function pushes the text @var{string} onto the kill ring and +makes the yanking pointer point to it. It discards the oldest entry +if appropriate. It also invokes the value of @code{interprogram-cut-function} (see below). +If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the +first element of the kill ring with @var{string}, rather than pushing +@var{string} onto the kill ring. + If @var{yank-handler} is non-@code{nil}, this puts that value onto the string of killed text, as a @code{yank-handler} property. -@xref{Yanking}. +@xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, then +@code{kill-new} copies any @code{yank-handler} properties present on +@var{string} onto the kill ring, as it does with other text properties. @end defun @defun kill-append string before-p &optional yank-handler This function appends the text @var{string} to the first entry in the -kill ring. Normally @var{string} goes at the end of the entry, but if +kill ring and makes the yanking pointer point to the combined entry. +Normally @var{string} goes at the end of the entry, but if @var{before-p} is non-@code{nil}, it goes at the beginning. This -function also invokes the value of @code{interprogram-cut-function} (see -below). This handles @var{yank-handler} just like @code{kill-new}. +function also invokes the value of @code{interprogram-cut-function} +(see below). This handles @var{yank-handler} just like +@code{kill-new}, except that if @var{yank-handler} is different from +the @code{yank-handler} property of the first entry of the kill ring, +@code{kill-append} pushes the concatenated string onto the kill ring, +instead of replacing the original first entry with it. @end defun @defvar interprogram-paste-function @@ -1023,7 +1057,7 @@ If the value is a function, @code{current-kill} calls it to get the ``most recent kill''. If the function returns a non-@code{nil} value, then that value is used as the ``most recent kill''. If it returns -@code{nil}, then the first element of @code{kill-ring} is used. +@code{nil}, then the front of the kill ring is used. The normal use of this hook is to get the window system's primary selection as the most recent kill, even if the selection belongs to @@ -1033,13 +1067,17 @@ @defvar interprogram-cut-function This variable provides a way of communicating killed text to other programs, when you are using a window system. Its value should be -@code{nil} or a function of one argument. +@code{nil} or a function of one required and one optional argument. If the value is a function, @code{kill-new} and @code{kill-append} call -it with the new first element of the kill ring as an argument. +it with the new first element of the kill ring as the first argument. +The second, optional, argument has the same meaning as the @var{push} +argument to @code{x-set-cut-buffer} (@pxref{Definition of +x-set-cut-buffer}) and only affects the second and later cut buffers. The normal use of this hook is to set the window system's primary -selection from the newly killed text. @xref{Window System Selections}. +selection (and first cut buffer) from the newly killed text. +@xref{Window System Selections}. @end defvar @node Internals of Kill Ring @@ -1112,7 +1150,7 @@ @defopt kill-ring-max The value of this variable is the maximum length to which the kill ring can grow, before elements are thrown away at the end. The default -value for @code{kill-ring-max} is 30. +value for @code{kill-ring-max} is 60. @end defopt @node Undo @@ -1149,7 +1187,9 @@ @item (@var{text} . @var{position}) This kind of element indicates how to reinsert text that was deleted. The deleted text itself is the string @var{text}. The place to -reinsert it is @code{(abs @var{position})}. +reinsert it is @code{(abs @var{position})}. If @var{position} is +positive, point was at the beginning of the deleted text, otherwise it +was at the end. @item (t @var{high} . @var{low}) This kind of element indicates that an unmodified buffer became @@ -1241,13 +1281,13 @@ You cannot specify any other buffer. @end deffn -@deffn Command buffer-disable-undo &optional buffer -@deffnx Command buffer-flush-undo &optional buffer +@deffn Command buffer-disable-undo &optional buffer-or-name +@deffnx Command buffer-flush-undo &optional buffer-or-name @cindex disable undo -This function discards the undo list of @var{buffer}, and disables +This function discards the undo list of @var{buffer-or-name}, and disables further recording of undo information. As a result, it is no longer possible to undo either previous changes or any subsequent changes. If -the undo list of @var{buffer} is already disabled, this function +the undo list of @var{buffer-or-name} is already disabled, this function has no effect. This function returns @code{nil}. @@ -3935,7 +3975,7 @@ arguments. @end defvar - Output of messges into the @samp{*Messages*} buffer does not + Output of messages into the @samp{*Messages*} buffer does not call these functions. @defmac combine-after-change-calls body...
--- a/lispref/tips.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/lispref/tips.texi Tue Feb 24 22:48:10 2004 +0000 @@ -538,7 +538,7 @@ @item For consistency, phrase the verb in the first sentence of a function's -documentation string as an imperative--for instance, use ``Return the +documentation string as an imperative---for instance, use ``Return the cons of A and B.'' in preference to ``Returns the cons of A and B@.'' Usually it looks good to do likewise for the rest of the first paragraph. Subsequent paragraphs usually look better if each sentence
--- a/man/ChangeLog Tue Feb 24 18:00:36 2004 +0000 +++ b/man/ChangeLog Tue Feb 24 22:48:10 2004 +0000 @@ -1,3 +1,21 @@ +2004-02-23 Nick Roberts <nick@nick.uklinux.net> + + * building.texi (Watch Expressions): Update. + +2004-02-21 Juri Linkov <juri@jurta.org> + + * cmdargs.texi (Action Arguments): Add alias --find-file. Add + --directory, --help, --version. Move text about command-line-args + to Command Arguments. + (Initial Options): Remove alias -batch. Add @cindex for --script. + Fix @cindex for -q. Add --no-desktop. Add alias --no-multibyte, + --no-unibyte. + (Window Size X): Join -g and --geometry. Add @cindex. + (Borders X): Fix @cindex for -ib. Add @cindex for -bw. + (Title X): Remove alias -title. + (Icons X): Remove alias -iconic. + (Misc X): New node. + 2004-02-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> * frames.texi (Drag and drop): Add Motif to list of supported
--- a/man/building.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/man/building.texi Tue Feb 24 22:48:10 2004 +0000 @@ -705,7 +705,7 @@ @kindex RET @r{(GDB speedbar)} @findex gdb-var-delete With the cursor over the root expression of a complex data type, type -@key{RET} or click @kbd{Mouse-2} to delete it from the speedbar +@key{D} to delete it from the speedbar (@code{gdb-var-delete}). @findex gdb-edit-value @@ -714,13 +714,16 @@ its value. A prompt for a new value appears in the mini-buffer (@code{gdb-edit-value}). -If you set the variable @code{gdb-show-changed-values} to a -non-@code{nil} value, then Emacs will use font-lock-warning-face to -display values that have recently changed in the speedbar. +If you set the variable @code{gdb-show-changed-values} to +non-@code{nil} (the default value), then Emacs will use +font-lock-warning-face to display values that have recently changed in +the speedbar. If you set the variable @code{gdb-use-colon-colon-notation} to a non-@code{nil} value, then, in C, Emacs will use the FUNCTION::VARIABLE format to display variables in the speedbar. +Since this does not work for variables defined in compound statements, +the default value is @code{nil}. @node Other Buffers @subsubsection Other Buffers
--- a/man/cmdargs.texi Tue Feb 24 18:00:36 2004 +0000 +++ b/man/cmdargs.texi Tue Feb 24 22:48:10 2004 +0000 @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985,86,87,93,94,95,1997,2001, 2003 Free Software Foundation, Inc. +@c Copyright (C) 1985,86,87,93,94,95,97,2001,03,2004 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Command Arguments, X Resources, Service, Top @appendix Command Line Arguments @@ -46,27 +46,33 @@ @cindex initial options (command line) @cindex action options (command line) +@vindex command-line-args Most options specify how to initialize Emacs, or set parameters for the Emacs session. We call them @dfn{initial options}. A few options specify things to do: for example, load libraries, call functions, or terminate Emacs. These are called @dfn{action options}. These and file names together are called @dfn{action arguments}. Emacs processes all -the action arguments in the order they are written. +the action arguments in the order they are written. The @file{.emacs} file +can access the values of the action arguments as the elements of a list in +the variable @code{command-line-args}. + + @menu -* Action Arguments:: Arguments to visit files, load libraries, - and call functions. +* Action Arguments:: Arguments to visit files, load libraries, + and call functions. * Initial Options:: Arguments that take effect while starting Emacs. * Command Example:: Examples of using command line arguments. -* Resume Arguments:: Specifying arguments when you resume a running Emacs. +* Resume Arguments:: Specifying arguments when you resume a running Emacs. * Environment:: Environment variables that Emacs uses. * Display X:: Changing the default display and using remote login. -* Font X:: Choosing a font for text, under X. -* Colors:: Choosing display colors. +* Font X:: Choosing a font for text, under X. +* Colors:: Choosing display colors. * Window Size X:: Start-up window size, under X. -* Borders X:: Internal and external borders, under X. +* Borders X:: Internal and external borders, under X. * Title X:: Specifying the initial frame's title. * Icons X:: Choosing what sort of icon to use, under X. +* Misc X:: Other display options. @end menu @node Action Arguments @@ -76,10 +82,12 @@ @table @samp @item @var{file} +@opindex --file +@itemx --file=@var{file} +@opindex --find-file +@itemx --find-file=@var{file} @opindex --visit @itemx --visit=@var{file} -@opindex --file -@itemx --file=@var{file} @cindex visiting files, command-line argument @vindex inhibit-startup-buffer-menu Visit @var{file} using @code{find-file}. @xref{Visiting}. @@ -107,6 +115,12 @@ directory, or in the Emacs library search path as specified with @env{EMACSLOADPATH} (@pxref{General Variables}). +@item -L @var{dir} +@opindex -L +@itemx --directory=@var{dir} +@opindex --directory +Add directory @var{dir} to the variable @code{load-path}. + @item -f @var{function} @opindex -f @itemx --funcall=@var{function} @@ -133,13 +147,16 @@ @item --kill @opindex --kill Exit from Emacs without asking for confirmation. -@end table -@vindex command-line-args - The init file can access the values of the action arguments as the -elements of a list in the variable @code{command-line-args}. The init -file can override the normal processing of the action arguments, or -define new ones, by reading and setting this variable. +@item --help +@opindex --help +Print a usage message listing all available options, then exit +successfully. + +@item --version +@opindex --version +Print Emacs version, then exit successfully. +@end table @node Initial Options @appendixsec Initial Options @@ -162,6 +179,7 @@ @opindex --terminal @cindex device for Emacs terminal I/O Use @var{device} as the device for terminal input and output. +@samp{--terminal} implies @samp{--no-window-system}. @item -d @var{display} @opindex -d @@ -205,6 +223,7 @@ @item --script @var{file} @opindex --script +@cindex script mode Run Emacs in batch mode, like @samp{--batch}, and then read and execute the Lisp code in @var{file}. @@ -224,11 +243,12 @@ @opindex -q @itemx --no-init-file @opindex --no-init-file -@cindex bypassing init and site-start file +@cindex bypassing init and @file{default.el} file @cindex init file, not loading @cindex @file{default.el} file, not loading Do not load your Emacs init file @file{~/.emacs}, or @file{default.el} -either. When invoked like this, Emacs does not allow saving options +either. Regardless of this switch, @file{site-start.el} is still loaded. +When invoked like this, Emacs does not allow saving options changed with the @kbd{M-x customize} command and its variants. @xref{Easy Customization}. @@ -236,7 +256,7 @@ @opindex --no-site-file @cindex @file{site-start.el} file, not loading Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u} -and @samp{-batch} have no effect on the loading of this file---this is +and @samp{--batch} have no effect on the loading of this file---this is the only option that blocks it. @item --no-splash @@ -245,6 +265,10 @@ Do not display a splash screen on startup; this is equivalent to setting the variable @code{inhibit-startup-message} to non-@code{nil}. +@item --no-desktop +@opindex --no-desktop +Do not reload any saved desktop. @xref{Saving Emacs Sessions}. + @item -u @var{user} @opindex -u @itemx --user=@var{user} @@ -260,6 +284,8 @@ @item --unibyte @opindex --unibyte +@itemx --no-multibyte +@opindex --no-multibyte @cindex unibyte operation, command-line argument Do almost everything with single-byte buffers and strings. All buffers and strings are unibyte unless you (or a Lisp program) @@ -270,6 +296,8 @@ @item --multibyte @opindex --multibyte +@itemx --no-unibyte +@opindex --no-unibyte Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs uses multibyte characters by default, as usual. @end table @@ -290,7 +318,7 @@ This says to visit @file{foo.c}, load @file{hack-c.el} (which makes changes in the visited file), save @file{foo.c} (note that @code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and -then exit back to the shell (because of @samp{-batch}). @samp{-batch} +then exit back to the shell (because of @samp{--batch}). @samp{--batch} also guarantees there will be no problem redirecting output to @file{log}, because Emacs will not assume that it has a display terminal to work with. @@ -944,14 +972,13 @@ @table @samp @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} @opindex -g +@itemx --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} +@opindex --geometry +@cindex geometry, command-line argument Specify the size @var{width} and @var{height} (measured in character columns and lines), and positions @var{xoffset} and @var{yoffset} (measured in pixels). This applies to all frames. -@item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} -@opindex --geometry -This is another way of writing the same thing. - @item -fs @opindex -fs @itemx --fullscreen @@ -1029,7 +1056,7 @@ @file{~/.emacs} file disables the tool bar, you will end up with a frame geometry different from what you asked for. To get the intended size with no tool bar, use an X resource to specify ``no tool bar'' -(@pxref{Table of Resources});then Emacs will already know there's no +(@pxref{Table of Resources}); then Emacs will already know there's no tool bar when it processes the specified geometry. When using one of @samp{--fullscreen}, @samp{--fullwidth} or @@ -1057,13 +1084,15 @@ @opindex -ib @itemx --internal-border=@var{width} @opindex --internal-border -@cindex border width, command-line argument -Specify @var{width} as the width of the internal border, in pixels. +@cindex internal border width, command-line argument +Specify @var{width} as the width of the internal border (between the text +and the main border), in pixels. @item -bw @var{width} @opindex -bw @itemx --border-width=@var{width} @opindex --border-width +@cindex main border width, command-line argument Specify @var{width} as the width of the main border, in pixels. @end table @@ -1091,11 +1120,10 @@ line option: @table @samp -@item -title @var{title} -@opindex --title +@item -T @var{title} +@opindex -T @itemx --title=@var{title} -@itemx -T @var{title} -@opindex -T +@opindex --title @cindex frame title, command-line argument Specify @var{title} as the title for the initial Emacs frame. @end table @@ -1138,6 +1166,35 @@ is the only indication that Emacs has started; the text frame doesn't appear until you deiconify it. +@node Misc X +@appendixsec Other Display Options + +@table @samp +@item -hb +@opindex -hb +@itemx --horizontal-scroll-bars +@opindex --horizontal-scroll-bars +@cindex horizontal scroll bars, command-line argument +Enable horizontal scroll bars. + +@item -vb +@opindex -vb +@itemx --vertical-scroll-bars +@opindex --vertical-scroll-bars +@cindex vertical scroll bars, command-line argument +Enable vertical scroll bars. + +@item -lsp @var{pixels} +@opindex -lsp +@itemx --line-spacing=@var{pixels} +@opindex --line-spacing +@cindex line spacing, command-line argument +Specify @var{pixels} as additional space to put between lines, in pixels. +@end table + + The @samp{--xrm} option (@pxref{Resources}) specifies additional +X resource values. + @ignore arch-tag: fffecd9e-7329-4a51-a3cc-dd4a9889340e @end ignore
--- a/src/ChangeLog Tue Feb 24 18:00:36 2004 +0000 +++ b/src/ChangeLog Tue Feb 24 22:48:10 2004 +0000 @@ -1,3 +1,26 @@ +2004-02-23 Luc Teirlinck <teirllm@auburn.edu> + + * abbrev.c (Finsert_abbrev_table_description): Doc fix. + +2004-02-22 Jason Rumney <jasonr@gnu.org> + + * w32term.c (w32_draw_fringe_bitmap): Draw overlaid bitmaps + correctly over other bitmaps. + +2004-02-21 Eli Zaretskii <eliz@elta.co.il> + + * emacs.c (USAGE1): Split into two halves. + (USAGE2): Second half of the old USAGE1. + (USAGE3): Renamed from USAGE2. + (USAGE4): Renamed from USAGE3. + +2004-02-21 Juri Linkov <juri@jurta.org> + + * emacs.c (USAGE1): Add --no-desktop. Move --display from USAGE2. + Fix --multibyte. Move --help, --version to USAGE2. Add alias + --file. Fix -f, -l. Sort options. Untabify. + (USAGE2): Add -hb. Fix --name, --title. Sort options. Untabify. + 2004-02-19 Luc Teirlinck <teirllm@auburn.edu> * category.c (Fdefine_category, Fcategory_docstring)
--- a/src/abbrev.c Tue Feb 24 18:00:36 2004 +0000 +++ b/src/abbrev.c Tue Feb 24 22:48:10 2004 +0000 @@ -540,7 +540,8 @@ a call to `define-abbrev-table', which would define the abbrev table NAME exactly as it is currently defined. -Abbrevs marked as "system abbrevs" are omitted. */) +Abbrevs marked as "system abbrevs" are normally omitted. However, if +READABLE is non-nil, they are listed. */) (name, readable) Lisp_Object name, readable; {
--- a/src/emacs.c Tue Feb 24 18:00:36 2004 +0000 +++ b/src/emacs.c Tue Feb 24 22:48:10 2004 +0000 @@ -221,6 +221,8 @@ static void sort_args (); void syms_of_emacs (); +/* MSVC needs each string be shorter than 2048 bytes, so the usage + strings below are split to not overflow this limit. */ #define USAGE1 "\ Usage: %s [OPTION-OR-FILENAME]...\n\ \n\ @@ -233,66 +235,71 @@ \n\ Initialization options:\n\ \n\ ---batch do not do interactive display; implies -q\n\ ---script FILE run FILE as an Emacs Lisp script.\n\ ---debug-init enable Emacs Lisp debugger during init file\n\ ---help display this help message and exit\n\ ---multibyte, --no-unibyte run Emacs in multibyte mode\n\ ---no-init-file, -q load neither ~/.emacs nor default.el\n\ ---no-shared-memory, -nl do not use shared memory\n\ ---no-site-file do not load site-start.el\n\ ---no-splash do not display a splash screen on startup\n\ ---no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ ---terminal, -t DEVICE use DEVICE for terminal I/O\n\ +--batch do not do interactive display; implies -q\n\ +--debug-init enable Emacs Lisp debugger for init file\n\ +--display, -d DISPLAY use X server DISPLAY\n\ +--multibyte, --no-unibyte inhibit the effect of EMACS_UNIBYTE\n\ +--no-desktop do not load a saved desktop\n\ +--no-init-file, -q load neither ~/.emacs nor default.el\n\ +--no-shared-memory, -nl do not use shared memory\n\ +--no-site-file do not load site-start.el\n\ +--no-splash do not display a splash screen on startup\n\ +--no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ +--script FILE run FILE as an Emacs Lisp script\n\ +--terminal, -t DEVICE use DEVICE for terminal I/O\n\ --unibyte, --no-multibyte run Emacs in unibyte mode\n\ ---user, -u USER load ~USER/.emacs instead of your own\n\ ---version display version information and exit\n\ -\n\ +--user, -u USER load ~USER/.emacs instead of your own\n\ +\n%s" + +#define USAGE2 "\ Action options:\n\ \n\ -FILE visit FILE using find-file\n\ -+LINE FILE visit FILE using find-file, then go to line LINE\n\ -+LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ - column COLUMN\n\ ---directory, -L DIR add DIR to variable load-path\n\ ---eval EXPR evaluate Emacs Lisp expression EXPR\n\ ---execute EXPR evaluate Emacs Lisp expression EXPR\n\ ---find-file FILE visit FILE\n\ ---funcall, -f FUNC call Emacs function FUNC with no arguments\n\ ---insert FILE insert contents of FILE into current buffer\n\ ---kill exit without asking for confirmation\n\ ---load, -l FILE load FILE of Emacs Lisp code using the load function\n\ ---visit FILE visit FILE\n\ +FILE visit FILE using find-file\n\ ++LINE FILE visit FILE using find-file, then go to line LINE\n\ ++LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ + column COLUMN\n\ +--directory, -L DIR add DIR to variable load-path\n\ +--eval EXPR evaluate Emacs Lisp expression EXPR\n\ +--execute EXPR evaluate Emacs Lisp expression EXPR\n\ +--file FILE visit FILE using find-file\n\ +--find-file FILE visit FILE using find-file\n\ +--funcall, -f FUNC call Emacs Lisp function FUNC with no arguments\n\ +--insert FILE insert contents of FILE into current buffer\n\ +--kill exit without asking for confirmation\n\ +--load, -l FILE load Emacs Lisp FILE using the load function\n\ +--visit FILE visit FILE using find-file\n\ \n" -#define USAGE2 "\ +#define USAGE3 "\ Display options:\n\ \n\ ---background-color, -bg COLOR window background color\n\ ---border-color, -bd COLOR main border color\n\ ---border-width, -bw WIDTH width of main border\n\ ---color=MODE color mode for character terminals;\n\ - MODE defaults to `auto', and can also\n\ - be `never', `auto', `always',\n\ - or a mode name like `ansi8'\n\ ---cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ ---display, -d DISPLAY use X server DISPLAY\n\ ---font, -fn FONT default font; must be fixed-width\n\ ---foreground-color, -fg COLOR window foreground color\n\ ---fullscreen, -fs make first frame fullscreen\n\ ---fullwidth, -fw make the first frame wide as the screen\n\ ---fullheight, -fh make the first frame high as the screen\n\ ---geometry, -g GEOMETRY window geometry\n\ ---iconic start Emacs in iconified state\n\ ---icon-type, -i use picture of gnu for Emacs icon\n\ ---internal-border, -ib WIDTH width between text and main border\n\ ---line-spacing, -lsp PIXELS additional space to put between lines\n\ ---mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ ---name NAME title of main Emacs window\n\ ---reverse-video, -r, -rv switch foreground and background\n\ ---title, -T, -wn TITLE title for Emacs windows\n\ ---vertical-scroll-bars, -vb enable vertical scroll bars\n\ ---xrm XRESOURCES set additional X resources\n\ +--background-color, -bg COLOR window background color\n\ +--border-color, -bd COLOR main border color\n\ +--border-width, -bw WIDTH width of main border\n\ +--color MODE color mode for character terminals;\n\ + MODE defaults to `auto', and can also\n\ + be `never', `auto', `always',\n\ + or a mode name like `ansi8'\n\ +--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ +--font, -fn FONT default font; must be fixed-width\n\ +--foreground-color, -fg COLOR window foreground color\n\ +--fullheight, -fh make the first frame high as the screen\n\ +--fullscreen, -fs make first frame fullscreen\n\ +--fullwidth, -fw make the first frame wide as the screen\n\ +--geometry, -g GEOMETRY window geometry\n\ +--horizontal-scroll-bars, -hb enable horizontal scroll bars\n\ +--icon-type, -i use picture of gnu for Emacs icon\n\ +--iconic start Emacs in iconified state\n\ +--internal-border, -ib WIDTH width between text and main border\n\ +--line-spacing, -lsp PIXELS additional space to put between lines\n\ +--mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ +--name NAME title for initial Emacs frame\n\ +--reverse-video, -r, -rv switch foreground and background\n\ +--title, -T TITLE title for initial Emacs frame\n\ +--vertical-scroll-bars, -vb enable vertical scroll bars\n\ +--xrm XRESOURCES set additional X resources\n\ +--help display this help and exit\n\ +--version output version information and exit\n\ \n\ You can generally also specify long option names with a single -; for\n\ example, -batch as well as --batch. You can use any unambiguous\n\ @@ -302,7 +309,7 @@ Emacs' operation. See the main documentation.\n\ \n" -#define USAGE3 "\ +#define USAGE4 "\ Report bugs to %s. First, please see the Bugs\n\ section of the Emacs manual or the file BUGS.\n" @@ -1062,9 +1069,9 @@ /* Handle the --help option, which gives a usage message. */ if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) { - printf (USAGE1, argv[0]); - printf (USAGE2); - printf (USAGE3, bug_reporting_address ()); + printf (USAGE1, argv[0], USAGE2); + printf (USAGE3); + printf (USAGE4, bug_reporting_address ()); exit (0); }
--- a/src/w32term.c Tue Feb 24 18:00:36 2004 +0000 +++ b/src/w32term.c Tue Feb 24 22:48:10 2004 +0000 @@ -715,29 +715,41 @@ SaveDC (hdc); horig_obj = SelectObject (compat_hdc, pixmap); - SetTextColor (hdc, face->background); - SetBkColor (hdc, p->cursor_p - ? (p->overlay_p ? face->background - : f->output_data.w32->cursor_pixel) - : face->foreground); /* Paint overlays transparently. */ if (p->overlay_p) { - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - DSTINVERT); - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - MERGEPAINT); - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - DSTINVERT); + HBRUSH h_brush, h_orig_brush; + + SetTextColor (hdc, BLACK_PIX_DEFAULT (f)); + SetBkColor (hdc, WHITE_PIX_DEFAULT (f)); + h_brush = CreateSolidBrush (face->foreground); + h_orig_brush = SelectObject (hdc, h_brush); + + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + 0x2E064A); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); + + SelectObject (hdc, h_orig_brush); + DeleteObject (h_brush); } else - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - SRCCOPY); + { + SetTextColor (hdc, face->background); + SetBkColor (hdc, (p->cursor_p + ? f->output_data.w32->cursor_pixel + : face->foreground)); + + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + SRCCOPY); + } SelectObject (compat_hdc, horig_obj); DeleteDC (compat_hdc);