Merge from emacs--rel--22

Patches applied:

 * emacs--rel--22  (patch 116-121)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-889
This commit is contained in:
Miles Bader 2007-10-15 02:07:53 +00:00
commit b2529d56b5
28 changed files with 380 additions and 272 deletions

View file

@ -36,13 +36,6 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem.
** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem on Cygwin.
(Did we decide that is unreproducible?)
** set-frame-size for frame without minibuffer loses mode line
Probably a Windows only bug. Reported by Drew Adams on bug-gnu-emacs on
2007-08-07. It seems that the bug manifests itself only if resizing the
frame makes the menu bar wrap before. On 2007-08-16 Glenn Morris
reported on emacs-devel that he was not able to reproduce the bug on a
GNU/Linux system.
* BUGS WAITING FOR MORE USER INPUT
** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process)

View file

@ -27,6 +27,11 @@
* files.texi (Version Systems): Describe newer VCses.
Reorder the descriptions to be chronological.
2007-10-09 Richard Stallman <rms@gnu.org>
* display.texi (Cursor Display): Correct how cursor appears
in nonselected windows.
2007-10-04 Nick Roberts <nickrob@snap.net.nz>
* building.texi (GDB Graphical Interface): Remove references to gdba

View file

@ -1116,12 +1116,12 @@ doesn't switch, so it uses the normal cursor.
@cindex cursor in non-selected windows
@vindex cursor-in-non-selected-windows
Normally, the cursor appears in non-selected windows in the ``off''
state, with the same appearance as when the blinking cursor blinks
Normally, the cursor appears in non-selected windows without
blinking, with the same appearance as when the blinking cursor blinks
``off.'' For a box cursor, this is a hollow box; for a bar cursor,
this is a thinner bar. To turn off cursors in non-selected windows,
customize the variable @code{cursor-in-non-selected-windows} and assign
it a @code{nil} value.
customize the variable @code{cursor-in-non-selected-windows} and
assign it a @code{nil} value.
@vindex x-stretch-cursor
@cindex wide block cursor

View file

@ -4,6 +4,22 @@
since we want @copying as close as possible to the beginning of
the output.
2007-10-12 Richard Stallman <rms@gnu.org>
* elisp.texi (Top): Add Distinguish Interactive to subnode menu.
* commands.texi (Distinguish Interactive): New node,
broken out from Interactive Call and rewritten.
(Command Loop): Put Distinguish Interactive in menu.
2007-10-09 Richard Stallman <rms@gnu.org>
* text.texi (Examining Properties): Mention overlay priority.
* display.texi (Display Margins): Correct the description
of margin display specifications.
(Replacing Specs): New subnode broken out of Display Property.
2007-10-06 Juri Linkov <juri@jurta.org>
* text.texi (Filling): Document fill-paragraph-or-region.

View file

