Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7815fe19
Commit
7815fe19
authored
Aug 08, 2010
by
Chong Yidong
Browse files
Options
Browse Files
Download
Plain Diff
Merge changes from emacs-23 branch
parents
25717ca1
e54a1075
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
444 additions
and
200 deletions
+444
-200
doc/lispref/ChangeLog
doc/lispref/ChangeLog
+14
-0
doc/lispref/control.texi
doc/lispref/control.texi
+1
-1
doc/lispref/minibuf.texi
doc/lispref/minibuf.texi
+5
-4
doc/lispref/modes.texi
doc/lispref/modes.texi
+3
-3
doc/misc/ChangeLog
doc/misc/ChangeLog
+4
-0
etc/ChangeLog
etc/ChangeLog
+4
-0
etc/PROBLEMS
etc/PROBLEMS
+8
-0
lisp/ChangeLog
lisp/ChangeLog
+90
-0
lisp/align.el
lisp/align.el
+5
-5
lisp/bindings.el
lisp/bindings.el
+3
-0
lisp/dabbrev.el
lisp/dabbrev.el
+1
-1
lisp/emacs-lisp/syntax.el
lisp/emacs-lisp/syntax.el
+1
-1
lisp/emulation/pc-select.el
lisp/emulation/pc-select.el
+6
-6
lisp/eshell/esh-io.el
lisp/eshell/esh-io.el
+2
-1
lisp/international/mule-conf.el
lisp/international/mule-conf.el
+8
-6
lisp/international/mule.el
lisp/international/mule.el
+95
-99
lisp/isearch.el
lisp/isearch.el
+12
-7
lisp/language/cyrillic.el
lisp/language/cyrillic.el
+0
-7
lisp/progmodes/which-func.el
lisp/progmodes/which-func.el
+3
-1
lisp/replace.el
lisp/replace.el
+3
-1
lisp/server.el
lisp/server.el
+2
-2
lisp/simple.el
lisp/simple.el
+2
-1
lisp/term.el
lisp/term.el
+10
-10
nt/ChangeLog
nt/ChangeLog
+5
-0
nt/cmdproxy.c
nt/cmdproxy.c
+29
-11
src/ChangeLog
src/ChangeLog
+32
-0
src/charset.c
src/charset.c
+75
-11
src/coding.c
src/coding.c
+1
-1
src/dired.c
src/dired.c
+1
-2
src/fns.c
src/fns.c
+11
-12
src/minibuf.c
src/minibuf.c
+2
-1
src/w32fns.c
src/w32fns.c
+1
-1
src/xfns.c
src/xfns.c
+5
-5
No files found.
doc/lispref/ChangeLog
View file @
7815fe19
2010
-
08
-
08
Christoph
<
cschol2112
@
googlemail
.
com
>
*
control
.
texi
(
Handling
Errors
)
<
error
-
message
-
string
>:
Fix
arg
name
.
2010
-
08
-
08
Juanma
Barranquero
<
lekktu
@
gmail
.
com
>
*
modes
.
texi
(
Defining
Minor
Modes
):
Use
C
-
backspace
,
not
C
-
delete
.
Suggested
by
Š
t
ě
p
á
n
N
ě
mec
<
stepnem
@
gmail
.
com
>.
2010
-
08
-
08
Juanma
Barranquero
<
lekktu
@
gmail
.
com
>
*
minibuf
.
texi
(
High
-
Level
Completion
):
Document
args
of
`
read
-
buffer
-
function
' (bug#5625).
2010-07-29 Jan Djärv <jan.h.d@swipnet.se>
* frames.texi (Layout Parameters): Add doc for tool-bar-position.
...
...
doc/lispref/control.texi
View file @
7815fe19
...
...
@@ -1039,7 +1039,7 @@ to @code{condition-case} whose error condition you want to re-throw.
@xref{Definition of signal}.
@end defspec
@defun error-message-string error-descript
ion
@defun error-message-string error-descript
or
This function returns the error message string for a given error
descriptor. It is useful if you want to handle an error by printing the
usual error message for that error. @xref{Definition of signal}.
...
...
doc/lispref/minibuf.texi
View file @
7815fe19
...
...
@@ -1222,10 +1222,11 @@ Buffer name (default foo): @point{}
@end defun
@defopt read-buffer-function
This variable specifies how to read buffer names. For example, if you
set this variable to @code{iswitchb-read-buffer}, all Emacs commands
that call @code{read-buffer} to read a buffer name will actually use the
@code{iswitchb} package to read it.
This variable specifies how to read buffer names. The function is
called with the arguments passed to @code{read-buffer}. For example,
if you set this variable to @code{iswitchb-read-buffer}, all Emacs
commands that call @code{read-buffer} to read a buffer name will
actually use the @code{iswitchb} package to read it.
@end defopt
@defopt read-buffer-completion-ignore-case
...
...
doc/lispref/modes.texi
View file @
7815fe19
...
...
@@ -1494,7 +1494,7 @@ See the command \\[hungry-electric-delete]."
;; The indicator for the mode line.
" Hungry"
;; The minor mode bindings.
'(([C-
delet
e] . hungry-electric-delete))
'(([C-
backspac
e] . hungry-electric-delete))
:group 'hunger)
@end smallexample
...
...
@@ -1526,8 +1526,8 @@ See the command \\[hungry-electric-delete]."
:lighter " Hungry"
;; The minor mode bindings.
:keymap
'(([C-
delet
e] . hungry-electric-delete)
([C-M-
delet
e]
'(([C-
backspac
e] . hungry-electric-delete)
([C-M-
backspac
e]
. (lambda ()
(interactive)
(hungry-electric-delete t))))
...
...
doc/misc/ChangeLog
View file @
7815fe19
2010-08-08 Juanma Barranquero <lekktu@gmail.com>
* org.texi (Footnotes, Tables in HTML export): Fix typos.
2010-08-08 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi (Making Selections, Selecting Subformulas)
...
...
etc/ChangeLog
View file @
7815fe19
2010-08-08 Ken Brown <kbrown@cornell.edu>
* PROBLEMS: Mention problem with Cygwin 1.5.19.
2010-08-07 Eli Zaretskii <eliz@gnu.org>
* NEWS: Mention the Hebrew translation.
...
...
etc/PROBLEMS
View file @
7815fe19
...
...
@@ -2344,6 +2344,14 @@ files are installed. Then use:
As of Emacs 22.1, there have been stability problems with Cygwin
builds of Emacs using GCC 3. Cygwin users are advised to use GCC 4.
*** Building Emacs 23.3 and later will fail under Cygwin 1.5.19
This is a consequence of a change to src/dired.c on 2010-07-27. The
issue is that Cygwin 1.5.19 did not have d_ino in 'struct dirent'.
See
http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg01266.html
*** Building the native MS-Windows port fails due to unresolved externals
The linker error messages look like this:
...
...
lisp/ChangeLog
View file @
7815fe19
2010-08-08 Johan Bockgård <bojohan@gnu.org>
* replace.el (replace-highlight): Bind isearch-forward and
isearch-error, ensuring that highlighting is updated if the user
switches the search direction (Bug#6808).
* isearch.el (isearch-lazy-highlight-forward): New var.
(isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
(isearch-lazy-highlight-update): Use it.
2010-08-08 Kenichi Handa <handa@m17n.org>
* international/mule.el (define-charset): Store NAME as :base
property.
(ctext-non-standard-encodings-table): Pay attention to charset
aliases.
(ctext-pre-write-conversion): Sort ctext-standard-encodings by the
current priority. Force using the designation of the specific
charset by adding `charset' text property. Improve the whole
algorithm.
2010-08-08 Juanma Barranquero <lekktu@gmail.com>
* emulation/pc-select.el (pc-selection-mode-hook)
(copy-region-as-kill-nomark, beginning-of-buffer-mark)
(pc-selection-mode): Fix typos in docstrings.
2010-08-08 Kenichi Handa <handa@m17n.org>
* language/cyrillic.el: Don't add "microsoft-cp1251" to
ctext-non-standard-encodings-alist here.
* international/mule.el (ctext-non-standard-encodings-alist): Add
"koi8-r" and "microsoft-cp1251".
(ctext-standard-encodings): New variable.
(ctext-non-standard-encodings-table): List only elements for
non-standard encodings.
(ctext-pre-write-conversion): Adjusted for the above change.
Check ctext-standard-encodings.
* international/mule-conf.el (compound-text): Doc fix.
(ctext-no-compositions): Doc fix.
(compound-text-with-extensions): Doc fix.
2010-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (exchange-dot-and-mark): Mark obsolete, finally.
2010-08-03 Juanma Barranquero <lekktu@gmail.com>
* progmodes/which-func.el (which-func-format): Split help-echo text
into lines, like other mode-line tooltips.
* server.el (server-start): When using TCP sockets, force IPv4
and use a literal 127.0.0.1 for localhost. (Related to bug#6781.)
2010-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
* bindings.el (complete-symbol): Run completion-at-point as a fallback.
2010-08-02 Juanma Barranquero <lekktu@gmail.com>
* term.el (term-delimiter-argument-list): Reflow docstring.
(term-read-input-ring, term-write-input-ring, term-send-input)
(term-bol, term-erase-in-display, serial-supported-or-barf):
Fix typos in docstrings.
2010-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
* bindings.el (function-key-map): Add a S-tab => backtab fallback.
2010-08-01 Juanma Barranquero <lekktu@gmail.com>
* dabbrev.el (dabbrev-completion): Fix typo in docstring.
2010-08-01 MON KEY <monkey@sandpframing.com> (tiny change)
* emacs-lisp/syntax.el (syntax-ppss-toplevel-pos):
Fix typo in docstring (bug#6747).
2010-08-08 Leo <sdl.web@gmail.com>
* eshell/esh-io.el (eshell-get-target): Better detection of
read-only file (Bug#6762).
2010-08-08 Juanma Barranquero <lekktu@gmail.com>
* align.el (align-default-spacing): Doc fix.
(align-region-heuristic, align-regexp): Fix typos in docstrings.
2010-08-08 Ulf Jasper <ulf.jasper@web.de>
* calendar/icalendar.el (icalendar-uid-format): Doc fix.
...
...
lisp/align.el
View file @
7815fe19
...
...
@@ -140,8 +140,8 @@
"An integer that represents the default amount of padding to use.
If `align-to-tab-stop' is non-nil, this will represent the number of
tab stops to use for alignment, rather than the number of spaces.
Each alignment rule can optionally override both this variable
. See
`align-
mode-a
list'."
Each alignment rule can optionally override both this variable
and
`align-
to-tab-stop'. See `align-rules-
list'."
:type
'integer
:group
'align
)
...
...
@@ -157,8 +157,8 @@ Since each alignment rule can possibly have its own set of alignment
sections (whenever `align-region-separate' is non-nil, and not a
string), this heuristic is used to determine how far before and after
point we should search in looking for a region separator. Larger
values can mean slower perform in large files, although smaller
values
may cause unexpected behavior at times."
values can mean slower perform
ance
in large files, although smaller
values
may cause unexpected behavior at times."
:type
'integer
:group
'align
)
...
...
@@ -926,7 +926,7 @@ align them so that the opening parentheses would line up:
Joe (123) 456-7890
There is no predefined rule to handle this, but you could easily do it
using a REGEXP like \"(\". All you would have to do is to mark the
using a REGEXP like \"(\".
All you would have to do is to mark the
region, call `align-regexp' and type in that regular expression."
(
interactive
(
append
...
...
lisp/bindings.el
View file @
7815fe19
...
...
@@ -1054,6 +1054,9 @@ if `inhibit-field-text-motion' is non-nil."
;; so we can't distinguish those two keys, but usually we consider C-SPC
;; (rather than C-@) as the "canonical" binding.
(
define-key
function-key-map
[?\C-@]
[?\C-\s]
)
;; Many keyboards don't have a `backtab' key, so by convention the user
;; can use S-tab instead to access that binding.
(
define-key
function-key-map
[S-tab]
[backtab]
)
(
define-key
global-map
[mouse-movement]
'ignore
)
...
...
lisp/dabbrev.el
View file @
7815fe19
...
...
@@ -377,7 +377,7 @@ With a prefix argument ARG, it searches all buffers accepted by the
function
pointed
out
by
`
dabbrev-friend-buffer-function
'
to
find
the
completions.
If
the
prefix
argument
is
16
(
which
comes
from
\\[
prefix
-argument]
\\[
prefix
-argument]
)
,
If
the
prefix
argument
is
16
(
which
comes
from
\\[
universal
-argument]
\\[
universal
-argument]
)
,
then
it
searches
*all*
buffers.
"
(interactive "
*P
")
(dabbrev--reset-global-variables)
...
...
lisp/emacs-lisp/syntax.el
View file @
7815fe19
...
...
@@ -52,7 +52,7 @@
(
defun
syntax-ppss-toplevel-pos
(
ppss
)
"Get the latest syntactically outermost position found in a syntactic scan.
PPSS is a scan state, as returned by `par
tial-parse
-sexp' or `syntax-ppss'.
PPSS is a scan state, as returned by `par
se-partial
-sexp' or `syntax-ppss'.
An \"outermost position\" means one that it is outside of any syntactic entity:
outside of any parentheses, comments, or strings encountered in the scan.
If no such position is recorded in PPSS (because the end of the scan was
...
...
lisp/emulation/pc-select.el
View file @
7815fe19
...
...
@@ -110,7 +110,7 @@ This gives mostly Emacs-like behavior with only the selection keys enabled."
:group
'pc-select
)
(
defcustom
pc-selection-mode-hook
nil
"The hook to run when
pc-s
election
-
mode is toggled."
"The hook to run when
PC S
election
mode is toggled."
:type
'hook
:group
'pc-select
)
...
...
@@ -261,7 +261,7 @@ association.")
(
provide
'pc-select
)
(
defun
copy-region-as-kill-nomark
(
beg
end
)
"Save the region as if killed
;
but don't kill it; deactivate mark.
"Save the region as if killed
,
but don't kill it; deactivate mark.
If `interprogram-cut-function' is non-nil, also save the text for a window
system cut and paste.
...
...
@@ -569,7 +569,7 @@ Don't use this command in Lisp programs!
;;;;;;;;;;;;;;;;;;;;
(
defun
backward-char-mark
(
&optional
arg
)
"Ensure mark is active; move point left ARG characters (right if ARG negative).
"Ensure mark is active; move point left ARG characters (right if ARG negative).
On attempt to pass beginning or end of buffer, stop and signal error."
(
interactive
"p"
)
(
pc-select-ensure-mark
)
...
...
@@ -633,7 +633,7 @@ If scan reaches end of buffer, stop there without error."
(
defun
scroll-up-mark
(
&optional
arg
)
"Ensure mark is active; scroll upward ARG lines; or near full screen if no ARG.
"Ensure mark is active; scroll upward ARG lines; or near full screen if no ARG.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll downward.
When calling from a program, supply a number as argument or nil.
...
...
@@ -654,7 +654,7 @@ If the buffer is narrowed, this command uses the beginning and size
of the accessible part of the buffer.
Don't use this command in Lisp programs!
\(goto-char (p
\
oint-min)) is faster and avoids clobbering the mark."
\(goto-char (point-min)) is faster and avoids clobbering the mark."
(
interactive
"P"
)
(
pc-select-ensure-mark
)
(
let
((
size
(
-
(
point-max
)
(
point-min
))))
...
...
@@ -841,7 +841,7 @@ If the value is non-nil, call the function MODE with an argument of
;;;###autoload
(
define-minor-mode
pc-selection-mode
"Change mark behavior to emulate Motif, M
AC
or MS-Windows cut and paste style.
"Change mark behavior to emulate Motif, M
ac
or MS-Windows cut and paste style.
This mode enables Delete Selection mode and Transient Mark mode.
...
...
lisp/eshell/esh-io.el
View file @
7815fe19
...
...
@@ -343,8 +343,9 @@ it defaults to `insert'."
(
let*
((
exists
(
get-file-buffer
target
))
(
buf
(
find-file-noselect
target
t
)))
(
with-current-buffer
buf
(
if
buffer-read-only
(
if
buffer-
file-
read-only
(
error
"Cannot write to read-only file `%s'"
target
))
(
setq
buffer-read-only
nil
)
(
set
(
make-local-variable
'eshell-output-file-buffer
)
(
if
(
eq
exists
buf
)
0
t
))
(
cond
((
eq
mode
'overwrite
)
...
...
lisp/international/mule-conf.el
View file @
7815fe19
...
...
@@ -1410,9 +1410,10 @@ is treated as a character."
:flags
'
(
ascii-at-eol
ascii-at-cntl
designation
single-shift
composition
))
(
define-coding-system
'compound-text
"Compound text based generic encoding for decoding unknown messages.
This coding system does not support extended segments of CTEXT."
"Compound text based generic encoding.
This coding system is an extension of X's \"Compound Text Encoding\".
It encodes many characters using the normal ISO-2022 designation sequences,
but it doesn't support extended segments of CTEXT."
:coding-type
'iso-2022
:mnemonic
?x
:charset-list
'iso-2022
...
...
@@ -1432,7 +1433,7 @@ This coding system does not support extended segments of CTEXT."
;; not have a mime-charset property, to prevent it from showing up
;; close to the beginning of coding systems ordered by priority.
(
define-coding-system
'ctext-no-compositions
"Compound text based generic encoding
for decoding unknown messages
.
"Compound text based generic encoding.
Like `compound-text', but does not produce escape sequences for compositions."
:coding-type
'iso-2022
...
...
@@ -1445,8 +1446,9 @@ Like `compound-text', but does not produce escape sequences for compositions."
(
define-coding-system
'compound-text-with-extensions
"Compound text encoding with ICCCM Extended Segment extensions.
See the variable `ctext-non-standard-encodings-alist' for the
detail about how extended segments are handled.
See the variables `ctext-standard-encodings' and
`ctext-non-standard-encodings-alist' for the detail about how
extended segments are handled.
This coding system should be used only for X selections. It is inappropriate
for decoding and encoding files, process I/O, etc."
...
...
lisp/international/mule.el
View file @
7815fe19
...
...
@@ -282,6 +282,7 @@ attribute."
(plist-put props :short-name (symbol-name name)))
(or (plist-get props :long-name)
(plist-put props :long-name (plist-get props :short-name)))
(plist-put props :base name)
;; We can probably get a worthwhile amount in purespace.
(setq props
(mapcar (lambda (elt)
...
...
@@ -1465,7 +1466,9 @@ This function is provided for backward compatibility."
'(("big5-0" big5 2 big5)
("ISO8859-14" iso-8859-14 1 latin-iso8859-14)
("ISO8859-15" iso-8859-15 1 latin-iso8859-15)
("gbk-0" gbk 2 chinese-gbk)))
("gbk-0" gbk 2 chinese-gbk)
("koi8-r" koi8-r 1 koi8-r)
("microsoft-cp1251" windows-1251 1 windows-1251)))
"Alist of non-standard encoding names vs the corresponding usages in CTEXT.
It controls how extended segments of a compound text are handled
...
...
@@ -1554,6 +1557,20 @@ Each element must be one of the names listed in the variable
(goto-char (point-min))
(- (point-max) (point)))))
(defvar ctext-standard-encodings
'(ascii latin-jisx0201 katakana-jisx0201
latin-iso8859-1 latin-iso8859-2 latin-iso8859-3 latin-iso8859-4
greek-iso8859-7 arabic-iso8859-6 hebrew-iso8859-8 cyrillic-iso8859-5
latin-iso8859-9
chinese-gb2312 japanese-jisx0208 korean-ksc5601)
"
List
of
approved
standard
encodings
(
i.e.
charsets
)
of
X
's
Compound
Text.
Coding-system
`
compound-text-with-extensions
'
encodes
a
character
belonging
to
any
of
those
charsets
using
the
normal
ISO2022
designation
sequence
unless
the
current
language
environment
or
the
variable
`
ctext-non-standard-encodings
'
decide
to
use
an
extended
segment
of
CTEXT
for
that
character.
See
also
the
documentation
of
`
ctext-non-standard-encodings-alist
'.
")
;; Return an alist of CHARSET vs CTEXT-USAGE-INFO generated from
;; `ctext-non-standard-encodings' and a list specified by the key
;; `ctext-non-standard-encodings' for the currrent language
...
...
@@ -1565,115 +1582,94 @@ Each element must be one of the names listed in the variable
;; is encoded using UTF-8 encoding extention.
(defun ctext-non-standard-encodings-table ()
(let
(table
)
;; Setup charsets specified by the key
;; `ctext-non-standard-encodings' for the
current
language
;; environment and in `
ctext-non-standard-encodings
'.
(dolist (encoding (append
(get-language-info current-language-environment
'ctext-non-standard-encodings)
ctext-non-standard-encodings
))
(let* ((slot (assoc e
ncoding
ctext-non-standard-encodings-alist))
(let
* (
(table
(append ctext-non-standard-encodings
(copy-sequence
(get-language-info
current
-
language
-environment
'
ctext-non-standard-encodings
))))
(tail table)
elt)
(while tail
(setq elt (car tail
))
(let* ((slot (assoc e
lt
ctext-non-standard-encodings-alist))
(charset (nth 3 slot)))
(if (charsetp charset)
(push (cons charset slot) table)
(dolist (cs charset)
(push (cons cs slot) table)))))
;; Next prepend charsets for ISO2022 designation sequence.
(dolist (charset charset-list)
(let ((final (plist-get (charset-plist charset) :iso-final-char)))
(if (and (integerp final)
(>= final #x40) (<= final #x7e)
;; Exclude ascii and chinese-cns11643-X.
(not (eq charset 'ascii))
(not (string-match "
cns11643
" (symbol-name charset))))
(push (cons charset nil) table))))
;; Returned reversed list so that the charsets specified by the
;; key `ctext-non-standard-encodings' for the current language
;; have the highest priority.
(nreverse table)))
(setcar tail
(cons (plist-get (charset-plist charset) :base) slot))
(setcar tail (cons (car charset) slot))
(dolist (cs (cdr charset))
(setcdr tail
(cons (cons (plist-get (charset-plist (car cs)) :base) slot)
(cdr tail)))
(setq tail (cdr tail))))
(setq tail (cdr tail))))
table))
(defun ctext-pre-write-conversion (from to)
"
Encode
characters
between
FROM
and
TO
as
Compound
Text
w/Extended
Segments.
If
FROM
is
a
string,
or
if
the
current
buffer
i
s
no
t
the
one
set
up
for
us
by
`
encode-coding-string
',
generate
a
new
temp
buffer,
insert
the
text,
and
convert
it
in
the
temporary
buffer.
Otherwise,
convert
in-place.
"
If
FROM
is
a
string,
generate
a
new
temp
buffer
,
i
nser
t
the
text,
and
convert
it
in
the
temporary
buffer.
Otherwise,
convert
in-place.
"
(save-match-data
;; Setup a working buffer if necessary.
(when (stringp from)
(set-buffer (generate-new-buffer "
*temp
"))
(set-buffer-multibyte (multibyte-string-p from))
(insert from))
;; Now we can encode the whole buffer.
(let ((encoding-table (ctext-non-standard-encodings-table))
last-coding-system-used
last-pos last-encoding-info
encoding-info end-pos ch)
(goto-char (setq last-pos (point-min)))
(setq end-pos (point-marker))
(while (re-search-forward "
[^\000-\177]+
" nil t)
;; Found a sequence of non-ASCII characters.
(setq last-pos (match-beginning 0)
ch (char-after last-pos)
last-encoding-info (catch 'tag
(dolist (elt encoding-table)
(if (encode-char ch (car elt))
(throw 'tag (cdr elt))))
'utf-8))
(set-marker end-pos (match-end 0))
(goto-char (1+ last-pos))
(catch 'tag
(while t
(setq encoding-info
(if (< (point) end-pos)
(catch 'tag
(setq ch (following-char))
(dolist (elt encoding-table)
(if (encode-char ch (car elt))
(throw 'tag (cdr elt))))
'utf-8)))
(unless (eq last-encoding-info encoding-info)
(cond ((consp last-encoding-info)
;; Encode the previous range using an extended
;; segment.
(let ((encoding-name (car last-encoding-info))
(coding-system (nth 1 last-encoding-info))
(noctets (nth 2 last-encoding-info))
len)
(encode-coding-region last-pos (point) coding-system)
(setq len (+ (length encoding-name) 1
(- (point) last-pos)))
;; According to the spec of CTEXT, it is not
;; necessary to produce this extra designation
;; sequence, but some buggy application
;; (e.g. crxvt-gb) requires it.
(insert "
\e
(
B
")
(save-excursion
(goto-char last-pos)
(insert (format "
\e%%/%d
" noctets))
(insert-byte (+ (/ len 128) 128) 1)
(insert-byte (+ (% len 128) 128) 1)
(insert encoding-name)
(insert 2))))
((eq last-encoding-info 'utf-8)
;; Encode the previous range using UTF-8 encoding
;; extention.
(encode-coding-region last-pos (point) 'mule-utf-8)
(save-excursion
(goto-char last-pos)
(insert "
\e%G
"))
(insert "
\e%@
")))
(setq last-pos (point)
last-encoding-info encoding-info))
(if (< (point) end-pos)
(forward-char 1)
(throw 'tag nil)))))
(set-marker end-pos nil)
(goto-char (point-min))))
(insert from)
(setq from 1 to (point-max)))
(save-restriction
(narrow-to-region from to)
(goto-char from)
(let ((encoding-table (ctext-non-standard-encodings-table))
(charset-list (sort-charsets
(copy-sequence ctext-standard-encodings)))
(end-pos (make-marker))
last-coding-system-used
last-pos charset encoding-info)
(dolist (elt encoding-table)
(push (car elt) charset-list))
(setq end-pos (point-marker))
(while (re-search-forward "
[^\0-\177]+
" nil t)
;; Found a sequence of non-ASCII characters.
(set-marker end-pos (match-end 0))
(goto-char (match-beginning 0))
(setq last-pos (point)
charset (char-charset (following-char) charset-list))
(forward-char 1)
(while (and (< (point) end-pos)
(eq charset (char-charset (following-char) charset-list)))
(forward-char 1))
(if charset
(if (setq encoding-info (cdr (assq charset encoding-table)))
;; Encode this range using an extended segment.
(let ((encoding-name (car encoding-info))
(coding-system (nth 1 encoding-info))
(noctets (nth 2 encoding-info))
len)
(encode-coding-region last-pos (point) coding-system)
(setq len (+ (length encoding-name) 1
(- (point) last-pos)))
;; According to the spec of CTEXT, it is not
;; necessary to produce this extra designation
;; sequence, but some buggy application
;; (e.g. crxvt-gb) requires it.
(insert "
\e
(
B
")
(save-excursion
(goto-char last-pos)
(insert (format "
\e%%/%d
" noctets))
(insert-byte (+ (/ len 128) 128) 1)
(insert-byte (+ (% len 128) 128) 1)
(insert encoding-name)
(insert 2)))
;; Encode this range as characters in CHARSET.
(put-text-property last-pos (point) 'charset charset))
;; Encode this range using UTF-8 encoding extention.
(encode-coding-region last-pos (point) 'mule-utf-8)
(save-excursion
(goto-char last-pos)
(insert "
\e%G
"))
(insert "
\e%@
")))
(goto-char (point-min)))))
;; Must return nil, as build_annotations_2 expects that.
nil)
...
...
lisp/isearch.el
View file @
7815fe19
...
...
@@ -2581,6 +2581,7 @@ since they have special meaning in a regexp."
(defvar isearch-lazy-highlight-case-fold-search nil)
(defvar isearch-lazy-highlight-regexp nil)
(defvar isearch-lazy-highlight-space-regexp nil)
(defvar isearch-lazy-highlight-forward nil)
(defun lazy-highlight-cleanup (&optional force)
"
Stop
lazy
highlighting
and
remove
extra
highlighting
from
current
buffer.
...
...
@@ -2620,7 +2621,9 @@ by other Emacs features."
(not (= (window-start)
isearch-lazy-highlight-window-start))
(not (= (window-end) ; Window may have been split/joined.
isearch-lazy-highlight-window-end))))
isearch-lazy-highlight-window-end))
(not (eq isearch-forward
isearch-lazy-highlight-forward))))
;; something important did indeed change
(lazy-highlight-cleanup t) ;kill old loop & remove overlays
(when (not isearch-error)
...
...
@@ -2635,7 +2638,8 @@ by other Emacs features."
isearch-lazy-highlight-case-fold-search isearch-case-fold-search
isearch-lazy-highlight-regexp isearch-regexp
isearch-lazy-highlight-wrapped nil
isearch-lazy-highlight-space-regexp search-whitespace-regexp)
isearch-lazy-highlight-space-regexp search-whitespace-regexp
isearch-lazy-highlight-forward isearch-forward)
(unless (equal isearch-string "")
(setq isearch-lazy-highlight-timer
(run-with-idle-timer lazy-highlight-initial-delay nil
...
...
@@ -2651,7 +2655,8 @@ Attempt to do the search exactly the way the pending Isearch would."
(search-invisible nil) ; don't match invisible text
(retry t)
(success nil)
(bound (if isearch-forward
(isearch-forward isearch-lazy-highlight-forward)
(bound (if isearch-lazy-highlight-forward
(min (or isearch-lazy-highlight-end-limit (point-max))
(if isearch-lazy-highlight-wrapped
isearch-lazy-highlight-start
...
...
@@ -2687,7 +2692,7 @@ Attempt to do the search exactly the way the pending Isearch would."
(select-window isearch-lazy-highlight-window))
(save-excursion
(save-match-data
(goto-char (if isearch-forward
(goto-char (if isearch-
lazy-highlight-
forward