Merged in changes from CVS trunk.

Patches applied:

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-325
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-326
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-327
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-328
   Update from CVS: src/.gdbinit (xsymbol): Fix last change.

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-329
   Update from CVS


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-166
This commit is contained in:
Karoly Lorentey 2004-05-22 22:52:43 +00:00
commit 04a0dc45e1
27 changed files with 464 additions and 217 deletions

View file

@ -1,18 +1,61 @@
2004-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (do-auto-fill): Remove unused vars `bol' and `opoint'.
(completion-setup-function): Use with-current-buffer.
Properly save excursion. Simplify.
Don't assume there is necessarily a `mouse-face' property somewhere.
* progmodes/gud.el (gud-reset): Use unless & with-current-buffer.
* progmodes/gdb-ui.el (gdb-reset): Use unless. Fix regexp.
* emacs-lisp/bytecomp.el (byte-compile-log): Use backquotes.
(byte-compile-log-1): Don't call (byte-goto-log-buffer).
Use with-current-buffer.
(byte-goto-log-buffer): Delete.
(byte-compile-log-file): Call compilation-forget-errors.
2004-05-19 Takaaki Ota <Takaaki.Ota@am.sony.com> (tiny change)
* net/ldap.el (ldap-search-internal): Avoid mixing standard error
output messages into the search result.
2004-05-19 Masatake YAMATO <jet@gyve.org>
* wid-edit.el (widget-radio-button-notify): Revert my last
change. Reported by Katsumi Yamaoka <yamaoka@jpl.org>.
2004-05-19 Kenichi Handa <handa@m17n.org>
* international/characters.el: Fix syntax (open/close) of CJK chars.
2004-05-18 Karl Chen <quarl@hkn.eecs.berkeley.edu> (tiny change)
* help-mode.el (help-go-back): Don't depend on position of back button.
2004-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
* files.el (auto-save-file-name-transforms): Make sure ange-ftp temp
files files don't contain an accidental additional /.
* textmodes/tex-mode.el (tex-compilation-parse-errors): Save excursion
in source buffer.
2004-05-18 Masatake YAMATO <jet@gyve.org>
* wid-edit.el (widget-radio-button-notify): Don't pass `widget'
to widget-apply. :action method assumes 2 arguments, not 3.
to widget-apply. :action method assumes 2 arguments, not 3.
2004-05-17 Glenn Morris <gmorris@ast.cam.ac.uk>
* progmodes/f90.el (f90-end-block-re, f90-start-block-re): New
constants.
* progmodes/f90.el (f90-end-block-re, f90-start-block-re):
New constants.
(hs-special-modes-alist): Add an f90-mode entry.
2004-05-17 Sam Steingold <sds@gnu.org>
* emacs-lisp/cl-indent.el (common-lisp-indent-function-1): Indent
"without-" forms just like "with-" and "do-". Use regexp-opt.
* emacs-lisp/cl-indent.el (common-lisp-indent-function-1):
Indent "without-" forms just like "with-" and "do-". Use regexp-opt.
2004-05-16 Kim F. Storm <storm@cua.dk>
@ -20,15 +63,14 @@
2004-05-15 John Wiegley <johnw@newartisans.com>
* eshell/esh-io.el (eshell-get-target): whitespace changes.
* eshell/esh-io.el (eshell-get-target): Whitespace changes.
(eshell-output-object-to-target): Improve output speed 20% by not
calling `eshell-stringify' if something is already known to be a
string.
calling `eshell-stringify' if something is already known to be a string.
2004-05-15 Alex Ott <ott@jet.msk.su>
* textmodes/ispell.el (ispell-local-dictionary-alist): Add
windows-1251 to the choice of coding systems.
* textmodes/ispell.el (ispell-local-dictionary-alist):
Add windows-1251 to the choice of coding systems.
(ispell-dictionary-alist-6): Add support for "russianw.aff",
encoded in cp1251.
@ -75,7 +117,7 @@
2004-05-13 Marcelo Toledo <marcelo@marcelotoledo.org>
* language/european.el ("Brazilian Portuguese"): Added support for
* language/european.el ("Brazilian Portuguese"): Add support for
Brazilian Portuguese.
2004-05-13 John Wiegley <johnw@newartisans.com>
@ -84,8 +126,7 @@
`recentf-mode' if this variable has been customized to t.
* eshell/esh-test.el (eshell-test): Call the function
`emacs-version' rather than trying to build a custom version
string.
`emacs-version' rather than trying to build a custom version string.
2004-05-13 Stefan Monnier <monnier@iro.umontreal.ca>
@ -775,18 +816,17 @@
* progmodes/fortran.el (fortran-fill): Use local var `bol' rather
than duplicate call to `line-beginning-position'.
* progmodes/f90.el (f90-get-present-comment-type): Return
whitespace, as well as comment chars, for consistent filling
* progmodes/f90.el (f90-get-present-comment-type):
Return whitespace, as well as comment chars, for consistent filling
of comment blocks. Use `match-string-no-properties'.
(f90-break-line): Do not leave trailing whitespace when filling
comments.
(f90-break-line): Trim trailing whitespace when filling comments.
2004-04-30 Dave Love <fx@gnu.org>
* calendar/diary-lib.el (diary-outlook-formats): New variable.
(diary-from-outlook-internal, diary-from-outlook)
(diary-from-outlook-gnus, diary-from-outlook-rmail): New
functions to import diary entries from Outlook-format
(diary-from-outlook-gnus, diary-from-outlook-rmail):
New functions to import diary entries from Outlook-format
appointments in mail messages.
2004-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
@ -814,8 +854,7 @@
* progmodes/sql.el (sql-product-alist): Rename variable
`sql-product-support'. Add Postgres login parameters.
(sql-set-product, sql-product-feature): Update with renamed
variable.
(sql-set-product, sql-product-feature): Update with renamed variable.
(sql-connect-postgres): Add username prompt.
(sql-imenu-generic-expression, sql-mode-font-lock-object-name):
Make patterns less product specific.
@ -837,8 +876,7 @@
(sql-mode-sqlite-font-lock-keywords)
(sql-mode-db2-font-lock-keywords): Default to nil.
(sql-product-font-lock): Always highlight ANSI keywords.
(sql-add-product-keywords): Made similar to
`font-lock-add-keywords'.
(sql-add-product-keywords): Made similar to `font-lock-add-keywords'.
(sql-send-string): Add function.
2004-04-29 Dave Love <fx@gnu.org>
@ -7391,7 +7429,7 @@ See ChangeLog.10 for earlier changes.
;; coding: iso-2022-7bit
;; End:
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2001, 02, 04 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.

View file

@ -832,24 +832,22 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
;; Log something that isn't a warning.
(defmacro byte-compile-log (format-string &rest args)
(list 'and
'byte-optimize
'(memq byte-optimize-log '(t source))
(list 'let '((print-escape-newlines t)
(print-level 4)
(print-length 4))
(list 'byte-compile-log-1
(cons 'format
(cons format-string
(mapcar
(lambda (x)
(if (symbolp x) (list 'prin1-to-string x) x))
args)))))))
`(and
byte-optimize
(memq byte-optimize-log '(t source))
(let ((print-escape-newlines t)
(print-level 4)
(print-length 4))
(byte-compile-log-1
(format
,format-string
,@(mapcar
(lambda (x) (if (symbolp x) (list 'prin1-to-string x) x))
args))))))
;; Log something that isn't a warning.
(defun byte-compile-log-1 (string)
(save-excursion
(byte-goto-log-buffer)
(with-current-buffer "*Compile-Log*"
(goto-char (point-max))
(byte-compile-warning-prefix nil nil)
(cond (noninteractive
@ -903,11 +901,6 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(defvar byte-compile-last-warned-form nil)
(defvar byte-compile-last-logged-file nil)
(defun byte-goto-log-buffer ()
(set-buffer (get-buffer-create "*Compile-Log*"))
(unless (eq major-mode 'compilation-mode)
(compilation-mode)))
;; This is used as warning-prefix for the compiler.
;; It is always called with the warnings buffer current.
(defun byte-compile-warning-prefix (level entry)
@ -983,6 +976,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
;; Do this after setting default-directory.
(unless (eq major-mode 'compilation-mode)
(compilation-mode))
(compilation-forget-errors)
pt))))
;; Log a message STRING in *Compile-Log*.

View file

@ -293,7 +293,7 @@ Normally auto-save files are written under other names."
:group 'auto-save)
(defcustom auto-save-file-name-transforms
`(("\\`/[^/]*:\\(.+/\\)*\\(.*\\)"
`(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'"
;; Don't put "\\2" inside expand-file-name, since it will be
;; transformed to "/2" on DOS/Windows.
,(concat temporary-file-directory "\\2") t))

View file

@ -1,5 +1,7 @@
2004-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
* mm-view.el (mm-insert-inline): Make it work in read-only buffer.
* gnus-win.el (gnus-all-windows-visible-p): Don't consider
non-visible windows.

View file

@ -1,5 +1,5 @@
;;; mm-view.el --- functions for viewing MIME objects
;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Copyright (C) 1998, 1999, 2000, 01, 2004 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
@ -197,7 +197,8 @@
(defun mm-insert-inline (handle text)
"Insert TEXT inline from HANDLE."
(let ((b (point)))
(let ((b (point))
(inhibit-read-only t))
(insert text)
(mm-handle-set-undisplayer
handle

View file

@ -577,12 +577,11 @@ help buffer."
(goto-char position)))))
(defun help-go-back ()
"Invoke the [back] button (if any) in the Help mode buffer."
"Go back to previous topic in this help buffer."
(interactive)
(let ((back-button (button-at (1- (point-max)))))
(if back-button
(button-activate back-button)
(error "No [back] button"))))
(if help-xref-stack
(help-xref-go-back (current-buffer))
(error "No previous help buffer.")))
(defun help-do-xref (pos function args)
"Call the help cross-reference function FUNCTION with args ARGS.

View file

@ -229,6 +229,14 @@
(modify-category-entry generic-char ?|)
(setq cns-list (cdr cns-list))))
(let ((parens "$(G!>!?!@!A!B!C!D!E!F!G!H!I!J!K!L!M!N!O!P!Q!R!S!T!U!V!W!X!Y!Z![!\!]!^!_!`!a!b!c(B")
open close)
(dotimes (i (/ (length parens) 2))
(setq open (aref parens (* i 2))
close (aref parens (1+ (* i 2))))
(modify-syntax-entry open (format "(%c" close))
(modify-syntax-entry close (format ")%c" open))))
;; Cyrillic character set (ISO-8859-5)
(modify-category-entry (make-char 'cyrillic-iso8859-5) ?y)
@ -584,16 +592,13 @@
(while chars
(modify-syntax-entry (car chars) "w")
(setq chars (cdr chars))))
(modify-syntax-entry ?\$B!J(B "($B!K(B")
(modify-syntax-entry ?\$B!N(B "($B!O(B")
(modify-syntax-entry ?\$B!P(B "($B!Q(B")
(modify-syntax-entry ?\$B!V(B "($B!W(B")
(modify-syntax-entry ?\$B!X(B "($B!Y(B")
(modify-syntax-entry ?\$B!K(B ")$B!J(B")
(modify-syntax-entry ?\$B!O(B ")$B!N(B")
(modify-syntax-entry ?\$B!Q(B ")$B!P(B")
(modify-syntax-entry ?\$B!W(B ")$B!V(B")
(modify-syntax-entry ?\$B!Y(B ")$B!X(B")
(let ((parens "$B!J!K!L!M!N!O!P!Q!R!S!T!U!V!W!X!Y!Z![(B" )
open close)
(dotimes (i (/ (length parens) 2))
(setq open (aref parens (* i 2))
close (aref parens (1+ (* i 2))))
(modify-syntax-entry open (format "(%c" close))
(modify-syntax-entry close (format ")%c" open))))
(modify-category-entry (make-char 'japanese-jisx0208 35) ?A)
(modify-category-entry (make-char 'japanese-jisx0208 36) ?H)
@ -652,6 +657,14 @@
(modify-category-entry (make-char 'korean-ksc5601 43) ?K)
(modify-category-entry (make-char 'korean-ksc5601 44) ?Y)
(let ((parens "$(C!2!3!4!5!6!7!8!9!:!;!<!=(B" )
open close)
(dotimes (i (/ (length parens) 2))
(setq open (aref parens (* i 2))
close (aref parens (1+ (* i 2))))
(modify-syntax-entry open (format "(%c" close))
(modify-syntax-entry close (format ")%c" open))))
;; Latin character set (latin-1,2,3,4,5,8,9)
(modify-category-entry (make-char 'latin-iso8859-1) ?l)

View file

@ -554,7 +554,7 @@ an alist of attribute/value pairs."
(setq arglist (nconc arglist (list (format "-z%s" sizelimit)))))
(eval `(call-process ldap-ldapsearch-prog
nil
buf
`(,buf nil)
nil
,@arglist
,@ldap-ldapsearch-args

View file

@ -764,7 +764,7 @@ before calling the real function `" (symbol-name fun-1) "'.\n")
(interactive)
(cvs-mode! ',fun-1)))))
(t (error "unknown style %s in `defun-cvs-mode'" style)))))
(t (error "Unknown style %s in `defun-cvs-mode'" style)))))
(defun-cvs-mode cvs-mode-kill-process ()
"Kill the temporary buffer and associated process."

View file

@ -1728,15 +1728,15 @@ This arrangement depends on the value of `gdb-many-windows'."
"Exit a debugging session cleanly by killing the gdb buffers and resetting
the source buffers."
(dolist (buffer (buffer-list))
(if (not (eq buffer gud-comint-buffer))
(with-current-buffer buffer
(if (memq gud-minor-mode '(gdba pdb))
(if (string-match "^\*.+*$" (buffer-name))
(kill-buffer nil)
(gdb-remove-breakpoint-icons (point-min) (point-max) t)
(setq gud-minor-mode nil)
(kill-local-variable 'tool-bar-map)
(setq gud-running nil))))))
(unless (eq buffer gud-comint-buffer)
(with-current-buffer buffer
(if (memq gud-minor-mode '(gdba pdb))
(if (string-match "\\`\\*.+\\*\\'" (buffer-name))
(kill-buffer nil)
(gdb-remove-breakpoint-icons (point-min) (point-max) t)
(setq gud-minor-mode nil)
(kill-local-variable 'tool-bar-map)
(setq gud-running nil))))))
(when (markerp gdb-overlay-arrow-position)
(move-marker gdb-overlay-arrow-position nil)
(setq gdb-overlay-arrow-position nil))
@ -2013,5 +2013,5 @@ BUFFER nil or omitted means use the current buffer."
(provide 'gdb-ui)
;;; arch-tag: e9fb00c5-74ef-469f-a088-37384caae352
;; arch-tag: e9fb00c5-74ef-469f-a088-37384caae352
;;; gdb-ui.el ends here

View file

@ -2554,12 +2554,11 @@ It is saved for when this flag is not set.")
(defun gud-reset ()
(dolist (buffer (buffer-list))
(if (not (eq buffer gud-comint-buffer))
(save-excursion
(set-buffer buffer)
(when gud-minor-mode
(setq gud-minor-mode nil)
(kill-local-variable 'tool-bar-map))))))
(unless (eq buffer gud-comint-buffer)
(with-current-buffer buffer
(when gud-minor-mode
(setq gud-minor-mode nil)
(kill-local-variable 'tool-bar-map))))))
(defun gud-display-frame ()
"Find and obey the last filename-and-line marker from the debugger.

View file

@ -3396,15 +3396,14 @@ Setting this variable automatically makes it local to the current buffer.")
;; (Actually some major modes use a different auto-fill function,
;; but this one is the default one.)
(defun do-auto-fill ()
(let (fc justify bol give-up
(let (fc justify give-up
(fill-prefix fill-prefix))
(if (or (not (setq justify (current-justification)))
(null (setq fc (current-fill-column)))
(and (eq justify 'left)
(<= (current-column) fc))
(save-excursion (beginning-of-line)
(setq bol (point))
(and auto-fill-inhibit-regexp
(and auto-fill-inhibit-regexp
(save-excursion (beginning-of-line)
(looking-at auto-fill-inhibit-regexp))))
nil ;; Auto-filling not required
(if (memq justify '(full center right))
@ -3427,16 +3426,15 @@ Setting this variable automatically makes it local to the current buffer.")
;; Determine where to split the line.
(let* (after-prefix
(fill-point
(let ((opoint (point)))
(save-excursion
(beginning-of-line)
(setq after-prefix (point))
(and fill-prefix
(looking-at (regexp-quote fill-prefix))
(setq after-prefix (match-end 0)))
(move-to-column (1+ fc))
(fill-move-to-break-point after-prefix)
(point)))))
(save-excursion
(beginning-of-line)
(setq after-prefix (point))
(and fill-prefix
(looking-at (regexp-quote fill-prefix))
(setq after-prefix (match-end 0)))
(move-to-column (1+ fc))
(fill-move-to-break-point after-prefix)
(point))))
;; See whether the place we found is any good.
(if (save-excursion
@ -4269,16 +4267,15 @@ of the differing parts is, by contrast, slightly highlighted."
:group 'completion)
(defun completion-setup-function ()
(save-excursion
(let ((mainbuf (current-buffer))
(mbuf-contents (minibuffer-contents)))
;; When reading a file name in the minibuffer,
;; set default-directory in the minibuffer
;; so it will get copied into the completion list buffer.
(if minibuffer-completing-file-name
(with-current-buffer mainbuf
(setq default-directory (file-name-directory mbuf-contents))))
(set-buffer standard-output)
(let ((mainbuf (current-buffer))
(mbuf-contents (minibuffer-contents)))
;; When reading a file name in the minibuffer,
;; set default-directory in the minibuffer
;; so it will get copied into the completion list buffer.
(if minibuffer-completing-file-name
(with-current-buffer mainbuf
(setq default-directory (file-name-directory mbuf-contents))))
(with-current-buffer standard-output
(completion-list-mode)
(make-local-variable 'completion-reference-buffer)
(setq completion-reference-buffer mainbuf)
@ -4287,24 +4284,23 @@ of the differing parts is, by contrast, slightly highlighted."
;; use the number of chars before the start of the
;; last file name component.
(setq completion-base-size
(save-excursion
(set-buffer mainbuf)
(goto-char (point-max))
(skip-chars-backward "^/")
(- (point) (minibuffer-prompt-end))))
(with-current-buffer mainbuf
(save-excursion
(goto-char (point-max))
(skip-chars-backward "^/")
(- (point) (minibuffer-prompt-end)))))
;; Otherwise, in minibuffer, the whole input is being completed.
(save-match-data
(if (minibufferp mainbuf)
(setq completion-base-size 0))))
;; Put faces on first uncommon characters and common parts.
(if (minibufferp mainbuf)
(setq completion-base-size 0)))
;; Put faces on first uncommon characters and common parts.
(when completion-base-size
(let* ((common-string-length (length
(substring mbuf-contents
completion-base-size)))
(let* ((common-string-length
(- (length mbuf-contents) completion-base-size))
(element-start (next-single-property-change
(point-min)
'mouse-face))
(element-common-end (+ element-start common-string-length))
(element-common-end
(+ (or element-start nil) common-string-length))
(maxp (point-max)))
(while (and element-start (< element-common-end maxp))
(when (and (get-char-property element-start 'mouse-face)
@ -4768,5 +4764,5 @@ works by saving the value of `buffer-invisibility-spec' and setting it to nil."
(provide 'simple)
;;; arch-tag: 24af67c0-2a49-44f6-b3b1-312d8b570dfd
;; arch-tag: 24af67c0-2a49-44f6-b3b1-312d8b570dfd
;;; simple.el ends here

View file

@ -1944,21 +1944,22 @@ for the error messages."
(or (null last-filename)
(not (string-equal last-filename filename))))
(error-location
(save-excursion
(if (equal filename (concat tex-zap-file ".tex"))
(set-buffer tex-last-buffer-texed)
(set-buffer (find-file-noselect filename)))
(if new-file
(progn (goto-line linenum) (setq last-position nil))
(goto-char last-position)
(forward-line (- linenum last-linenum)))
;; first try a forward search for the error text,
;; then a backward search limited by the last error.
(let ((starting-point (point)))
(or (re-search-forward error-text nil t)
(re-search-backward error-text last-position t)
(goto-char starting-point)))
(point-marker))))
(with-current-buffer
(if (equal filename (concat tex-zap-file ".tex"))
tex-last-buffer-texed
(find-file-noselect filename))
(save-excursion
(if new-file
(progn (goto-line linenum) (setq last-position nil))
(goto-char last-position)
(forward-line (- linenum last-linenum)))
;; first try a forward search for the error text,
;; then a backward search limited by the last error.
(let ((starting-point (point)))
(or (re-search-forward error-text nil t)
(re-search-backward error-text last-position t)
(goto-char starting-point)))
(point-marker)))))
(goto-char this-error)
(if (and compilation-error-list
(or (and find-at-least

View file

@ -2294,7 +2294,7 @@ Return an alist of (TYPE MATCH)."
(defun widget-radio-button-notify (widget child &optional event)
;; Tell daddy.
(widget-apply (widget-get widget :parent) :action event))
(widget-apply (widget-get widget :parent) :action widget event))
;;; The `radio-button-choice' Widget.

View file

@ -1,3 +1,7 @@
2004-05-19 Thien-Thi Nguyen <ttn@gnu.org>
* modes.texi (Search-based Fontification): Fix typo.
2004-05-10 Juanma Barranquero <lektu@terra.es>
* modes.texi (Mode Line Variables): Fix description of

View file

@ -2001,7 +2001,7 @@ Find text by calling @var{function}, and highlight the matches
it finds using @code{font-lock-keyword-face}.
When @var{function} is called, it receives one argument, the limit of
the search; it should searching at point, and not search beyond the
the search; it should begin searching at point, and not search beyond the
limit. It should return non-@code{nil} if it succeeds, and set the
match data to describe the match that was found. Returning @code{nil}
indicates failure of the search.

View file

@ -724,6 +724,18 @@ determines which characters these are. @xref{Syntax}.
@item \W
matches any character that is not a word-constituent.
@item \_<
matches the empty string, but only at the beginning of a symbol. A
symbol is a sequence of one or more word or symbol constituent
characters. @samp{\_<} matches at the beginning of the buffer only if
a symbol-constituent character follows.
@item \_>
matches the empty string, but only at the end of a symbol. A symbol
is a sequence of one or more word or symbol constituent characters.
@samp{\_>} matches at the end of the buffer only if the contents end
with a symbol-constituent character.
@item \s@var{c}
matches any character whose syntax is @var{c}. Here @var{c} is a
character that designates a particular syntax class: thus, @samp{w}

View file

@ -186,9 +186,10 @@ Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value
end
define xsymbol
xgetptr $
set $sym = $
xgetptr $sym
print (struct Lisp_Symbol *) $ptr
xprintsym $
xprintsym $sym
echo \n
end
document xsymbol
@ -199,7 +200,7 @@ end
define xstring
xgetptr $
print (struct Lisp_String *) $ptr
output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size & ~gdb_array_mark_flag : $->size_byte)
xprintstr $
echo \n
end
document xstring
@ -372,12 +373,17 @@ document xscrollbar
Print $ as a scrollbar pointer.
end
define xprintstr
set $data = $arg0->data
output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte)
end
define xprintsym
xgetptr $arg0
set $sym = (struct Lisp_Symbol *) $ptr
xgetptr $sym->xname
set $sym_name = (struct Lisp_String *) $ptr
output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size & ~gdb_array_mark_flag : $sym_name->size_byte)
xprintstr $sym_name
end
document xprintsym
Print argument as a symbol.

View file

@ -1,3 +1,47 @@
2004-05-19 Jim Blandy <jimb@redhat.com>
Add support for new '\_<' and '\_>' regexp operators, matching the
beginning and ends of symbols.
* regex.c (enum syntaxcode): Add Ssymbol.
(init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword.
(re_opcode_t): New opcodes `symbeg' and `symend'.
(print_partial_compiled_pattern): Print the new opcodes properly.
(regex_compile): Parse the new operators.
(analyse_first): Skip symbeg and symend (they match only the empty string).
(mutually_exclusive_p): `symend' is mutually exclusive with \s_ and
\sw; `symbeg' is mutually exclusive with \S_ and \Sw.
(re_match_2_internal): Match symbeg and symend.
* search.c (trivial_regexp_p): \_ is no longer a trivial regexp.
2004-05-19 Kim F. Storm <storm@cua.dk>
* .gdbinit (xsymbol): Fix last change.
2004-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
* .gdbinit (xprintstr): New fun.
(xstring, xprintsym): Use it.
* w32proc.c (create_child): Use INTMASK.
* alloc.c (Fgarbage_collect): Do all the marking before flushing
unmarked elements of the undo list.
2004-05-18 David Ponce <david@dponce.com>
* print.c (print): Reset print_depth before to call print_object.
2004-05-18 Jason Rumney <jasonr@gnu.org>
* w32console.c: Prefix RIF functions with w32con_ to avoid
namespace clash with functions in term.c and w32term.c.
* w32menu.c (add_menu_item, w32_menu_display_help)
[USE_LISP_UNION_TYPE]: Cast from Lisp_Object using i member.
* w32term.h (display_x_get_resource, vga_stdcolor_name): Add prototype.
2004-05-18 Eli Zaretskii <eliz@gnu.org>
* lisp.h (DECL_ALIGN): Remove restriction on MS-DOS systems.
@ -97,12 +141,16 @@
section to frame.c section.
(Fxw_display_color_p, Fx_file_dialog): Declare if
HAVE_WINDOW_SYSTEM defined.
* macfns.c (Fx_create_frame): Fix int/Lisp_Object mixup.
* macmenu.c (set_frame_menubar): Use NILP to test a lisp value.
* macterm.c (mac_get_emulated_btn, mac_event_to_emacs_modifiers)
(mac_get_mouse_btn): Use NILP and EQ to test/compare lisp values.
(XTread_socket): Fix int/Lisp_Object mixup.
(mac_check_for_quit_char): Fix pointer/Lisp_Object mixup.
* macterm.h (struct frame, struct face, struct image)
(display_x_get_resource, Fx_display_color_p)
(Fx_display_grayscale_p, Fx_display_planes, x_free_gcs):
@ -246,6 +294,7 @@
around call to ReceiveEvent to avoid certain crashes.
2004-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c (mac_draw_line_to_pixmap, XCreatePixmapFromBitmapData)
(mac_fill_rectangle_to_pixmap, mac_draw_rectangle_to_pixmap)
(mac_copy_area_to_pixmap, mac_copy_area_with_mask_to_pixmap):

View file

@ -1220,7 +1220,6 @@ print (obj, printcharfun, escapeflag)
register Lisp_Object printcharfun;
int escapeflag;
{
print_depth = 0;
old_backquote_output = 0;
/* Reset print_number_index and Vprint_number_table only when
@ -1240,6 +1239,7 @@ print (obj, printcharfun, escapeflag)
start = index = print_number_index;
/* Construct Vprint_number_table.
This increments print_number_index for the objects added. */
print_depth = 0;
print_preprocess (obj);
/* Remove unnecessary objects, which appear only once in OBJ;
@ -1264,6 +1264,7 @@ print (obj, printcharfun, escapeflag)
print_number_index = index;
}
print_depth = 0;
print_object (obj, printcharfun, escapeflag);
}

View file

@ -2,7 +2,7 @@
0.12. (Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
Copyright (C) 1993,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
Copyright (C) 1993,94,95,96,97,98,99,2000,04 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -217,7 +217,7 @@ char *realloc ();
/* Define the syntax stuff for \<, \>, etc. */
/* Sword must be nonzero for the wordchar pattern commands in re_match_2. */
enum syntaxcode { Swhitespace = 0, Sword = 1 };
enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
# ifdef SWITCH_ENUM_BUG
# define SWITCH_ENUM_CAST(x) ((int)(x))
@ -398,7 +398,7 @@ init_syntax_once ()
if (ISALNUM (c))
re_syntax_table[c] = Sword;
re_syntax_table['_'] = Sword;
re_syntax_table['_'] = Ssymbol;
done = 1;
}
@ -655,6 +655,9 @@ typedef enum
wordbound, /* Succeeds if at a word boundary. */
notwordbound, /* Succeeds if not at a word boundary. */
symbeg, /* Succeeds if at symbol beginning. */
symend, /* Succeeds if at symbol end. */
/* Matches any character whose syntax is specified. Followed by
a byte which contains a syntax code, e.g., Sword. */
syntaxspec,
@ -1094,6 +1097,14 @@ print_partial_compiled_pattern (start, end)
case wordend:
fprintf (stderr, "/wordend");
case symbeg:
printf ("/symbeg");
break;
case symend:
printf ("/symend");
break;
case syntaxspec:
fprintf (stderr, "/syntaxspec");
mcnt = *p++;
@ -3398,6 +3409,19 @@ regex_compile (pattern, size, syntax, bufp)
BUF_PUSH (wordend);
break;
case '_':
if (syntax & RE_NO_GNU_OPS)
goto normal_char;
laststart = b;
PATFETCH (c);
if (c == '<')
BUF_PUSH (symbeg);
else if (c == '>')
BUF_PUSH (symend);
else
FREE_STACK_RETURN (REG_BADPAT);
break;
case 'b':
if (syntax & RE_NO_GNU_OPS)
goto normal_char;
@ -3890,6 +3914,8 @@ analyse_first (p, pend, fastmap, multibyte)
case notwordbound:
case wordbeg:
case wordend:
case symbeg:
case symend:
continue;
@ -4654,14 +4680,20 @@ mutually_exclusive_p (bufp, p1, p2)
break;
case wordend:
case notsyntaxspec:
return ((re_opcode_t) *p1 == syntaxspec && p1[1] == Sword);
case symend:
return ((re_opcode_t) *p1 == syntaxspec
&& p1[1] == (op2 == wordend ? Sword : p2[1]));
&& (p1[1] == Ssymbol || p1[1] == Sword));
case notsyntaxspec:
return ((re_opcode_t) *p1 == syntaxspec && p1[1] == p2[1]);
case wordbeg:
case syntaxspec:
return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == Sword);
case symbeg:
return ((re_opcode_t) *p1 == notsyntaxspec
&& p1[1] == (op2 == wordbeg ? Sword : p2[1]));
&& (p1[1] == Ssymbol || p1[1] == Sword));
case syntaxspec:
return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == p2[1]);
case wordbound:
return (((re_opcode_t) *p1 == notsyntaxspec
@ -5803,6 +5835,92 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
}
break;
case symbeg:
DEBUG_PRINT1 ("EXECUTING symbeg.\n");
/* We FAIL in one of the following cases: */
/* Case 1: D is at the end of string. */
if (AT_STRINGS_END (d))
goto fail;
else
{
/* C1 is the character before D, S1 is the syntax of C1, C2
is the character at D, and S2 is the syntax of C2. */
re_wchar_t c1, c2;
int s1, s2;
#ifdef emacs
int offset = PTR_TO_OFFSET (d);
int charpos = SYNTAX_TABLE_BYTE_TO_CHAR (offset);
UPDATE_SYNTAX_TABLE (charpos);
#endif
PREFETCH ();
c2 = RE_STRING_CHAR (d, dend - d);
s2 = SYNTAX (c2);
/* Case 2: S2 is neither Sword nor Ssymbol. */
if (s2 != Sword && s2 != Ssymbol)
goto fail;
/* Case 3: D is not at the beginning of string ... */
if (!AT_STRINGS_BEG (d))
{
GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2);
#ifdef emacs
UPDATE_SYNTAX_TABLE_BACKWARD (charpos - 1);
#endif
s1 = SYNTAX (c1);
/* ... and S1 is Sword or Ssymbol. */
if (s1 == Sword || s1 == Ssymbol)
goto fail;
}
}
break;
case symend:
DEBUG_PRINT1 ("EXECUTING symend.\n");
/* We FAIL in one of the following cases: */
/* Case 1: D is at the beginning of string. */
if (AT_STRINGS_BEG (d))
goto fail;
else
{
/* C1 is the character before D, S1 is the syntax of C1, C2
is the character at D, and S2 is the syntax of C2. */
re_wchar_t c1, c2;
int s1, s2;
#ifdef emacs
int offset = PTR_TO_OFFSET (d) - 1;
int charpos = SYNTAX_TABLE_BYTE_TO_CHAR (offset);
UPDATE_SYNTAX_TABLE (charpos);
#endif
GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2);
s1 = SYNTAX (c1);
/* Case 2: S1 is neither Ssymbol nor Sword. */
if (s1 != Sword && s1 != Ssymbol)
goto fail;
/* Case 3: D is not at the end of string ... */
if (!AT_STRINGS_END (d))
{
PREFETCH_NOLIMIT ();
c2 = RE_STRING_CHAR (d, dend - d);
#ifdef emacs
UPDATE_SYNTAX_TABLE_FORWARD (charpos);
#endif
s2 = SYNTAX (c2);
/* ... and S2 is Sword or Ssymbol. */
if (s2 == Sword || s2 == Ssymbol)
goto fail;
}
}
break;
case syntaxspec:
case notsyntaxspec:
not = (re_opcode_t) *(p - 1) == notsyntaxspec;

View file

@ -957,7 +957,7 @@ trivial_regexp_p (regexp)
{
case '|': case '(': case ')': case '`': case '\'': case 'b':
case 'B': case '<': case '>': case 'w': case 'W': case 's':
case 'S': case '=': case '{': case '}':
case 'S': case '=': case '{': case '}': case '_':
case 'c': case 'C': /* for categoryspec and notcategoryspec */
case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9':

View file

@ -53,20 +53,20 @@ extern int read_input_pending ();
extern struct frame * updating_frame;
extern int meta_key;
static void move_cursor (int row, int col);
static void clear_to_end (void);
void clear_frame (void);
void clear_end_of_line (int);
static void ins_del_lines (int vpos, int n);
void insert_glyphs (struct glyph *start, int len);
void write_glyphs (struct glyph *string, int len);
void delete_glyphs (int n);
static void w32con_move_cursor (int row, int col);
static void w32con_clear_to_end (void);
static void w32con_clear_frame (void);
static void w32con_clear_end_of_line (int);
static void w32con_ins_del_lines (int vpos, int n);
static void w32con_insert_glyphs (struct glyph *start, int len);
static void w32con_write_glyphs (struct glyph *string, int len);
static void w32con_delete_glyphs (int n);
void w32_sys_ring_bell (void);
void reset_terminal_modes (void);
void set_terminal_modes (void);
void set_terminal_window (int size);
void update_begin (struct frame * f);
void update_end (struct frame * f);
static void w32con_reset_terminal_modes (void);
static void w32con_set_terminal_modes (void);
static void w32con_set_terminal_window (int size);
static void w32con_update_begin (struct frame * f);
static void w32con_update_end (struct frame * f);
static WORD w32_face_attributes (struct frame *f, int face_id);
static COORD cursor_coords;
@ -104,7 +104,7 @@ ctrl_c_handler (unsigned long type)
/* Move the cursor to (row, col). */
static void
move_cursor (int row, int col)
w32con_move_cursor (int row, int col)
{
cursor_coords.X = col;
cursor_coords.Y = row;
@ -117,17 +117,17 @@ move_cursor (int row, int col)
/* Clear from cursor to end of screen. */
static void
clear_to_end (void)
w32con_clear_to_end (void)
{
struct frame * f = PICK_FRAME ();
clear_end_of_line (FRAME_COLS (f) - 1);
ins_del_lines (cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1);
w32con_clear_end_of_line (FRAME_COLS (f) - 1);
w32con_ins_del_lines (cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1);
}
/* Clear the frame. */
void
clear_frame (void)
static void
w32con_clear_frame (void)
{
struct frame * f = PICK_FRAME ();
COORD dest;
@ -144,7 +144,7 @@ clear_frame (void)
FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r);
FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r);
move_cursor (0, 0);
w32con_move_cursor (0, 0);
}
@ -152,8 +152,8 @@ static struct glyph glyph_base[256];
static BOOL ceol_initialized = FALSE;
/* Clear from Cursor to end (what's "standout marker"?). */
void
clear_end_of_line (int end)
static void
w32con_clear_end_of_line (int end)
{
if (!ceol_initialized)
{
@ -164,12 +164,12 @@ clear_end_of_line (int end)
}
ceol_initialized = TRUE;
}
write_glyphs (glyph_base, end - cursor_coords.X); /* fencepost ? */
w32con_write_glyphs (glyph_base, end - cursor_coords.X); /* fencepost ? */
}
/* Insert n lines at vpos. if n is negative delete -n lines. */
void
ins_del_lines (int vpos, int n)
static void
w32con_ins_del_lines (int vpos, int n)
{
int i, nb;
SMALL_RECT scroll;
@ -212,8 +212,8 @@ ins_del_lines (int vpos, int n)
{
for (i = scroll.Bottom; i < dest.Y; i++)
{
move_cursor (i, 0);
clear_end_of_line (FRAME_COLS (f));
w32con_move_cursor (i, 0);
w32con_clear_end_of_line (FRAME_COLS (f));
}
}
}
@ -225,8 +225,8 @@ ins_del_lines (int vpos, int n)
{
for (i = nb; i < scroll.Top; i++)
{
move_cursor (i, 0);
clear_end_of_line (FRAME_COLS (f));
w32con_move_cursor (i, 0);
w32con_clear_end_of_line (FRAME_COLS (f));
}
}
}
@ -275,8 +275,8 @@ scroll_line (int dist, int direction)
/* If start is zero insert blanks instead of a string at start ?. */
void
insert_glyphs (register struct glyph *start, register int len)
static void
w32con_insert_glyphs (register struct glyph *start, register int len)
{
scroll_line (len, RIGHT);
@ -286,16 +286,16 @@ insert_glyphs (register struct glyph *start, register int len)
/* Print the first len characters of start, cursor_coords.X adjusted
by write_glyphs. */
write_glyphs (start, len);
w32con_write_glyphs (start, len);
}
else
{
clear_end_of_line (cursor_coords.X + len);
w32con_clear_end_of_line (cursor_coords.X + len);
}
}
void
write_glyphs (register struct glyph *string, register int len)
static void
w32con_write_glyphs (register struct glyph *string, register int len)
{
int produced, consumed;
DWORD r;
@ -353,7 +353,7 @@ write_glyphs (register struct glyph *string, register int len)
}
cursor_coords.X += produced;
move_cursor (cursor_coords.Y, cursor_coords.X);
w32con_move_cursor (cursor_coords.Y, cursor_coords.X);
}
len -= consumed;
n -= consumed;
@ -391,8 +391,8 @@ write_glyphs (register struct glyph *string, register int len)
}
void
delete_glyphs (int n)
static void
w32con_delete_glyphs (int n)
{
/* delete chars means scroll chars from cursor_coords.X + n to
cursor_coords.X, anything beyond the edge of the screen should
@ -450,8 +450,8 @@ SOUND is nil to use the normal beep. */)
return sound;
}
void
reset_terminal_modes (void)
static void
w32con_reset_terminal_modes (void)
{
#ifdef USE_SEPARATE_SCREEN
SetConsoleActiveScreenBuffer (prev_screen);
@ -461,8 +461,8 @@ reset_terminal_modes (void)
SetConsoleMode (keyboard_handle, prev_console_mode);
}
void
set_terminal_modes (void)
static void
w32con_set_terminal_modes (void)
{
CONSOLE_CURSOR_INFO cci;
@ -484,19 +484,19 @@ set_terminal_modes (void)
clumps rather than one-character-at-a-time...
we'll start with not moving the cursor while an update is in progress. */
void
update_begin (struct frame * f)
static void
w32con_update_begin (struct frame * f)
{
}
void
update_end (struct frame * f)
static void
w32con_update_end (struct frame * f)
{
SetConsoleCursorPosition (cur_screen, cursor_coords);
}
void
set_terminal_window (int size)
static void
w32con_set_terminal_window (int size)
{
}
@ -574,21 +574,21 @@ initialize_w32_display (void)
{
CONSOLE_SCREEN_BUFFER_INFO info;
cursor_to_hook = move_cursor;
raw_cursor_to_hook = move_cursor;
clear_to_end_hook = clear_to_end;
clear_frame_hook = clear_frame;
clear_end_of_line_hook = clear_end_of_line;
ins_del_lines_hook = ins_del_lines;
insert_glyphs_hook = insert_glyphs;
write_glyphs_hook = write_glyphs;
delete_glyphs_hook = delete_glyphs;
cursor_to_hook = w32con_move_cursor;
raw_cursor_to_hook = w32con_move_cursor;
clear_to_end_hook = w32con_clear_to_end;
clear_frame_hook = w32con_clear_frame;
clear_end_of_line_hook = w32con_clear_end_of_line;
ins_del_lines_hook = w32con_ins_del_lines;
insert_glyphs_hook = w32con_insert_glyphs;
write_glyphs_hook = w32con_write_glyphs;
delete_glyphs_hook = w32con_delete_glyphs;
ring_bell_hook = w32_sys_ring_bell;
reset_terminal_modes_hook = reset_terminal_modes;
set_terminal_modes_hook = set_terminal_modes;
set_terminal_window_hook = set_terminal_window;
update_begin_hook = update_begin;
update_end_hook = update_end;
reset_terminal_modes_hook = w32con_reset_terminal_modes;
set_terminal_modes_hook = w32con_set_terminal_modes;
set_terminal_window_hook = w32con_set_terminal_window;
update_begin_hook = w32con_update_begin;
update_end_hook = w32con_update_end;
read_socket_hook = w32_console_read_socket;
mouse_position_hook = w32_console_mouse_position;

View file

@ -8090,7 +8090,7 @@ DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key,
(WPARAM) XINT (XCAR (item)), (LPARAM) item.i))
#else
if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY,
(WPARAM) XINT (XCAR (item)), (LPARAM) item.i))
(WPARAM) XINT (XCAR (item)), (LPARAM) item))
#endif
{
@ -8170,7 +8170,7 @@ is set to off if the low bit of NEW-STATE is zero, otherwise on. */)
(WPARAM) vk_code, (LPARAM) new_state.i))
#else
if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY,
(WPARAM) vk_code, (LPARAM) new_state.i))
(WPARAM) vk_code, (LPARAM) new_state))
#endif
{
MSG msg;

View file

@ -2225,9 +2225,12 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
/* Set help string for menu item. Leave it as a Lisp_Object
until it is ready to be displayed, since GC can happen while
menus are active. */
if (wv->help)
info.dwItemData = (DWORD) wv->help;
if (!NILP (wv->help))
#ifdef USE_LISP_UNION_TYPE
info.dwItemData = (DWORD) (wv->help).i;
#else
info.dwItemData = (DWORD) (wv->help);
#endif
if (wv->button_type == BUTTON_TYPE_RADIO)
{
/* CheckMenuRadioItem allows us to differentiate TOGGLE and
@ -2307,7 +2310,12 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags)
info.fMask = MIIM_DATA;
get_menu_item_info (menu, item, FALSE, &info);
#ifdef USE_LISP_UNION_TYPE
help = info.dwItemData ? (Lisp_Object) ((EMACS_INT) info.dwItemData)
: Qnil;
#else
help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil;
#endif
}
/* Store the help echo in the keyboard buffer as the X toolkit

View file

@ -1,5 +1,5 @@
/* Process support for GNU Emacs on the Microsoft W32 API.
Copyright (C) 1992, 1995, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1992, 95, 99, 2000, 01, 04 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@ -367,7 +367,7 @@ create_child (char *exe, char *cmdline, char *env, int is_gui_app,
cp->pid = -cp->pid;
/* pid must fit in a Lisp_Int */
cp->pid = XUINT (make_number (cp->pid));
cp->pid = cp->pid & INTMASK;
*pPid = cp->pid;

View file

@ -252,6 +252,10 @@ extern int unibyte_display_via_language_environment;
struct w32_display_info *x_display_info_for_name ();
Lisp_Object display_x_get_resource P_ ((struct w32_display_info *,
Lisp_Object, Lisp_Object,
Lisp_Object, Lisp_Object));
extern struct w32_display_info *w32_term_init ();
extern Lisp_Object w32_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
@ -717,6 +721,8 @@ struct face;
XGCValues *XCreateGC (void *, Window, unsigned long, XGCValues *);
struct frame * check_x_frame (Lisp_Object);
Lisp_Object vga_stdcolor_name (int);
EXFUN (Fx_display_color_p, 1);
EXFUN (Fx_display_grayscale_p, 1);