Merge from emacs--rel--22

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-937
This commit is contained in:
Miles Bader 2007-11-21 04:55:58 +00:00
commit d4aa48db8e
22 changed files with 154 additions and 101 deletions

View file

@ -106,6 +106,12 @@ http://thread.gmane.org/gmane.emacs.gnus.general/65622
** Extra question asked when doing a reply in Gnus
http://thread.gmane.org/gmane.emacs.gnus.general/65627
** sdl.web@gmail.com, 30 Oct: ps-lpr-switches has no effect
** Stephen.Berman@gmx.net: minibuffer and current-local-map
** timh@insightful.com, 9 Nov: X-coding-system incompatibility, and workaround
* DOCUMENTATION
** Check the Emacs Tutorial.

View file

@ -1,3 +1,8 @@
2007-11-18 Richard Stallman <rms@gnu.org>
* flymake.texi (Example -- Configuring a tool called directly):
Update example.
2007-11-17 Eli Zaretskii <eliz@gnu.org>
* mule.texi (Communication Coding): Fix wording of last change.
@ -7,9 +12,18 @@
* custom.texi (Specifying File Variables), major.texi (Choosing
Modes): Mention '\" in man pages.
2007-11-15 Richard Stallman <rms@gnu.org>
* cl.texi (Equality Predicates): Delete `eql'.
(Predicates, Naming Conventions, Top): Delete `eql'.
(Common Lisp Compatibility): Delete `eql'.
(Porting Common Lisp): Delete obsolete backquote info.
Minor clarification about character constants.
(Sequence Basics): Minor clarification.
2007-11-16 Kenichi Handa <handa@ni.aist.go.jp>
* mule.texi (Communication Coding): Mention x-select-request-type.
* mule.texi (Communication Coding): Document x-select-request-type.
* frames.texi (Cut/Paste Other App): Mention x-select-request-type.

View file

@ -1129,6 +1129,15 @@ specified by one of the environment variables @env{LC_ALL},
specified above, whose value is nonempty is the one that determines
the text representation.)
@vindex x-select-request-type
The variable @code{x-select-request-type} specifies a selection data
type of selection to request from the X server. The default value is
@code{nil}, which means Emacs tries @code{COMPOUND_TEXT} and
@code{UTF8_STRING}, and uses whichever result seems more appropriate.
You can explicitly specify the data type by setting the variable to
one of the symbols @code{COMPOUND_TEXT}, @code{UTF8_STRING},
@code{STRING} and @code{TEXT}.
@node File Name Coding
@section Coding Systems for File Names

View file

@ -62,14 +62,14 @@ does assume a basic familiarity with Emacs Lisp.
@menu
* Overview:: Installation, usage, etc.
* Program Structure:: Arglists, `eval-when', `defalias'
* Predicates:: `typep', `eql', and `equalp'
* Predicates:: `typep' and `equalp'
* Control Structure:: `setf', `do', `loop', etc.
* Macros:: Destructuring, `define-compiler-macro'
* Declarations:: `proclaim', `declare', etc.
* Symbols:: Property lists, `gensym'
* Numbers:: Predicates, functions, random numbers
* Sequences:: Mapping, functions, searching, sorting
* Lists:: `cadr', `sublis', `member*', `assoc*', etc.
* Lists:: `caddr', `sublis', `member*', `assoc*', etc.
* Structures:: `defstruct'
* Assertions:: `check-type', `assert', `ignore-errors'.
@ -287,7 +287,7 @@ The following simple functions and macros are defined in @file{cl.el};
they do not cause other components like @file{cl-extra} to be loaded.
@example
eql floatp-safe endp
floatp-safe endp
evenp oddp plusp minusp
caaar .. cddddr
list* ldiff rest first .. tenth
@ -700,7 +700,7 @@ facts are true or false.
@menu
* Type Predicates:: `typep', `deftype', and `coerce'
* Equality Predicates:: `eql' and `equalp'
* Equality Predicates:: `equalp'
@end menu
@node Type Predicates, Equality Predicates, Predicates, Predicates
@ -840,40 +840,7 @@ arguments to specify the type of sequence to return. @xref{Sequences}.
@section Equality Predicates
@noindent
This package defines two Common Lisp predicates, @code{eql} and
@code{equalp}.
@defun eql a b
This function is almost the same as @code{eq}, except that if @var{a}
and @var{b} are numbers of the same type, it compares them for numeric
equality (as if by @code{equal} instead of @code{eq}). This makes a
difference only for versions of Emacs that are compiled with
floating-point support. Emacs floats are allocated
objects just like cons cells, which means that @code{(eq 3.0 3.0)}
will not necessarily be true---if the two @code{3.0}s were allocated
separately, the pointers will be different even though the numbers are
the same. But @code{(eql 3.0 3.0)} will always be true.
The types of the arguments must match, so @code{(eql 3 3.0)} is
still false.
Note that Emacs integers are ``direct'' rather than allocated, which
basically means @code{(eq 3 3)} will always be true. Thus @code{eq}
and @code{eql} behave differently only if floating-point numbers are
involved, and are indistinguishable on Emacs versions that don't
support floats.
There is a slight inconsistency with Common Lisp in the treatment of
positive and negative zeros. Some machines, notably those with IEEE
standard arithmetic, represent @code{+0} and @code{-0} as distinct
values. Normally this doesn't matter because the standard specifies
that @code{(= 0.0 -0.0)} should always be true, and this is indeed
what Emacs Lisp and Common Lisp do. But the Common Lisp standard
states that @code{(eql 0.0 -0.0)} and @code{(equal 0.0 -0.0)} should
be false on IEEE-like machines; Emacs Lisp does not do this, and in
fact the only known way to distinguish between the two zeros in Emacs
Lisp is to @code{format} them and check for a minus sign.
@end defun
This package defines the Common Lisp predicate @code{equalp}.
@defun equalp a b
This function is a more flexible version of @code{equal}. In
@ -3685,7 +3652,7 @@ the same sequence, in the same order as they appear in that sequence.)
The @code{:test} argument specifies a function which must return
true (non-@code{nil}) to indicate a match; instead, you may use
@code{:test-not} to give a function which returns @emph{false} to
indicate a match. The default test function is @code{:test 'eql}.
indicate a match. The default test function is @code{eql}.
Many functions which take @var{item} and @code{:test} or @code{:test-not}
arguments also come in @code{-if} and @code{-if-not} varieties,
@ -4998,7 +4965,7 @@ which understand full-featured argument lists. The @code{&whole}
keyword does not work in @code{defmacro} argument lists (except
inside recursive argument lists).
The @code{eql} and @code{equal} predicates do not distinguish
The @code{equal} predicate does not distinguish
between IEEE floating-point plus and minus zero. The @code{equalp}
predicate has several differences with Common Lisp; @pxref{Predicates}.
@ -5218,12 +5185,6 @@ whereas Emacs Lisp's parser just treats quote as a special case.
Some Lisp packages use reader macros to create special syntaxes
for themselves, which the Emacs parser is incapable of reading.
The lack of reader macros, incidentally, is the reason behind
Emacs Lisp's unusual backquote syntax. Since backquotes are
implemented as a Lisp package and not built-in to the Emacs
parser, they are forced to use a regular macro named @code{`}
which is used with the standard function/macro call notation.
@item
Other syntactic features. Common Lisp provides a number of
notations beginning with @code{#} that the Emacs Lisp parser
@ -5287,11 +5248,11 @@ matters, Emacs has its own @code{#(} notation for
something entirely different---strings with properties.
@item
Characters are distinct from integers in Common Lisp. The
notation for character constants is also different: @code{#\A}
instead of @code{?A}. Also, @code{string=} and @code{string-equal}
are synonyms in Emacs Lisp whereas the latter is case-insensitive
in Common Lisp.
Characters are distinct from integers in Common Lisp. The notation
for character constants is also different: @code{#\A} in Common Lisp
where Emacs Lisp uses @code{?A}. Also, @code{string=} and
@code{string-equal} are synonyms in Emacs Lisp, whereas the latter is
case-insensitive in Common Lisp.
@item
Data types. Some Common Lisp data types do not exist in Emacs

View file

@ -413,12 +413,9 @@ First, we write the @code{init-function}:
(defun flymake-perl-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (concat (flymake-build-relative-filename
(file-name-directory
(buffer-file-name
(current-buffer)))
(file-name-directory temp-file))
(file-name-nondirectory temp-file))))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "perl" (list "-wc " local-file))))
@end lisp

