aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorXue Fuqiao2013-07-30 08:29:09 +0800
committerXue Fuqiao2013-07-30 08:29:09 +0800
commitd2067333246b676fcf98567d34eec79ed4648d5f (patch)
treead6543d8e7f1db50226907f7278373eef544d252 /lisp
parent7aa7fff0c8860b72a2c7cdc7d4d0845245754d43 (diff)
parent86b192c1479d167c13edb9cdaa026c231c8a0442 (diff)
downloademacs-d2067333246b676fcf98567d34eec79ed4648d5f.tar.gz
emacs-d2067333246b676fcf98567d34eec79ed4648d5f.zip
Merge from mainline.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog165
-rw-r--r--lisp/ChangeLog.104
-rw-r--r--lisp/ChangeLog.152
-rw-r--r--lisp/ChangeLog.164
-rw-r--r--lisp/ChangeLog.74
-rw-r--r--lisp/align.el39
-rw-r--r--lisp/calendar/todo-mode.el65
-rw-r--r--lisp/cedet/ChangeLog35
-rw-r--r--lisp/cedet/cedet.el3
-rw-r--r--lisp/cedet/semantic/analyze/fcn.el5
-rw-r--r--lisp/cedet/semantic/bovine/el.el1
-rw-r--r--lisp/cedet/semantic/db-el.el39
-rw-r--r--lisp/cedet/semantic/decorate/mode.el4
-rw-r--r--lisp/cedet/semantic/edit.el5
-rw-r--r--lisp/cedet/semantic/wisent/python.el1
-rw-r--r--lisp/desktop.el265
-rw-r--r--lisp/dired-x.el6
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/debug.el145
-rw-r--r--lisp/emacs-lisp/edebug.el210
-rw-r--r--lisp/emacs-lisp/nadvice.el2
-rw-r--r--lisp/epa-mail.el191
-rw-r--r--lisp/epa.el12
-rw-r--r--lisp/frame.el3
-rw-r--r--lisp/gnus/ChangeLog18
-rw-r--r--lisp/gnus/ChangeLog.12
-rw-r--r--lisp/gnus/ChangeLog.24
-rw-r--r--lisp/gnus/gnus-art.el6
-rw-r--r--lisp/gnus/gnus-sum.el15
-rw-r--r--lisp/mh-e/ChangeLog.134
-rw-r--r--lisp/net/tramp-sh.el8
-rw-r--r--lisp/net/tramp.el8
-rw-r--r--lisp/org/ChangeLog6
-rw-r--r--lisp/progmodes/cc-engine.el13
-rw-r--r--lisp/progmodes/cc-fonts.el3
-rw-r--r--lisp/progmodes/cc-langs.el15
-rw-r--r--lisp/simple.el10
-rw-r--r--lisp/subr.el18
-rw-r--r--lisp/vc/vc-dir.el2
-rw-r--r--lisp/window.el3
40 files changed, 814 insertions, 563 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 29cd88a9186..f27a6fa1945 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,168 @@
12013-07-29 Eli Zaretskii <eliz@gnu.org>
2
3 * frame.el (frame-notice-user-settings): Avoid inflooping when the
4 initial frame is minibuffer-less. (Bug#14841)
5
62013-07-29 Michael Albinus <michael.albinus@gmx.de>
7
8 * net/tramp.el (tramp-use-ssh-controlmaster-options): New customer
9 option.
10
11 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
12 (tramp-maybe-open-connection): Use it.
13
142013-07-28 Juanma Barranquero <lekktu@gmail.com>
15
16 * desktop.el (desktop--make-frame): Include `minibuffer' in the
17 minimal set of parameters passed when creating a frame, because
18 the minibuffer status of a frame cannot be changed later.
19
202013-07-28 Stephen Berman <stephen.berman@gmx.net>
21
22 * calendar/todo-mode.el (todo-rename-file): Fix incorrect use of
23 replace-regexp-in-string and inadvertent omissions in previous change.
24 (todo-filter-items): Ensure only file names are comma-separated in
25 name of filtered items buffer.
26
272013-07-28 Juanma Barranquero <lekktu@gmail.com>
28
29 * desktop.el: Optionally force offscreen frames back onscreen.
30 (desktop-restoring-reuses-frames): New option.
31 (desktop--compute-pos, desktop--move-onscreen): New functions.
32 (desktop--make-frame): Use desktop--move-onscreen.
33
342013-07-27 Alan Mackenzie <acm@muc.de>
35
36 Fontify a Java generic method as a function.
37 * progmodes/cc-langs.el (c-recognize-<>-arglists): Set the Java
38 value to t.
39
402013-07-27 Stephen Berman <stephen.berman@gmx.net>
41
42 * calendar/todo-mode.el: Add command to rename todo files.
43 (todo-rename-file): New command.
44 (todo-key-bindings-t): Add key binding for it. Change the
45 bindings of todo-filter-regexp-items(-multifile) to use `x'
46 instead of `r', since the latter is better suited to the new
47 renaming command.
48
492013-07-27 Alan Mackenzie <acm@muc.de>
50
51 Make Java try-with-resources statement parse properly.
52 * progmodes/cc-langs.el (c-block-stmt-1-2-kwds)
53 (c-block-stmt-1-2-key): New language constants/variables.
54 * progmodes/cc-engine.el (c-beginning-of-statement-1)
55 (c-after-conditional): Adapt to deal with c-block-stmt-1-2-key.
56 * progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to deal
57 with c-block-stmet-1-2-key.
58
592013-07-27 Juanma Barranquero <lekktu@gmail.com>
60
61 * desktop.el (desktop--make-frame): Apply most frame parameters after
62 creating the frame to force (partially or totally) offscreen frames to
63 be restored as such.
64
652013-07-26 Xue Fuqiao <xfq.free@gmail.com>
66
67 * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff.
68 (Bug#14948)
69
702013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
71
72 * emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new
73 `base' arg of backtrace-frame.
74
752013-07-26 Eli Zaretskii <eliz@gnu.org>
76
77 * simple.el (list-processes): Doc fix.
78
792013-07-26 Juanma Barranquero <lekktu@gmail.com>
80
81 * desktop.el (desktop--select-frame):
82 Try harder to reuse existing frames.
83
842013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
85
86 * emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables.
87 (edebug-eval): Use backtrace-eval.
88 (edebug--display, edebug--recursive-edit): Don't let-bind the
89 edebug-outer-* vars that keep track of variables we locally let-bind.
90 (edebug-outside-excursion): Don't restore outside values of locally
91 let-bound vars.
92 (edebug--display): Use user-error.
93 (cl-lexical-debug, cl-debug-env): Remove.
94
952013-07-26 Juanma Barranquero <lekktu@gmail.com>
96
97 * desktop.el (desktop-restore-frames): Call `sit-for' once all frames
98 are restored to be sure that they are visible before deleting any
99 remaining ones.
100
1012013-07-26 Matthias Meulien <orontee@gmail.com>
102
103 * vc/vc-dir.el (vc-dir-mode-map): Add binding for
104 vc-print-root-log. (Bug#14948)
105
1062013-07-26 Richard Stallman <rms@gnu.org>
107
108 Add aliases for encrypting mail.
109 * epa.el (epa-mail-aliases): New option.
110 * epa-mail.el (epa-mail-encrypt): Rewrite to be callable from programs.
111 Bind inhibit-read-only so read-only text doesn't ruin everything.
112 (epa-mail-default-recipients): New subroutine broken out.
113 Handle epa-mail-aliases.
114
1152013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
116
117 Add support for lexical variables to the debugger's `e' command.
118 * emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-*
119 vars, except for debugger-outer-match-data.
120 (debugger-frame-number): Move check for "on a function call" from
121 callers into it. Add `skip-base' argument.
122 (debugger-frame, debugger-frame-clear): Simplify accordingly.
123 (debugger-env-macro): Only reset the state stored in non-variables,
124 i.e. current-buffer and match-data.
125 (debugger-eval-expression): Rewrite using backtrace-eval.
126 * subr.el (internal--called-interactively-p--get-frame): Remove.
127 (called-interactively-p):
128 * emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new
129 `base' arg of backtrace-frame instead.
130
1312013-07-26 Glenn Morris <rgm@gnu.org>
132
133 * align.el (align-regexp): Doc fix. (Bug#14857)
134 (align-region): Explicit error if subexpression missing/does not match.
135
136 * simple.el (global-visual-line-mode):
137 Do not duplicate the mode lighter. (Bug#14858)
138
1392013-07-25 Martin Rudalics <rudalics@gmx.at>
140
141 * window.el (display-buffer): In display-buffer bind
142 split-window-keep-point to t, bug#14829.
143
1442013-07-25 Juanma Barranquero <lekktu@gmail.com>
145
146 * desktop.el: Rename internal "desktop-X" frame params to "desktop--X".
147 (desktop-filter-parameters-alist, desktop--filter-restore-desktop-parm)
148 (desktop--filter-save-desktop-parm, desktop--process-minibuffer-frames)
149 (desktop--select-frame, desktop--sort-states, desktop-restore-frames):
150 Change accordingly.
151 (desktop--select-frame, desktop--sort-states, desktop-restore-frames):
152 Use pcase-let, pcase-let* to deobfuscate access to desktop--mini values.
153
1542013-07-25 Glenn Morris <rgm@gnu.org>
155
156 * dired-x.el (dired-mark-extension): Convert comment to doc string.
157
1582013-07-25 Juanma Barranquero <lekktu@gmail.com>
159
160 * desktop.el (desktop--make-frame): Do not pass the `fullscreen'
161 parameter to modify-frame-parameters if the value has not changed;
162 this is a workaround for bug#14949.
163 (desktop--make-frame): On cl-delete-if call, check parameter name,
164 not full parameter.
165
12013-07-30 Xue Fuqiao <xfq.free@gmail.com> 1662013-07-30 Xue Fuqiao <xfq.free@gmail.com>
2 167
3 * vc/vc.el (vc-ignore): New function. 168 * vc/vc.el (vc-ignore): New function.
diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10
index 2d331a2819d..30afe9ce970 100644
--- a/lisp/ChangeLog.10
+++ b/lisp/ChangeLog.10
@@ -5182,7 +5182,7 @@
5182 inserted. 5182 inserted.
5183 (Info-hide-note-references): Fix doc and customize type. 5183 (Info-hide-note-references): Fix doc and customize type.
5184 5184
51852003-03-02 Matt Swift <swift@alum.mit.edu> 51852003-03-02 Matthew Swift <swift@alum.mit.edu>
5186 5186
5187 * emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column): 5187 * emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column):
5188 New custom variable. 5188 New custom variable.
@@ -5228,7 +5228,7 @@
5228 (tramp-send-region): Correct debug message. 5228 (tramp-send-region): Correct debug message.
5229 (tramp-bug): Add `tramp-chunksize'. 5229 (tramp-bug): Add `tramp-chunksize'.
5230 5230
52312003-02-26 Matt Swift <swift@alum.mit.edu> 52312003-02-26 Matthew Swift <swift@alum.mit.edu>
5232 5232
5233 * startup.el: Streamline code in several functions for efficiency 5233 * startup.el: Streamline code in several functions for efficiency
5234 and readability. Rephrase booleans to avoid `(not noninteractive)'. 5234 and readability. Rephrase booleans to avoid `(not noninteractive)'.
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index 4d0ff9a40e2..afa2bce104e 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -5119,7 +5119,7 @@
5119 (x-setup-function-keys, xw-defined-colors): Merge x- and w32- 5119 (x-setup-function-keys, xw-defined-colors): Merge x- and w32-
5120 definitions here. 5120 definitions here.
5121 5121
51222010-10-24 T.V. Raman <tv.raman.tv@gmail.com> (tiny change) 51222010-10-24 T. V. Raman <tv.raman.tv@gmail.com> (tiny change)
5123 5123
5124 * net/mairix.el (mairix-searches-mode-map): 5124 * net/mairix.el (mairix-searches-mode-map):
5125 * mail/mspools.el (mspools-mode-map): Fix 2010-10-10 change. 5125 * mail/mspools.el (mspools-mode-map): Fix 2010-10-10 change.
diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16
index d6d1bac43c2..7692a0fffa8 100644
--- a/lisp/ChangeLog.16
+++ b/lisp/ChangeLog.16
@@ -4569,7 +4569,7 @@
4569 * bookmark.el (bookmark-completing-read): Set the completion category 4569 * bookmark.el (bookmark-completing-read): Set the completion category
4570 to `bookmark' (bug#11131). 4570 to `bookmark' (bug#11131).
4571 4571
45722012-10-26 Bastien <bzg@altern.org> 45722012-10-26 Bastien Guerry <bzg@altern.org>
4573 Stefan Monnier <monnier@iro.umontreal.ca> 4573 Stefan Monnier <monnier@iro.umontreal.ca>
4574 4574
4575 * face-remap.el: Use lexical-binding. 4575 * face-remap.el: Use lexical-binding.
@@ -9712,7 +9712,7 @@
9712 * international/mule-cmds.el (mule-menu-keymap) 9712 * international/mule-cmds.el (mule-menu-keymap)
9713 (set-language-environment, set-locale-environment): Doc tweaks. 9713 (set-language-environment, set-locale-environment): Doc tweaks.
9714 9714
97152012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com> 97152012-06-16 Aurélien Aptel <aurelien.aptel@gmail.com>
9716 9716
9717 * cus-face.el (custom-face-attributes): Add wave-style underline 9717 * cus-face.el (custom-face-attributes): Add wave-style underline
9718 attribute. 9718 attribute.
diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7
index 4eec1795789..f52fdd7e194 100644
--- a/lisp/ChangeLog.7
+++ b/lisp/ChangeLog.7
@@ -7617,7 +7617,7 @@
7617 Delete the binding for toggle-enable-multibyte-characters. 7617 Delete the binding for toggle-enable-multibyte-characters.
7618 (mule-menu-keymap): Delete the menu item for it. 7618 (mule-menu-keymap): Delete the menu item for it.
7619 7619
76201997-12-17 Peter Galbraith <galbraith@mixing.qc.dfo.ca> 76201997-12-17 Peter S Galbraith <galbraith@mixing.qc.dfo.ca>
7621 7621
7622 * simple.el (copy-region-as-kill): 7622 * simple.el (copy-region-as-kill):
7623 Deactivate mark in transient-mark-mode. 7623 Deactivate mark in transient-mark-mode.
@@ -19637,7 +19637,7 @@
19637 19637
19638 * term/x-win.el (function-key-map): Define iso-lefttab. 19638 * term/x-win.el (function-key-map): Define iso-lefttab.
19639 19639
196401997-03-24 Vince Del Vecchio <vdelvecc@spd.analog.com> 196401997-03-24 Vincent Del Vecchio <vdelvecc@spd.analog.com>
19641 19641
19642 * mh-utils.el (mh-find-progs): When looking for mh-lib, construct 19642 * mh-utils.el (mh-find-progs): When looking for mh-lib, construct
19643 likely paths based on mh-progs rather than using a static list. 19643 likely paths based on mh-progs rather than using a static list.
diff --git a/lisp/align.el b/lisp/align.el
index 1b62042be75..3d2ca192245 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -906,15 +906,8 @@ on the format of these lists."
906;;;###autoload 906;;;###autoload
907(defun align-regexp (beg end regexp &optional group spacing repeat) 907(defun align-regexp (beg end regexp &optional group spacing repeat)
908 "Align the current region using an ad-hoc rule read from the minibuffer. 908 "Align the current region using an ad-hoc rule read from the minibuffer.
909BEG and END mark the limits of the region. This function will prompt 909BEG and END mark the limits of the region. Interactively, this function
910for the REGEXP to align with. If no prefix arg was specified, you 910prompts for the regular expression REGEXP to align with.
911only need to supply the characters to be lined up and any preceding
912whitespace is replaced. If a prefix arg was specified, the full
913regexp with parenthesized whitespace should be supplied; it will also
914prompt for which parenthesis GROUP within REGEXP to modify, the amount
915of SPACING to use, and whether or not to REPEAT the rule throughout
916the line. See `align-rules-list' for more information about these
917options.
918 911
919For example, let's say you had a list of phone numbers, and wanted to 912For example, let's say you had a list of phone numbers, and wanted to
920align them so that the opening parentheses would line up: 913align them so that the opening parentheses would line up:
@@ -925,8 +918,29 @@ align them so that the opening parentheses would line up:
925 Joe (123) 456-7890 918 Joe (123) 456-7890
926 919
927There is no predefined rule to handle this, but you could easily do it 920There is no predefined rule to handle this, but you could easily do it
928using a REGEXP like \"(\". All you would have to do is to mark the 921using a REGEXP like \"(\". Interactively, all you would have to do is
929region, call `align-regexp' and type in that regular expression." 922to mark the region, call `align-regexp' and enter that regular expression.
923
924REGEXP must contain at least one parenthesized subexpression, typically
925whitespace of the form \"\\\\(\\\\s-*\\\\)\". In normal interactive use,
926this is automatically added to the start of your regular expression after
927you enter it. You only need to supply the characters to be lined up, and
928any preceding whitespace is replaced.
929
930If you specify a prefix argument (or use this function non-interactively),
931you must enter the full regular expression, including the subexpression.
932The function also then prompts for which subexpression parenthesis GROUP
933\(default 1) within REGEXP to modify, the amount of SPACING (default
934`align-default-spacing') to use, and whether or not to REPEAT the rule
935throughout the line.
936
937See `align-rules-list' for more information about these options.
938
939The non-interactive form of the previous example would look something like:
940 \(align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\")
941
942This function is a nothing more than a small wrapper that helps you
943construct a rule to pass to `align-region', which does the real work."
930 (interactive 944 (interactive
931 (append 945 (append
932 (list (region-beginning) (region-end)) 946 (list (region-beginning) (region-end))
@@ -1498,6 +1512,9 @@ aligner would have dealt with are."
1498 (setq rule-beg (match-beginning first) 1512 (setq rule-beg (match-beginning first)
1499 save-match-data (match-data)) 1513 save-match-data (match-data))
1500 1514
1515 (or rule-beg
1516 (error "No match for subexpression %s" first))
1517
1501 ;; unless the `valid' attribute is set, and tells 1518 ;; unless the `valid' attribute is set, and tells
1502 ;; us that the rule is not valid at this point in 1519 ;; us that the rule is not valid at this point in
1503 ;; the code.. 1520 ;; the code..
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 934dfb92a57..943aa8b34b5 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -1099,6 +1099,52 @@ Noninteractively, return the name of the new file."
1099 (todo-show)) 1099 (todo-show))
1100 file))) 1100 file)))
1101 1101
1102(defun todo-rename-file (&optional arg)
1103 "Rename the current todo file.
1104With prefix ARG, prompt for a todo file and rename it.
1105If there are corresponding archive or filtered items files,
1106rename these accordingly. If there are live buffers visiting
1107these files, also rename them accordingly."
1108 (interactive "P")
1109 (let* ((oname (or (and arg
1110 (todo-read-file-name "Choose a file to rename: "
1111 nil t))
1112 (buffer-file-name)))
1113 (soname (todo-short-file-name oname))
1114 (nname (todo-read-file-name "New name for this file: "))
1115 (snname (todo-short-file-name nname))
1116 (files (directory-files todo-directory t
1117 (concat ".*" (regexp-quote soname)
1118 ".*\.tod[aorty]$") t)))
1119 (dolist (f files)
1120 (let* ((sfname (todo-short-file-name f))
1121 (fext (file-name-extension f t))
1122 (fbuf (find-buffer-visiting f))
1123 (fbname (buffer-name fbuf)))
1124 (when (string-match (regexp-quote soname) sfname)
1125 (let* ((snfname (replace-match snname t t sfname))
1126 (nfname (concat todo-directory snfname fext)))
1127 (rename-file f nfname)
1128 (when fbuf
1129 (with-current-buffer fbuf
1130 (set-visited-file-name nfname t t)
1131 (cond ((member fext '(".todo" ".toda"))
1132 (setq todo-current-todo-file (buffer-file-name))
1133 (setq mode-line-buffer-identification
1134 (funcall todo-mode-line-function
1135 (todo-current-category))))
1136 (t
1137 (rename-buffer
1138 (replace-regexp-in-string
1139 (regexp-quote soname) snname fbname))))))))))
1140 (setq todo-files (funcall todo-files-function)
1141 todo-archives (funcall todo-files-function t))
1142 (when (string= todo-default-todo-file soname)
1143 (setq todo-default-todo-file snname))
1144 (when (string= todo-global-current-todo-file oname)
1145 (setq todo-global-current-todo-file nname))
1146 (todo-reevaluate-filelist-defcustoms)))
1147
1102(defun todo-delete-file () 1148(defun todo-delete-file ()
1103 "Delete the current todo, archive or filtered items file. 1149 "Delete the current todo, archive or filtered items file.
1104If the todo file has a corresponding archive file, or vice versa, 1150If the todo file has a corresponding archive file, or vice versa,
@@ -4121,7 +4167,8 @@ multifile commands for further details."
4121 (regexp ".todr"))))) 4167 (regexp ".todr")))))
4122 (rxfiles (when regexp 4168 (rxfiles (when regexp
4123 (directory-files todo-directory t ".*\\.todr$" t))) 4169 (directory-files todo-directory t ".*\\.todr$" t)))
4124 (file-exists (or (file-exists-p fname) rxfiles))) 4170 (file-exists (or (file-exists-p fname) rxfiles))
4171 bufname)
4125 (cond ((and top new (natnump new)) 4172 (cond ((and top new (natnump new))
4126 (todo-filter-items-1 (cons 'top new) flist)) 4173 (todo-filter-items-1 (cons 'top new) flist))
4127 ((and (not new) file-exists) 4174 ((and (not new) file-exists)
@@ -4135,10 +4182,15 @@ multifile commands for further details."
4135 (todo-check-filtered-items-file)) 4182 (todo-check-filtered-items-file))
4136 (t 4183 (t
4137 (todo-filter-items-1 filter flist))) 4184 (todo-filter-items-1 filter flist)))
4138 (setq fname (replace-regexp-in-string "-" ", " 4185 (dolist (s (split-string (todo-short-file-name fname) "-"))
4139 (todo-short-file-name fname))) 4186 (setq bufname (if bufname
4187 (concat bufname (if (member s (mapcar
4188 'todo-short-file-name
4189 todo-files))
4190 ", " "-") s)
4191 s)))
4140 (rename-buffer (format (concat "%s for file" (if multi "s" "") 4192 (rename-buffer (format (concat "%s for file" (if multi "s" "")
4141 " \"%s\"") buf fname)))) 4193 " \"%s\"") buf bufname))))
4142 4194
4143(defun todo-filter-items-1 (filter file-list) 4195(defun todo-filter-items-1 (filter file-list)
4144 "Build a list of items by applying FILTER to FILE-LIST. 4196 "Build a list of items by applying FILTER to FILE-LIST.
@@ -6163,6 +6215,7 @@ Filtered Items mode following todo (not done) items."
6163 ("Cey" todo-edit-category-diary-inclusion) 6215 ("Cey" todo-edit-category-diary-inclusion)
6164 ("Cek" todo-edit-category-diary-nonmarking) 6216 ("Cek" todo-edit-category-diary-nonmarking)
6165 ("Fa" todo-add-file) 6217 ("Fa" todo-add-file)
6218 ("Fr" todo-rename-file)
6166 ("Ff" todo-find-filtered-items-file) 6219 ("Ff" todo-find-filtered-items-file)
6167 ("FV" todo-toggle-view-done-only) 6220 ("FV" todo-toggle-view-done-only)
6168 ("V" todo-toggle-view-done-only) 6221 ("V" todo-toggle-view-done-only)
@@ -6171,8 +6224,8 @@ Filtered Items mode following todo (not done) items."
6171 ("Fts" todo-set-top-priorities-in-file) 6224 ("Fts" todo-set-top-priorities-in-file)
6172 ("Fyy" todo-filter-diary-items) 6225 ("Fyy" todo-filter-diary-items)
6173 ("Fym" todo-filter-diary-items-multifile) 6226 ("Fym" todo-filter-diary-items-multifile)
6174 ("Frr" todo-filter-regexp-items) 6227 ("Fxx" todo-filter-regexp-items)
6175 ("Frm" todo-filter-regexp-items-multifile) 6228 ("Fxm" todo-filter-regexp-items-multifile)
6176 ("ee" todo-edit-item) 6229 ("ee" todo-edit-item)
6177 ("em" todo-edit-multiline-item) 6230 ("em" todo-edit-multiline-item)
6178 ("edt" todo-edit-item-header) 6231 ("edt" todo-edit-item-header)
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index 705277c97a0..c39a8a700ef 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,3 +1,38 @@
12013-07-29 David Engster <deng@randomsample.de>
2
3 * lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its
4 development does no longer happens in CEDET upstream but in Emacs
5 proper. Also remove cedet-contrib and cogre since those are only
6 in upstream.
7
8 * semantic/analyze/fcn.el (semantic-analyze-type-to-name): If TYPE
9 has a parent, return a fully qualified name.
10
11 * semantic/decorate/mode.el
12 (semantic-decoration-on-includes-p-default)
13 (semantic-decoration-on-includes-highlight-default): Declare for
14 byte compiler.
15
16 * semantic/wisent/python.el (semantic/format): New require.
17
182013-07-27 Eric Ludlam <zappo@gnu.org>
19
20 * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap
21 debug message removing middle tag in semantic-edits-verbose-flag
22 check.
23
242013-07-27 David Engster <deng@randomsample.de>
25
26 * semantic/bovine/el.el (semantic/db-el): New require.
27
28 * semantic/db-el.el (semanticdb-normalize-one-tag): It might be
29 that a symbol comes from a file but cannot be found in its table.
30 This happens for instance when a symbol was dynamically created
31 through a macro like `defstruct'. In this case, return the
32 original tag.
33 (semanticdb-elisp-sym->tag): Deal with autoloaded functions, where
34 the argument list is not available until the file is loaded.
35
12013-06-25 Stefan Monnier <monnier@iro.umontreal.ca> 362013-06-25 Stefan Monnier <monnier@iro.umontreal.ca>
2 37
3 * data-debug.el, cedet-idutils.el: Neuter the "Version:" header. 38 * data-debug.el, cedet-idutils.el: Neuter the "Version:" header.
diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el
index e8720bc6624..f34442996c1 100644
--- a/lisp/cedet/cedet.el
+++ b/lisp/cedet/cedet.el
@@ -46,9 +46,6 @@
46 (semantic "2.2" nil "semantic/doc") 46 (semantic "2.2" nil "semantic/doc")
47 (srecode "1.2" nil "srecode" ) 47 (srecode "1.2" nil "srecode" )
48 (ede "1.2" nil "ede" ) 48 (ede "1.2" nil "ede" )
49 (speedbar "1.0.4" nil "speedbar" )
50 (cogre "1.2" nil "cogre" )
51 (cedet-contrib "1.2" "contrib" nil )
52 ) 49 )
53 "Table of CEDET packages to install.") 50 "Table of CEDET packages to install.")
54 51
diff --git a/lisp/cedet/semantic/analyze/fcn.el b/lisp/cedet/semantic/analyze/fcn.el
index 4300c89c9df..7512b7ca15a 100644
--- a/lisp/cedet/semantic/analyze/fcn.el
+++ b/lisp/cedet/semantic/analyze/fcn.el
@@ -165,7 +165,10 @@ SCOPE is the scope object with additional items in which to search for names."
165The TYPE field in a tag can be nil (return nil) 165The TYPE field in a tag can be nil (return nil)
166or a string, or a non-positional tag." 166or a string, or a non-positional tag."
167 (cond ((semantic-tag-p type) 167 (cond ((semantic-tag-p type)
168 (semantic-tag-name type)) 168 (if (semantic-tag-named-parent type)
169 (semantic-analyze-unsplit-name `(,(semantic-tag-named-parent type)
170 ,(semantic-tag-name type)))
171 (semantic-tag-name type)))
169 ((stringp type) 172 ((stringp type)
170 type) 173 type)
171 ((listp type) 174 ((listp type)
diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el
index 0bbe3c61d76..c6f1ceb0f94 100644
--- a/lisp/cedet/semantic/bovine/el.el
+++ b/lisp/cedet/semantic/bovine/el.el
@@ -25,6 +25,7 @@
25 25
26(require 'semantic) 26(require 'semantic)
27(require 'semantic/bovine) 27(require 'semantic/bovine)
28(require 'semantic/db-el)
28(require 'find-func) 29(require 'find-func)
29 30
30(require 'semantic/ctxt) 31(require 'semantic/ctxt)
diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el
index 1b0f3292ad3..3376389c7d5 100644
--- a/lisp/cedet/semantic/db-el.el
+++ b/lisp/cedet/semantic/db-el.el
@@ -173,13 +173,17 @@ If Emacs cannot resolve this symbol to a particular file, then return nil."
173 (newtags (when tab (semanticdb-find-tags-by-name-method 173 (newtags (when tab (semanticdb-find-tags-by-name-method
174 tab (semantic-tag-name tag)))) 174 tab (semantic-tag-name tag))))
175 (match nil)) 175 (match nil))
176 ;; Find the best match. 176 ;; We might not have a parsed tag in this file, because it
177 (dolist (T newtags) 177 ;; might be generated through a macro like defstruct.
178 (when (semantic-tag-similar-p T tag) 178 (if (null newtags)
179 (setq match T))) 179 (setq match tag)
180 ;; Backup system. 180 ;; Find the best match.
181 (when (not match) 181 (dolist (T newtags)
182 (setq match (car newtags))) 182 (when (semantic-tag-similar-p T tag)
183 (setq match T)))
184 ;; Backup system.
185 (when (not match)
186 (setq match (car newtags))))
183 ;; Return it. 187 ;; Return it.
184 (when tab (cons tab match)))))) 188 (when tab (cons tab match))))))
185 189
@@ -196,15 +200,18 @@ TOKTYPE is a hint to the type of tag desired."
196 (when sym 200 (when sym
197 (cond ((and (eq toktype 'function) (fboundp sym)) 201 (cond ((and (eq toktype 'function) (fboundp sym))
198 (require 'semantic/bovine/el) 202 (require 'semantic/bovine/el)
199 (semantic-tag-new-function 203 (let ((arglist (help-function-arglist sym)))
200 (symbol-name sym) 204 (when (not (listp arglist))
201 nil ;; return type 205 ;; Function might be autoloaded, in which case
202 (semantic-elisp-desymbolify 206 ;; the arglist is not available yet.
203 (help-function-arglist sym)) ;; arg-list 207 (setq arglist nil))
204 :user-visible-flag (condition-case nil 208 (semantic-tag-new-function
205 (interactive-form sym) 209 (symbol-name sym)
206 (error nil)) 210 nil ;; return type
207 )) 211 (semantic-elisp-desymbolify arglist)
212 :user-visible-flag (condition-case nil
213 (interactive-form sym)
214 (error nil)))))
208 ((and (eq toktype 'variable) (boundp sym)) 215 ((and (eq toktype 'variable) (boundp sym))
209 (semantic-tag-new-variable 216 (semantic-tag-new-variable
210 (symbol-name sym) 217 (symbol-name sym)
diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el
index ba06c73936b..cc5e9d9bec2 100644
--- a/lisp/cedet/semantic/decorate/mode.el
+++ b/lisp/cedet/semantic/decorate/mode.el
@@ -541,6 +541,10 @@ Use a primary decoration."
541 541
542;;; Decoration Modes in other files 542;;; Decoration Modes in other files
543;; 543;;
544(declare-function semantic-decoration-on-includes-p-default
545 "semantic/decorate/include")
546(declare-function semantic-decoration-on-includes-highlight-default
547 "semantic/decorate/include")
544(define-semantic-decoration-style semantic-decoration-on-includes 548(define-semantic-decoration-style semantic-decoration-on-includes
545 "Highlight class members that are includes. 549 "Highlight class members that are includes.
546This mode provides a nice context menu on the include statements." 550This mode provides a nice context menu on the include statements."
diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index a27eab5404c..91455cdb741 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -882,8 +882,9 @@ pre-positioned to a convenient location."
882 ;; reparse 882 ;; reparse
883 (semantic-parse-changes-failed "Splice-remove failed. Empty buffer?") 883 (semantic-parse-changes-failed "Splice-remove failed. Empty buffer?")
884 )) 884 ))
885 (message "To Remove Middle Tag: (%s)" 885 (when semantic-edits-verbose-flag
886 (semantic-format-tag-name first))) 886 (message "To Remove Middle Tag: (%s)"
887 (semantic-format-tag-name first))))
887 ;; Find in the cache the preceding tag 888 ;; Find in the cache the preceding tag
888 (while (and cachestart (not (eq first (car (cdr cachestart))))) 889 (while (and cachestart (not (eq first (car (cdr cachestart)))))
889 (setq cachestart (cdr cachestart))) 890 (setq cachestart (cdr cachestart)))
diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el
index 719868f7635..2c0ed5868ce 100644
--- a/lisp/cedet/semantic/wisent/python.el
+++ b/lisp/cedet/semantic/wisent/python.el
@@ -39,6 +39,7 @@
39(require 'semantic/find) 39(require 'semantic/find)
40(require 'semantic/dep) 40(require 'semantic/dep)
41(require 'semantic/ctxt) 41(require 'semantic/ctxt)
42(require 'semantic/format)
42 43
43(eval-when-compile 44(eval-when-compile
44 (require 'cl)) 45 (require 'cl))
diff --git a/lisp/desktop.el b/lisp/desktop.el
index f4622ae4961..299bdc0eeb4 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -387,6 +387,18 @@ If `delete', frames on other displays are deleted instead of restored."
387 :group 'desktop 387 :group 'desktop
388 :version "24.4") 388 :version "24.4")
389 389
390(defcustom desktop-restore-forces-onscreen t
391 "If t, offscreen frames are restored onscreen instead.
392If `all', frames that are partially offscreen are also forced onscren.
393NOTE: Checking of frame boundaries is only approximate and can fail
394to reliably detect frames whose onscreen/offscreen state depends on a
395few pixels, especially near the right / bottom borders of the screen."
396 :type '(choice (const :tag "Only fully offscreen frames" t)
397 (const :tag "Also partially offscreen frames" 'all)
398 (const :tag "Do not force frames onscreen" nil))
399 :group 'desktop
400 :version "24.4")
401
390(defcustom desktop-restoring-reuses-frames t 402(defcustom desktop-restoring-reuses-frames t
391 "If t, restoring frames reuses existing frames. 403 "If t, restoring frames reuses existing frames.
392If nil, existing frames are deleted. 404If nil, existing frames are deleted.
@@ -878,30 +890,30 @@ DIRNAME must be the directory in which the desktop file will be saved."
878 890
879;; ---------------------------------------------------------------------------- 891;; ----------------------------------------------------------------------------
880(defvar desktop-filter-parameters-alist 892(defvar desktop-filter-parameters-alist
881 '((background-color . desktop--filter-*-color) 893 '((background-color . desktop--filter-*-color)
882 (buffer-list . t) 894 (buffer-list . t)
883 (buffer-predicate . t) 895 (buffer-predicate . t)
884 (buried-buffer-list . t) 896 (buried-buffer-list . t)
885 (desktop-font . desktop--filter-restore-desktop-parm) 897 (desktop--font . desktop--filter-restore-desktop-parm)
886 (desktop-fullscreen . desktop--filter-restore-desktop-parm) 898 (desktop--fullscreen . desktop--filter-restore-desktop-parm)
887 (desktop-height . desktop--filter-restore-desktop-parm) 899 (desktop--height . desktop--filter-restore-desktop-parm)
888 (desktop-width . desktop--filter-restore-desktop-parm) 900 (desktop--width . desktop--filter-restore-desktop-parm)
889 (font . desktop--filter-save-desktop-parm) 901 (font . desktop--filter-save-desktop-parm)
890 (font-backend . t) 902 (font-backend . t)
891 (foreground-color . desktop--filter-*-color) 903 (foreground-color . desktop--filter-*-color)
892 (fullscreen . desktop--filter-save-desktop-parm) 904 (fullscreen . desktop--filter-save-desktop-parm)
893 (height . desktop--filter-save-desktop-parm) 905 (height . desktop--filter-save-desktop-parm)
894 (left . desktop--filter-iconified-position) 906 (left . desktop--filter-iconified-position)
895 (minibuffer . desktop--filter-minibuffer) 907 (minibuffer . desktop--filter-minibuffer)
896 (name . t) 908 (name . t)
897 (outer-window-id . t) 909 (outer-window-id . t)
898 (parent-id . t) 910 (parent-id . t)
899 (top . desktop--filter-iconified-position) 911 (top . desktop--filter-iconified-position)
900 (tty . desktop--filter-tty*) 912 (tty . desktop--filter-tty*)
901 (tty-type . desktop--filter-tty*) 913 (tty-type . desktop--filter-tty*)
902 (width . desktop--filter-save-desktop-parm) 914 (width . desktop--filter-save-desktop-parm)
903 (window-id . t) 915 (window-id . t)
904 (window-system . t)) 916 (window-system . t))
905 "Alist of frame parameters and filtering functions. 917 "Alist of frame parameters and filtering functions.
906 918
907Each element is a cons (PARAM . FILTER), where PARAM is a parameter 919Each element is a cons (PARAM . FILTER), where PARAM is a parameter
@@ -972,27 +984,27 @@ Only meaningful when called from a filtering function in
972 t))) 984 t)))
973 985
974(defun desktop--filter-restore-desktop-parm (current parameters saving) 986(defun desktop--filter-restore-desktop-parm (current parameters saving)
975 ;; When switching to a GUI frame, convert desktop-XXX parameter to XXX 987 ;; When switching to a GUI frame, convert desktop--XXX parameter to XXX
976 (or saving 988 (or saving
977 (not (desktop-switch-to-gui-p parameters)) 989 (not (desktop-switch-to-gui-p parameters))
978 (let ((val (cdr current))) 990 (let ((val (cdr current)))
979 (if (eq val :desktop-processed) 991 (if (eq val :desktop-processed)
980 nil 992 nil
981 (cons (intern (substring (symbol-name (car current)) 993 (cons (intern (substring (symbol-name (car current))
982 8)) ;; (length "desktop-") 994 9)) ;; (length "desktop--")
983 val))))) 995 val)))))
984 996
985(defun desktop--filter-save-desktop-parm (current parameters saving) 997(defun desktop--filter-save-desktop-parm (current parameters saving)
986 ;; When switching to a tty frame, save parameter XXX as desktop-XXX so it 998 ;; When switching to a tty frame, save parameter XXX as desktop--XXX so it
987 ;; can be restored in a subsequent GUI session, unless it already exists. 999 ;; can be restored in a subsequent GUI session, unless it already exists.
988 (cond (saving t) 1000 (cond (saving t)
989 ((desktop-switch-to-tty-p parameters) 1001 ((desktop-switch-to-tty-p parameters)
990 (let ((sym (intern (format "desktop-%s" (car current))))) 1002 (let ((sym (intern (format "desktop--%s" (car current)))))
991 (if (assq sym parameters) 1003 (if (assq sym parameters)
992 nil 1004 nil
993 (cons sym (cdr current))))) 1005 (cons sym (cdr current)))))
994 ((desktop-switch-to-gui-p parameters) 1006 ((desktop-switch-to-gui-p parameters)
995 (let* ((dtp (assq (intern (format "desktop-%s" (car current))) 1007 (let* ((dtp (assq (intern (format "desktop--%s" (car current)))
996 parameters)) 1008 parameters))
997 (val (cdr dtp))) 1009 (val (cdr dtp)))
998 (if (eq val :desktop-processed) 1010 (if (eq val :desktop-processed)
@@ -1047,34 +1059,34 @@ Internal use only."
1047 filtered)) 1059 filtered))
1048 1060
1049(defun desktop--process-minibuffer-frames (frames) 1061(defun desktop--process-minibuffer-frames (frames)
1050 ;; Adds a desktop-mini parameter to frames 1062 ;; Adds a desktop--mini parameter to frames
1051 ;; desktop-mini is a list (MINIBUFFER NUMBER DEFAULT?) where 1063 ;; desktop--mini is a list (MINIBUFFER NUMBER DEFAULT?) where
1052 ;; MINIBUFFER t if the frame (including minibuffer-only) owns a minibuffer 1064 ;; MINIBUFFER t if the frame (including minibuffer-only) owns a minibuffer
1053 ;; NUMBER if MINIBUFFER = t, an ID for the frame; if nil, the ID of 1065 ;; NUMBER if MINIBUFFER = t, an ID for the frame; if nil, the ID of
1054 ;; the frame containing the minibuffer used by this frame 1066 ;; the frame containing the minibuffer used by this frame
1055 ;; DEFAULT? if t, this frame is the value of default-minibuffer-frame 1067 ;; DEFAULT? if t, this frame is the value of default-minibuffer-frame
1056 (let ((count 0)) 1068 (let ((count 0))
1057 ;; Reset desktop-mini for all frames 1069 ;; Reset desktop--mini for all frames
1058 (dolist (frame (frame-list)) 1070 (dolist (frame (frame-list))
1059 (set-frame-parameter frame 'desktop-mini nil)) 1071 (set-frame-parameter frame 'desktop--mini nil))
1060 ;; Number all frames with its own minibuffer 1072 ;; Number all frames with its own minibuffer
1061 (dolist (frame (minibuffer-frame-list)) 1073 (dolist (frame (minibuffer-frame-list))
1062 (set-frame-parameter frame 'desktop-mini 1074 (set-frame-parameter frame 'desktop--mini
1063 (list t 1075 (list t
1064 (cl-incf count) 1076 (cl-incf count)
1065 (eq frame default-minibuffer-frame)))) 1077 (eq frame default-minibuffer-frame))))
1066 ;; Now link minibufferless frames with their minibuffer frames 1078 ;; Now link minibufferless frames with their minibuffer frames
1067 (dolist (frame frames) 1079 (dolist (frame frames)
1068 (unless (frame-parameter frame 'desktop-mini) 1080 (unless (frame-parameter frame 'desktop--mini)
1069 (let ((mb-frame (window-frame (minibuffer-window frame)))) 1081 (let ((mb-frame (window-frame (minibuffer-window frame))))
1070 ;; Frames whose minibuffer frame has been filtered out will have 1082 ;; Frames whose minibuffer frame has been filtered out will have
1071 ;; desktop-mini = nil, so desktop-restore-frames will restore them 1083 ;; desktop--mini = nil, so desktop-restore-frames will restore them
1072 ;; according to their minibuffer parameter. Set up desktop-mini 1084 ;; according to their minibuffer parameter. Set up desktop--mini
1073 ;; for the rest. 1085 ;; for the rest.
1074 (when (memq mb-frame frames) 1086 (when (memq mb-frame frames)
1075 (set-frame-parameter frame 'desktop-mini 1087 (set-frame-parameter frame 'desktop--mini
1076 (list nil 1088 (list nil
1077 (cl-second (frame-parameter mb-frame 'desktop-mini)) 1089 (cl-second (frame-parameter mb-frame 'desktop--mini))
1078 nil)))))))) 1090 nil))))))))
1079 1091
1080(defun desktop-save-frames () 1092(defun desktop-save-frames ()
@@ -1201,6 +1213,68 @@ This function also sets `desktop-dirname' to nil."
1201(defvar desktop--reuse-list nil 1213(defvar desktop--reuse-list nil
1202 "Internal use only.") 1214 "Internal use only.")
1203 1215
1216(defun desktop--compute-pos (value left/top right/bottom)
1217 (pcase value
1218 (`(+ ,val) (+ left/top val))
1219 (`(- ,val) (+ right/bottom val))
1220 (val val)))
1221
1222(defun desktop--move-onscreen (frame)
1223 "If FRAME is offscreen, move it back onscreen and, if necessary, resize it.
1224When forced onscreen, frames wider than the monitor's workarea are converted
1225to fullwidth, and frames taller than the workarea are converted to fullheight.
1226NOTE: This only works for non-iconified frames."
1227 (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame)))
1228 (right (+ left width -1))
1229 (bottom (+ top height -1))
1230 (fr-left (desktop--compute-pos (frame-parameter frame 'left) left right))
1231 (fr-top (desktop--compute-pos (frame-parameter frame 'top) top bottom))
1232 (ch-width (frame-char-width frame))
1233 (ch-height (frame-char-height frame))
1234 (fr-width (max (frame-pixel-width frame) (* ch-width (frame-width frame))))
1235 (fr-height (max (frame-pixel-height frame) (* ch-height (frame-height frame))))
1236 (fr-right (+ fr-left fr-width -1))
1237 (fr-bottom (+ fr-top fr-height -1)))
1238 (when (pcase desktop-restore-forces-onscreen
1239 ;; Any corner is outside the screen.
1240 (`all (or (< fr-bottom top) (> fr-bottom bottom)
1241 (< fr-left left) (> fr-left right)
1242 (< fr-right left) (> fr-right right)
1243 (< fr-top top) (> fr-top bottom)))
1244 ;; Displaced to the left, right, above or below the screen.
1245 (`t (or (> fr-left right)
1246 (< fr-right left)
1247 (> fr-top bottom)
1248 (< fr-bottom top)))
1249 (_ nil))
1250 (let ((fullwidth (> fr-width width))
1251 (fullheight (> fr-height height))
1252 (params nil))
1253 ;; Position frame horizontally.
1254 (cond (fullwidth
1255 (push `(left . ,left) params))
1256 ((> fr-right right)
1257 (push `(left . ,(+ left (- width fr-width))) params))
1258 ((< fr-left left)
1259 (push `(left . ,left) params)))
1260 ;; Position frame vertically.
1261 (cond (fullheight
1262 (push `(top . ,top) params))
1263 ((> fr-bottom bottom)
1264 (push `(top . ,(+ top (- height fr-height))) params))
1265 ((< fr-top top)
1266 (push `(top . ,top) params)))
1267 ;; Compute fullscreen state, if required.
1268 (when (or fullwidth fullheight)
1269 (push (cons 'fullscreen
1270 (cond ((not fullwidth) 'fullheight)
1271 ((not fullheight) 'fullwidth)
1272 (t 'maximized)))
1273 params))
1274 ;; Finally, move the frame back onscreen.
1275 (when params
1276 (modify-frame-parameters frame params))))))
1277
1204(defun desktop--find-frame (predicate display &rest args) 1278(defun desktop--find-frame (predicate display &rest args)
1205 "Find a suitable frame in `desktop--reuse-list'. 1279 "Find a suitable frame in `desktop--reuse-list'.
1206Look through frames whose display property matches DISPLAY and 1280Look through frames whose display property matches DISPLAY and
@@ -1228,33 +1302,44 @@ is the parameter list of the frame being restored. Internal use only."
1228 ;; session has already been loaded. The other main use case, which 1302 ;; session has already been loaded. The other main use case, which
1229 ;; is the initial desktop-read upon starting Emacs, should usually 1303 ;; is the initial desktop-read upon starting Emacs, should usually
1230 ;; only have one, or very few, frame(s) to reuse. 1304 ;; only have one, or very few, frame(s) to reuse.
1231 (cond (;; When the target is tty, every existing frame is reusable. 1305 (cond ((null display)
1232 (null display) 1306 ;; When the target is tty, every existing frame is reusable.
1233 (setq frame (desktop--find-frame nil display))) 1307 (setq frame (desktop--find-frame nil display)))
1234 (;; If the frame has its own minibuffer, let's see whether 1308 ((car (setq mini (cdr (assq 'desktop--mini frame-cfg))))
1309 ;; If the frame has its own minibuffer, let's see whether
1235 ;; that frame has already been loaded (which can happen after 1310 ;; that frame has already been loaded (which can happen after
1236 ;; M-x desktop-read). 1311 ;; M-x desktop-read).
1237 (car (setq mini (cdr (assq 'desktop-mini frame-cfg)))) 1312 (setq frame (desktop--find-frame
1238 (setq frame (or (desktop--find-frame 1313 (lambda (f m)
1239 (lambda (f m) 1314 (equal (frame-parameter f 'desktop--mini) m))
1240 (equal (frame-parameter f 'desktop-mini) m)) 1315 display mini))
1241 display mini)))) 1316 ;; If it has not been loaded, and it is not a minibuffer-only frame,
1242 (;; For minibufferless frames, check whether they already exist, 1317 ;; let's look for an existing non-minibuffer-only frame to reuse.
1318 (unless (or frame (eq (cdr (assq 'minibuffer frame-cfg)) 'only))
1319 (setq frame (desktop--find-frame
1320 (lambda (f)
1321 (let ((w (frame-parameter f 'minibuffer)))
1322 (and (window-live-p w)
1323 (window-minibuffer-p w)
1324 (eq (window-frame w) f))))
1325 display))))
1326 (mini
1327 ;; For minibufferless frames, check whether they already exist,
1243 ;; and that they are linked to the right minibuffer frame. 1328 ;; and that they are linked to the right minibuffer frame.
1244 mini
1245 (setq frame (desktop--find-frame 1329 (setq frame (desktop--find-frame
1246 (lambda (f n) 1330 (lambda (f n)
1247 (let ((m (frame-parameter f 'desktop-mini))) 1331 (pcase-let (((and m `(,hasmini ,num))
1332 (frame-parameter f 'desktop--mini)))
1248 (and m 1333 (and m
1249 (null (cl-first m)) 1334 (null hasmini)
1250 (= (cl-second m) n) 1335 (= num n)
1251 (equal (cl-second (frame-parameter 1336 (equal (cl-second (frame-parameter
1252 (window-frame (minibuffer-window f)) 1337 (window-frame (minibuffer-window f))
1253 'desktop-mini)) 1338 'desktop--mini))
1254 n)))) 1339 n))))
1255 display (cl-second mini)))) 1340 display (cl-second mini))))
1256 (;; Default to just finding a frame in the same display. 1341 (t
1257 t 1342 ;; Default to just finding a frame in the same display.
1258 (setq frame (desktop--find-frame nil display)))) 1343 (setq frame (desktop--find-frame nil display))))
1259 ;; If found, remove from the list. 1344 ;; If found, remove from the list.
1260 (when frame 1345 (when frame
@@ -1289,7 +1374,7 @@ its window state. Internal use only."
1289 (visible (assq 'visibility filtered-cfg))) 1374 (visible (assq 'visibility filtered-cfg)))
1290 (setq filtered-cfg (cl-delete-if (lambda (p) 1375 (setq filtered-cfg (cl-delete-if (lambda (p)
1291 (memq p '(visibility fullscreen width height))) 1376 (memq p '(visibility fullscreen width height)))
1292 filtered-cfg)) 1377 filtered-cfg :key #'car))
1293 (when width 1378 (when width
1294 (setq filtered-cfg (append `((user-size . t) (width . ,width)) 1379 (setq filtered-cfg (append `((user-size . t) (width . ,width))
1295 filtered-cfg))) 1380 filtered-cfg)))
@@ -1300,10 +1385,29 @@ its window state. Internal use only."
1300 (push visible alt-cfg) 1385 (push visible alt-cfg)
1301 (push (cons 'fullscreen fullscreen) alt-cfg))) 1386 (push (cons 'fullscreen fullscreen) alt-cfg)))
1302 1387
1303 ;; Time to select or create a frame an apply the big bunch of parameters 1388 ;; Time to find or create a frame an apply the big bunch of parameters.
1304 (if (setq frame (desktop--select-frame display filtered-cfg)) 1389 ;; If a frame needs to be created and it falls partially or wholly offscreen,
1305 (modify-frame-parameters frame filtered-cfg) 1390 ;; sometimes it gets "pushed back" onscreen; however, moving it afterwards is
1306 (setq frame (make-frame-on-display display filtered-cfg))) 1391 ;; allowed. So we create the frame as invisible and then reapply the full
1392 ;; parameter list (including position and size parameters).
1393 (setq frame (or (desktop--select-frame display filtered-cfg)
1394 (make-frame-on-display display
1395 (cons '(visibility)
1396 (cl-loop
1397 for param in '(left top width height minibuffer)
1398 collect (assq param filtered-cfg))))))
1399 (modify-frame-parameters frame
1400 (if (eq (frame-parameter frame 'fullscreen) fullscreen)
1401 ;; Workaround for bug#14949
1402 (assq-delete-all 'fullscreen filtered-cfg)
1403 filtered-cfg))
1404
1405 ;; If requested, force frames to be onscreen.
1406 (when (and desktop-restore-forces-onscreen
1407 ;; FIXME: iconified frames should be checked too,
1408 ;; but it is impossible without deiconifying them.
1409 (not (eq (frame-parameter frame 'visibility) 'icon)))
1410 (desktop--move-onscreen frame))
1307 1411
1308 ;; Let's give the finishing touches (visibility, tool-bar, maximization). 1412 ;; Let's give the finishing touches (visibility, tool-bar, maximization).
1309 (when lines (push lines alt-cfg)) 1413 (when lines (push lines alt-cfg))
@@ -1316,14 +1420,12 @@ its window state. Internal use only."
1316 ;; Order: default minibuffer frame 1420 ;; Order: default minibuffer frame
1317 ;; other frames with minibuffer, ascending ID 1421 ;; other frames with minibuffer, ascending ID
1318 ;; minibufferless frames, ascending ID 1422 ;; minibufferless frames, ascending ID
1319 (let ((dm1 (cdr (assq 'desktop-mini (car state1)))) 1423 (pcase-let ((`(,_p1 ,hasmini1 ,num1 ,default1) (assq 'desktop--mini (car state1)))
1320 (dm2 (cdr (assq 'desktop-mini (car state2))))) 1424 (`(,_p2 ,hasmini2 ,num2 ,default2) (assq 'desktop--mini (car state2))))
1321 (cond ((cl-third dm1) t) 1425 (cond (default1 t)
1322 ((cl-third dm2) nil) 1426 (default2 nil)
1323 ((eq (cl-first dm1) (cl-first dm2)) 1427 ((eq hasmini1 hasmini2) (< num1 num2))
1324 (< (cl-second dm1) (cl-second dm2))) 1428 (t hasmini1))))
1325 (t
1326 (cl-first dm1)))))
1327 1429
1328(defun desktop-restoring-frames-p () 1430(defun desktop-restoring-frames-p ()
1329 "True if calling `desktop-restore-frames' will actually restore frames." 1431 "True if calling `desktop-restore-frames' will actually restore frames."
@@ -1349,10 +1451,10 @@ being set (usually, by reading it from the desktop)."
1349 1451
1350 (dolist (state desktop-saved-frame-states) 1452 (dolist (state desktop-saved-frame-states)
1351 (condition-case err 1453 (condition-case err
1352 (let* ((frame-cfg (car state)) 1454 (pcase-let* ((`(,frame-cfg . ,window-cfg) state)
1353 (window-cfg (cdr state)) 1455 ((and d-mini `(,hasmini ,num ,default))
1354 (d-mini (cdr (assq 'desktop-mini frame-cfg))) 1456 (cdr (assq 'desktop--mini frame-cfg)))
1355 num frame to-tty) 1457 (frame nil) (to-tty nil))
1356 ;; Only set target if forcing displays and the target display is different. 1458 ;; Only set target if forcing displays and the target display is different.
1357 (if (or (not forcing) 1459 (if (or (not forcing)
1358 (equal target (or (assq 'display frame-cfg) '(display . nil)))) 1460 (equal target (or (assq 'display frame-cfg) '(display . nil))))
@@ -1373,17 +1475,16 @@ being set (usually, by reading it from the desktop)."
1373 ;; global state; it's best to do it here than add a bunch of global 1475 ;; global state; it's best to do it here than add a bunch of global
1374 ;; variables to pass info back-and-forth to/from the filter function. 1476 ;; variables to pass info back-and-forth to/from the filter function.
1375 (cond 1477 (cond
1376 ((null d-mini)) ;; No desktop-mini. Process as normal frame. 1478 ((null d-mini)) ;; No desktop--mini. Process as normal frame.
1377 (to-tty) ;; Ignore minibuffer stuff and process as normal frame. 1479 (to-tty) ;; Ignore minibuffer stuff and process as normal frame.
1378 ((cl-first d-mini) ;; Frame has minibuffer (or it is minibuffer-only). 1480 (hasmini ;; Frame has minibuffer (or it is minibuffer-only).
1379 (setq num (cl-second d-mini))
1380 (when (eq (cdr (assq 'minibuffer frame-cfg)) 'only) 1481 (when (eq (cdr (assq 'minibuffer frame-cfg)) 'only)
1381 (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0)) 1482 (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0))
1382 frame-cfg)))) 1483 frame-cfg))))
1383 (t ;; Frame depends on other frame's minibuffer window. 1484 (t ;; Frame depends on other frame's minibuffer window.
1384 (let ((mb-frame (cdr (assq (cl-second d-mini) frame-mb-map)))) 1485 (let ((mb-frame (cdr (assq num frame-mb-map))))
1385 (unless (frame-live-p mb-frame) 1486 (unless (frame-live-p mb-frame)
1386 (error "Minibuffer frame %s not found" (cl-second d-mini))) 1487 (error "Minibuffer frame %s not found" num))
1387 (let ((mb-param (assq 'minibuffer frame-cfg)) 1488 (let ((mb-param (assq 'minibuffer frame-cfg))
1388 (mb-window (minibuffer-window mb-frame))) 1489 (mb-window (minibuffer-window mb-frame)))
1389 (unless (and (window-live-p mb-window) 1490 (unless (and (window-live-p mb-window)
@@ -1396,12 +1497,16 @@ being set (usually, by reading it from the desktop)."
1396 ;; restore the window config. 1497 ;; restore the window config.
1397 (setq frame (desktop--make-frame frame-cfg window-cfg)) 1498 (setq frame (desktop--make-frame frame-cfg window-cfg))
1398 ;; Set default-minibuffer if required. 1499 ;; Set default-minibuffer if required.
1399 (when (cl-third d-mini) (setq default-minibuffer-frame frame)) 1500 (when default (setq default-minibuffer-frame frame))
1400 ;; Store frame/NUM to assign to minibufferless frames. 1501 ;; Store NUM/frame to assign to minibufferless frames.
1401 (when num (push (cons num frame) frame-mb-map)))) 1502 (when hasmini (push (cons num frame) frame-mb-map))))
1402 (error 1503 (error
1403 (delay-warning 'desktop (error-message-string err) :error)))) 1504 (delay-warning 'desktop (error-message-string err) :error))))
1404 1505
1506 ;; In case we try to delete the initial frame, we want to make sure that
1507 ;; other frames are already visible (discussed in thread for bug#14841).
1508 (sit-for 0 t)
1509
1405 ;; Delete remaining frames, but do not fail if some resist being deleted. 1510 ;; Delete remaining frames, but do not fail if some resist being deleted.
1406 (unless (eq desktop-restoring-reuses-frames 'keep) 1511 (unless (eq desktop-restoring-reuses-frames 'keep)
1407 (dolist (frame desktop--reuse-list) 1512 (dolist (frame desktop--reuse-list)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index ddb632db692..0c432593909 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -331,9 +331,9 @@ See also the functions:
331;; Mark files with some extension. 331;; Mark files with some extension.
332(defun dired-mark-extension (extension &optional marker-char) 332(defun dired-mark-extension (extension &optional marker-char)
333 "Mark all files with a certain EXTENSION for use in later commands. 333 "Mark all files with a certain EXTENSION for use in later commands.
334A `.' is *not* automatically prepended to the string entered." 334A `.' is *not* automatically prepended to the string entered.
335 ;; EXTENSION may also be a list of extensions instead of a single one. 335EXTENSION may also be a list of extensions instead of a single one.
336 ;; Optional MARKER-CHAR is marker to use. 336Optional MARKER-CHAR is marker to use."
337 (interactive "sMarking extension: \nP") 337 (interactive "sMarking extension: \nP")
338 (or (listp extension) 338 (or (listp extension)
339 (setq extension (list extension))) 339 (setq extension (list extension)))
diff --git a/lisp/dired.el b/lisp/dired.el
index 2a7d9a297f0..c871761bb3c 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4367,7 +4367,7 @@ instead.
4367 4367
4368;;;*** 4368;;;***
4369 4369
4370;;;### (autoloads nil "dired-x" "dired-x.el" "9bfe6b761cb88b4d3ab78a7905979371") 4370;;;### (autoloads nil "dired-x" "dired-x.el" "1419d865898f84c17f172320e578380c")
4371;;; Generated autoloads from dired-x.el 4371;;; Generated autoloads from dired-x.el
4372 4372
4373(autoload 'dired-jump "dired-x" "\ 4373(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 0728e86d072..aee48eef668 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -102,22 +102,6 @@ The value used here is passed to `quit-restore-window'."
102This is to optimize `debugger-make-xrefs'.") 102This is to optimize `debugger-make-xrefs'.")
103 103
104(defvar debugger-outer-match-data) 104(defvar debugger-outer-match-data)
105(defvar debugger-outer-load-read-function)
106(defvar debugger-outer-overriding-local-map)
107(defvar debugger-outer-overriding-terminal-local-map)
108(defvar debugger-outer-track-mouse)
109(defvar debugger-outer-last-command)
110(defvar debugger-outer-this-command)
111(defvar debugger-outer-unread-command-events)
112(defvar debugger-outer-unread-post-input-method-events)
113(defvar debugger-outer-last-input-event)
114(defvar debugger-outer-last-command-event)
115(defvar debugger-outer-last-nonmenu-event)
116(defvar debugger-outer-last-event-frame)
117(defvar debugger-outer-standard-input)
118(defvar debugger-outer-standard-output)
119(defvar debugger-outer-inhibit-redisplay)
120(defvar debugger-outer-cursor-in-echo-area)
121(defvar debugger-will-be-back nil 105(defvar debugger-will-be-back nil
122 "Non-nil if we expect to get back in the debugger soon.") 106 "Non-nil if we expect to get back in the debugger soon.")
123 107
@@ -174,24 +158,6 @@ first will be printed into the backtrace buffer."
174 ;; Save the outer values of these vars for the `e' command 158 ;; Save the outer values of these vars for the `e' command
175 ;; before we replace the values. 159 ;; before we replace the values.
176 (debugger-outer-match-data (match-data)) 160 (debugger-outer-match-data (match-data))
177 (debugger-outer-load-read-function load-read-function)
178 (debugger-outer-overriding-local-map overriding-local-map)
179 (debugger-outer-overriding-terminal-local-map
180 overriding-terminal-local-map)
181 (debugger-outer-track-mouse track-mouse)
182 (debugger-outer-last-command last-command)
183 (debugger-outer-this-command this-command)
184 (debugger-outer-unread-command-events unread-command-events)
185 (debugger-outer-unread-post-input-method-events
186 unread-post-input-method-events)
187 (debugger-outer-last-input-event last-input-event)
188 (debugger-outer-last-command-event last-command-event)
189 (debugger-outer-last-nonmenu-event last-nonmenu-event)
190 (debugger-outer-last-event-frame last-event-frame)
191 (debugger-outer-standard-input standard-input)
192 (debugger-outer-standard-output standard-output)
193 (debugger-outer-inhibit-redisplay inhibit-redisplay)
194 (debugger-outer-cursor-in-echo-area cursor-in-echo-area)
195 (debugger-with-timeout-suspend (with-timeout-suspend))) 161 (debugger-with-timeout-suspend (with-timeout-suspend)))
196 ;; Set this instead of binding it, so that `q' 162 ;; Set this instead of binding it, so that `q'
197 ;; will not restore it. 163 ;; will not restore it.
@@ -294,26 +260,6 @@ first will be printed into the backtrace buffer."
294 (funcall (nth 0 debugger-previous-state)))))) 260 (funcall (nth 0 debugger-previous-state))))))
295 (with-timeout-unsuspend debugger-with-timeout-suspend) 261 (with-timeout-unsuspend debugger-with-timeout-suspend)
296 (set-match-data debugger-outer-match-data))) 262 (set-match-data debugger-outer-match-data)))
297 ;; Put into effect the modified values of these variables
298 ;; in case the user set them with the `e' command.
299 (setq load-read-function debugger-outer-load-read-function)
300 (setq overriding-local-map debugger-outer-overriding-local-map)
301 (setq overriding-terminal-local-map
302 debugger-outer-overriding-terminal-local-map)
303 (setq track-mouse debugger-outer-track-mouse)
304 (setq last-command debugger-outer-last-command)
305 (setq this-command debugger-outer-this-command)
306 (setq unread-command-events debugger-outer-unread-command-events)
307 (setq unread-post-input-method-events
308 debugger-outer-unread-post-input-method-events)
309 (setq last-input-event debugger-outer-last-input-event)
310 (setq last-command-event debugger-outer-last-command-event)
311 (setq last-nonmenu-event debugger-outer-last-nonmenu-event)
312 (setq last-event-frame debugger-outer-last-event-frame)
313 (setq standard-input debugger-outer-standard-input)
314 (setq standard-output debugger-outer-standard-output)
315 (setq inhibit-redisplay debugger-outer-inhibit-redisplay)
316 (setq cursor-in-echo-area debugger-outer-cursor-in-echo-area)
317 (setq debug-on-next-call debugger-step-after-exit) 263 (setq debug-on-next-call debugger-step-after-exit)
318 debugger-value))) 264 debugger-value)))
319 265
@@ -518,18 +464,21 @@ removes itself from that hook."
518 (setq debugger-jumping-flag nil) 464 (setq debugger-jumping-flag nil)
519 (remove-hook 'post-command-hook 'debugger-reenable)) 465 (remove-hook 'post-command-hook 'debugger-reenable))
520 466
521(defun debugger-frame-number () 467(defun debugger-frame-number (&optional skip-base)
522 "Return number of frames in backtrace before the one point points at." 468 "Return number of frames in backtrace before the one point points at."
523 (save-excursion 469 (save-excursion
524 (beginning-of-line) 470 (beginning-of-line)
471 (if (looking-at " *;;;\\|[a-z]")
472 (error "This line is not a function call"))
525 (let ((opoint (point)) 473 (let ((opoint (point))
526 (count 0)) 474 (count 0))
527 (while (not (eq (cadr (backtrace-frame count)) 'debug)) 475 (unless skip-base
528 (setq count (1+ count))) 476 (while (not (eq (cadr (backtrace-frame count)) 'debug))
529 ;; Skip debug--implement-debug-on-entry frame. 477 (setq count (1+ count)))
530 (when (eq 'debug--implement-debug-on-entry 478 ;; Skip debug--implement-debug-on-entry frame.
531 (cadr (backtrace-frame (1+ count)))) 479 (when (eq 'debug--implement-debug-on-entry
532 (setq count (+ 2 count))) 480 (cadr (backtrace-frame (1+ count))))
481 (setq count (+ 2 count))))
533 (goto-char (point-min)) 482 (goto-char (point-min))
534 (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):") 483 (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):")
535 (goto-char (match-end 0)) 484 (goto-char (match-end 0))
@@ -551,12 +500,8 @@ removes itself from that hook."
551 "Request entry to debugger when this frame exits. 500 "Request entry to debugger when this frame exits.
552Applies to the frame whose line point is on in the backtrace." 501Applies to the frame whose line point is on in the backtrace."
553 (interactive) 502 (interactive)
554 (save-excursion
555 (beginning-of-line)
556 (if (looking-at " *;;;\\|[a-z]")
557 (error "This line is not a function call")))
558 (beginning-of-line)
559 (backtrace-debug (debugger-frame-number) t) 503 (backtrace-debug (debugger-frame-number) t)
504 (beginning-of-line)
560 (if (= (following-char) ? ) 505 (if (= (following-char) ? )
561 (let ((inhibit-read-only t)) 506 (let ((inhibit-read-only t))
562 (delete-char 1) 507 (delete-char 1)
@@ -567,12 +512,8 @@ Applies to the frame whose line point is on in the backtrace."
567 "Do not enter debugger when this frame exits. 512 "Do not enter debugger when this frame exits.
568Applies to the frame whose line point is on in the backtrace." 513Applies to the frame whose line point is on in the backtrace."
569 (interactive) 514 (interactive)
570 (save-excursion
571 (beginning-of-line)
572 (if (looking-at " *;;;\\|[a-z]")
573 (error "This line is not a function call")))
574 (beginning-of-line)
575 (backtrace-debug (debugger-frame-number) nil) 515 (backtrace-debug (debugger-frame-number) nil)
516 (beginning-of-line)
576 (if (= (following-char) ?*) 517 (if (= (following-char) ?*)
577 (let ((inhibit-read-only t)) 518 (let ((inhibit-read-only t))
578 (delete-char 1) 519 (delete-char 1)
@@ -583,59 +524,33 @@ Applies to the frame whose line point is on in the backtrace."
583 "Run BODY in original environment." 524 "Run BODY in original environment."
584 (declare (indent 0)) 525 (declare (indent 0))
585 `(save-excursion 526 `(save-excursion
586 (if (null (buffer-name debugger-old-buffer)) 527 (if (null (buffer-live-p debugger-old-buffer))
587 ;; old buffer deleted 528 ;; old buffer deleted
588 (setq debugger-old-buffer (current-buffer))) 529 (setq debugger-old-buffer (current-buffer)))
589 (set-buffer debugger-old-buffer) 530 (set-buffer debugger-old-buffer)
590 (let ((load-read-function debugger-outer-load-read-function) 531 (set-match-data debugger-outer-match-data)
591 (overriding-terminal-local-map 532 (prog1
592 debugger-outer-overriding-terminal-local-map) 533 (progn ,@body)
593 (overriding-local-map debugger-outer-overriding-local-map) 534 (setq debugger-outer-match-data (match-data)))))
594 (track-mouse debugger-outer-track-mouse)
595 (last-command debugger-outer-last-command)
596 (this-command debugger-outer-this-command)
597 (unread-command-events debugger-outer-unread-command-events)
598 (unread-post-input-method-events
599 debugger-outer-unread-post-input-method-events)
600 (last-input-event debugger-outer-last-input-event)
601 (last-command-event debugger-outer-last-command-event)
602 (last-nonmenu-event debugger-outer-last-nonmenu-event)
603 (last-event-frame debugger-outer-last-event-frame)
604 (standard-input debugger-outer-standard-input)
605 (standard-output debugger-outer-standard-output)
606 (inhibit-redisplay debugger-outer-inhibit-redisplay)
607 (cursor-in-echo-area debugger-outer-cursor-in-echo-area))
608 (set-match-data debugger-outer-match-data)
609 (prog1
610 (progn ,@body)
611 (setq debugger-outer-match-data (match-data))
612 (setq debugger-outer-load-read-function load-read-function)
613 (setq debugger-outer-overriding-terminal-local-map
614 overriding-terminal-local-map)
615 (setq debugger-outer-overriding-local-map overriding-local-map)
616 (setq debugger-outer-track-mouse track-mouse)
617 (setq debugger-outer-last-command last-command)
618 (setq debugger-outer-this-command this-command)
619 (setq debugger-outer-unread-command-events unread-command-events)
620 (setq debugger-outer-unread-post-input-method-events
621 unread-post-input-method-events)
622 (setq debugger-outer-last-input-event last-input-event)
623 (setq debugger-outer-last-command-event last-command-event)
624 (setq debugger-outer-last-nonmenu-event last-nonmenu-event)
625 (setq debugger-outer-last-event-frame last-event-frame)
626 (setq debugger-outer-standard-input standard-input)
627 (setq debugger-outer-standard-output standard-output)
628 (setq debugger-outer-inhibit-redisplay inhibit-redisplay)
629 (setq debugger-outer-cursor-in-echo-area cursor-in-echo-area)
630 ))))
631 535
632(defun debugger-eval-expression (exp) 536(defun debugger-eval-expression (exp)
633 "Eval an expression, in an environment like that outside the debugger." 537 "Eval an expression, in an environment like that outside the debugger.
538The environment used is the one when entering the activation frame at point."
634 (interactive 539 (interactive
635 (list (read-from-minibuffer "Eval: " 540 (list (read-from-minibuffer "Eval: "
636 nil read-expression-map t 541 nil read-expression-map t
637 'read-expression-history))) 542 'read-expression-history)))
638 (debugger-env-macro (eval-expression exp))) 543 (let ((nframe (condition-case nil (1+ (debugger-frame-number 'skip-base))
544 (error 0))) ;; If on first line.
545 (base (if (eq 'debug--implement-debug-on-entry
546 (cadr (backtrace-frame 1 'debug)))
547 'debug--implement-debug-on-entry 'debug)))
548 (debugger-env-macro
549 (let ((val (backtrace-eval exp nframe base)))
550 (prog1
551 (prin1 val t)
552 (let ((str (eval-expression-print-format val)))
553 (if str (princ str t))))))))
639 554
640(defvar debugger-mode-map 555(defvar debugger-mode-map
641 (let ((map (make-keymap)) 556 (let ((map (make-keymap))
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 36c72f3a3bd..ae20e5270e1 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2088,8 +2088,6 @@ expressions; a `progn' form will be returned enclosing these forms."
2088(defvar edebug-coverage) ; the coverage results of each expression of function. 2088(defvar edebug-coverage) ; the coverage results of each expression of function.
2089 2089
2090(defvar edebug-buffer) ; which buffer the function is in. 2090(defvar edebug-buffer) ; which buffer the function is in.
2091(defvar edebug-outside-executing-macro)
2092(defvar edebug-outside-defining-kbd-macro)
2093 2091
2094(defvar edebug-execution-mode 'step) ; Current edebug mode set by user. 2092(defvar edebug-execution-mode 'step) ; Current edebug mode set by user.
2095(defvar edebug-next-execution-mode nil) ; Use once instead of initial mode. 2093(defvar edebug-next-execution-mode nil) ; Use once instead of initial mode.
@@ -2097,12 +2095,6 @@ expressions; a `progn' form will be returned enclosing these forms."
2097(defvar edebug-outside-debug-on-error) ; the value of debug-on-error outside 2095(defvar edebug-outside-debug-on-error) ; the value of debug-on-error outside
2098(defvar edebug-outside-debug-on-quit) ; the value of debug-on-quit outside 2096(defvar edebug-outside-debug-on-quit) ; the value of debug-on-quit outside
2099 2097
2100
2101(defvar edebug-outside-pre-command-hook)
2102(defvar edebug-outside-post-command-hook)
2103
2104(defvar cl-lexical-debug) ;; Defined in cl.el
2105
2106;;; Handling signals 2098;;; Handling signals
2107 2099
2108(defun edebug-signal (signal-name signal-data) 2100(defun edebug-signal (signal-name signal-data)
@@ -2154,10 +2146,7 @@ error is signaled again."
2154 ;; Binding these may not be the right thing to do. 2146 ;; Binding these may not be the right thing to do.
2155 ;; We want to allow the global values to be changed. 2147 ;; We want to allow the global values to be changed.
2156 (debug-on-error (or debug-on-error edebug-on-error)) 2148 (debug-on-error (or debug-on-error edebug-on-error))
2157 (debug-on-quit edebug-on-quit) 2149 (debug-on-quit edebug-on-quit))
2158
2159 ;; Lexical bindings must be uncompiled for this to work.
2160 (cl-lexical-debug t))
2161 (unwind-protect 2150 (unwind-protect
2162 (let ((signal-hook-function 'edebug-signal)) 2151 (let ((signal-hook-function 'edebug-signal))
2163 (setq edebug-execution-mode (or edebug-next-execution-mode 2152 (setq edebug-execution-mode (or edebug-next-execution-mode
@@ -2386,9 +2375,6 @@ MSG is printed after `::::} '."
2386(defvar edebug-window-data) ; window and window-start for current function 2375(defvar edebug-window-data) ; window and window-start for current function
2387(defvar edebug-outside-windows) ; outside window configuration 2376(defvar edebug-outside-windows) ; outside window configuration
2388(defvar edebug-eval-buffer) ; for the evaluation list. 2377(defvar edebug-eval-buffer) ; for the evaluation list.
2389(defvar edebug-outside-o-a-p) ; outside overlay-arrow-position
2390(defvar edebug-outside-o-a-s) ; outside overlay-arrow-string
2391(defvar edebug-outside-c-i-e-a) ; outside cursor-in-echo-area
2392(defvar edebug-outside-d-c-i-n-s-w) ; outside default-cursor-in-non-selected-windows 2378(defvar edebug-outside-d-c-i-n-s-w) ; outside default-cursor-in-non-selected-windows
2393 2379
2394(defvar edebug-eval-list nil) ;; List of expressions to evaluate. 2380(defvar edebug-eval-list nil) ;; List of expressions to evaluate.
@@ -2398,8 +2384,6 @@ MSG is printed after `::::} '."
2398;; Emacs 19 adds an arg to mark and mark-marker. 2384;; Emacs 19 adds an arg to mark and mark-marker.
2399(defalias 'edebug-mark-marker 'mark-marker) 2385(defalias 'edebug-mark-marker 'mark-marker)
2400 2386
2401(defvar edebug-outside-unread-command-events)
2402
2403(defun edebug--display (value offset-index arg-mode) 2387(defun edebug--display (value offset-index arg-mode)
2404 (unless (marker-position edebug-def-mark) 2388 (unless (marker-position edebug-def-mark)
2405 ;; The buffer holding the source has been killed. 2389 ;; The buffer holding the source has been killed.
@@ -2421,7 +2405,6 @@ MSG is printed after `::::} '."
2421 (edebug-outside-buffer (current-buffer)) 2405 (edebug-outside-buffer (current-buffer))
2422 (edebug-outside-point (point)) 2406 (edebug-outside-point (point))
2423 (edebug-outside-mark (edebug-mark)) 2407 (edebug-outside-mark (edebug-mark))
2424 (edebug-outside-unread-command-events unread-command-events)
2425 edebug-outside-windows ; Window or screen configuration. 2408 edebug-outside-windows ; Window or screen configuration.
2426 edebug-buffer-points 2409 edebug-buffer-points
2427 2410
@@ -2431,9 +2414,6 @@ MSG is printed after `::::} '."
2431 edebug-trace-window 2414 edebug-trace-window
2432 edebug-trace-window-start 2415 edebug-trace-window-start
2433 2416
2434 (edebug-outside-o-a-p overlay-arrow-position)
2435 (edebug-outside-o-a-s overlay-arrow-string)
2436 (edebug-outside-c-i-e-a cursor-in-echo-area)
2437 (edebug-outside-d-c-i-n-s-w 2417 (edebug-outside-d-c-i-n-s-w
2438 (default-value 'cursor-in-non-selected-windows))) 2418 (default-value 'cursor-in-non-selected-windows)))
2439 (unwind-protect 2419 (unwind-protect
@@ -2445,8 +2425,7 @@ MSG is printed after `::::} '."
2445 ) 2425 )
2446 (setq-default cursor-in-non-selected-windows t) 2426 (setq-default cursor-in-non-selected-windows t)
2447 (if (not (buffer-name edebug-buffer)) 2427 (if (not (buffer-name edebug-buffer))
2448 (let ((debug-on-error nil)) 2428 (user-error "Buffer defining %s not found" edebug-function))
2449 (error "Buffer defining %s not found" edebug-function)))
2450 2429
2451 (if (eq 'after arg-mode) 2430 (if (eq 'after arg-mode)
2452 ;; Compute result string now before windows are modified. 2431 ;; Compute result string now before windows are modified.
@@ -2486,10 +2465,9 @@ MSG is printed after `::::} '."
2486 ;; Check whether positions are up-to-date. 2465 ;; Check whether positions are up-to-date.
2487 ;; This assumes point is never before symbol. 2466 ;; This assumes point is never before symbol.
2488 (if (not (memq (following-char) '(?\( ?\# ?\` ))) 2467 (if (not (memq (following-char) '(?\( ?\# ?\` )))
2489 (let ((debug-on-error nil)) 2468 (user-error "Source has changed - reevaluate definition of %s"
2490 (error "Source has changed - reevaluate definition of %s" 2469 edebug-function)
2491 edebug-function) 2470 ))
2492 )))
2493 2471
2494 (setcdr edebug-window-data 2472 (setcdr edebug-window-data
2495 (edebug-adjust-window (cdr edebug-window-data))) 2473 (edebug-adjust-window (cdr edebug-window-data)))
@@ -2645,11 +2623,6 @@ MSG is printed after `::::} '."
2645 (if edebug-eval-buffer (kill-buffer edebug-eval-buffer)) 2623 (if edebug-eval-buffer (kill-buffer edebug-eval-buffer))
2646 (with-timeout-unsuspend edebug-with-timeout-suspend) 2624 (with-timeout-unsuspend edebug-with-timeout-suspend)
2647 ;; Reset global variables to outside values in case they were changed. 2625 ;; Reset global variables to outside values in case they were changed.
2648 (setq
2649 unread-command-events edebug-outside-unread-command-events
2650 overlay-arrow-position edebug-outside-o-a-p
2651 overlay-arrow-string edebug-outside-o-a-s
2652 cursor-in-echo-area edebug-outside-c-i-e-a)
2653 (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) 2626 (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w)
2654 ))) 2627 )))
2655 2628
@@ -2667,27 +2640,6 @@ MSG is printed after `::::} '."
2667(defvar edebug-inside-windows) 2640(defvar edebug-inside-windows)
2668(defvar edebug-interactive-p) 2641(defvar edebug-interactive-p)
2669 2642
2670(defvar edebug-outside-map)
2671(defvar edebug-outside-standard-output)
2672(defvar edebug-outside-standard-input)
2673(defvar edebug-outside-current-prefix-arg)
2674(defvar edebug-outside-last-command)
2675(defvar edebug-outside-this-command)
2676
2677;; Note: here we have defvars for variables that are
2678;; built-in in certain versions.
2679;; Each defvar makes a difference
2680;; in versions where the variable is *not* built-in.
2681
2682;; Emacs 18 FIXME
2683
2684;; Emacs 19.
2685(defvar edebug-outside-last-command-event)
2686(defvar edebug-outside-last-input-event)
2687(defvar edebug-outside-last-event-frame)
2688(defvar edebug-outside-last-nonmenu-event)
2689(defvar edebug-outside-track-mouse)
2690
2691(defun edebug--recursive-edit (arg-mode) 2643(defun edebug--recursive-edit (arg-mode)
2692 ;; Start up a recursive edit inside of edebug. 2644 ;; Start up a recursive edit inside of edebug.
2693 ;; The current buffer is the edebug-buffer, which is put into edebug-mode. 2645 ;; The current buffer is the edebug-buffer, which is put into edebug-mode.
@@ -2705,28 +2657,6 @@ MSG is printed after `::::} '."
2705 ;; The window configuration may be saved and restored 2657 ;; The window configuration may be saved and restored
2706 ;; during a recursive-edit 2658 ;; during a recursive-edit
2707 edebug-inside-windows 2659 edebug-inside-windows
2708
2709 ;; Save the outside value of executing macro. (here??)
2710 (edebug-outside-executing-macro executing-kbd-macro)
2711 (edebug-outside-pre-command-hook
2712 (edebug-var-status 'pre-command-hook))
2713 (edebug-outside-post-command-hook
2714 (edebug-var-status 'post-command-hook))
2715
2716 (edebug-outside-standard-output standard-output)
2717 (edebug-outside-standard-input standard-input)
2718 (edebug-outside-defining-kbd-macro defining-kbd-macro)
2719
2720 (edebug-outside-last-command last-command)
2721 (edebug-outside-this-command this-command)
2722
2723 (edebug-outside-current-prefix-arg current-prefix-arg)
2724
2725 (edebug-outside-last-input-event last-input-event)
2726 (edebug-outside-last-command-event last-command-event)
2727 (edebug-outside-last-event-frame last-event-frame)
2728 (edebug-outside-last-nonmenu-event last-nonmenu-event)
2729 (edebug-outside-track-mouse track-mouse)
2730 ) 2660 )
2731 2661
2732 (unwind-protect 2662 (unwind-protect
@@ -2757,7 +2687,7 @@ MSG is printed after `::::} '."
2757 (overriding-local-map nil) 2687 (overriding-local-map nil)
2758 (overriding-terminal-local-map nil) 2688 (overriding-terminal-local-map nil)
2759 2689
2760 ;; Bind again to outside values. 2690 ;; Bind again to outside values.
2761 (debug-on-error edebug-outside-debug-on-error) 2691 (debug-on-error edebug-outside-debug-on-error)
2762 (debug-on-quit edebug-outside-debug-on-quit) 2692 (debug-on-quit edebug-outside-debug-on-quit)
2763 2693
@@ -2805,27 +2735,7 @@ MSG is printed after `::::} '."
2805 ;; gotta have a buffer to let its buffer local variables be set 2735 ;; gotta have a buffer to let its buffer local variables be set
2806 (get-buffer-create " bogus edebug buffer")) 2736 (get-buffer-create " bogus edebug buffer"))
2807 ));; inner let 2737 ));; inner let
2808 2738 )))
2809 ;; Reset global vars to outside values, in case they have been changed.
2810 (setq
2811 last-command-event edebug-outside-last-command-event
2812 last-command edebug-outside-last-command
2813 this-command edebug-outside-this-command
2814 current-prefix-arg edebug-outside-current-prefix-arg
2815 last-input-event edebug-outside-last-input-event
2816 last-event-frame edebug-outside-last-event-frame
2817 last-nonmenu-event edebug-outside-last-nonmenu-event
2818 track-mouse edebug-outside-track-mouse
2819
2820 standard-output edebug-outside-standard-output
2821 standard-input edebug-outside-standard-input
2822 defining-kbd-macro edebug-outside-defining-kbd-macro)
2823
2824 (setq executing-kbd-macro edebug-outside-executing-macro)
2825 (edebug-restore-status
2826 'post-command-hook edebug-outside-post-command-hook)
2827 (edebug-restore-status
2828 'pre-command-hook edebug-outside-pre-command-hook))))
2829 2739
2830 2740
2831;;; Display related functions 2741;;; Display related functions
@@ -3423,6 +3333,9 @@ edebug-mode."
3423(defmacro edebug-outside-excursion (&rest body) 3333(defmacro edebug-outside-excursion (&rest body)
3424 "Evaluate an expression list in the outside context. 3334 "Evaluate an expression list in the outside context.
3425Return the result of the last expression." 3335Return the result of the last expression."
3336 ;; Only restores the non-variables context since all the variables let-bound
3337 ;; by Edebug will be properly reset to the appropriate context's value by
3338 ;; backtrace-eval.
3426 (declare (debug t)) 3339 (declare (debug t))
3427 `(save-excursion ; of current-buffer 3340 `(save-excursion ; of current-buffer
3428 (if edebug-save-windows 3341 (if edebug-save-windows
@@ -3435,89 +3348,32 @@ Return the result of the last expression."
3435 (edebug-set-windows edebug-outside-windows))) 3348 (edebug-set-windows edebug-outside-windows)))
3436 3349
3437 (set-buffer edebug-buffer) ; why? 3350 (set-buffer edebug-buffer) ; why?
3438 ;; (use-local-map edebug-outside-map)
3439 (set-match-data edebug-outside-match-data) 3351 (set-match-data edebug-outside-match-data)
3440 ;; Restore outside context. 3352 ;; Restore outside context.
3441 (let (;; (edebug-inside-map (current-local-map)) ;; restore map?? 3353 (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w)
3442 (last-command-event edebug-outside-last-command-event) 3354 (unwind-protect
3443 (last-command edebug-outside-last-command) 3355 (with-current-buffer edebug-outside-buffer ; of edebug-buffer
3444 (this-command edebug-outside-this-command) 3356 (goto-char edebug-outside-point)
3445 (unread-command-events edebug-outside-unread-command-events) 3357 (if (marker-buffer (edebug-mark-marker))
3446 (current-prefix-arg edebug-outside-current-prefix-arg) 3358 (set-marker (edebug-mark-marker) edebug-outside-mark))
3447 (last-input-event edebug-outside-last-input-event) 3359 ,@body)
3448 (last-event-frame edebug-outside-last-event-frame) 3360
3449 (last-nonmenu-event edebug-outside-last-nonmenu-event) 3361 ;; Back to edebug-buffer. Restore rest of inside context.
3450 (track-mouse edebug-outside-track-mouse) 3362 ;; (use-local-map edebug-inside-map)
3451 (standard-output edebug-outside-standard-output) 3363 (if edebug-save-windows
3452 (standard-input edebug-outside-standard-input) 3364 ;; Restore inside windows.
3453 3365 (edebug-set-windows edebug-inside-windows))
3454 (executing-kbd-macro edebug-outside-executing-macro) 3366
3455 (defining-kbd-macro edebug-outside-defining-kbd-macro) 3367 ;; Save values that may have been changed.
3456 ;; Get the values out of the saved statuses. 3368 (setq edebug-outside-d-c-i-n-s-w
3457 (pre-command-hook (cdr edebug-outside-pre-command-hook)) 3369 (default-value 'cursor-in-non-selected-windows))
3458 (post-command-hook (cdr edebug-outside-post-command-hook)) 3370
3459 3371 ;; Restore the outside saved values; don't alter
3460 ;; See edebug-display. 3372 ;; the outside binding loci.
3461 (overlay-arrow-position edebug-outside-o-a-p) 3373 (setq-default cursor-in-non-selected-windows t))))
3462 (overlay-arrow-string edebug-outside-o-a-s)
3463 (cursor-in-echo-area edebug-outside-c-i-e-a)
3464 )
3465 (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w)
3466 (unwind-protect
3467 (with-current-buffer edebug-outside-buffer ; of edebug-buffer
3468 (goto-char edebug-outside-point)
3469 (if (marker-buffer (edebug-mark-marker))
3470 (set-marker (edebug-mark-marker) edebug-outside-mark))
3471 ,@body)
3472
3473 ;; Back to edebug-buffer. Restore rest of inside context.
3474 ;; (use-local-map edebug-inside-map)
3475 (if edebug-save-windows
3476 ;; Restore inside windows.
3477 (edebug-set-windows edebug-inside-windows))
3478
3479 ;; Save values that may have been changed.
3480 (setq
3481 edebug-outside-last-command-event last-command-event
3482 edebug-outside-last-command last-command
3483 edebug-outside-this-command this-command
3484 edebug-outside-unread-command-events unread-command-events
3485 edebug-outside-current-prefix-arg current-prefix-arg
3486 edebug-outside-last-input-event last-input-event
3487 edebug-outside-last-event-frame last-event-frame
3488 edebug-outside-last-nonmenu-event last-nonmenu-event
3489 edebug-outside-track-mouse track-mouse
3490 edebug-outside-standard-output standard-output
3491 edebug-outside-standard-input standard-input
3492
3493 edebug-outside-executing-macro executing-kbd-macro
3494 edebug-outside-defining-kbd-macro defining-kbd-macro
3495
3496 edebug-outside-o-a-p overlay-arrow-position
3497 edebug-outside-o-a-s overlay-arrow-string
3498 edebug-outside-c-i-e-a cursor-in-echo-area
3499 edebug-outside-d-c-i-n-s-w (default-value
3500 'cursor-in-non-selected-windows)
3501 )
3502
3503 ;; Restore the outside saved values; don't alter
3504 ;; the outside binding loci.
3505 (setcdr edebug-outside-pre-command-hook pre-command-hook)
3506 (setcdr edebug-outside-post-command-hook post-command-hook)
3507
3508 (setq-default cursor-in-non-selected-windows t)
3509 )) ; let
3510 ))
3511
3512(defvar cl-debug-env) ; defined in cl; non-nil when lexical env used.
3513 3374
3514(defun edebug-eval (expr) 3375(defun edebug-eval (expr)
3515 ;; Are there cl lexical variables active? 3376 (backtrace-eval expr 0 'edebug-after))
3516 (eval (if (and (bound-and-true-p cl-debug-env)
3517 (fboundp 'cl-macroexpand-all))
3518 (cl-macroexpand-all expr cl-debug-env)
3519 expr)
3520 lexical-binding))
3521 3377
3522(defun edebug-safe-eval (expr) 3378(defun edebug-safe-eval (expr)
3523 ;; Evaluate EXPR safely. 3379 ;; Evaluate EXPR safely.
@@ -4268,7 +4124,7 @@ With prefix argument, make it a temporary breakpoint."
4268 (eq (nth 1 (nth 1 frame1)) '()) 4124 (eq (nth 1 (nth 1 frame1)) '())
4269 (eq (nth 1 frame2) 'edebug-enter)) 4125 (eq (nth 1 frame2) 'edebug-enter))
4270 ;; `edebug-enter' calls itself on its first invocation. 4126 ;; `edebug-enter' calls itself on its first invocation.
4271 (if (eq (nth 1 (internal--called-interactively-p--get-frame i)) 4127 (if (eq (nth 1 (backtrace-frame i 'called-interactively-p))
4272 'edebug-enter) 4128 'edebug-enter)
4273 2 1))) 4129 2 1)))
4274 4130
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index 8b149aad7bb..edcfc409085 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -425,7 +425,7 @@ of the piece of advice."
425 (get-next-frame 425 (get-next-frame
426 (lambda () 426 (lambda ()
427 (setq frame1 frame2) 427 (setq frame1 frame2)
428 (setq frame2 (internal--called-interactively-p--get-frame i)) 428 (setq frame2 (backtrace-frame i #'called-interactively-p))
429 ;; (message "Advice Frame %d = %S" i frame2) 429 ;; (message "Advice Frame %d = %S" i frame2)
430 (setq i (1+ i))))) 430 (setq i (1+ i)))))
431 (when (and (eq (nth 1 frame2) 'apply) 431 (when (and (eq (nth 1 frame2) 'apply)
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el
index 6ba29d3748f..896fc2a954e 100644
--- a/lisp/epa-mail.el
+++ b/lisp/epa-mail.el
@@ -109,94 +109,127 @@ If no one is selected, default secret key is used. "
109 (if verbose 109 (if verbose
110 (epa--read-signature-type) 110 (epa--read-signature-type)
111 'clear))))) 111 'clear)))))
112 (epa-sign-region start end signers mode)) 112 (let ((inhibit-read-only t))
113 (epa-sign-region start end signers mode)))
114
115(defun epa-mail-default-recipients ()
116 "Return the default list of encryption recipients for a mail buffer."
117 (let ((config (epg-configuration))
118 recipients-string real-recipients)
119 (save-excursion
120 (goto-char (point-min))
121 (save-restriction
122 (narrow-to-region (point)
123 (if (search-forward mail-header-separator nil 0)
124 (match-beginning 0)
125 (point)))
126 (setq recipients-string
127 (mapconcat #'identity
128 (nconc (mail-fetch-field "to" nil nil t)
129 (mail-fetch-field "cc" nil nil t)
130 (mail-fetch-field "bcc" nil nil t))
131 ","))
132 (setq recipients-string
133 (mail-strip-quoted-names
134 (with-temp-buffer
135 (insert "to: " recipients-string "\n")
136 (expand-mail-aliases (point-min) (point-max))
137 (car (mail-fetch-field "to" nil nil t))))))
138
139 (setq real-recipients
140 (split-string recipients-string "," t "[ \t\n]*"))
141
142 ;; Process all the recipients thru the list of GnuPG groups.
143 ;; Expand GnuPG group names to what they stand for.
144 (setq real-recipients
145 (apply #'nconc
146 (mapcar
147 (lambda (recipient)
148 (or (epg-expand-group config recipient)
149 (list recipient)))
150 real-recipients)))
151
152 ;; Process all the recipients thru the user's list
153 ;; of encryption aliases.
154 (setq real-recipients
155 (apply #'nconc
156 (mapcar
157 (lambda (recipient)
158 (let ((tem (assoc recipient epa-mail-aliases)))
159 (if tem (cdr tem)
160 (list recipient))))
161 real-recipients)))
162 )))
113 163
114;;;###autoload 164;;;###autoload
115(defun epa-mail-encrypt (start end recipients sign signers) 165(defun epa-mail-encrypt (&optional recipients signers)
116 "Encrypt the current buffer. 166 "Encrypt the outgoing mail message in the current buffer.
117The buffer is expected to contain a mail message. 167Takes the recipients from the text in the header in the buffer
168and translates them through `epa-mail-aliases'.
169With prefix argument, asks you to select among them interactively
170and also whether and how to sign.
118 171
119Don't use this command in Lisp programs!" 172Called from Lisp, the optional argument RECIPIENTS is a list
173of recipient addresses, t to perform symmetric encryption,
174or nil meaning use the defaults.
175
176SIGNERS is a list of keys to sign the message with."
120 (interactive 177 (interactive
121 (save-excursion 178 (let ((verbose current-prefix-arg)
122 (let ((verbose current-prefix-arg) 179 (context (epg-make-context epa-protocol)))
123 (config (epg-configuration)) 180 (list (if verbose
124 (context (epg-make-context epa-protocol)) 181 (or (epa-select-keys
125 recipients-string recipients recipient-key sign) 182 context
126 (goto-char (point-min)) 183 "Select recipients for encryption.
127 (save-restriction
128 (narrow-to-region (point)
129 (if (search-forward mail-header-separator nil 0)
130 (match-beginning 0)
131 (point)))
132 (setq recipients-string
133 (mapconcat #'identity
134 (nconc (mail-fetch-field "to" nil nil t)
135 (mail-fetch-field "cc" nil nil t)
136 (mail-fetch-field "bcc" nil nil t))
137 ","))
138 (setq recipients
139 (mail-strip-quoted-names
140 (with-temp-buffer
141 (insert "to: " recipients-string "\n")
142 (expand-mail-aliases (point-min) (point-max))
143 (car (mail-fetch-field "to" nil nil t))))))
144 (if recipients
145 (setq recipients (delete ""
146 (split-string recipients
147 "[ \t\n]*,[ \t\n]*"))))
148
149 ;; Process all the recipients thru the list of GnuPG groups.
150 ;; Expand GnuPG group names to what they stand for.
151 (setq recipients
152 (apply #'nconc
153 (mapcar
154 (lambda (recipient)
155 (or (epg-expand-group config recipient)
156 (list recipient)))
157 recipients)))
158
159 (goto-char (point-min))
160 (if (search-forward mail-header-separator nil t)
161 (forward-line))
162 (setq epa-last-coding-system-specified
163 (or coding-system-for-write
164 (epa--select-safe-coding-system (point) (point-max))))
165 (list (point) (point-max)
166 (if verbose
167 (epa-select-keys
168 context
169 "Select recipients for encryption.
170If no one is selected, symmetric encryption will be performed. " 184If no one is selected, symmetric encryption will be performed. "
171 recipients) 185 (epa-mail-default-recipients))
172 (if recipients 186 t))
187 (and verbose (y-or-n-p "Sign? ")
188 (epa-select-keys context
189 "Select keys for signing. ")))))
190 (let (start recipient-keys default-recipients)
191 (save-excursion
192 (setq recipient-keys
193 (cond ((eq recipients t)
194 nil)
195 (recipients recipients)
196 (t
197 (setq default-recipients
198 (epa-mail-default-recipients))
199 ;; Convert recipients to keys.
173 (apply 200 (apply
174 'nconc 201 'nconc
175 (mapcar 202 (mapcar
176 (lambda (recipient) 203 (lambda (recipient)
177 (setq recipient-key 204 (let ((recipient-key
178 (epa-mail--find-usable-key 205 (epa-mail--find-usable-key
179 (epg-list-keys 206 (epg-list-keys
180 (epg-make-context epa-protocol) 207 (epg-make-context epa-protocol)
181 (if (string-match "@" recipient) 208 (if (string-match "@" recipient)
182 (concat "<" recipient ">") 209 (concat "<" recipient ">")
183 recipient)) 210 recipient))
184 'encrypt)) 211 'encrypt)))
185 (unless (or recipient-key 212 (unless (or recipient-key
186 (y-or-n-p 213 (y-or-n-p
187 (format 214 (format
188 "No public key for %s; skip it? " 215 "No public key for %s; skip it? "
189 recipient))) 216 recipient)))
190 (error "No public key for %s" recipient)) 217 (error "No public key for %s" recipient))
191 (if recipient-key (list recipient-key))) 218 (if recipient-key (list recipient-key))))
192 recipients)))) 219 default-recipients)))))
193 (setq sign (if verbose (y-or-n-p "Sign? "))) 220
194 (if sign 221 (goto-char (point-min))
195 (epa-select-keys context 222 (if (search-forward mail-header-separator nil t)
196 "Select keys for signing. ")))))) 223 (forward-line))
197 ;; Don't let some read-only text stop us from encrypting. 224 (setq start (point))
198 (let ((inhibit-read-only t)) 225
199 (epa-encrypt-region start end recipients sign signers))) 226 (setq epa-last-coding-system-specified
227 (or coding-system-for-write
228 (epa--select-safe-coding-system (point) (point-max)))))
229
230 ;; Don't let some read-only text stop us from encrypting.
231 (let ((inhibit-read-only t))
232 (epa-encrypt-region start (point-max) recipient-keys signers signers))))
200 233
201;;;###autoload 234;;;###autoload
202(defun epa-mail-import-keys () 235(defun epa-mail-import-keys ()
diff --git a/lisp/epa.el b/lisp/epa.el
index 68e7a18fe17..a99fb9230e1 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -48,6 +48,18 @@
48 :version "23.1" 48 :version "23.1"
49 :group 'epa) 49 :group 'epa)
50 50
51(defcustom epa-mail-aliases nil
52 "Alist of aliases of email addresses that stand for encryption keys.
53Each element is (ALIAS EXPANSIONS...).
54It means that when a message is addressed to ALIAS,
55instead of encrypting it for ALIAS, encrypt it for EXPANSIONS...
56If EXPANSIONS is empty, ignore ALIAS as regards encryption.
57That is a handy way to avoid warnings about addresses
58that you don't have any key for."
59 :type '(repeat (cons (string :tag "Alias") (repeat '(string :tag "Expansion"))))
60 :group 'epa
61 :version "24.4")
62
51(defface epa-validity-high 63(defface epa-validity-high
52 '((default :weight bold) 64 '((default :weight bold)
53 (((class color) (background dark)) :foreground "PaleTurquoise")) 65 (((class color) (background dark)) :foreground "PaleTurquoise"))
diff --git a/lisp/frame.el b/lisp/frame.el
index 71e7cc10de2..22cf484e54a 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -317,6 +317,9 @@ there (in decreasing order of priority)."
317 t)) 317 t))
318 ;; Create the new frame. 318 ;; Create the new frame.
319 (let (parms new) 319 (let (parms new)
320 ;; MS-Windows needs this to avoid inflooping below.
321 (if (eq system-type 'windows-nt)
322 (sit-for 0 t))
320 ;; If the frame isn't visible yet, wait till it is. 323 ;; If the frame isn't visible yet, wait till it is.
321 ;; If the user has to position the window, 324 ;; If the user has to position the window,
322 ;; Emacs doesn't know its real position until 325 ;; Emacs doesn't know its real position until
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5d3de61aa91..c32853a2a9f 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,13 @@
12013-07-26 Tassilo Horn <tsdh@gnu.org>
2
3 * gnus-sum.el (gnus-sort-threads-recursively): New defcustom.
4 (gnus-sort-threads): Use it.
5
62013-07-25 Andreas Schwab <schwab@linux-m68k.org>
7
8 * gnus-art.el (gnus-button-url-regexp): Make it match url in which
9 punctuation characters follow parentheses (bug#14950).
10
12013-07-23 Katsumi Yamaoka <yamaoka@jpl.org> 112013-07-23 Katsumi Yamaoka <yamaoka@jpl.org>
2 12
3 * gnus.el (gnus-continuum-version): 13 * gnus.el (gnus-continuum-version):
@@ -1892,7 +1902,7 @@
1892 1902
1893 * nnmail.el (mail-send-and-exit): Silence the byte compiler. 1903 * nnmail.el (mail-send-and-exit): Silence the byte compiler.
1894 1904
18952012-06-26 Peter Munster <pmrb@free.fr> 19052012-06-26 Peter Münster <pmrb@free.fr>
1896 1906
1897 * gnus-demon.el (gnus-demon-timers): Now a plist (function -> timer). 1907 * gnus-demon.el (gnus-demon-timers): Now a plist (function -> timer).
1898 (gnus-demon-cancel): Ditto. 1908 (gnus-demon-cancel): Ditto.
@@ -2119,7 +2129,7 @@
2119 (spam-check-BBDB): Use it. 2129 (spam-check-BBDB): Use it.
2120 (spam-enter-ham-BBDB): Use it. 2130 (spam-enter-ham-BBDB): Use it.
2121 2131
21222012-06-26 Peter Munster <pmrb@free.fr> (tiny change) 21322012-06-26 Peter Münster <pmrb@free.fr> (tiny change)
2123 2133
2124 * gnus-group.el (gnus-group-get-new-news): 2134 * gnus-group.el (gnus-group-get-new-news):
2125 New parameter `one-level' for scanning exactly one level. 2135 New parameter `one-level' for scanning exactly one level.
@@ -8482,7 +8492,7 @@
8482 * nnimap.el (nnimap-request-group): Low higher than high to signal no 8492 * nnimap.el (nnimap-request-group): Low higher than high to signal no
8483 messages in empty groups. 8493 messages in empty groups.
8484 8494
84852010-10-01 Ted Zlatanov <tzz@lifelogs.com> 84952010-10-01 Teodor Zlatanov <tzz@lifelogs.com>
8486 8496
8487 * nnimap.el (nnimap-request-group): Don't bug out when there's an empty 8497 * nnimap.el (nnimap-request-group): Don't bug out when there's an empty
8488 non-UIDNEXT group. 8498 non-UIDNEXT group.
@@ -8623,7 +8633,7 @@
8623 * nndraft.el (nndraft-request-expire-articles): Use the group name 8633 * nndraft.el (nndraft-request-expire-articles): Use the group name
8624 instead if "nndraft". Fix found by Nils Ackermann. 8634 instead if "nndraft". Fix found by Nils Ackermann.
8625 8635
86262010-09-29 Ludovic Courtes <ludo@gnu.org> 86362010-09-29 Ludovic Courtès <ludo@gnu.org>
8627 8637
8628 * nnregistry.el: Add. 8638 * nnregistry.el: Add.
8629 8639
diff --git a/lisp/gnus/ChangeLog.1 b/lisp/gnus/ChangeLog.1
index 9043a23361e..9a71bc35b41 100644
--- a/lisp/gnus/ChangeLog.1
+++ b/lisp/gnus/ChangeLog.1
@@ -340,7 +340,7 @@
340 340
341 * nnmail.el (nnmail-spool-file): Allow lists of files. 341 * nnmail.el (nnmail-spool-file): Allow lists of files.
342 342
3431998-08-20 Per Starback <starback@update.uu.se> 3431998-08-20 Per Starbäck <starback@update.uu.se>
344 344
345 * gnus/gnus-start.el (gnus-check-first-time-used): Change current 345 * gnus/gnus-start.el (gnus-check-first-time-used): Change current
346 buffer before creating help group. 346 buffer before creating help group.
diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2
index 4ddd622ce9a..df223bd332b 100644
--- a/lisp/gnus/ChangeLog.2
+++ b/lisp/gnus/ChangeLog.2
@@ -210,7 +210,7 @@
210 * mml1991.el (mml1991-pgg-encrypt): Decode according to CTE before 210 * mml1991.el (mml1991-pgg-encrypt): Decode according to CTE before
211 encrypting. 211 encrypting.
212 212
2132003-12-28 Ivan Boldyrev <boldyrev@uiggm.nsc.ru> (tiny change). 2132003-12-28 Ivan Boldyrev <boldyrev@uiggm.nsc.ru> (tiny change)
214 214
215 * mml1991.el (mml1991-pgg-sign): Use unibyte when re-encoding. 215 * mml1991.el (mml1991-pgg-sign): Use unibyte when re-encoding.
216 216
@@ -4490,7 +4490,7 @@
4490 4490
4491 * gnus-start.el (gnus-backup-startup-file): Fixed custom type. 4491 * gnus-start.el (gnus-backup-startup-file): Fixed custom type.
4492 4492
44932003-02-24 Ted Zlatanov <tzz@lifelogs.com> 44932003-02-24 Teodor Zlatanov <tzz@lifelogs.com>
4494 4494
4495 * spam.el: Disabled spam-get-article-as-filename. 4495 * spam.el: Disabled spam-get-article-as-filename.
4496 4496
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 31a108a3c98..e65b9fb99e4 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7177,15 +7177,17 @@ groups."
7177 "\\(?:" 7177 "\\(?:"
7178 ;; Match paired parentheses, e.g. in Wikipedia URLs: 7178 ;; Match paired parentheses, e.g. in Wikipedia URLs:
7179 ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com 7179 ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
7180 "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]*" 7180 "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)"
7181 "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?"
7181 "\\|" 7182 "\\|"
7182 "[" chars punct "]+" "[" chars "]" 7183 "[" chars punct "]+" "[" chars "]"
7183 "\\)")) 7184 "\\)"))
7184 (concat ;; XEmacs 21.4 doesn't support POSIX. 7185 (concat ;; XEmacs 21.4 doesn't support POSIX.
7185 "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+" 7186 "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
7186 "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)")) 7187 "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
7187 "\\)") 7188 "\\)")
7188 "Regular expression that matches URLs." 7189 "Regular expression that matches URLs."
7190 :version "24.4"
7189 :group 'gnus-article-buttons 7191 :group 'gnus-article-buttons
7190 :type 'regexp) 7192 :type 'regexp)
7191 7193
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index f3918b0a215..15cbb5a45e6 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -847,6 +847,13 @@ controls how articles are sorted."
847 (function :tag "other")) 847 (function :tag "other"))
848 (boolean :tag "Reverse order")))) 848 (boolean :tag "Reverse order"))))
849 849
850(defcustom gnus-sort-threads-recursively t
851 "If non-nil, `gnus-thread-sort-functions' are applied recursively.
852Setting this to nil allows sorting high-score, recent,
853etc. threads to the top of the summary buffer while still
854retaining chronological old to new sorting order inside threads."
855 :group 'gnus-summary-sort
856 :type 'boolean)
850 857
851(defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number) 858(defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number)
852 "*List of functions used for sorting threads in the summary buffer. 859 "*List of functions used for sorting threads in the summary buffer.
@@ -4876,9 +4883,11 @@ If LINE, insert the rebuilt thread starting on line LINE."
4876 (gnus-message 8 "Sorting threads...") 4883 (gnus-message 8 "Sorting threads...")
4877 (prog1 4884 (prog1
4878 (condition-case nil 4885 (condition-case nil
4879 (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000))) 4886 (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000))
4880 (gnus-sort-threads-recursive 4887 (sort-func (gnus-make-sort-function gnus-thread-sort-functions)))
4881 threads (gnus-make-sort-function gnus-thread-sort-functions))) 4888 (if gnus-sort-threads-recursively
4889 (gnus-sort-threads-recursive threads sort-func)
4890 (sort threads sort-func)))
4882 ;; Even after binding max-lisp-eval-depth, the recursive 4891 ;; Even after binding max-lisp-eval-depth, the recursive
4883 ;; sorter might fail for very long threads. In that case, 4892 ;; sorter might fail for very long threads. In that case,
4884 ;; try using a (less well-tested) non-recursive sorter. 4893 ;; try using a (less well-tested) non-recursive sorter.
diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1
index e57911947b1..f90d88ee0de 100644
--- a/lisp/mh-e/ChangeLog.1
+++ b/lisp/mh-e/ChangeLog.1
@@ -1403,11 +1403,11 @@
1403 (mh-x-image-url-display): Don't display image if the URL looks 1403 (mh-x-image-url-display): Don't display image if the URL looks
1404 malformed. 1404 malformed.
1405 1405
14062003-10-04 Mark D Baushke <mdb@gnu.org> 14062003-10-04 Mark D. Baushke <mdb@gnu.org>
1407 1407
1408 * mh-comp.el (mh-letter-menu): Simplify menu heading. 1408 * mh-comp.el (mh-letter-menu): Simplify menu heading.
1409 1409
14102003-10-03 Mark D Baushke <mdb@gnu.org> 14102003-10-03 Mark D. Baushke <mdb@gnu.org>
1411 1411
1412 * mh-mime.el (mh-mml-query-cryptographic-method): Avoid 1412 * mh-mime.el (mh-mml-query-cryptographic-method): Avoid
1413 revisionist history and still provide a good default. 1413 revisionist history and still provide a good default.
@@ -3877,7 +3877,7 @@
3877 runs checkdoc and lm-verify which is useful before releasing the 3877 runs checkdoc and lm-verify which is useful before releasing the
3878 software. It can and should be expanded to do real unit tests. 3878 software. It can and should be expanded to do real unit tests.
3879 3879
38802003-04-22 Mark D Baushke <mdb@gnu.org> 38802003-04-22 Mark D. Baushke <mdb@gnu.org>
3881 3881
3882 * mh-alias.el: Update Copyright. 3882 * mh-alias.el: Update Copyright.
3883 * mh-comp.el: Ditto. 3883 * mh-comp.el: Ditto.
@@ -6106,7 +6106,7 @@
6106 explicitly stated. 6106 explicitly stated.
6107 (mh-visit-folder): Really fix it this time. 6107 (mh-visit-folder): Really fix it this time.
6108 6108
61092003-01-01 Mark D Baushke <mdb@gnu.org> 61092003-01-01 Mark D. Baushke <mdb@gnu.org>
6110 6110
6111 * mh-alias.el (mh-alias-from-has-no-alias-p): Needs the 6111 * mh-alias.el (mh-alias-from-has-no-alias-p): Needs the
6112 mh-autoload comment or mh-customize may have problems finding the 6112 mh-autoload comment or mh-customize may have problems finding the
@@ -6854,7 +6854,7 @@
6854 * Makefile: Moved .PHONY rule after all rule for compatibility 6854 * Makefile: Moved .PHONY rule after all rule for compatibility
6855 with BSD/OS's old pmake. 6855 with BSD/OS's old pmake.
6856 6856
68572002-12-03 Mark D Baushke <mdb@gnu.org> 68572002-12-03 Mark D. Baushke <mdb@gnu.org>
6858 6858
6859 * mh-e.el (mh-get-new-mail): Simplify no-new-mail test. 6859 * mh-e.el (mh-get-new-mail): Simplify no-new-mail test.
6860 (mh-add-cur-notation): Remove unnecessary function. 6860 (mh-add-cur-notation): Remove unnecessary function.
@@ -6878,7 +6878,7 @@
6878 number of scan lines is fewer than mh-large-folders (closes SF 6878 number of scan lines is fewer than mh-large-folders (closes SF
6879 #646794). 6879 #646794).
6880 6880
68812002-12-02 Mark D Baushke <mdb@gnu.org> 68812002-12-02 Mark D. Baushke <mdb@gnu.org>
6882 6882
6883 * mh-e.el (mh-add-cur-notation): New function to mark the 6883 * mh-e.el (mh-add-cur-notation): New function to mark the
6884 current message with the mh-note-cur character. 6884 current message with the mh-note-cur character.
@@ -8312,7 +8312,7 @@
8312 variable as new-file-flag. 8312 variable as new-file-flag.
8313 This addresses part of SF #627015. 8313 This addresses part of SF #627015.
8314 8314
83152002-10-24 Mark D Baushke <mdb@gnu.org> 83152002-10-24 Mark D. Baushke <mdb@gnu.org>
8316 8316
8317 * mh-comp.el (mh-forward): Fix mh-mml-compose-insert-p reference 8317 * mh-comp.el (mh-forward): Fix mh-mml-compose-insert-p reference
8318 in last commit to be mh-mml-compose-insert-flag. 8318 in last commit to be mh-mml-compose-insert-flag.
@@ -8581,7 +8581,7 @@
8581 8581
8582 * mh-comp.el (mh-mml-to-mime autoload): Ditto. 8582 * mh-comp.el (mh-mml-to-mime autoload): Ditto.
8583 8583
85842002-10-21 Mark D Baushke <mdb@gnu.org> 85842002-10-21 Mark D. Baushke <mdb@gnu.org>
8585 8585
8586 * mh-mime.el (smiley-region): Use load for a non-fatal dependency 8586 * mh-mime.el (smiley-region): Use load for a non-fatal dependency
8587 on the smiley library. 8587 on the smiley library.
@@ -8735,7 +8735,7 @@
8735 prompted for the number of messages to display, you got an error. 8735 prompted for the number of messages to display, you got an error.
8736 This has been fixed. 8736 This has been fixed.
8737 8737
87382002-10-19 Mark D Baushke <mdb@gnu.org> 87382002-10-19 Mark D. Baushke <mdb@gnu.org>
8739 8739
8740 * mh-e.el (mh-last-destination-folder): Destination of last refile 8740 * mh-e.el (mh-last-destination-folder): Destination of last refile
8741 command. 8741 command.
@@ -8777,7 +8777,7 @@
8777 macro mh-compat-write-file-hook to use write-file-functions for 8777 macro mh-compat-write-file-hook to use write-file-functions for
8778 Emacs 21.4 and local-write-file-hooks for older versions. 8778 Emacs 21.4 and local-write-file-hooks for older versions.
8779 8779
87802002-10-18 Mark D Baushke <mdb@gnu.org> 87802002-10-18 Mark D. Baushke <mdb@gnu.org>
8781 8781
8782 * mh-utils.el (mh-invisible-headers): Add more anti-spam headers. 8782 * mh-utils.el (mh-invisible-headers): Add more anti-spam headers.
8783 8783
@@ -9079,7 +9079,7 @@
9079 (mh-remove-xemacs-horizontal-scrollbar): New macro to avoid 9079 (mh-remove-xemacs-horizontal-scrollbar): New macro to avoid
9080 compiler-warnings. 9080 compiler-warnings.
9081 9081
90822002-10-10 Mark D Baushke <mdb@gnu.org> 90822002-10-10 Mark D. Baushke <mdb@gnu.org>
9083 9083
9084 * Makefile (EMACS_OPTIONS): New macro for command-line compile 9084 * Makefile (EMACS_OPTIONS): New macro for command-line compile
9085 options. 9085 options.
@@ -9088,13 +9088,13 @@
9088 (COMPILE_COMMAND): Combine the compile command with its options. 9088 (COMPILE_COMMAND): Combine the compile command with its options.
9089 (.el.elc): Use the new $(COMPILE_COMMAND). 9089 (.el.elc): Use the new $(COMPILE_COMMAND).
9090 9090
90912002-10-10 Mark D Baushke <mdb@gnu.org> 90912002-10-10 Mark D. Baushke <mdb@gnu.org>
9092 9092
9093 * mh-speed.el (mh-speed-select-attached-frame): Define a new 9093 * mh-speed.el (mh-speed-select-attached-frame): Define a new
9094 compatibility macro for getting to the attached-frame. 9094 compatibility macro for getting to the attached-frame.
9095 (mh-speed-update-current-folder): Use it. 9095 (mh-speed-update-current-folder): Use it.
9096 9096
90972002-10-10 Mark D Baushke <mdb@gnu.org> 90972002-10-10 Mark D. Baushke <mdb@gnu.org>
9098 9098
9099 * mh-speed.el (mh-speed-update-current-folder): Use 9099 * mh-speed.el (mh-speed-update-current-folder): Use
9100 'dframe-select-attached-frame if we are in a newer speedbar 9100 'dframe-select-attached-frame if we are in a newer speedbar
@@ -9452,7 +9452,7 @@
9452 present in the load-path. 9452 present in the load-path.
9453 * mh-mime.el (mh-require): Don't use it anymore. 9453 * mh-mime.el (mh-require): Don't use it anymore.
9454 9454
94552002-07-15 Mark D Baushke <mdb@gnu.org> 94552002-07-15 Mark D. Baushke <mdb@gnu.org>
9456 9456
9457 * mh-utils.el (mh-update-scan-format): Rewrite for compatibility 9457 * mh-utils.el (mh-update-scan-format): Rewrite for compatibility
9458 with XEmacs as replace-match appears not to have identical 9458 with XEmacs as replace-match appears not to have identical
@@ -9531,7 +9531,7 @@
9531 9531
9532 * mh-mime.el (mm-destroy-parts): Add definition for old emacs. 9532 * mh-mime.el (mm-destroy-parts): Add definition for old emacs.
9533 9533
95342002-06-30 Mark D Baushke <mdb@gnu.org> 95342002-06-30 Mark D. Baushke <mdb@gnu.org>
9535 9535
9536 * mh-utils.el (mh-update-scan-format): Add documentation string. 9536 * mh-utils.el (mh-update-scan-format): Add documentation string.
9537 (mh-scan-msg-format-regexp): Update the regexp to find %(msg). 9537 (mh-scan-msg-format-regexp): Update the regexp to find %(msg).
@@ -9574,7 +9574,7 @@
9574 * mh-index.el (mh-count-windows): This function works around the 9574 * mh-index.el (mh-count-windows): This function works around the
9575 lack of the window-list builtin function in emacs20. 9575 lack of the window-list builtin function in emacs20.
9576 9576
95772002-06-29 Mark D Baushke <mdb@gnu.org> 95772002-06-29 Mark D. Baushke <mdb@gnu.org>
9578 9578
9579 * mh-utils.el (mh-message-number-width): New function to scan 9579 * mh-utils.el (mh-message-number-width): New function to scan
9580 the last message of a folder and return its width. 9580 the last message of a folder and return its width.
@@ -9625,7 +9625,7 @@
9625 * mh-mime.el (gnus-newsgroup-name): Initialize it to nil, so that 9625 * mh-mime.el (gnus-newsgroup-name): Initialize it to nil, so that
9626 mm-uu-dissect doesn't cause error. 9626 mm-uu-dissect doesn't cause error.
9627 9627
96282002-06-27 Mark D Baushke <mdb@gnu.org> 96282002-06-27 Mark D. Baushke <mdb@gnu.org>
9629 9629
9630 * mh-utils.el (mh-cmd-note): Make buffer-local. Changes to this 9630 * mh-utils.el (mh-cmd-note): Make buffer-local. Changes to this
9631 variable should be made via the new mh-set-default-cmd-note 9631 variable should be made via the new mh-set-default-cmd-note
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c92eacd4473..441849fd2af 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2248,7 +2248,10 @@ The method used must be an out-of-band method."
2248 spec (format-spec-make 2248 spec (format-spec-make
2249 ?t (tramp-get-connection-property 2249 ?t (tramp-get-connection-property
2250 (tramp-get-connection-process v) "temp-file" "")) 2250 (tramp-get-connection-process v) "temp-file" ""))
2251 options (format-spec tramp-ssh-controlmaster-options spec) 2251 options (format-spec
2252 (if tramp-use-ssh-controlmaster-options
2253 tramp-ssh-controlmaster-options "")
2254 spec)
2252 spec (format-spec-make 2255 spec (format-spec-make
2253 ?h host ?u user ?p port ?c options 2256 ?h host ?u user ?p port ?c options
2254 ?k (if keep-date " " "")) 2257 ?k (if keep-date " " ""))
@@ -4416,7 +4419,8 @@ connection if a previous connection has died for some reason."
4416 (let* ((target-alist (tramp-compute-multi-hops vec)) 4419 (let* ((target-alist (tramp-compute-multi-hops vec))
4417 ;; We will apply `tramp-ssh-controlmaster-options' 4420 ;; We will apply `tramp-ssh-controlmaster-options'
4418 ;; only for the first hop. 4421 ;; only for the first hop.
4419 (options tramp-ssh-controlmaster-options) 4422 (options (if tramp-use-ssh-controlmaster-options
4423 tramp-ssh-controlmaster-options ""))
4420 (process-connection-type tramp-process-connection-type) 4424 (process-connection-type tramp-process-connection-type)
4421 (process-adaptive-read-buffering nil) 4425 (process-adaptive-read-buffering nil)
4422 (coding-system-for-read nil) 4426 (coding-system-for-read nil)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index db6a1e381a6..48e13004c36 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -305,6 +305,14 @@ useful only in combination with `tramp-default-proxies-alist'.")
305 "Call ssh to detect whether it supports the Control* arguments. 305 "Call ssh to detect whether it supports the Control* arguments.
306Return a string to be used in `tramp-methods'.") 306Return a string to be used in `tramp-methods'.")
307 307
308;;;###tramp-autoload
309(defcustom tramp-use-ssh-controlmaster-options
310 (not (zerop (length tramp-ssh-controlmaster-options)))
311 "Whether to use `tramp-ssh-controlmaster-options'."
312 :group 'tramp
313 :version "24.4"
314 :type 'boolean)
315
308(defcustom tramp-default-method 316(defcustom tramp-default-method
309 ;; An external copy method seems to be preferred, because it performs 317 ;; An external copy method seems to be preferred, because it performs
310 ;; much better for large files, and it hasn't too serious delays 318 ;; much better for large files, and it hasn't too serious delays
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 16097c1c0b2..019fa8a358d 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -3983,7 +3983,7 @@
3983 (org-export-latex-tables-tend): New options. 3983 (org-export-latex-tables-tend): New options.
3984 (org-export-latex-tables): Use the new options. 3984 (org-export-latex-tables): Use the new options.
3985 3985
39862012-09-30 tumashu <tumashu@gmail.com> (tiny change) 39862012-09-30 Feng Shu <tumashu@gmail.com> (tiny change)
3987 3987
3988 * org-exp.el (org-export-language-setup): Add simplified chinese 3988 * org-exp.el (org-export-language-setup): Add simplified chinese
3989 translation. 3989 translation.
@@ -9437,7 +9437,7 @@
9437 (org-update-checkbox-count-maybe): Add an optional argument passed to 9437 (org-update-checkbox-count-maybe): Add an optional argument passed to
9438 org-update-checkbox-count. 9438 org-update-checkbox-count.
9439 9439
94402011-07-28 Ted Zlatanov <tzz@lifelogs.com> 94402011-07-28 Teodor Zlatanov <tzz@lifelogs.com>
9441 9441
9442 * org.el (org-fontify-meta-lines-and-blocks): Ignore errors. 9442 * org.el (org-fontify-meta-lines-and-blocks): Ignore errors.
9443 9443
@@ -18000,7 +18000,7 @@
18000 * org-habit.el (org-habit-build-graph): Help-echo date when 18000 * org-habit.el (org-habit-build-graph): Help-echo date when
18001 mouse is over stars. 18001 mouse is over stars.
18002 18002
180032010-07-19 Jan Böker <jan.boecker@jboecker.de> 180032010-07-19 Jan Böcker <jan.boecker@jboecker.de>
18004 18004
18005 * org.el (org-file-apps): Improve docstring to reflect 18005 * org.el (org-file-apps): Improve docstring to reflect
18006 grouping matches. 18006 grouping matches.
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index a3bd000a4f3..c2ff5011a0e 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1135,9 +1135,13 @@ comment at the start of cc-engine.el for more info."
1135 (not (memq sym '(boundary ignore nil)))) 1135 (not (memq sym '(boundary ignore nil))))
1136 ;; Need to investigate closer whether we've crossed 1136 ;; Need to investigate closer whether we've crossed
1137 ;; between a substatement and its containing statement. 1137 ;; between a substatement and its containing statement.
1138 (if (setq saved (if (looking-at c-block-stmt-1-key) 1138 (if (setq saved
1139 ptok 1139 (cond ((and (looking-at c-block-stmt-1-2-key)
1140 pptok)) 1140 (eq (char-after ptok) ?\())
1141 pptok)
1142 ((looking-at c-block-stmt-1-key)
1143 ptok)
1144 (t pptok)))
1141 (cond ((> start saved) (setq pos saved)) 1145 (cond ((> start saved) (setq pos saved))
1142 ((= start saved) (setq ret 'up))))) 1146 ((= start saved) (setq ret 'up)))))
1143 1147
@@ -7988,7 +7992,8 @@ comment at the start of cc-engine.el for more info."
7988 (or (looking-at c-block-stmt-1-key) 7992 (or (looking-at c-block-stmt-1-key)
7989 (and (eq (char-after) ?\() 7993 (and (eq (char-after) ?\()
7990 (zerop (c-backward-token-2 1 t lim)) 7994 (zerop (c-backward-token-2 1 t lim))
7991 (looking-at c-block-stmt-2-key))) 7995 (or (looking-at c-block-stmt-2-key)
7996 (looking-at c-block-stmt-1-2-key))))
7992 (point)))) 7997 (point))))
7993 7998
7994(defun c-after-special-operator-id (&optional lim) 7999(defun c-after-special-operator-id (&optional lim)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 6a4bfd9e875..4e8ce6bac28 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1307,7 +1307,8 @@ casts and declarations are fontified. Used on level 2 and higher."
1307 (goto-char match-pos) 1307 (goto-char match-pos)
1308 (backward-char) 1308 (backward-char)
1309 (c-backward-token-2) 1309 (c-backward-token-2)
1310 (looking-at c-block-stmt-2-key))) 1310 (or (looking-at c-block-stmt-2-key)
1311 (looking-at c-block-stmt-1-2-key))))
1311 (setq context nil 1312 (setq context nil
1312 c-restricted-<>-arglists t)) 1313 c-restricted-<>-arglists t))
1313 ;; Near BOB. 1314 ;; Near BOB.
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index af52ad53aad..2c0a1317b04 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2187,6 +2187,18 @@ identifiers that follows the type in a normal declaration."
2187 t (c-make-keywords-re t (c-lang-const c-block-stmt-1-kwds))) 2187 t (c-make-keywords-re t (c-lang-const c-block-stmt-1-kwds)))
2188(c-lang-defvar c-block-stmt-1-key (c-lang-const c-block-stmt-1-key)) 2188(c-lang-defvar c-block-stmt-1-key (c-lang-const c-block-stmt-1-key))
2189 2189
2190(c-lang-defconst c-block-stmt-1-2-kwds
2191 "Statement keywords optionally followed by a paren sexp.
2192Keywords here should also be in `c-block-stmt-1-kwds'."
2193 t nil
2194 java '("try"))
2195
2196(c-lang-defconst c-block-stmt-1-2-key
2197 ;; Regexp matching the start of a statement which may be followed by a
2198 ;; paren sexp and will then be followed by a substatement.
2199 t (c-make-keywords-re t (c-lang-const c-block-stmt-1-2-kwds)))
2200(c-lang-defvar c-block-stmt-1-2-key (c-lang-const c-block-stmt-1-2-key))
2201
2190(c-lang-defconst c-block-stmt-2-kwds 2202(c-lang-defconst c-block-stmt-2-kwds
2191 "Statement keywords followed by a paren sexp and then by a substatement." 2203 "Statement keywords followed by a paren sexp and then by a substatement."
2192 t '("for" "if" "switch" "while") 2204 t '("for" "if" "switch" "while")
@@ -2938,7 +2950,8 @@ identifier or one of the keywords on `c-<>-type-kwds' or
2938`c-<>-arglist-kwds'. If there's an identifier before then the whole 2950`c-<>-arglist-kwds'. If there's an identifier before then the whole
2939expression is considered to be a type." 2951expression is considered to be a type."
2940 t (or (consp (c-lang-const c-<>-type-kwds)) 2952 t (or (consp (c-lang-const c-<>-type-kwds))
2941 (consp (c-lang-const c-<>-arglist-kwds)))) 2953 (consp (c-lang-const c-<>-arglist-kwds)))
2954 java t)
2942(c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists)) 2955(c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists))
2943 2956
2944(c-lang-defconst c-enums-contain-decls 2957(c-lang-defconst c-enums-contain-decls
diff --git a/lisp/simple.el b/lisp/simple.el
index 4b158d31f36..1fb2fa6014c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3141,14 +3141,17 @@ Also, delete any process that is exited or signaled."
3141 (display-buffer (button-get button 'process-buffer))) 3141 (display-buffer (button-get button 'process-buffer)))
3142 3142
3143(defun list-processes (&optional query-only buffer) 3143(defun list-processes (&optional query-only buffer)
3144 "Display a list of all processes. 3144 "Display a list of all processes that are Emacs sub-processes.
3145If optional argument QUERY-ONLY is non-nil, only processes with 3145If optional argument QUERY-ONLY is non-nil, only processes with
3146the query-on-exit flag set are listed. 3146the query-on-exit flag set are listed.
3147Any process listed as exited or signaled is actually eliminated 3147Any process listed as exited or signaled is actually eliminated
3148after the listing is made. 3148after the listing is made.
3149Optional argument BUFFER specifies a buffer to use, instead of 3149Optional argument BUFFER specifies a buffer to use, instead of
3150\"*Process List*\". 3150\"*Process List*\".
3151The return value is always nil." 3151The return value is always nil.
3152
3153This function lists only processes that were launched by Emacs. To
3154see other processes running on the system, use `list-system-processes'."
3152 (interactive) 3155 (interactive)
3153 (or (fboundp 'process-list) 3156 (or (fboundp 'process-list)
3154 (error "Asynchronous subprocesses are not supported on this system")) 3157 (error "Asynchronous subprocesses are not supported on this system"))
@@ -5530,8 +5533,7 @@ Mode' for details."
5530 (visual-line-mode 1)) 5533 (visual-line-mode 1))
5531 5534
5532(define-globalized-minor-mode global-visual-line-mode 5535(define-globalized-minor-mode global-visual-line-mode
5533 visual-line-mode turn-on-visual-line-mode 5536 visual-line-mode turn-on-visual-line-mode)
5534 :lighter " vl")
5535 5537
5536 5538
5537(defun transpose-chars (arg) 5539(defun transpose-chars (arg)
diff --git a/lisp/subr.el b/lisp/subr.el
index 7130639dbe5..3b85a9bedb0 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4191,22 +4191,6 @@ I is the index of the frame after FRAME2. It should return nil
4191if those frames don't seem special and otherwise, it should return 4191if those frames don't seem special and otherwise, it should return
4192the number of frames to skip (minus 1).") 4192the number of frames to skip (minus 1).")
4193 4193
4194(defmacro internal--called-interactively-p--get-frame (n)
4195 ;; `sym' will hold a global variable, which will be used kind of like C's
4196 ;; "static" variables.
4197 (let ((sym (make-symbol "base-index")))
4198 `(progn
4199 (defvar ,sym)
4200 (unless (boundp ',sym)
4201 (let ((i 1))
4202 (while (not (eq (indirect-function (nth 1 (backtrace-frame i)) t)
4203 (indirect-function 'called-interactively-p)))
4204 (setq i (1+ i)))
4205 (setq ,sym i)))
4206 ;; (unless (eq (nth 1 (backtrace-frame ,sym)) 'called-interactively-p)
4207 ;; (error "called-interactively-p: %s is out-of-sync!" ,sym))
4208 (backtrace-frame (+ ,sym ,n)))))
4209
4210(defun called-interactively-p (&optional kind) 4194(defun called-interactively-p (&optional kind)
4211 "Return t if the containing function was called by `call-interactively'. 4195 "Return t if the containing function was called by `call-interactively'.
4212If KIND is `interactive', then only return t if the call was made 4196If KIND is `interactive', then only return t if the call was made
@@ -4241,7 +4225,7 @@ command is called from a keyboard macro?"
4241 (get-next-frame 4225 (get-next-frame
4242 (lambda () 4226 (lambda ()
4243 (setq frame nextframe) 4227 (setq frame nextframe)
4244 (setq nextframe (internal--called-interactively-p--get-frame i)) 4228 (setq nextframe (backtrace-frame i 'called-interactively-p))
4245 ;; (message "Frame %d = %S" i nextframe) 4229 ;; (message "Frame %d = %S" i nextframe)
4246 (setq i (1+ i))))) 4230 (setq i (1+ i)))))
4247 (funcall get-next-frame) ;; Get the first frame. 4231 (funcall get-next-frame) ;; Get the first frame.
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 4920e85c351..6f03cba1f75 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -237,9 +237,11 @@ See `run-hooks'."
237 ;; VC commands 237 ;; VC commands
238 (define-key map "v" 'vc-next-action) ;; C-x v v 238 (define-key map "v" 'vc-next-action) ;; C-x v v
239 (define-key map "=" 'vc-diff) ;; C-x v = 239 (define-key map "=" 'vc-diff) ;; C-x v =
240 (define-key map "D" 'vc-root-diff) ;; C-x v D
240 (define-key map "i" 'vc-register) ;; C-x v i 241 (define-key map "i" 'vc-register) ;; C-x v i
241 (define-key map "+" 'vc-update) ;; C-x v + 242 (define-key map "+" 'vc-update) ;; C-x v +
242 (define-key map "l" 'vc-print-log) ;; C-x v l 243 (define-key map "l" 'vc-print-log) ;; C-x v l
244 (define-key map "L" 'vc-print-root-log) ;; C-x v L
243 ;; More confusing than helpful, probably 245 ;; More confusing than helpful, probably
244 ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark. 246 ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark.
245 ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer 247 ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer
diff --git a/lisp/window.el b/lisp/window.el
index a2acd2a81b0..86d93c0a9f6 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5470,6 +5470,9 @@ argument, ACTION is t."
5470 (let ((buffer (if (bufferp buffer-or-name) 5470 (let ((buffer (if (bufferp buffer-or-name)
5471 buffer-or-name 5471 buffer-or-name
5472 (get-buffer buffer-or-name))) 5472 (get-buffer buffer-or-name)))
5473 ;; Make sure that when we split windows the old window keeps
5474 ;; point, bug#14829.
5475 (split-window-keep-point t)
5473 ;; Handle the old form of the first argument. 5476 ;; Handle the old form of the first argument.
5474 (inhibit-same-window (and action (not (listp action))))) 5477 (inhibit-same-window (and action (not (listp action)))))
5475 (unless (listp action) (setq action nil)) 5478 (unless (listp action) (setq action nil))