@ -18,6 +18,7 @@ are done, and the subroutines that allow Lisp programs to do them.
* Command Overview:: How the command loop reads commands.
* Defining Commands:: Specifying how a function should read arguments.
* Interactive Call:: Calling a command, so that it will read arguments.
* Distinguish Interactive:: Making a command distinguish interactive calls.
* Command Loop Info:: Variables set by the command loop for you to examine.
* Adjusting Point:: Adjustment of point after a command.
* Input Events:: What input looks like when you read it.
@ -635,44 +636,76 @@ part of the prompt.
@end example
@end deffn
@defun interactive-p
This function returns @code{t} if the containing function (the one
whose code includes the call to @code{interactive-p}) was called in
direct response to user input. This means that it was called with the
function @code{call-interactively}, and that a keyboard macro is
not running, and that Emacs is not running in batch mode.
@node Distinguish Interactive
@section Distinguish Interactive Calls
Sometimes a command should display additional visual feedback (such
as an informative message in the echo area) for interactive calls
only. There are three ways to do this. The recommended way to test
whether the function was called using @code{call-interactively} is to
give it an optional argument @code{print-message} and use the
@code{interactive} spec to make it non-@code{nil} in interactive
calls. Here's an example:
@example
(defun foo (&optional print-message)
(interactive "p")
(when print-message
(message "foo")))
@end example
@noindent
We use @code{"p"} because the numeric prefix argument is never
@code{nil}. Defined in this way, the function does display the
message when called from a keyboard macro.
The above method with the additional argument is usually best,
because it allows callers to say ``treat this call as interactive.''
But you can also do the job in a simpler way by testing
@code{called-interactively-p}.
@defun called-interactively-p
This function returns @code{t} when the calling function was called
using @code{call-interactively}.
If the containing function was called by Lisp evaluation (or with
@code{apply} or @code{funcall}), then it was not called interactively.
@end defun
The most common use of @code{interactive-p} is for deciding whether
to give the user additional visual feedback (such as by printing an
informative message). For example:
Here's an example of using @code{called-interactively-p}:
@example
@group
;; @r{Here's the usual way to use @code{interactive-p}.}
(defun foo ()
(interactive)
(when (interactive-p)
(message "foo")))
(when (called-interactively-p)
(message "foo"))
'haha)
@result{} foo
@end group
@group
;; @r{This function is just to illustrate the behavior.}
(defun bar ()
(interactive)
(setq foobar (list (foo) (interactive-p))))
@result{} bar
@end group
@group
;; @r{Type @kbd{M-x foo}.}
@print{} foo
@end group
@group
(foo)
@result{} haha
@end group
@end example
Here is another example that contrasts direct and indirect
calls to @code{called-interactively-p}.
@example
@group
(defun bar ()
(interactive)
(setq foobar (list (foo) (called-interactively-p))))
@result{} bar
@end group
@group
;; @r{Type @kbd{M-x bar}.}
;; @r{This does not display a message.}
@ -684,31 +717,16 @@ foobar
@end group
@end example
If you want to test @emph{only} whether the function was called
using @code{call-interactively}, add an optional argument
@code{print-message} which should be non-@code{nil} in an interactive
call, and use the @code{interactive} spec to make sure it is
non-@code{nil}. Here's an example:
If you want to treat commands run in keyboard macros just like calls
from Lisp programs, test @code{interactive-p} instead of
@code{called-interactively-p}.
@example
(defun foo (&optional print-message)
(interactive "p")
(when print-message
(message "foo")))
@end example
@noindent
Defined in this way, the function does display the message when called
from a keyboard macro. We use @code{"p"} because the numeric prefix
argument is never @code{nil}.
@defun called-interactively-p
This function returns @code{t} when the calling function was called
using @code{call-interactively}.
When possible, instead of using this function, you should use the
method in the example above; that method makes it possible for a
caller to ``pretend'' that the function was called interactively.
@defun interactive-p
This function returns @code{t} if the containing function (the one
whose code includes the call to @code{interactive-p}) was called in
direct response to user input. This means that it was called with the
function @code{call-interactively}, and that a keyboard macro is
not running, and that Emacs is not running in batch mode.
@end defun
@node Command Loop Info

View file

@ -3245,21 +3245,47 @@ to use the value specified by the frame.
insert images into text, and also control other aspects of how text
displays. The value of the @code{display} property should be a
display specification, or a list or vector containing several display
specifications. Display specifications generally apply in parallel to
the text they cover.
specifications. Display specifications in the same @code{display}
property value generally apply in parallel to the text they cover.
If several sources (overlays and/or a text property) specify values
for the @code{display} property, only one of the values takes effect,
following the rules of @code{get-char-property}. @xref{Examining
Properties}.
The rest of this section describes several kinds of
display specifications and what they mean.
@menu
* Replacing Specs:: Display specs that replace the text.
* Specified Space:: Displaying one space with a specified width.
* Pixel Specification:: Specifying space width or height in pixels.
* Other Display Specs:: Displaying an image; magnifying text; moving it
up or down on the page; adjusting the width
of spaces within text.
* Display Margins:: Displaying text or images to the side of the main text.
@end menu
@node Replacing Specs
@subsection Display Specs That Replace The Text
Some kinds of @code{display} specifications specify something to
display instead of the text that has the property. If a list of
display specifications includes more than one of this kind, the first
is effective and the rest are ignored. You cannot interactively move
point into the middle of the text that is thus replaced.
display instead of the text that has the property. These are called
@dfn{replacing} display specifications. Emacs does not allow the user
to interactively move point into the middle of buffer text that is
replaced in this way.
For these specifications, ``the text that has the property'' means
all the consecutive characters that have the same Lisp object as their
@code{display} property; these characters are replaced as a single
unit. By contrast, characters that have similar but distinct Lisp
objects as their @code{display} properties are handled separately.
Here's a function that illustrates this point:
If a list of display specifications includes more than one replacing
display specification, the first overrides the rest. Replacing
display specifications make most other display specifications
irrelevant, since those don't apply to the replacement.
For replacing display specifications, ``the text that has the
property'' means all the consecutive characters that have the same
Lisp object as their @code{display} property; these characters are
replaced as a single unit. By contrast, characters that have similar
but distinct Lisp objects as their @code{display} properties are
handled separately. Here's a function that illustrates this point:
@smallexample
(defun foo ()
@ -3299,18 +3325,6 @@ object as the @code{display} property value, it's irrelevant
whether they got this property from a single call to
@code{put-text-property} or from two different calls.
The rest of this section describes several kinds of
display specifications and what they mean.
@menu
* Specified Space:: Displaying one space with a specified width.
* Pixel Specification:: Specifying space width or height in pixels.
* Other Display Specs:: Displaying an image; magnifying text; moving it
up or down on the page; adjusting the width
of spaces within text.
* Display Margins:: Displaying text or images to the side of the main text.
@end menu
@node Specified Space
@subsection Specified Spaces
@cindex spaces, specified height or width
@ -3549,25 +3563,28 @@ string.
@cindex display margins
@cindex margins, display
A buffer can have blank areas called @dfn{display margins} on the left
and on the right. Ordinary text never appears in these areas, but you
can put things into the display margins using the @code{display}
property.
A buffer can have blank areas called @dfn{display margins} on the
left and on the right. Ordinary text never appears in these areas,
but you can put things into the display margins using the
@code{display} property. There is currently no way to make text or
images in the margin mouse-sensitive.
To put text in the left or right display margin of the window, use a
display specification of the form @code{(margin right-margin)} or
@code{(margin left-margin)} on it. To put an image in a display margin,
use that display specification along with the display specification for
the image. Unfortunately, there is currently no way to make
text or images in the margin mouse-sensitive.
The way to display something in the margins is to specify it in a
margin display specification in the @code{display} property of some
text. This is a replacing display specification, meaning that the
text you put it on does not get displayed; the margin display appears,
but that text does not.
If you put such a display specification directly on text in the
buffer, the specified margin display appears @emph{instead of} that
buffer text itself. To put something in the margin @emph{in
association with} certain buffer text without preventing or altering
the display of that text, put a @code{before-string} property on the
text and put the display specification on the contents of the
before-string.
A margin display specification looks like @code{((margin
right-margin) @var{spec}} or @code{((margin left-margin) @var{spec})}.
Here, @var{spec} is another display specification that says what to
display in the margin. Typically it is a string of text to display,
or an image descriptor.
To display something in the margin @emph{in association with}
certain buffer text, without altering or preventing the display of
that text, put a @code{before-string} property on the text and put the
margin display specification on the contents of the before-string.
Before the display margins can display anything, you must give
them a nonzero width. The usual way to do that is to set these

View file

@ -639,6 +639,7 @@ Command Loop
* Command Overview:: How the command loop reads commands.
* Defining Commands:: Specifying how a function should read arguments.
* Interactive Call:: Calling a command, so that it will read arguments.
* Distinguish Interactive:: Making a command distinguish interactive calls.
* Command Loop Info:: Variables set by the command loop for you to examine.
* Adjusting Point:: Adjustment of point after a command.
* Input Events:: What input looks like when you read it.

View file

@ -2619,13 +2619,13 @@ the @var{prop} property of that symbol.
This function is like @code{get-text-property}, except that it checks
overlays first and then text properties. @xref{Overlays}.
The argument @var{object} may be a string, a buffer, or a window. If it
is a window, then the buffer displayed in that window is used for text
properties and overlays, but only the overlays active for that window
are considered. If @var{object} is a buffer, then all overlays in that
buffer are considered, as well as text properties. If @var{object} is a
string, only text properties are considered, since strings never have
overlays.
The argument @var{object} may be a string, a buffer, or a window. If
it is a window, then the buffer displayed in that window is used for
text properties and overlays, but only the overlays active for that
window are considered. If @var{object} is a buffer, then overlays in
that buffer are considered first, in order of decreasing priority,
followed by the text properties. If @var{object} is a string, only
text properties are considered, since strings never have overlays.
@end defun
@defun get-char-property-and-overlay position prop &optional object

View file

@ -40,6 +40,40 @@
* progmodes/etags.el (select-tags-table): Disable undo in the
`*Tags Table List*' buffer.
2007-10-13 Eli Zaretskii <eliz@gnu.org>
* dired.el (dired-warn-writable): New face.
(dired-warn-writable-face): New variable.
(dired-font-lock-keywords): Use dired-warn-writable-face, instead
of dired-warning-face, for group- and world-writable files.
2007-10-13 Richard Stallman <rms@gnu.org>
* files.el (directory-abbrev-alist): Doc fix.
2007-10-13 Jari Aalto <jari.aalto@cante.net>
* comint.el (comint-password-prompt-regexp): Add 'LDAP'.
2007-10-12 Martin Rudalics <rudalics@gmx.at>
* frame.el (set-frame-configuration): Assign name parameter only
if it has been set explicitly before.
2007-10-11 Tom Tromey <tromey@redhat.com>
* progmodes/gdb-ui.el (gdb-info-stack-custom): Ensure current
frame is visible.
2007-10-10 Richard Stallman <rms@gnu.org>
* emacs-lisp/debug.el (debugger-setup-buffer): Disable undo
in *Backtrace*.
* faces.el (face-font-selection-order): Doc fix.
* loadhist.el (unload-feature): Doc fix.
2007-10-13 Glenn Morris <rgm@gnu.org>
* progmodes/octave-mod.el (octave-looking-at-kw): Add doc string.

View file

@ -337,7 +337,7 @@ This variable is buffer-local."
;; Some implementations of passwd use "Password (again)" as the 2nd prompt.
(defcustom comint-password-prompt-regexp
"\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\
Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\
Kerberos \\|CVS \\|UNIX \\| SMB \\|LDAP \\|^\\)\
\[Pp]assword\\( (again)\\)?\\|\
pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\
\\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'"

View file

@ -344,6 +344,15 @@ Subexpression 2 must end right before the \\n or \\r.")
(defvar dired-warning-face 'dired-warning
"Face name used for a part of a buffer that needs user attention.")
(defface dired-warn-writable
'((((type w32 pc)) :inherit default) ;; These default to rw-rw-rw.
(t (:inherit font-lock-warning-face)))
"Face used to highlight permissions of group- and world-writable files."
:group 'dired-faces
:version "22.2")
(defvar dired-warn-writable-face 'dired-warn-writable
"Face name used for permissions of group- and world-writable files.")
(defface dired-directory
'((t (:inherit font-lock-function-name-face)))
"Face used for subdirectories."
@ -405,10 +414,10 @@ Subexpression 2 must end right before the \\n or \\r.")
;; fields with keymaps to frob the permissions, somewhat a la XEmacs.
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-d]....\\(w\\)....") ; group writable
'(1 dired-warning-face))
'(1 dired-warn-writable-face))
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-d].......\\(w\\).") ; world writable
'(1 dired-warning-face))
'(1 dired-warn-writable-face))
;;
;; Subdirectories.
(list dired-re-dir

View file

@ -269,6 +269,7 @@ That buffer should be current already."
(setq buffer-read-only nil)
(erase-buffer)
(set-buffer-multibyte nil)
(setq buffer-undo-list t)
(let ((standard-output (current-buffer))
(print-escape-newlines t)
(print-level 8)

View file

@ -3675,44 +3675,6 @@ Return the result of the last expression."
;;; Printing
;; Replace printing functions.
;; obsolete names
(define-obsolete-function-alias 'edebug-install-custom-print-funcs
'edebug-install-custom-print "22.1")
(define-obsolete-function-alias 'edebug-reset-print-funcs
'edebug-uninstall-custom-print "22.1")
(define-obsolete-function-alias 'edebug-uninstall-custom-print-funcs
'edebug-uninstall-custom-print "22.1")
(defun edebug-install-custom-print ()
"Replace print functions used by Edebug with custom versions."
;; Modifying the custom print functions, or changing print-length,
;; print-level, print-circle, custom-print-list or custom-print-vector
;; have immediate effect.
(interactive)
(require 'cust-print)
(defalias 'edebug-prin1 'custom-prin1)
(defalias 'edebug-print 'custom-print)
(defalias 'edebug-prin1-to-string 'custom-prin1-to-string)
(defalias 'edebug-format 'custom-format)
(defalias 'edebug-message 'custom-message)
"Installed")
(eval-and-compile
(defun edebug-uninstall-custom-print ()
"Replace edebug custom print functions with internal versions."
(interactive)
(defalias 'edebug-prin1 'prin1)
(defalias 'edebug-print 'print)
(defalias 'edebug-prin1-to-string 'prin1-to-string)
(defalias 'edebug-format 'format)
(defalias 'edebug-message 'message)
"Uninstalled")
;; Default print functions are the same as Emacs'.
(edebug-uninstall-custom-print))
(defun edebug-report-error (edebug-value)
;; Print an error message like command level does.
@ -3759,6 +3721,12 @@ Return the result of the last expression."
;;; Read, Eval and Print
(defalias 'edebug-prin1 'prin1)
(defalias 'edebug-print 'print)
(defalias 'edebug-prin1-to-string 'prin1-to-string)
(defalias 'edebug-format 'format)
(defalias 'edebug-message 'message)
(defun edebug-eval-expression (edebug-expr)
"Evaluate an expression in the outside environment.
If interactive, prompt for the expression.

View file

@ -48,8 +48,8 @@
"*A list specifying how face font selection chooses fonts.
Each of the four symbols `:width', `:height', `:weight', and `:slant'
must appear once in the list, and the list must not contain any other
elements. Font selection tries to find a best matching font for
those face attributes first that appear first in the list. For
elements. Font selection first tries to find a best matching font
for those face attributes that appear before in the list. For
example, if `:slant' appears before `:height', font selection first
tries to find a font with a suitable slant, even if this results in
a font height that isn't optimal."

View file

@ -59,8 +59,9 @@ FROM with TO when it appears in a directory name. This replacement is
done when setting up the default directory of a newly visited file.
*Every* FROM string should start with `^'.
Do not use `~' in the TO strings.
They should be ordinary absolute directory names.
FROM and TO should be equivalent names, which refer to the
same directory. Do not use `~' in the TO strings;
they should be ordinary absolute directory names.
Use this feature when you have directories which you normally refer to
via absolute symbolic links. Make TO the name of the link, and FROM
@ -554,7 +555,7 @@ See Info node `(elisp)Standard File Names' for more details."
(start 0))
;; Replace invalid filename characters with !
(while (string-match "[?*:<>|\"\000-\037]" name start)
(aset name (match-beginning 0) ?!)
(aset name (match-beginning 0) ?!)
(setq start (match-end 0)))
name)
filename))