View file

@ -2218,7 +2218,11 @@ This combination of keys is a command to change keyboard layout. If
you proceed to type another non-modifier key before you let go of Alt
and Shift, the Alt and Shift act as modifiers in the usual way. A
more permanent work around is to change it to another key combination,
or disable it in the keyboard control panel.
or disable it in the "Regional and Language Options" applet of the
Control Panel. (The exact sequence of mouse clicks in the "Regional
and Language Options" applet needed to find the key combination that
changes the keyboard layout depends on your Windows version; for XP,
in the Languages tab, click "Details" and then "Key Settings".)
** Cygwin build of Emacs hangs after rebasing Cygwin DLLs

View file

@ -1,3 +1,39 @@
2007-11-21 Eli Zaretskii <eliz@gnu.org>
* international/mule-cmds.el (set-locale-environment): Set
default-file-name-coding-system _after_ keyboard and terminal
coding systems. This fixes last change.
* mail/rmail.el (rmail-current-subject-regexp): Allow more than
one space after "Subject:".
2007-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
* pcvs-parse.el (cvs-parse-table): Ignore errors when looking up files
in order to determine if there's a conflict.
2007-11-21 Richard Stallman <rms@gnu.org>
* bindings.el (esc-map): Bind C-M-l here; moved from reposition.el.
* reposition.el (reposition-window):
Binding C-M-l moved to bindings.el.
* bindings.el (ctl-x-4-map): Bind C-x 4 a here; moved from add-log.el.
* add-log.el (add-change-log-entry-other-window):
Key binding C-x 4 a moved to bindings.el.
* bindings.el (minibuffer-local-map): Bind C-tab here; moved
from filecache.el.
* filecache.el: Minibuffer map bindings moved to bindings.el.
2007-11-21 Jason Rumney <jasonr@gnu.org>
* international/mule-cmds.el (set-locale-environment):
Set default-file-name-coding-system from system defaults on Windows.
2007-11-21 Jason Rumney <jasonr@gnu.org>
* term/w32console.el: New term init file for w32 console.

