aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2007-04-22 12:45:07 +0000
committerKaroly Lorentey2007-04-22 12:45:07 +0000
commit6ca7e0d8570f684ce14f60a6c8fb9545a0c2c935 (patch)
tree45771ca4535584e12b5f4886c65f865b61527213 /lisp
parent9d0799072a0d09bc14a99eaf372b262d1ba61399 (diff)
parentfcb006c4ee97e3413a794c543367b771f0237495 (diff)
downloademacs-6ca7e0d8570f684ce14f60a6c8fb9545a0c2c935.tar.gz
emacs-6ca7e0d8570f684ce14f60a6c8fb9545a0c2c935.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-702 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-703 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-704 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-705 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-706 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-707 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-216 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-602
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog67
-rw-r--r--lisp/arc-mode.el36
-rw-r--r--lisp/calendar/diary-lib.el19
-rw-r--r--lisp/calendar/parse-time.el3
-rw-r--r--lisp/calendar/todo-mode.el12
-rw-r--r--lisp/gnus/ChangeLog12
-rw-r--r--lisp/gnus/gnus-art.el69
-rw-r--r--lisp/gnus/mm-view.el10
-rw-r--r--lisp/international/mule.el6
-rw-r--r--lisp/paren.el8
-rw-r--r--lisp/progmodes/cc-cmds.el24
-rw-r--r--lisp/replace.el10
-rw-r--r--lisp/textmodes/bibtex.el76
13 files changed, 260 insertions, 92 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9fc26846057..b42647a61bf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,56 @@
12007-04-19 Kevin Ryde <user42@zip.com.au>
2
3 * arc-mode.el (archive-find-type): lzh-exe for lzh self-extracting exe.
4 (archive-lzh-summarize): Add optional start arg for where to start
5 looking at the archive.
6 (archive-lzh-exe-summarize, archive-lzh-exe-extract): New functions.
7
8 * international/mule.el (auto-coding-alist): no-conversion for .exe
9 and .EXE.
10
112007-04-19 Alan Mackenzie <acm@muc.de>
12
13 * progmodes/cc-cmds.el (c-in-function-trailer-p): Fix this: when a
14 function return type contains "struct", "union", etc.
15 c-end-of-defun goes too far forward.
16
172007-04-19 Chong Yidong <cyd@stupidchicken.com>
18
19 * paren.el (show-paren-function): Reset window-start to avoid
20 recentering.
21
222007-04-19 Glenn Morris <rgm@gnu.org>
23
24 * calendar/todo-mode.el: Fix typo: "threshhold" -> "threshold".
25
262007-04-18 Glenn Morris <rgm@gnu.org>
27
28 * calendar/diary-lib.el (diary-header-line-format): Add a custom
29 :set function.
30 (diary-list-entries): Only switch to diary-mode from
31 default-major-mode (reverts 2007-03-21 change). Otherwise, if in
32 diary-mode set header-line-format, in case of any customization.
33
342007-04-18 Levin Du <zslevin@gmail.com> (tiny change)
35
36 * calendar/parse-time.el (parse-time-string-chars): Check if CHAR
37 is less than the length of parse-time-syntax.
38
392007-04-17 David Kastrup <dak@gnu.org>
40
41 * replace.el (query-replace-regexp-eval): Deprecate.
42
432007-04-17 Alan Mackenzie <acm@muc.de>
44
45 * progmodes/cc-cmds.el (c-beginning-of-defun): With -ve arg and
46 point too close to EOB, leave point at EOB rather than last `}'.
47
482007-04-17 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
49
50 * textmodes/bibtex.el (bibtex-include-OPTkey)
51 (bibtex-user-optional-fields, bibtex-entry-field-alist):
52 Fix defcustom.
53
12007-04-17 Glenn Morris <rgm@gnu.org> 542007-04-17 Glenn Morris <rgm@gnu.org>
2 55
3 * calendar/cal-dst.el (calendar-dst-find-startend): If YEAR cannot 56 * calendar/cal-dst.el (calendar-dst-find-startend): If YEAR cannot
@@ -66,8 +119,7 @@
66 119
672007-04-13 Chong Yidong <cyd@stupidchicken.com> 1202007-04-13 Chong Yidong <cyd@stupidchicken.com>
68 121
69 * progmodes/compile.el (compilation-start): Revert 2007-03-25 122 * progmodes/compile.el (compilation-start): Revert 2007-03-25 change.
70 change.
71 123
72 * files.el: Ditto. 124 * files.el: Ditto.
73 125
@@ -135,8 +187,8 @@
135 187
1362007-04-11 Stefan Monnier <monnier@iro.umontreal.ca> 1882007-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
137 189
138 * desktop.el (desktop-save, desktop-create-buffer): Replace mapcar with 190 * desktop.el (desktop-save, desktop-create-buffer): Replace mapcar
139 dolist. 191 with dolist.
140 (after-init-hook): Don't quote lambda. 192 (after-init-hook): Don't quote lambda.
141 (desktop-first-buffer): Don't wrap it in eval-when-compile. 193 (desktop-first-buffer): Don't wrap it in eval-when-compile.
142 (desktop-internal-v2s): Remove unused var `el'. 194 (desktop-internal-v2s): Remove unused var `el'.
@@ -715,6 +767,13 @@
715 (number-of-diary-entries): Change :set to use diary-set-maybe-redraw. 767 (number-of-diary-entries): Change :set to use diary-set-maybe-redraw.
716 (diary-list-entries): Always run diary-mode. 768 (diary-list-entries): Always run diary-mode.
717 769
7702007-03-20 Kenichi Handa <handa@m17n.org>
771
772 * international/quail.el (quail-setup-completion-buf): Make the
773 completion buffer read-only.
774 (quail-completion): Adjusted for the above change. Leave the
775 modified flag nil.
776
7182007-03-20 David Kastrup <dak@gnu.org> 7772007-03-20 David Kastrup <dak@gnu.org>
719 778
720 * files.el (magic-mode-alist): Require literal "%!PS" string for 779 * files.el (magic-mode-alist): Require literal "%!PS" string for
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 8630d3e8b06..1a22ac628e6 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -700,6 +700,10 @@ archive.
700 (string-match "\\.[aA][rR][cC]$" 700 (string-match "\\.[aA][rR][cC]$"
701 (or buffer-file-name (buffer-name)))) 701 (or buffer-file-name (buffer-name))))
702 'arc) 702 'arc)
703 ;; This pattern modelled on the BSD/GNU+Linux `file' command.
704 ;; Have seen capital "LHA's", and file has lower case "LHa's" too.
705 ;; Note this regexp is also in archive-exe-p.
706 ((looking-at "MZ\\(.\\|\n\\)\\{34\\}LH[aA]'s SFX ") 'lzh-exe)
703 (t (error "Buffer format not recognized"))))) 707 (t (error "Buffer format not recognized")))))
704;; ------------------------------------------------------------------------- 708;; -------------------------------------------------------------------------
705(defun archive-summarize (&optional shut-up) 709(defun archive-summarize (&optional shut-up)
@@ -1398,8 +1402,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
1398;; ------------------------------------------------------------------------- 1402;; -------------------------------------------------------------------------
1399;; Section: Lzh Archives 1403;; Section: Lzh Archives
1400 1404
1401(defun archive-lzh-summarize () 1405(defun archive-lzh-summarize (&optional start)
1402 (let ((p 1) 1406 (let ((p (or start 1)) ;; 1 for .lzh, something further on for .exe
1403 (totalsize 0) 1407 (totalsize 0)
1404 (maxlen 8) 1408 (maxlen 8)
1405 files 1409 files
@@ -1621,6 +1625,34 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
1621 ;; This should work even though newmode will be dynamically accessed. 1625 ;; This should work even though newmode will be dynamically accessed.
1622 (lambda (old) (archive-calc-mode old newmode t)) 1626 (lambda (old) (archive-calc-mode old newmode t))
1623 files "a unix-style mode" 8)) 1627 files "a unix-style mode" 8))
1628
1629;; -------------------------------------------------------------------------
1630;; Section: Lzh Self-Extracting .exe Archives
1631;;
1632;; No support for modifying these files. It looks like the lha for unix
1633;; program (as of version 1.14i) can't create or retain the DOS exe part.
1634;; If you do an "lha a" on a .exe for instance it renames and writes to a
1635;; plain .lzh.
1636
1637(defun archive-lzh-exe-summarize ()
1638 "Summarize the contents of an LZH self-extracting exe, for `archive-mode'."
1639
1640 ;; Skip the initial executable code part and apply archive-lzh-summarize
1641 ;; to the archive part proper. The "-lh5-" etc regexp here for the start
1642 ;; is the same as in archive-find-type.
1643 ;;
1644 ;; The lha program (version 1.14i) does this in skip_msdos_sfx1_code() by
1645 ;; a similar scan. It looks for "..-l..-" plus for level 0 or 1 a test of
1646 ;; the header checksum, or level 2 a test of the "attribute" and size.
1647 ;;
1648 (re-search-forward "..-l[hz][0-9ds]-" nil)
1649 (archive-lzh-summarize (match-beginning 0)))
1650
1651;; `archive-lzh-extract' runs "lha pq", and that works for .exe as well as
1652;; .lzh files
1653(defalias 'archive-lzh-exe-extract 'archive-lzh-extract
1654 "Extract a member from an LZH self-extracting exe, for `archive-mode'.")
1655
1624;; ------------------------------------------------------------------------- 1656;; -------------------------------------------------------------------------
1625;; Section: Zip Archives 1657;; Section: Zip Archives
1626 1658
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index df01a508031..ee93b60eb98 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -276,6 +276,7 @@ The format of the header is specified by `diary-header-line-format'."
276 :group 'diary 276 :group 'diary
277 :type 'boolean 277 :type 'boolean
278 :initialize 'custom-initialize-default 278 :initialize 'custom-initialize-default
279 ;; FIXME overkill.
279 :set 'diary-set-maybe-redraw 280 :set 'diary-set-maybe-redraw
280 :version "22.1") 281 :version "22.1")
281 282
@@ -292,6 +293,9 @@ before edit/copy"
292Only used if `diary-header-line-flag' is non-nil." 293Only used if `diary-header-line-flag' is non-nil."
293 :group 'diary 294 :group 'diary
294 :type 'sexp 295 :type 'sexp
296 :initialize 'custom-initialize-default
297 ;; FIXME overkill.
298 :set 'diary-set-maybe-redraw
295 :version "22.1") 299 :version "22.1")
296 300
297(defvar diary-saved-point) ; internal 301(defvar diary-saved-point) ; internal
@@ -434,10 +438,17 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list."
434 (or (verify-visited-file-modtime diary-buffer) 438 (or (verify-visited-file-modtime diary-buffer)
435 (revert-buffer t t)))) 439 (revert-buffer t t))))
436 ;; Setup things like the header-line-format and invisibility-spec. 440 ;; Setup things like the header-line-format and invisibility-spec.
437 ;; This used to only run if the major-mode was default-major-mode, 441 (if (eq major-mode default-major-mode)
438 ;; but that meant eg changes to header-line-format did not 442 (diary-mode)
439 ;; take effect from one diary invocation to the next. 443 ;; This kludge is to make customizations to
440 (diary-mode) 444 ;; diary-header-line-flag after diary has been displayed
445 ;; take effect. Unconditionally calling (diary-mode)
446 ;; clobbers file local variables.
447 ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00363.html
448 ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00404.html
449 (if (eq major-mode 'diary-mode)
450 (setq header-line-format (and diary-header-line-flag
451 diary-header-line-format))))
441 ;; d-s-p is passed to the diary display function. 452 ;; d-s-p is passed to the diary display function.
442 (let ((diary-saved-point (point))) 453 (let ((diary-saved-point (point)))
443 (save-excursion 454 (save-excursion
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el
index 4a786da7726..0913bc92160 100644
--- a/lisp/calendar/parse-time.el
+++ b/lisp/calendar/parse-time.el
@@ -66,7 +66,8 @@
66 (aref parse-time-digits char)) 66 (aref parse-time-digits char))
67 67
68(defsubst parse-time-string-chars (char) 68(defsubst parse-time-string-chars (char)
69 (aref parse-time-syntax char)) 69 (and (< char (length parse-time-syntax))
70 (aref parse-time-syntax char)))
70 71
71(put 'parse-error 'error-conditions '(parse-error error)) 72(put 'parse-error 'error-conditions '(parse-error error))
72(put 'parse-error 'error-message "Parsing error") 73(put 'parse-error 'error-message "Parsing error")
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 9449c84cb2a..f70400ed27d 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -205,11 +205,11 @@
205;; by the binary insertion algorithm. However, you may not 205;; by the binary insertion algorithm. However, you may not
206;; really have a need for such accurate priorities amongst your 206;; really have a need for such accurate priorities amongst your
207;; TODO items. If you now think about the binary insertion 207;; TODO items. If you now think about the binary insertion
208;; halfing the size of the window each time, then the threshhold 208;; halfing the size of the window each time, then the threshold
209;; is the window size at which it will stop. If you set the 209;; is the window size at which it will stop. If you set the
210;; threshhold to zero, the upper and lower bound will coincide at 210;; threshold to zero, the upper and lower bound will coincide at
211;; the end of the loop and you will insert your item just before 211;; the end of the loop and you will insert your item just before
212;; that point. If you set the threshhold to, e.g. 8, it will stop 212;; that point. If you set the threshold to, e.g. 8, it will stop
213;; as soon as the window size drops below that amount and will 213;; as soon as the window size drops below that amount and will
214;; insert the item in the approximate centre of that window. I 214;; insert the item in the approximate centre of that window. I
215;; got the idea for this feature after reading a very helpful 215;; got the idea for this feature after reading a very helpful
@@ -307,10 +307,10 @@ If you have 8 items in your TODO list, then you may get asked 4
307questions by the binary insertion algorithm. However, you may not 307questions by the binary insertion algorithm. However, you may not
308really have a need for such accurate priorities amongst your TODO 308really have a need for such accurate priorities amongst your TODO
309items. If you now think about the binary insertion halfing the size 309items. If you now think about the binary insertion halfing the size
310of the window each time, then the threshhold is the window size at 310of the window each time, then the threshold is the window size at
311which it will stop. If you set the threshhold to zero, the upper and 311which it will stop. If you set the threshold to zero, the upper and
312lower bound will coincide at the end of the loop and you will insert 312lower bound will coincide at the end of the loop and you will insert
313your item just before that point. If you set the threshhold to, 313your item just before that point. If you set the threshold to,
314e.g. 8, it will stop as soon as the window size drops below that 314e.g. 8, it will stop as soon as the window size drops below that
315amount and will insert the item in the approximate center of that 315amount and will insert the item in the approximate center of that
316window." 316window."
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 8f094dd6537..b02dc6c2f8e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,15 @@
12007-04-19 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-art.el (gnus-mime-strip-charset-parameters): New function.
4 (gnus-mime-view-part-as-charset): Use it; redisplay subpart currently
5 displayed of multipart/alternative part if it is invoked from summary
6 buffer.
7 (gnus-article-part-wrapper): Select article window.
8
9 * mm-view.el (mm-inline-text-html-render-with-w3m)
10 (mm-inline-text-html-render-with-w3m-standalone)
11 (mm-inline-render-with-function): Use mail-parse-charset by default.
12
12007-04-10 Katsumi Yamaoka <yamaoka@jpl.org> 132007-04-10 Katsumi Yamaoka <yamaoka@jpl.org>
2 14
3 * gnus-msg.el (gnus-inews-yank-articles): Use 15 * gnus-msg.el (gnus-inews-yank-articles): Use
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 552f3a68f49..6ae52b5eedd 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -4606,6 +4606,21 @@ are decompressed."
4606 (mm-string-to-multibyte contents))) 4606 (mm-string-to-multibyte contents)))
4607 (goto-char b))))) 4607 (goto-char b)))))
4608 4608
4609(defun gnus-mime-strip-charset-parameters (handle)
4610 "Strip charset parameters from HANDLE."
4611 (if (stringp (car handle))
4612 (mapc #'gnus-mime-strip-charset-parameters (cdr handle))
4613 (let* ((type (mm-handle-type (if (equal (mm-handle-media-type handle)
4614 "message/external-body")
4615 (progn
4616 (unless (mm-handle-cache handle)
4617 (mm-extern-cache-contents handle))
4618 (mm-handle-cache handle))
4619 handle)))
4620 (charset (assq 'charset (cdr type))))
4621 (when charset
4622 (delq charset type)))))
4623
4609(defun gnus-mime-view-part-as-charset (&optional handle arg) 4624(defun gnus-mime-view-part-as-charset (&optional handle arg)
4610 "Insert the MIME part under point into the current buffer using the 4625 "Insert the MIME part under point into the current buffer using the
4611specified charset." 4626specified charset."
@@ -4614,7 +4629,7 @@ specified charset."
4614 (let ((handle (or handle (get-text-property (point) 'gnus-data))) 4629 (let ((handle (or handle (get-text-property (point) 'gnus-data)))
4615 (fun (get-text-property (point) 'gnus-callback)) 4630 (fun (get-text-property (point) 'gnus-callback))
4616 (gnus-newsgroup-ignored-charsets 'gnus-all) 4631 (gnus-newsgroup-ignored-charsets 'gnus-all)
4617 gnus-newsgroup-charset type charset) 4632 gnus-newsgroup-charset form preferred parts)
4618 (when handle 4633 (when handle
4619 (if (mm-handle-undisplayer handle) 4634 (if (mm-handle-undisplayer handle)
4620 (mm-remove-part handle)) 4635 (mm-remove-part handle))
@@ -4622,17 +4637,24 @@ specified charset."
4622 (setq gnus-newsgroup-charset 4637 (setq gnus-newsgroup-charset
4623 (or (cdr (assq arg gnus-summary-show-article-charset-alist)) 4638 (or (cdr (assq arg gnus-summary-show-article-charset-alist))
4624 (mm-read-coding-system "Charset: "))) 4639 (mm-read-coding-system "Charset: ")))
4625 ;; Strip the charset parameter from `handle'. 4640 (gnus-mime-strip-charset-parameters handle)
4626 (setq type (mm-handle-type 4641 (when (and (consp (setq form (cdr-safe fun)))
4627 (if (equal (mm-handle-media-type handle) 4642 (setq form (ignore-errors
4628 "message/external-body") 4643 (assq 'gnus-mime-display-alternative form)))
4629 (progn 4644 (setq preferred (caddr form))
4630 (unless (mm-handle-cache handle) 4645 (progn
4631 (mm-extern-cache-contents handle)) 4646 (when (eq (car preferred) 'quote)
4632 (mm-handle-cache handle)) 4647 (setq preferred (cadr preferred)))
4633 handle)) 4648 (not (equal preferred
4634 charset (assq 'charset (cdr type))) 4649 (get-text-property (point) 'gnus-data))))
4635 (delq charset type) 4650 (setq parts (get-text-property (point) 'gnus-part))
4651 (setq parts (cdr (assq parts
4652 gnus-article-mime-handle-alist)))
4653 (equal (mm-handle-media-type parts) "multipart/alternative")
4654 (setq parts (reverse (cdr parts))))
4655 (setcar (cddr form)
4656 (list 'quote (or (cadr (member preferred parts))
4657 (car parts)))))
4636 (funcall fun handle))))) 4658 (funcall fun handle)))))
4637 4659
4638(defun gnus-mime-view-part-externally (&optional handle) 4660(defun gnus-mime-view-part-externally (&optional handle)
@@ -4688,13 +4710,22 @@ If no internal viewer is available, use an external viewer."
4688 (funcall (cdr action-pair))))) 4710 (funcall (cdr action-pair)))))
4689 4711
4690(defun gnus-article-part-wrapper (n function) 4712(defun gnus-article-part-wrapper (n function)
4691 (save-current-buffer 4713 (let ((window (get-buffer-window gnus-article-buffer 'visible))
4692 (set-buffer gnus-article-buffer) 4714 frame)
4693 (when (> n (length gnus-article-mime-handle-alist)) 4715 (when window
4694 (error "No such part")) 4716 ;; It is necessary to select the article window so that
4695 (gnus-article-goto-part n) 4717 ;; `gnus-article-goto-part' may really move the point.
4696 (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) 4718 (setq frame (selected-frame))
4697 (funcall function handle)))) 4719 (gnus-select-frame-set-input-focus (window-frame window))
4720 (unwind-protect
4721 (save-window-excursion
4722 (select-window window)
4723 (when (> n (length gnus-article-mime-handle-alist))
4724 (error "No such part"))
4725 (gnus-article-goto-part n)
4726 (let ((handle (cdr (assq n gnus-article-mime-handle-alist))))
4727 (funcall function handle)))
4728 (gnus-select-frame-set-input-focus frame)))))
4698 4729
4699(defun gnus-article-pipe-part (n) 4730(defun gnus-article-pipe-part (n)
4700 "Pipe MIME part N, which is the numerical prefix." 4731 "Pipe MIME part N, which is the numerical prefix."
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 14d480fe7df..888c814bf24 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -238,7 +238,8 @@
238 (mm-setup-w3m) 238 (mm-setup-w3m)
239 (let ((text (mm-get-part handle)) 239 (let ((text (mm-get-part handle))
240 (b (point)) 240 (b (point))
241 (charset (mail-content-type-get (mm-handle-type handle) 'charset))) 241 (charset (or (mail-content-type-get (mm-handle-type handle) 'charset)
242 mail-parse-charset)))
242 (save-excursion 243 (save-excursion
243 (insert (if charset (mm-decode-string text charset) text)) 244 (insert (if charset (mm-decode-string text charset) text))
244 (save-restriction 245 (save-restriction
@@ -302,7 +303,9 @@
302 "Render a text/html part using w3m." 303 "Render a text/html part using w3m."
303 (if (mm-w3m-standalone-supports-m17n-p) 304 (if (mm-w3m-standalone-supports-m17n-p)
304 (let ((source (mm-get-part handle)) 305 (let ((source (mm-get-part handle))
305 (charset (mail-content-type-get (mm-handle-type handle) 'charset)) 306 (charset (or (mail-content-type-get (mm-handle-type handle)
307 'charset)
308 (symbol-name mail-parse-charset)))
306 cs) 309 cs)
307 (unless (and charset 310 (unless (and charset
308 (setq cs (mm-charset-to-coding-system charset)) 311 (setq cs (mm-charset-to-coding-system charset))
@@ -368,7 +371,8 @@
368 371
369(defun mm-inline-render-with-function (handle func &rest args) 372(defun mm-inline-render-with-function (handle func &rest args)
370 (let ((source (mm-get-part handle)) 373 (let ((source (mm-get-part handle))
371 (charset (mail-content-type-get (mm-handle-type handle) 'charset))) 374 (charset (or (mail-content-type-get (mm-handle-type handle) 'charset)
375 mail-parse-charset)))
372 (mm-insert-inline 376 (mm-insert-inline
373 handle 377 handle
374 (mm-with-multibyte-buffer 378 (mm-with-multibyte-buffer
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index e873aadb8b4..7e137d987b3 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1586,8 +1586,10 @@ text, and convert it in the temporary buffer. Otherwise, convert in-place."
1586;;; FILE I/O 1586;;; FILE I/O
1587 1587
1588(defcustom auto-coding-alist 1588(defcustom auto-coding-alist
1589 '(("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\)\\'" . no-conversion) 1589 ;; .exe and .EXE are added to support archive-mode looking at DOS
1590 ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\)\\'" . no-conversion) 1590 ;; self-extracting exe archives.
1591 '(("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|exe\\)\\'" . no-conversion)
1592 ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|EXE\\)\\'" . no-conversion)
1591 ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion) 1593 ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion)
1592 ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) 1594 ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion)
1593 ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) 1595 ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion)
diff --git a/lisp/paren.el b/lisp/paren.el
index 95f718d5683..17f0c401901 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -143,6 +143,7 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
143 (let ((oldpos (point)) 143 (let ((oldpos (point))
144 (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) 144 (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1)
145 ((eq (syntax-class (syntax-after (point))) 4) 1))) 145 ((eq (syntax-class (syntax-after (point))) 4) 1)))
146 (window-start (window-start))
146 pos mismatch face) 147 pos mismatch face)
147 ;; 148 ;;
148 ;; Find the other end of the sexp. 149 ;; Find the other end of the sexp.
@@ -247,7 +248,12 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
247 ;; 248 ;;
248 ;; Always set the overlay face, since it varies. 249 ;; Always set the overlay face, since it varies.
249 (overlay-put show-paren-overlay 'priority show-paren-priority) 250 (overlay-put show-paren-overlay 'priority show-paren-priority)
250 (overlay-put show-paren-overlay 'face face))) 251 (overlay-put show-paren-overlay 'face face))
252 ;; If there are continued lines, the above operations can
253 ;; force redisplay to recenter the window (since there is no
254 ;; way for it to know that the overlay changes to the buffer
255 ;; are harmless). So reset the window-start.
256 (set-window-start (selected-window) window-start))
251 ;; show-paren-mode is nil in this buffer. 257 ;; show-paren-mode is nil in this buffer.
252 (and show-paren-overlay 258 (and show-paren-overlay
253 (delete-overlay show-paren-overlay)) 259 (delete-overlay show-paren-overlay))
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 79043c87b63..9ef4aaace72 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1360,10 +1360,24 @@ No indentation or other \"electric\" behavior is performed."
1360 (and c-opt-block-decls-with-vars-key 1360 (and c-opt-block-decls-with-vars-key
1361 (save-excursion 1361 (save-excursion
1362 (c-syntactic-skip-backward "^;}" lim) 1362 (c-syntactic-skip-backward "^;}" lim)
1363 (and (eq (char-before) ?\}) 1363 (let ((eo-block (point))
1364 (eq (car (c-beginning-of-decl-1 lim)) 'previous) 1364 bod)
1365 (looking-at c-opt-block-decls-with-vars-key) 1365 (and (eq (char-before) ?\})
1366 (point))))) 1366 (eq (car (c-beginning-of-decl-1 lim)) 'previous)
1367 (setq bod (point))
1368 ;; Look for struct or union or ... If we find one, it might
1369 ;; be the return type of a function, or the like. Exclude
1370 ;; this case.
1371 (c-syntactic-re-search-forward
1372 (concat "[;=\(\[{]\\|\\("
1373 c-opt-block-decls-with-vars-key
1374 "\\)")
1375 eo-block t t t)
1376 (match-beginning 1) ; Is there a "struct" etc., somewhere?
1377 (not (eq (char-before) ?_))
1378 (c-syntactic-re-search-forward "[;=\(\[{]" eo-block t t t)
1379 (eq (char-before) ?\{)
1380 bod)))))
1367 1381
1368(defun c-where-wrt-brace-construct () 1382(defun c-where-wrt-brace-construct ()
1369 ;; Determine where we are with respect to functions (or other brace 1383 ;; Determine where we are with respect to functions (or other brace
@@ -1531,7 +1545,7 @@ defun."
1531 (setq arg (c-forward-to-nth-EOF-} (- arg) where))) 1545 (setq arg (c-forward-to-nth-EOF-} (- arg) where)))
1532 ;; Move forward to the next opening brace.... 1546 ;; Move forward to the next opening brace....
1533 (when (and (= arg 0) 1547 (when (and (= arg 0)
1534 (c-syntactic-re-search-forward "{" nil t)) 1548 (c-syntactic-re-search-forward "{" nil 'eob))
1535 (backward-char) 1549 (backward-char)
1536 ;; ... and backward to the function header. 1550 ;; ... and backward to the function header.
1537 (c-beginning-of-decl-1) 1551 (c-beginning-of-decl-1)
diff --git a/lisp/replace.el b/lisp/replace.el
index a8dfd043c72..ed1fa9a6b59 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -303,6 +303,11 @@ Use \\[repeat-complex-command] after this command for details."
303 303
304(defun query-replace-regexp-eval (regexp to-expr &optional delimited start end) 304(defun query-replace-regexp-eval (regexp to-expr &optional delimited start end)
305 "Replace some things after point matching REGEXP with the result of TO-EXPR. 305 "Replace some things after point matching REGEXP with the result of TO-EXPR.
306
307Interactive use of this function is deprecated in favor of the
308`\\,' feature of `query-replace-regexp'. For non-interactive use, a loop
309using `search-forward-regexp' and `replace-match' is preferred.
310
306As each match is found, the user must type a character saying 311As each match is found, the user must type a character saying
307what to do with it. For directions, type \\[help-command] at that time. 312what to do with it. For directions, type \\[help-command] at that time.
308 313
@@ -354,6 +359,11 @@ Fourth and fifth arg START and END specify the region to operate on."
354 (perform-replace regexp (cons 'replace-eval-replacement to-expr) 359 (perform-replace regexp (cons 'replace-eval-replacement to-expr)
355 t 'literal delimited nil nil start end)) 360 t 'literal delimited nil nil start end))
356 361
362(make-obsolete 'query-replace-regexp-eval
363 "for interactive use, use the special `\\,' feature of
364`query-replace-regexp' instead. Non-interactively, a loop
365using `search-forward-regexp' and `replace-match' is preferred." "22.1")
366
357(defun map-query-replace-regexp (regexp to-strings &optional n start end) 367(defun map-query-replace-regexp (regexp to-strings &optional n start end)
358 "Replace some matches for REGEXP with various strings, in rotation. 368 "Replace some matches for REGEXP with various strings, in rotation.
359The second argument TO-STRINGS contains the replacement strings, 369The second argument TO-STRINGS contains the replacement strings,
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 0545ca85812..0b413e3b7ab 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -86,7 +86,7 @@ If this is a function, call it to generate the initial field text."
86 :group 'bibtex 86 :group 'bibtex
87 :type '(choice (const :tag "None" nil) 87 :type '(choice (const :tag "None" nil)
88 (string :tag "Initial text") 88 (string :tag "Initial text")
89 (function :tag "Initialize Function" :value fun) 89 (function :tag "Initialize Function")
90 (const :tag "Default" t))) 90 (const :tag "Default" t)))
91(put 'bibtex-include-OPTkey 'risky-local-variable t) 91(put 'bibtex-include-OPTkey 'risky-local-variable t)
92 92
@@ -98,11 +98,8 @@ CROSSREF-OPTIONAL lists in `bibtex-entry-field-alist' (which see)."
98 :group 'bibtex 98 :group 'bibtex
99 :type '(repeat (group (string :tag "Field") 99 :type '(repeat (group (string :tag "Field")
100 (string :tag "Comment") 100 (string :tag "Comment")
101 (option (group :inline t 101 (option (choice :tag "Init"
102 :extra-offset -4 102 (const nil) string function)))))
103 (choice :tag "Init" :value ""
104 string
105 function))))))
106(put 'bibtex-user-optional-fields 'risky-local-variable t) 103(put 'bibtex-user-optional-fields 'risky-local-variable t)
107 104
108(defcustom bibtex-entry-format 105(defcustom bibtex-entry-format
@@ -454,45 +451,34 @@ of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the
454field is an alternative. ALTERNATIVE-FLAG may be t only in the 451field is an alternative. ALTERNATIVE-FLAG may be t only in the
455REQUIRED or CROSSREF-REQUIRED lists." 452REQUIRED or CROSSREF-REQUIRED lists."
456 :group 'bibtex 453 :group 'bibtex
457 :type '(repeat (list (string :tag "Entry name") 454 :type '(repeat (group (string :tag "Entry name")
458 (list (repeat :tag "required" 455 (group (repeat :tag "Required fields"
459 (group (string :tag "Field") 456 (group (string :tag "Field")
460 (string :tag "Comment") 457 (string :tag "Comment")
461 (option (choice :tag "Init" :value nil 458 (option (choice :tag "Init" :value nil
462 (const nil) 459 (const nil) string function))
463 (string :tag "string") 460 (option (choice :tag "Alternative"
464 (function :tag "function"))) 461 (const :tag "No" nil)
465 (option (choice (const nil) 462 (const :tag "Yes" t)))))
466 (const :tag "Alternative" t))))) 463 (repeat :tag "Optional fields"
467 (repeat :tag "optional" 464 (group (string :tag "Field")
468 (group (string :tag "Field") 465 (string :tag "Comment")
469 (string :tag "Comment") 466 (option (choice :tag "Init" :value nil
470 (option (choice :tag "Init" :value nil 467 (const nil) string function)))))
471 (const nil) 468 (option :extra-offset -4
472 (string :tag "string") 469 (group (repeat :tag "Crossref: required fields"
473 (function :tag "function"))) 470 (group (string :tag "Field")
474 (option (choice (const nil) 471 (string :tag "Comment")
475 (const :tag "Alternative" t)))))) 472 (option (choice :tag "Init" :value nil
476 (option 473 (const nil) string function))
477 (list :tag "Crossref" 474 (option (choice :tag "Alternative"
478 (repeat :tag "required" 475 (const :tag "No" nil)
479 (group (string :tag "Field") 476 (const :tag "Yes" t)))))
480 (string :tag "Comment") 477 (repeat :tag "Crossref: optional fields"
481 (option (choice :tag "Init" :value nil 478 (group (string :tag "Field")
482 (const nil) 479 (string :tag "Comment")
483 (string :tag "string") 480 (option (choice :tag "Init" :value nil
484 (function :tag "function"))) 481 (const nil) string function)))))))))
485 (option (choice (const nil)
486 (const :tag "Alternative" t)))))
487 (repeat :tag "optional"
488 (group (string :tag "Field")
489 (string :tag "Comment")
490 (option (choice :tag "Init" :value nil
491 (const nil)
492 (string :tag "string")
493 (function :tag "function")))
494 (option (choice (const nil)
495 (const :tag "Alternative" t))))))))))
496(put 'bibtex-entry-field-alist 'risky-local-variable t) 482(put 'bibtex-entry-field-alist 'risky-local-variable t)
497 483
498(defcustom bibtex-comment-start "@Comment" 484(defcustom bibtex-comment-start "@Comment"