View file

@ -950,8 +950,15 @@ is given and non-nil, the unwanted frames are iconified instead."
;; Since we can't set a frame's minibuffer status,
;; we might as well omit the parameter altogether.
(let* ((parms (nth 1 parameters))
(mini (assq 'minibuffer parms)))
(if mini (setq parms (delq mini parms)))
(mini (assq 'minibuffer parms))
(name (assq 'name parms))
(explicit-name (cdr (assq 'explicit-name parms))))
(when mini (setq parms (delq mini parms)))
;; Leave name in iff it was set explicitly.
;; This should fix the behavior reported in
;; http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01632.html
(when (and name (not explicit-name))
(setq parms (delq name parms)))
parms))
(set-window-configuration (nth 2 parameters)))
(setq frames-to-delete (cons frame frames-to-delete)))))

View file

@ -154,14 +154,16 @@ documentation of `unload-feature' for details.")
If the feature is required by any other loaded code, and prefix arg FORCE
is nil, raise an error.
This function tries to undo modifications made by the package to
hooks. Packages may define a hook FEATURE-unload-hook that is called
instead of the normal heuristics for doing this. Such a hook should
undo all the relevant global state changes that may have been made by
loading the package or executing functions in it. It has access to
the package's feature list (before anything is unbound) in the
variable `unload-hook-features-list' and could remove features from it
in the event that the package has done something normally-ill-advised,
This function tries to undo any modifications that the package has
made to hook values in Emacs. Normally it does this using heuristics.
The packages may define a hook `FEATURE-unload-hook'; if that exists,
it is called instead of the normal heuristics.
Such a hook should undo all the relevant global state changes that may
have been made by loading the package or executing functions in it.
It has access to the package's feature list (before anything is unbound)
in the variable `unload-hook-features-list' and could remove features
from it in the event that the package has done something strange,
such as redefining an Emacs function."
(interactive
(list

View file

@ -2120,62 +2120,72 @@ static char *magick[] = {
(defun gdb-info-stack-custom ()
(with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
(save-excursion
(unless (eq gdb-look-up-stack 'delete)
(let ((buffer-read-only nil)
bl el)
(goto-char (point-min))
(while (< (point) (point-max))
(setq bl (line-beginning-position)
el (line-end-position))
(when (looking-at "#")
(add-text-properties bl el
'(mouse-face highlight
help-echo "mouse-2, RET: Select frame")))
(goto-char bl)
(when (looking-at "^#\\([0-9]+\\)")
(when (string-equal (match-string 1) gdb-frame-number)
(if (> (car (window-fringes)) 0)
(progn
(or gdb-stack-position
(setq gdb-stack-position (make-marker)))
(set-marker gdb-stack-position (point)))
(put-text-property bl (+ bl 4)
'face '(:inverse-video t))))
(when (re-search-forward
(concat
(if (string-equal (match-string 1) "0") "" " in ")
"\\([^ ]+\\) (") el t)
(put-text-property (match-beginning 1) (match-end 1)
'face font-lock-function-name-face)
(setq bl (match-end 0))
(while (re-search-forward "<\\([^>]+\\)>" el t)
(put-text-property (match-beginning 1) (match-end 1)
'face font-lock-function-name-face))
(goto-char bl)
(while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
(put-text-property (match-beginning 1) (match-end 1)
'face font-lock-variable-name-face))))
(forward-line 1))
(forward-line -1)
(when (looking-at "(More stack frames follow...)")
(add-text-properties (match-beginning 0) (match-end 0)
'(mouse-face highlight
gdb-max-frames t
help-echo
"mouse-2, RET: customize gdb-max-frames to see more frames")))))
(when gdb-look-up-stack
(let (move-to)
(save-excursion
(unless (eq gdb-look-up-stack 'delete)
(let ((buffer-read-only nil)
bl el)
(goto-char (point-min))
(when (re-search-forward "\\(\\S-+?\\):\\([0-9]+\\)" nil t)
(let ((start (line-beginning-position))
(file (match-string 1))
(line (match-string 2)))
(re-search-backward "^#*\\([0-9]+\\)" start t)
(gdb-enqueue-input
(list (concat gdb-server-prefix "frame "
(match-string 1) "\n") 'gdb-set-hollow))
(gdb-enqueue-input
(list (concat gdb-server-prefix "frame 0\n") 'ignore)))))))
(while (< (point) (point-max))
(setq bl (line-beginning-position)
el (line-end-position))
(when (looking-at "#")
(add-text-properties bl el
'(mouse-face highlight
help-echo "mouse-2, RET: Select frame")))
(goto-char bl)
(when (looking-at "^#\\([0-9]+\\)")
(when (string-equal (match-string 1) gdb-frame-number)
(if (> (car (window-fringes)) 0)
(progn
(or gdb-stack-position
(setq gdb-stack-position (make-marker)))
(set-marker gdb-stack-position (point))
(setq move-to gdb-stack-position))
(put-text-property bl (+ bl 4)
'face '(:inverse-video t))
(setq move-to bl)))
(when (re-search-forward
(concat
(if (string-equal (match-string 1) "0") "" " in ")
"\\([^ ]+\\) (") el t)
(put-text-property (match-beginning 1) (match-end 1)
'face font-lock-function-name-face)
(setq bl (match-end 0))
(while (re-search-forward "<\\([^>]+\\)>" el t)
(put-text-property (match-beginning 1) (match-end 1)
'face font-lock-function-name-face))
(goto-char bl)
(while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
(put-text-property (match-beginning 1) (match-end 1)
'face font-lock-variable-name-face))))
(forward-line 1))
(forward-line -1)
(when (looking-at "(More stack frames follow...)")
(add-text-properties (match-beginning 0) (match-end 0)
'(mouse-face highlight
gdb-max-frames t
help-echo
"mouse-2, RET: customize gdb-max-frames to see more frames")))))
(when gdb-look-up-stack
(goto-char (point-min))
(when (re-search-forward "\\(\\S-+?\\):\\([0-9]+\\)" nil t)
(let ((start (line-beginning-position))
(file (match-string 1))
(line (match-string 2)))
(re-search-backward "^#*\\([0-9]+\\)" start t)
(gdb-enqueue-input
(list (concat gdb-server-prefix "frame "
(match-string 1) "\n") 'gdb-set-hollow))
(gdb-enqueue-input
(list (concat gdb-server-prefix "frame 0\n") 'ignore))))))
(when move-to
(let ((window (get-buffer-window (current-buffer) 0)))
(when window
(with-selected-window window
(goto-char move-to)
(unless (pos-visible-in-window-p)
(recenter '(center)))))))))
(if (eq gdb-look-up-stack 'delete)
(kill-buffer (gdb-get-buffer 'gdb-stack-buffer)))
(setq gdb-look-up-stack nil))

View file

@ -1,8 +1,27 @@
2007-10-13 Richard Stallman <rms@gnu.org>
* url-util.el (url-basepath): Function deleted.
(url-file-directory, url-file-nondirectory): New functions
replacing url-basepath. Callers changed.
* url-expand.el (url-default-expander): Use `url-file-directory'.
* url-auth.el (url-digest-auth, url-basic-auth):
Rename `path' to `file'. Use `url-file-directory'.
2007-10-12 Diane Murray <disumu@x3y2z1.net>
* url-auth.el (url-basic-auth): Set path to "/" when URL has an
empty string filename.
2007-10-09 Richard Stallman <rms@gnu.org>
* url-parse.el (url-type, url-user, url-password, url-host)
(url-port, url-filename, url-target, url-attributes)
(url-fullness, url-set-type, url-set-user, url-set-password)
(url-set-host, url-set-port, url-set-filename, url-set-target)
(url-set-attributes, url-set-full): Change macros to defuns.
2007-09-26 Juanma Barranquero <lekktu@gmail.com>
* url-dav.el (top):

View file

@ -61,22 +61,22 @@ If optional argument PROMPT is non-nil, ask for the username/password
to use for the url and its descendants. If optional third argument
OVERWRITE is non-nil, overwrite the old username/password pair if it
is found in the assoc list. If REALM is specified, use that as the realm
instead of the pathname inheritance method."
instead of the filename inheritance method."
(let* ((href (if (stringp url)
(url-generic-parse-url url)
url))
(server (url-host href))
(port (url-port href))
(path (url-filename href))
(file (url-filename href))
(user (url-user href))
(pass (url-password href))
byserv retval data)
(setq server (format "%s:%d" server port)
path (cond
file (cond
(realm realm)
((string= "" path) "/")
((string-match "/$" path) path)
(t (url-basepath path)))
((string= "" file) "/")
((string-match "/$" file) file)
(t (url-file-directory file)))
byserv (cdr-safe (assoc server
(symbol-value url-basic-auth-storage))))
(cond
@ -86,21 +86,21 @@ instead of the pathname inheritance method."
pass (read-passwd "Password: " nil (or pass "")))
(set url-basic-auth-storage
(cons (list server
(cons path
(cons file
(setq retval
(base64-encode-string
(format "%s:%s" user pass)))))
(symbol-value url-basic-auth-storage))))
(byserv
(setq retval (cdr-safe (assoc path byserv)))
(setq retval (cdr-safe (assoc file byserv)))
(if (and (not retval)
(string-match "/" path))
(string-match "/" file))
(while (and byserv (not retval))
(setq data (car (car byserv)))
(if (or (not (string-match "/" data)) ; It's a realm - take it!
(and
(>= (length path) (length data))
(string= data (substring path 0 (length data)))))
(>= (length file) (length data))
(string= data (substring file 0 (length data)))))
(setq retval (cdr (car byserv))))
(setq byserv (cdr byserv))))
(if (or (and (not retval) prompt) overwrite)
@ -111,7 +111,7 @@ instead of the pathname inheritance method."
retval (base64-encode-string (format "%s:%s" user pass))
byserv (assoc server (symbol-value url-basic-auth-storage)))
(setcdr byserv
(cons (cons path retval) (cdr byserv))))))
(cons (cons file retval) (cdr byserv))))))
(t (setq retval nil)))
(if retval (setq retval (concat "Basic " retval)))
retval))
@ -153,12 +153,12 @@ instead of hostname:portnum."
url))
(server (url-host href))
(port (url-port href))
(path (url-filename href))
(file (url-filename href))
user pass byserv retval data)
(setq path (cond
(setq file (cond
(realm realm)
((string-match "/$" path) path)
(t (url-basepath path)))
((string-match "/$" file) file)
(t (url-file-directory file)))
server (format "%s:%d" server port)
byserv (cdr-safe (assoc server url-digest-auth-storage)))
(cond
@ -168,7 +168,7 @@ instead of hostname:portnum."
pass (read-passwd "Password: ")
url-digest-auth-storage
(cons (list server
(cons path
(cons file
(setq retval
(cons user
(url-digest-auth-create-key
@ -177,15 +177,15 @@ instead of hostname:portnum."
url)))))
url-digest-auth-storage)))
(byserv
(setq retval (cdr-safe (assoc path byserv)))
(setq retval (cdr-safe (assoc file byserv)))
(if (and (not retval) ; no exact match, check directories
(string-match "/" path)) ; not looking for a realm
(string-match "/" file)) ; not looking for a realm
(while (and byserv (not retval))
(setq data (car (car byserv)))
(if (or (not (string-match "/" data))
(and
(>= (length path) (length data))
(string= data (substring path 0 (length data)))))
(>= (length file) (length data))
(string= data (substring file 0 (length data)))))
(setq retval (cdr (car byserv))))
(setq byserv (cdr byserv))))
(if (or (and (not retval) prompt) overwrite)
@ -201,7 +201,7 @@ instead of hostname:portnum."
url)))
byserv (assoc server url-digest-auth-storage))
(setcdr byserv
(cons (cons path retval) (cdr byserv))))))
(cons (cons file retval) (cdr byserv))))))
(t (setq retval nil)))
(if retval
(let ((nonce (or (cdr-safe (assoc "nonce" args)) "nonegiven"))

View file

@ -135,7 +135,8 @@ path components followed by `..' are removed, along with the `..' itself."
sepchar (substring (url-filename urlobj) (match-beginning 0) (match-end 0)))
(setq file (url-filename urlobj)))
(setq file (url-expander-remove-relative-links
(concat (url-basepath (url-filename defobj)) file)))
(expand-file-name file
(url-file-directory (url-filename defobj)))))
(setf (url-filename urlobj)
(if query (concat file sepchar query) file))))))

View file

@ -259,17 +259,23 @@ Will not do anything if `url-show-status' is nil."
(/ (* x 100) y)))
;;;###autoload
(defun url-basepath (file &optional x)
"Return the base pathname of FILE, or the actual filename if X is true."
(defun url-file-directory (file)
"Return the directory part of FILE, for a URL."
(cond
((null file) "")
((string-match (eval-when-compile (regexp-quote "?")) file)
(if x
(file-name-nondirectory (substring file 0 (match-beginning 0)))
(file-name-directory (substring file 0 (match-beginning 0)))))
(x (file-name-nondirectory file))
(file-name-directory (substring file 0 (match-beginning 0))))
(t (file-name-directory file))))
;;;###autoload
(defun url-file-nondirectory (file)
"Return the nondirectory part of FILE, for a URL."
(cond
((null file) "")
((string-match (eval-when-compile (regexp-quote "?")) file)
(file-name-nondirectory (substring file 0 (match-beginning 0))))
(t (file-name-nondirectory file))))
;;;###autoload
(defun url-parse-query-string (query &optional downcase allow-newlines)
(let (retval pairs cur key val)
@ -385,7 +391,7 @@ string: \"%\" followed by two lowercase hex digits."
If optional variable X is t,
then return the basename of the file with the extension stripped off."
(if (and fname
(setq fname (url-basepath fname t))
(setq fname (url-file-nondirectory fname))
(string-match "\\.[^./]+$" fname))
(if x (substring fname 0 (match-beginning 0))
(substring fname (match-beginning 0) nil))

View file

@ -103,6 +103,7 @@ Lisp_Object Qouter_window_id;
#endif
Lisp_Object Qparent_id;
Lisp_Object Qtitle, Qname;
Lisp_Object Qexplicit_name;
Lisp_Object Qunsplittable;
Lisp_Object Qmenu_bar_lines, Qtool_bar_lines;
Lisp_Object Qleft_fringe, Qright_fringe;
@ -3268,6 +3269,7 @@ x_report_frame_params (f, alistptr)
tem = Qnil;
else
XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc);
store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
store_in_alist (alistptr, Qparent_id, tem);
}
@ -4229,6 +4231,8 @@ syms_of_frame ()
staticpro (&Qframep);
Qframe_live_p = intern ("frame-live-p");
staticpro (&Qframe_live_p);
Qexplicit_name = intern ("explicit-name");
staticpro (&Qexplicit_name);
Qheight = intern ("height");
staticpro (&Qheight);
Qicon = intern ("icon");

View file

@ -1868,15 +1868,7 @@ x_implicitly_set_name (f, arg, oldval)
}
/* Change the title of frame F to NAME.
If NAME is nil, use the frame name as the title.
If EXPLICIT is non-zero, that indicates that lisp code is setting the
name; if NAME is a string, set F's name to NAME and set
F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
If EXPLICIT is zero, that indicates that Emacs redisplay code is
suggesting a new name, which lisp code should override; if
F->explicit_name is set, ignore the new name; otherwise, set it. */
If NAME is nil, use the frame name as the title. */
void
x_set_title (f, name, old_name)

View file

@ -1935,15 +1935,7 @@ x_implicitly_set_name (f, arg, oldval)
}
/* Change the title of frame F to NAME.
If NAME is nil, use the frame name as the title.
If EXPLICIT is non-zero, that indicates that lisp code is setting the
name; if NAME is a string, set F's name to NAME and set
F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
If EXPLICIT is zero, that indicates that Emacs redisplay code is
suggesting a new name, which lisp code should override; if
F->explicit_name is set, ignore the new name; otherwise, set it. */
If NAME is nil, use the frame name as the title. */
void
x_set_title (f, name, old_name)

View file

@ -5564,7 +5564,22 @@ x_set_window_size (f, change_gravity, cols, rows)
SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
}
/* Now, strictly speaking, we can't be sure that this is accurate,
#if 0
/* The following mirrors what is done in xterm.c. It appears to be
for informing lisp of the new size immediately, while the actual
resize will happen asynchronously. But on Windows, the menu bar
automatically wraps when the frame is too narrow to contain it,
and that causes any calculations made here to come out wrong. The
end is some nasty buggy behaviour, including the potential loss
of the minibuffer.
Disabling this code is either not sufficient to fix the problems
completely, or it causes fresh problems, but at least it removes
the most problematic symptom of the minibuffer becoming unusable.
-----------------------------------------------------------------
Now, strictly speaking, we can't be sure that this is accurate,
but the window manager will get around to dealing with the size
change request eventually, and we'll hear how it went when the
ConfigureNotify event gets here.
@ -5595,6 +5610,7 @@ x_set_window_size (f, change_gravity, cols, rows)
Actually checking whether it is outside is a pain in the neck,
so don't try--just let the highlighting be done afresh with new size. */
cancel_mouse_face (f);
#endif
UNBLOCK_INPUT;
}

View file

@ -3707,6 +3707,10 @@ handle_invisible_prop (it)
it->position.bytepos = CHAR_TO_BYTE (it->position.charpos);
}
setup_for_ellipsis (it, 0);
/* Let the ellipsis display before
considering any properties of the following char.
Fixes jasonr@gnu.org 01 Oct 07 bug. */
handled = HANDLED_RETURN;
}
}
}

View file

@ -1778,15 +1778,7 @@ x_implicitly_set_name (f, arg, oldval)
}
/* Change the title of frame F to NAME.
If NAME is nil, use the frame name as the title.
If EXPLICIT is non-zero, that indicates that lisp code is setting the
name; if NAME is a string, set F's name to NAME and set
F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
If EXPLICIT is zero, that indicates that Emacs redisplay code is
suggesting a new name, which lisp code should override; if
F->explicit_name is set, ignore the new name; otherwise, set it. */
If NAME is nil, use the frame name as the title. */
void
x_set_title (f, name, old_name)