View file

@ -664,7 +664,6 @@ the change log file in another window."
(list current-prefix-arg
(prompt-for-change-log-name))))
(add-change-log-entry whoami file-name t))
;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
(defvar change-log-indent-text 0)

View file

@ -710,7 +710,8 @@ language you are using."
;; Override the global binding (which calls indent-relative via
;; indent-for-tab-command). The alignment that indent-relative tries to
;; do doesn't make much sense here since the prompt messes it up.
(define-key map "\t" 'self-insert-command))
(define-key map "\t" 'self-insert-command)
(define-key minibuffer-local-map [C-tab] 'file-cache-minibuffer-complete))
(define-key global-map "\C-u" 'universal-argument)
(let ((i ?0))
@ -1079,6 +1080,9 @@ language you are using."
(define-key ctl-x-map "z" 'repeat)
(define-key esc-map "\C-l" 'reposition-window)
(define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
(define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window)
;; Signal handlers

View file

@ -277,6 +277,8 @@
;; Isn't it an error for `string' not to be unibyte?? --stef
(if (fboundp 'string-as-unibyte)
(setq string (string-as-unibyte string)))
;; `byte-compile-splice-in-already-compiled-code'
;; takes care of inlining the body.
(cons `(lambda ,(aref fn 0)
(byte-code ,string ,(aref fn 2) ,(aref fn 3)))
(cdr form)))

View file

@ -780,10 +780,6 @@ match REGEXP."
;; Keybindings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;###autoload (define-key minibuffer-local-completion-map [C-tab] 'file-cache-minibuffer-complete)
;;;###autoload (define-key minibuffer-local-map [C-tab] 'file-cache-minibuffer-complete)
;;;###autoload (define-key minibuffer-local-must-match-map [C-tab] 'file-cache-minibuffer-complete)
(provide 'filecache)
;;; arch-tag: 433d3ca4-4af2-47ce-b2cf-1f727460f538

View file

@ -2619,14 +2619,24 @@ See also `locale-charset-language-names', `locale-language-names',
(setq locale-coding-system coding-system))))
;; On Windows, override locale-coding-system,
;; keyboard-coding-system with system codepage. Note:
;; selection-coding-system is already set in w32select.c.
;; default-file-name-coding-system, keyboard-coding-system,
;; terminal-coding-system with system codepage.
(when (boundp 'w32-ansi-code-page)
(let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page))))
(when (coding-system-p code-page-coding)
(unless frame (setq locale-coding-system code-page-coding))
(set-keyboard-coding-system code-page-coding frame)
(set-terminal-coding-system code-page-coding frame))))
(set-terminal-coding-system code-page-coding frame)
;; Set default-file-name-coding-system last, so that Emacs
;; doesn't try to use cpNNNN when it defines keyboard and
;; terminal encoding. That's because the above two lines
;; will want to load code-pages.el, where cpNNNN are
;; defined; if default-file-name-coding-system were set to
;; cpNNNN while these two lines run, Emacs will want to use
;; it for encoding the file name it wants to load. And that
;; will fail, since cpNNNN is not yet usable until
;; code-pages.el finishes loading.
(setq default-file-name-coding-system code-page-coding))))
(when (eq system-type 'darwin)
;; On Darwin, file names are always encoded in utf-8, no matter

View file

@ -3282,7 +3282,9 @@ and more whitespace. The returned regular expressions contains
(setq subject (regexp-quote subject))
(setq subject
(replace-regexp-in-string "[ \t\n]+" "[ \t\n]+" subject t t))
(concat "^Subject: "
;; Some mailers insert extra spaces after "Subject:", so allow any
;; amount of them.
(concat "^Subject:[ \t]+"
(if (string= "\\`" (substring rmail-reply-regexp 0 2))
(substring rmail-reply-regexp 2)
rmail-reply-regexp)

View file

@ -1343,10 +1343,10 @@ key, a click, or a menu-item"))
'(menu-item "Introduction to Emacs Lisp" menu-bar-read-lispintro
:help "Read the Introduction to Emacs Lisp Programming"))
(define-key menu-bar-help-menu [describe-project]
(define-key menu-bar-help-menu [about-gnu-project]
'(menu-item "About GNU" describe-project
:help "About the GNU System, GNU Project, and GNU/Linux"))
(define-key menu-bar-help-menu [about]
(define-key menu-bar-help-menu [about-emacs]
'(menu-item "About Emacs" about-emacs
:help "Display version number, copyright info, and basic help"))
(define-key menu-bar-help-menu [sep4]
@ -1357,7 +1357,7 @@ key, a click, or a menu-item"))
(define-key menu-bar-help-menu [describe-copying]
'(menu-item "Copying Conditions" describe-copying
:help "Show the Emacs license (GPL)"))
(define-key menu-bar-help-menu [describe-distribution]
(define-key menu-bar-help-menu [getting-new-versions]
'(menu-item "Getting New Versions" describe-distribution
:help "How to get latest versions of Emacs"))
(defun menu-bar-help-extra-packages ()
@ -1369,10 +1369,10 @@ key, a click, or a menu-item"))
(goto-address)))
(define-key menu-bar-help-menu [sep2]
'("--"))
(define-key menu-bar-help-menu [more]
(define-key menu-bar-help-menu [external-packages]
'(menu-item "External Packages" menu-bar-help-extra-packages
:help "Lisp packages distributed separately for use in Emacs"))
(define-key menu-bar-help-menu [finder-by-keyword]
(define-key menu-bar-help-menu [find-emacs-packages]
'(menu-item "Find Emacs Packages" finder-by-keyword
:help "Find packages and features by keyword"))
(define-key menu-bar-help-menu [more-manuals]
@ -1386,10 +1386,10 @@ key, a click, or a menu-item"))
(list 'menu-item "Search Documentation" menu-bar-search-documentation-menu))
(define-key menu-bar-help-menu [sep1]
'("--"))
(define-key menu-bar-help-menu [eliza]
(define-key menu-bar-help-menu [emacs-psychotherapist]
'(menu-item "Emacs Psychotherapist" doctor
:help "Our doctor will help you feel better"))
(define-key menu-bar-help-menu [report-emacs-bug]
(define-key menu-bar-help-menu [send-emacs-bug-report]
'(menu-item "Send Bug Report..." report-emacs-bug
:help "Send e-mail to Emacs maintainers"))
(define-key menu-bar-help-menu [emacs-known-problems]

View file

@ -235,7 +235,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
;; servers, this should not be necessary, because they return
;; a complete merge output.
(with-temp-buffer
(insert-file-contents path)
(ignore-errors (insert-file-contents path))
(goto-char (point-min))
(if (re-search-forward "^<<<<<<< " nil t)
'CONFLICT 'NEED-MERGE))))
@ -272,8 +272,9 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
;; branches, or because it's been removed).
(if (ignore-errors
(with-temp-buffer
(insert-file-contents (expand-file-name
".cvsignore" (file-name-directory dir)))
(ignore-errors
(insert-file-contents
(expand-file-name ".cvsignore" (file-name-directory dir))))
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote (file-name-nondirectory dir)) "/$")

View file

@ -171,8 +171,6 @@ first comment line visible (if point is in a comment)."
;;(repos-debug-macro "4")
))))
;;;###autoload (define-key esc-map "\C-l" 'reposition-window)
;;; Auxiliary functions
;; Return number of screen lines between START and END.

View file

@ -2,11 +2,15 @@
* url-mailto.el (mail-send-and-exit):
* url-http.el (url-dav-file-attributes):
* url-file.el (ange-ftp-set-passwd, ange-ftp-copy-file-internal):
* url-file.el (ange-ftp-set-passwd, ange-ftp-copy-file-internal)
(url-generate-unique-filename): Declare as functions.
* url-privacy.el (url-device-type): Define unconditionally.
2007-11-15 Richard Stallman <rms@gnu.org>
* url.el (url-retrieve-synchronously): Call delete-process.
2007-10-31 Juanma Barranquero <lekktu@gmail.com>
* url-vars.el (url-vars-unload-hook): Remove function and variable.

View file

@ -241,7 +241,9 @@ no further processing). URL is either a string or a parsed URL."
;; XXX: The callback must always be called. Any
;; exception is a bug that should be fixed, not worked
;; around.
(setq retrieval-done t))
(progn ;; Call delete-process so we run any sentinel now.
(delete-process proc)
(setq retrieval-done t)))
;; We used to use `sit-for' here, but in some cases it wouldn't
;; work because apparently pending keyboard input would always
;; interrupt it before it got a chance to handle process input.

View file

@ -1,3 +1,13 @@
2007-11-21 Jason Rumney <jasonr@gnu.org>
* w32bdf.c (w32_init_bdf_font, w32_BDF_to_x_font): CreateFileMapping
returns NULL on failure.
2007-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
* search.c (Fset_match_data): Remove the `evaporate' feature.
(unwind_set_match_data): Don't use the `evaporate' feature.
2007-11-21 Jason Rumney <jasonr@gnu.org>
* dispnew.c (init_display) [WINDOWSNT]: Hardcode terminal_type.

View file

@ -3016,7 +3016,7 @@
* w32.c: Fix high cpu load for server sockets.
(pfn_WSAEventSelect): New function ptr.
(init_winsock): Load it.
(sys_listen): Set FILE_LISTEN flag. Set event mask for socket's
(sys_listen): Set FILE_LISTEN flag. Set event mask for socket's
char_avail event object to FD_ACCEPT.
(sys_accept): Check FILE_LISTEN flag. Set event mask on new
socket's char_avail event object to FD_READ|FD_CLOSE.

View file

@ -2964,11 +2964,15 @@ Return value is undefined if the last search failed. */)
return reuse;
}
/* Internal usage only:
If RESEAT is `evaporate', put the markers back on the free list
immediately. No other references to the markers must exist in this case,
so it is used only internally on the unwind stack and save-match-data from
Lisp. */
/* We used to have an internal use variant of `reseat' described as:
If RESEAT is `evaporate', put the markers back on the free list
immediately. No other references to the markers must exist in this
case, so it is used only internally on the unwind stack and
save-match-data from Lisp.
But it was ill-conceived: those supposedly-internal markers get exposed via
the undo-list, so freeing them here is unsafe. */
DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0,
doc: /* Set internal data on last search match from elements of LIST.
@ -3053,10 +3057,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
if (!NILP (reseat) && MARKERP (m))
{
if (EQ (reseat, Qevaporate))
free_marker (m);
else
unchain_marker (XMARKER (m));
unchain_marker (XMARKER (m));
XSETCAR (list, Qnil);
}
@ -3074,10 +3075,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
if (!NILP (reseat) && MARKERP (m))
{
if (EQ (reseat, Qevaporate))
free_marker (m);
else
unchain_marker (XMARKER (m));
unchain_marker (XMARKER (m));
XSETCAR (list, Qnil);
}
}
@ -3141,8 +3139,8 @@ static Lisp_Object
unwind_set_match_data (list)
Lisp_Object list;
{
/* It is safe to free (evaporate) the markers immediately. */
return Fset_match_data (list, Qevaporate);
/* It is NOT ALWAYS safe to free (evaporate) the markers immediately. */
return Fset_match_data (list, Qt);
}
/* Called to unwind protect the match data. */

View file

@ -261,7 +261,7 @@ w32_init_bdf_font(char *filename)
error("Fail to open BDF file");
}
hfilemap = CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL);
if (hfilemap == INVALID_HANDLE_VALUE)
if (!hfilemap)
{
CloseHandle(hfile);
error("Can't map font");
@ -828,7 +828,7 @@ int w32_BDF_to_x_font (char *file, char* xstr, int len)
size = fileinfo.nFileSizeLow;
hfilemap = CreateFileMapping (hfile, NULL, PAGE_READONLY, 0, 0, NULL);
if (hfilemap == INVALID_HANDLE_VALUE)
if (!hfilemap)
{
CloseHandle (hfile);
return 0;