aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-10-06 09:50:54 -0400
committerStefan Monnier2017-10-06 09:50:54 -0400
commit11f9cb522fed9aa6552f6315340ca7352661a1e8 (patch)
tree39facc48471c67b321c045e47d70ef030adbea44
parent92045f4546b9708dc9f69954799d211c1f56ff1e (diff)
parent9655937da4a339300c624addd97674c038a01bc9 (diff)
downloademacs-11f9cb522fed9aa6552f6315340ca7352661a1e8.tar.gz
emacs-11f9cb522fed9aa6552f6315340ca7352661a1e8.zip
Merge emacs-26
-rw-r--r--ChangeLog.328971
-rw-r--r--INSTALL6
-rw-r--r--Makefile.in2
-rw-r--r--admin/authors.el27
-rw-r--r--configure.ac36
-rw-r--r--doc/lispref/strings.texi10
-rw-r--r--doc/misc/flymake.texi550
-rw-r--r--doc/misc/org.texi19
-rw-r--r--etc/NEWS.2614
-rw-r--r--etc/PROBLEMS13
-rw-r--r--etc/refcards/orgcard.tex2
-rw-r--r--lisp/emacs-lisp/bytecomp.el22
-rw-r--r--lisp/emacs-lisp/checkdoc.el19
-rw-r--r--lisp/emacs-lisp/cl-print.el2
-rw-r--r--lisp/emacs-lisp/generator.el3
-rw-r--r--lisp/emacs-lisp/tabulated-list.el11
-rw-r--r--lisp/gnus/ChangeLog.314
-rw-r--r--lisp/ldefs-boot.el115
-rw-r--r--lisp/net/shr.el27
-rw-r--r--lisp/net/tramp-adb.el25
-rw-r--r--lisp/net/tramp-gvfs.el56
-rw-r--r--lisp/net/tramp-sh.el47
-rw-r--r--lisp/net/tramp-smb.el48
-rw-r--r--lisp/net/tramp.el20
-rw-r--r--lisp/org/ob-hledger.el2
-rw-r--r--lisp/org/ob-lob.el14
-rw-r--r--lisp/org/org-clock.el1
-rw-r--r--lisp/org/org-colview.el3
-rw-r--r--lisp/org/org-table.el8
-rw-r--r--lisp/org/org-version.el4
-rw-r--r--lisp/org/org.el28
-rw-r--r--lisp/org/ox-html.el23
-rw-r--r--lisp/org/ox-publish.el4
-rw-r--r--lisp/progmodes/cc-engine.el54
-rw-r--r--lisp/progmodes/cc-langs.el5
-rw-r--r--lisp/progmodes/cc-mode.el4
-rw-r--r--lisp/progmodes/elisp-mode.el171
-rw-r--r--lisp/progmodes/flymake-proc.el1177
-rw-r--r--lisp/progmodes/flymake-ui.el634
-rw-r--r--lisp/progmodes/flymake.el960
-rw-r--r--lisp/progmodes/python.el6
-rw-r--r--lisp/ses.el3
-rw-r--r--lisp/time.el31
-rw-r--r--lisp/xt-mouse.el6
-rw-r--r--src/callint.c4
-rw-r--r--src/dbusbind.c3
-rw-r--r--src/editfns.c28
-rw-r--r--src/frame.c2
-rw-r--r--src/gtkutil.c17
-rw-r--r--src/keyboard.c14
-rw-r--r--src/lisp.h40
-rw-r--r--src/sysdep.c13
-rw-r--r--src/thread.c16
-rw-r--r--src/thread.h7
-rw-r--r--src/xdisp.c4
-rw-r--r--src/xrdb.c7
-rw-r--r--test/lisp/emacs-lisp/generator-tests.el10
-rw-r--r--test/lisp/net/tramp-tests.el29
-rw-r--r--test/lisp/progmodes/flymake-resources/Makefile4
-rw-r--r--test/lisp/progmodes/flymake-resources/errors-and-warnings.c13
-rw-r--r--test/lisp/progmodes/flymake-resources/no-problems.h1
-rw-r--r--test/lisp/progmodes/flymake-resources/some-problems.h5
-rw-r--r--test/lisp/progmodes/flymake-tests.el297
63 files changed, 31492 insertions, 2219 deletions
diff --git a/ChangeLog.3 b/ChangeLog.3
index fb24476a0b4..33d04f74ec5 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -1,3 +1,28147 @@
12017-10-05 Nicolas Petton <nicolas@petton.fr>
2
3 Update authors.el
4
5 * admin/authors.el (authors-renamed-files-alist)
6 (authors-valid-file-names): Additions.
7
82017-10-05 Gemini Lasswell <gazally@runbox.com>
9
10 Fix dynamic binding wrapper in iter-lambda (bug#25965)
11
12 * lisp/emacs-lisp/generator.el (cps--make-dynamic-binding-wrapper):
13 Remove extra evaluation of form.
14 * test/lisp/emacs-lisp/generator-tests.el
15 (cps-iter-lambda-with-dynamic-binding): New test.
16
172017-10-05 Rasmus <rasmus@gmx.us>
18
19 Update Org to v9.1.2
20
21 Please note this is a bugfix release. See etc/ORG-NEWS for details.
22
232017-10-05 Alan Mackenzie <acm@muc.de>
24
25 Fix irregularities with CC Mode fontification, particularly with "known types"
26
27 * lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Introduce a new
28 optional parameter, template-class. In "class <X = Y>", fontify "Y" as a
29 type.
30 (c-font-lock-single-decl): New variable template-class, set to non-nil when we
31 have a construct like the above. Pass this as argument to
32 c-font-lock-declarators.
33 (c-font-lock-cut-off-declarators): Check more rigorously that a declaration
34 being processed starts before the function's starting position.
35 (c-complex-decl-matchers): Remove the redundant clause which fontified "types
36 preceded by, e.g., "struct"".
37
38 * lisp/progmodes/cc-langs.el (c-template-typename-kwds)
39 (c-template-typename-key): New lang defconsts and defvar.
40
412017-10-05 Eli Zaretskii <eliz@gnu.org>
42
43 Fix breakage due to recent change in tabulated-list-print-entry
44
45 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-printer):
46 Update the doc string.
47 (tabulated-list-print-entry): Revert to using only 2 arguments.
48 Update the doc string.
49 (tabulated-list-entry-lnum-width): New defvar.
50 (tabulated-list-print): Compute the width of line-number display
51 once, then store that value in tabulated-list-entry-lnum-width,
52 for tabulated-list-printer to use. (Bug#28704)
53
542017-10-05 Gemini Lasswell <gazally@runbox.com>
55
56 * lisp/ses.el (ses-print-cell): Fix alignment of text cells. (Bug#27653)
57
582017-10-05 Alexander Gramiak <agrambot@gmail.com>
59
60 Set xterm click count to 1 even with no last click
61
62 * lisp/xt-mouse.el (xterm-mouse-event): Move the check for
63 the last click so that click-count is initialized properly.
64 Handle the value of t for double-click-time.
65 (Bug#28658)
66
672017-10-05 Vasilij Schneidermann <mail@vasilij.de>
68
69 Support indirection for all shr-tag-* calls
70
71 The 'shr-external-rendering-functions' variable was previously only
72 honored in the shr-descend function, now all direct calls to the
73 shr-tag-* functions have been replaced by a call to
74 'shr-indirect-call' which tries using an alternative rendering
75 function first.
76
77 * lisp/net/shr.el (shr-indirect-call): New helper function.
78 (shr-descend, shr-tag-object, shr-tag-video):
79 (shr-collect-extra-strings-in-table): Fix callers to call via
80 shr-indirect-call. (Bug#28402)
81
822017-10-05 Eli Zaretskii <eliz@gnu.org>
83
84 Speed up list-packages when 'visual' line numbers are displayed
85
86 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-printer):
87 Update the doc string.
88 (tabulated-list-print-entry): Accept an additional optional
89 argument INDENT. Update the doc string.
90 (tabulated-list-print): Compute the width of line-number display
91 once, then call tabulated-list-printer with that value as 3rd
92 argument. (Bug#28704)
93
942017-10-05 João Távora <joaotavora@gmail.com>
95
96 Misc. minor adjustments to Flymake
97
98 - Add a half-decent minor-mode menu;
99 - Fix "waiting for backends" mode line message;
100 - Adjust the flymake-diag-region API;
101 - Autoload the flymake-log macro;
102 - Auto-disable the legacy backend in more situations;
103 - Fix a couple of warnings in legacy backend.
104
105 * lisp/progmodes/flymake-proc.el
106 (flymake-proc--diagnostics-for-pattern): Use new
107 flymake-diag-region.
108
109 * lisp/progmodes/flymake-proc.el
110 (flymake-proc-legacy-flymake): Do error when no
111 buffer-file-name or not writable.
112 (flymake-proc-legacy-flymake)
113 (flymake-proc-simple-cleanup): Don't reference flymake-last-change-time
114
115 * lisp/progmodes/flymake.el (flymake-diag-region):
116 Autoload. Take buffer as first argument.
117
118 * lisp/progmodes/flymake.el (flymake-switch-to-log-buffer):
119 New command.
120 (flymake-menu): Add a simple menu.
121 (flymake--mode-line-format): Use menu. Fix message. Switch to
122 log buffer when clicking exceptional warnings.
123
1242017-10-05 Johan Bockgård <bojohan@gnu.org>
125
126 Fix search for ~/.Xdefaults-HOSTNAME
127
128 * src/xrdb.c (get_environ_db): Fix typo when handling
129 ~/.Xdefaults-HOSTNAME (Bug#28708).
130
1312017-10-04 Paul Eggert <eggert@cs.ucla.edu>
132
133 Speed up (format "%s" STRING) and the like
134
135 Although the Lisp manual said that ‘format’ returns a
136 newly-allocated string, this was not true for a few cases like
137 (format "%s" ""), and fixing the documentation to allow reuse of
138 arguments lets us improve performance in common cases like
139 (format "foo") and (format "%s" "foo") (Bug#28625).
140 * doc/lispref/strings.texi (Formatting Strings):
141 * etc/NEWS:
142 Say that the result of ‘format’ might not be newly allocated.
143 * src/callint.c (Fcall_interactively):
144 * src/dbusbind.c (XD_OBJECT_TO_STRING):
145 * src/editfns.c (Fmessage, Fmessage_box):
146 * src/xdisp.c (vadd_to_log, Ftrace_to_stderr):
147 Just use Fformat or Fformat_message, as that’s simpler and no
148 longer makes unnecessary copies.
149 * src/editfns.c (styled_format): Remove last argument, as it
150 is no longer needed: all callers now want it to behave as if it
151 were true. All remaining callers changed. Make this function
152 static again. Simplify the function now that we no longer
153 need to worry about whether the optimization is allowed.
154
1552017-10-04 Alan Mackenzie <acm@muc.de>
156
157 Fontify untyped function declarations in C Mode correctly.
158
159 Also correct two bugs where deleting WS at a BOL could leave an untyped
160 function declaration unfontified.
161
162 * lisp/progmodes/cc-engine.el (c-find-decl-spots): Don't set the flag
163 "top-level" when we're in a macro.
164 (c-forward-decl-or-cast-1): Recognize top-level "foo(bar)" or "foo()" in C
165 Mode as a implicitly typed function declaration.
166 (c-just-after-func-arglist-p): Don't get confused by "defined (foo)" inside a
167 macro. It's not a function plus arglist.
168
169 * lisp/progmodes/cc-langs.el (c-cpp-expr-functions-key): New defconst and
170 defvar.
171
172 * lisp/progmodes/cc-mode.el (c-fl-decl-end): After c-forward-declarator, move
173 over any following parenthesis expression (i.e. parameter list).
174 (c-change-expand-fl-region): When c-new-END is at a BOL, include that line in
175 the returned region, to cope with deletions at column 0.
176
1772017-10-04 Michael Albinus <michael.albinus@gmx.de>
178
179 * lisp/net/tramp.el (tramp-tramp-file-p): Use `string-match-p'.
180
181 Reported by Clément Pit-Claudel <cpitclaudel@gmail.com>.
182
1832017-10-04 Eli Zaretskii <eliz@gnu.org>
184
185 Avoid crashes on C-g when several threads wait for input
186
187 * src/thread.h (m_getcjmp): New member of 'struct thread_state'.
188 (getcjmp): Define to current thread's 'm_getcjmp'.
189 * src/thread.c (maybe_reacquire_global_lock): Switch to main
190 thread, since this is called from a SIGINT handler, which always
191 runs in the context of the main thread.
192 * src/lisp.h (sys_jmp_buf, sys_setjmp, sys_longjmp): Move the
193 definitions before thread.h is included, as thread.h now uses
194 sys_jmp_buf.
195 * src/keyboard.c (getcjmp): Remove declaration.
196 (read_char): Don't call maybe_reacquire_global_lock here.
197 (handle_interrupt): Call maybe_reacquire_global_lock here, if
198 invoked from the SIGINT handler, to make sure
199 quit_throw_to_read_char runs with main thread's Lisp bindings and
200 uses the main thread's jmp_buf buffer. (Bug#28630)
201
2022017-10-04 Paul Eggert <eggert@cs.ucla.edu>
203
204 Warn if --without-pop is now the default
205
206 * configure.ac (with_pop): Set to no-by-default if defaulting to "no".
207 Warn about the change if defaulting to "no". Update URLs.
208
2092017-10-04 Paul Eggert <eggert@cs.ucla.edu>
210
211 --with-pop is now the default only on MS-Windows
212
213 Problem reported by N. Jackson (Bug#28597).
214 This improves an earlier suggestion by Robert Pluim (Bug#28597#47).
215 * INSTALL, configure.ac, etc/NEWS:
216 Make --with-pop the default only on native MS-Windows.
217
2182017-10-03 Michael Albinus <michael.albinus@gmx.de>
219
220 Add support for `file-system-info' in Tramp
221
222 * lisp/net/tramp.el (tramp-file-name-for-operation):
223 Add `file-system-info'.
224
225 * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info): New defun.
226 (tramp-adb-file-name-handler-alist): Use it.
227
228 * lisp/net/tramp-gvfs.el (tramp-gvfs-file-system-attributes)
229 (tramp-gvfs-file-system-attributes-regexp): New defconst.
230 (tramp-gvfs-handle-file-system-info): New defun.
231 (tramp-gvfs-file-name-handler-alist): Use it.
232 (tramp-gvfs-get-directory-attributes): Fix property name.
233 (tramp-gvfs-get-root-attributes): Support also file system attributes.
234
235 * lisp/net/tramp-sh.el (tramp-sh-handle-file-system-info): New defun.
236 (tramp-sh-file-name-handler-alist): Use it.
237 (tramp-sh-handle-insert-directory): Insert size information.
238 (tramp-get-remote-df): New defun.
239
240 * lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info): New defun.
241 (tramp-smb-file-name-handler-alist): Use it.
242 (tramp-smb-handle-insert-directory): Insert size information.
243
244 * test/lisp/net/tramp-tests.el (tramp-test37-file-system-info):
245 New test.
246 (tramp-test38-asynchronous-requests)
247 (tramp-test39-recursive-load, tramp-test40-remote-load-path)
248 (tramp-test41-unload): Rename.
249
2502017-10-03 João Távora <joaotavora@gmail.com>
251
252 Merge branch 'scratch/flymake-refactor-clean-for-emacs-26' into emacs-26
253
2542017-10-03 João Távora <joaotavora@gmail.com>
255
256 Start rewriting Flymake manual
257
258 Missing the parts pertaining to the new customization API.
259
260 * doc/misc/flymake.texi (Overview of Flymake): Rewrite a bit.
261 (Installing Flymake): Delete most of this.
262 (Running the syntax check): Mention flymake-start.
263 (Navigating to error lines): Rewrite.
264 (Viewing error messages): Commente out.
265 (Syntax check statuses, Troubleshooting): Rewrite a bit.
266 (Customizable variables): New section under "Using
267 Flymake". Don't mention any proc variables here.
268 (Configuring Flymake): Delete
269 (Proc backend): New chapter
270 (Proc customization variables): New chapter.
271
272 * doc/misc/flymake.texi (Overview of Flymake): Rewrite a bit.
273 (Installing Flymake): Mostly scratch. Flymake comes with Emacs.
274 (Running the syntax check): Simplify.
275 (Viewing error messages): Dekete,
276 (Syntax check statuses): Rewrite.
277 (Troubleshooting): Simplify.
278 (Customizable variables): Rewrite.
279 (Extending Flymake): New chapter, empty for now.
280 (The legacy Proc backend): New chapter.
281 (Proc customizable variables)
282 (Adding support for a new syntax check tool)
283 (Implementation overview)
284 (Making a temporary copy)
285 (Locating a master file)
286 (Getting the include directories)
287 (Locating the buildfile)
288 (Starting the syntax check process)
289 (Parsing the output)
290 (Interaction with other modes)
291 (Example---Configuring a tool called via make)
292 (Example---Configuring a tool called directly): Rewrite a bit.
293
2942017-10-03 João Távora <joaotavora@gmail.com>
295
296 Minimal tweak as an attempt to future-proof Flymake API
297
298 Discussed with Stefan that this should allow Flymake to request more
299 from backends in the future, while also allowing backends to report
300 more accurately.
301
302 * lisp/progmodes/elisp-mode.el (elisp-flymake-checkdoc)
303 (elisp-flymake-byte-compile): Adjust to new API.
304
305 * lisp/progmodes/flymake-proc.el ()
306 (flymake-proc-legacy-flymake): Adjust to new API.
307
308 * lisp/progmodes/flymake.el (flymake-diagnostic-functions):
309 Review API again.
310 (flymake--handle-report): Allow other keys. Change ACTION to
311 REPORT-ACTION.
312
3132017-10-03 João Távora <joaotavora@gmail.com>
314
315 Integrate Flymake elisp checkers into elisp-mode.el directly
316
317 * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Use
318 elisp-flymake-checkdoc and elisp-flymake-byte-compile.
319 (elisp-flymake--checkdoc-1, elisp-flymake-checkdoc)
320 (elisp-flymake--byte-compile-done)
321 (elisp-flymake--byte-compile-process)
322 (elisp-flymake-byte-compile): Rename from flymake-elisp
323 counterparts in deleted flymake-elisp.el
324 (elisp-flymake--batch-compile-for-flymake): New helper.
325 (checkdoc-create-error-function)
326 (checkdoc-autofix-flag)
327 (checkdoc-generate-compile-warnings-flag)
328 (checkdoc-diagnostic-buffer): Forward declare.
329
330 * lisp/progmodes/flymake-elisp.el: Delete.
331
3322017-10-03 João Távora <joaotavora@gmail.com>
333
334 Hook Flymake onto proper checkdoc and byte-compile interfaces
335
336 The interfaces in bytecomp.el and checkdoc.el are mostly boilerplate,
337 with little knowledge of actual internals or thought given to the
338 usefulness of said interfaces in contexts other than Flymake's.
339
340 * lisp/emacs-lisp/bytecomp.el
341 (byte-compile-log-warning-function): New variable.
342 (byte-compile-log-warning): Use it.
343 (byte-compile--log-warning-for-byte-compile): New function.
344
345 * lisp/emacs-lisp/checkdoc.el
346 (checkdoc-create-error-function): New variable.
347 (checkdoc-create-error): Use it.
348 (checkdoc--create-error-for-checkdoc): New function.xo
349
350 * lisp/progmodes/flymake-elisp.el (flymake-elisp--checkdoc-1):
351 Use checkdoc-create-error-function.
352 (flymake-elisp--batch-byte-compile): Use
353 byte-compile-log-warning-function.
354
3552017-10-03 João Távora <joaotavora@gmail.com>
356
357 Tweak Flymake autoloads and dependencies
358
359 * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add to
360 flymake-diagnostic-functions here.
361
362 * lisp/progmodes/flymake-elisp.el[top]: Don't add to
363 emacs-lisp-mode-hook. Don't call flymake-elisp-setup-backends in
364 every buffer. (flymake-elisp-checkdoc) (flymake-elisp-byte-compile):
365 Autoload. (flymake-elisp-setup-backends): Remove.
366
367 * lisp/progmodes/flymake.el: Add some top-level comments.
368 (flymake-make-diagnostic)
369 (flymake-mode, flymake-mode-on, flymake-mode-off): Add autoloads
370
371 Where to fixup this shit?
372
3732017-10-03 João Távora <joaotavora@gmail.com>
374
375 Capitalize "Flymake" in docstrings and comments
376
377 * lisp/progmodes/flymake-elisp.el (flymake-elisp-checkdoc)
378 (flymake-elisp-setup-backends): Capitalize "Flymake"
379
380 * lisp/progmodes/flymake-proc.el:
381 (flymake-proc-reformat-err-line-patterns-from-compile-el)
382 (flymake-proc--panic, flymake-proc-legacy-flymake)
383 (flymake-start-syntax-check, flymake-proc-compile)
384 (define-obsolete-variable-alias): Capitalize "Flymake"
385
386 * lisp/progmodes/flymake.el (flymake-fringe-indicator-position)
387 (flymake-make-diagnostic, flymake-delete-own-overlays)
388 (flymake-diagnostic-functions)
389 (flymake-diagnostic-types-alist, flymake-is-running)
390 (flymake-make-report-fn, flymake-mode-on, flymake-mode-off)
391 (flymake-goto-next-error, flymake-goto-prev-error): Capitalize "Flymake"
392
3932017-10-03 João Távora <joaotavora@gmail.com>
394
395 Flymake backends can report multiple times per check
396
397 Rewrote a significant part of the Flymake backend API. Flymake now
398 ignores the return value of backend functions: a function can either
399 returns or errors. If it doesn't error, a backend is no longer
400 constrained to call REPORT-FN exactly once. It may do so any number
401 of times, cumulatively reporting diagnostics. Flymake keeps track of
402 outdated REPORT-FN instances and disconsiders obsolete reports.
403 Backends should avoid reporting obsolete data by cancelling any
404 ongoing processing at every renewed call to the backend function.
405
406 Consolidated flymake.el internal data structures to require less
407 buffer-local variables. Adjusted Flymake's mode-line indicator to the
408 new semantics.
409
410 Adapted and simplified the implementation of elisp and legacy
411 backends, fixing potential race conditions when calling backends in
412 rapid succession.
413
414 Added a new test for a backend that calls REPORT-FN multiple
415 times. Simplify test infrastructure.
416
417 * lisp/progmodes/flymake-elisp.el (flymake-elisp-checkdoc)
418 (flymake-elisp-byte-compile): Error instead of returning nil
419 if not in emacs-lisp-mode.
420 (flymake-elisp--byte-compile-process): New buffer-local variable.
421 (flymake-elisp-byte-compile): Mark (and kill) previous process
422 obsolete process before starting a new one. Don't report if
423 obsolete process.
424
425 * lisp/progmodes/flymake-proc.el
426 (flymake-proc--current-process): New buffer-local variable.
427 (flymake-proc--processes): Remove.
428 (flymake-proc--process-filter): Don't bind
429 flymake-proc--report-fn.
430 (flymake-proc--process-sentinel): Rewrite. Don't report if
431 obsolete process.
432 (flymake-proc-legacy-flymake): Rewrite. Mark (and kill)
433 previous process obsolete process before starting a new
434 one. Integrate flymake-proc--start-syntax-check-process
435 helper.
436 (flymake-proc--start-syntax-check-process): Delete.
437 (flymake-proc-stop-all-syntax-checks): Don't use
438 flymake-proc--processes, iterate buffers.
439 (flymake-proc-compile):
440
441 * lisp/progmodes/flymake.el (subr-x): Require it
442 explicitly.
443 (flymake-diagnostic-functions): Reword docstring.
444 (flymake--running-backends, flymake--disabled-backends)
445 (flymake--diagnostics-table): Delete.
446 (flymake--backend-state): New buffer-local variable and new defstruct.
447 (flymake--with-backend-state, flymake--collect)
448 (flymake-running-backends, flymake-disabled-backends)
449 (flymake-reporting-backends): New helpers.
450 (flymake-is-running): Use flymake-running-backends.
451 (flymake--handle-report): Rewrite.
452 (flymake-make-report-fn): Ensure REPORT-FN runs in the correct
453 buffer or not at all.
454 (flymake--disable-backend, flymake--run-backend): Rewrite.
455 (flymake-start): Rewrite.
456 (flymake-mode): Set flymake--backend-state.
457 (flymake--mode-line-format): Rewrite.
458
459 * test/lisp/progmodes/flymake-tests.el
460 (flymake-tests--wait-for-backends): New helper.
461 (flymake-tests--call-with-fixture): Use it.
462 (included-c-header-files): Fix whitespace.
463 (flymake-tests--diagnose-words): New helper.
464 (dummy-backends): Rewrite for new semantics. Use cl-letf.
465 (flymake-tests--assert-set): Use quote.
466 (recurrent-backend): New test.
467
4682017-10-03 João Távora <joaotavora@gmail.com>
469
470 Flymake uses proper idle timers
471
472 Also, flymake-no-changes-timeout can be set to nil to disable
473 automatic periodic checks. But even in that situation the idle timer
474 still runs at a reduced rate to detect changes in the variable and
475 revert that decision.
476
477 * lisp/progmodes/flymake.el (flymake-no-changes-timeout): Improve doc.
478 (flymake-last-change-time): Delete.
479 (flymake--schedule-timer-maybe): New helper.
480 (flymake-after-change-function): Use it.
481 (flymake-on-timer-event): Delete
482 (flymake-mode): Don't scheduler timer.
483
4842017-10-03 João Távora <joaotavora@gmail.com>
485
486 Flymake variable flymake-diagnostic-functions now a special hook
487
488 * lisp/progmodes/flymake-proc.el: Use add-hook to affect
489 flymake-diagnostic-functions.
490
491 * lisp/progmodes/flymake-elisp.el
492 (flymake-elisp-setup-backends): Use add-hook.
493
494 * lisp/progmodes/flymake.el (flymake-diagnostic-functions):
495 Revise docstring.
496 (flymake-start): Use run-hook-wrapped.
497
4982017-10-03 João Távora <joaotavora@gmail.com>
499
500 Batch of minor Flymake cleanup actions agreed to with Stefan
501
502 Discussed with Stefan, in no particular order
503
504 - Remove aliases for symbols thought to be internal to flymake-proc.el
505 - Don’t need :group in defcustom and defface in flymake.el
506 - Fix docstring of flymake-make-diagnostic
507 - Fix docstring of flymake-diagnostic-functions to clarify keywords.
508 - Mark overlays with just the property ’flymake, not ’flymake-overlay
509 - Tune flymake-overlays for performance
510 - Make flymake-mode-on and flymake-mode-off obsolete
511 - Don’t use hash-table-keys unless necessary.
512 - Copyright notice in flymake-elisp.
513
514 Added some more
515
516 - Clarify docstring of flymake-goto-next-error
517 - Clarify a comment in flymake--run-backend complaining about ert-deftest.
518 - Prevent compilation warnings in flymake-proc.el
519 - Remove doctring from obsolete aliases
520
521 Now the changelog:
522
523 * lisp/progmodes/flymake-elisp.el: Proper copyright notice.
524
525 * lisp/progmodes/flymake-proc.el (flymake-warning-re)
526 (flymake-proc-diagnostic-type-pred)
527 (flymake-proc-default-guess)
528 (flymake-proc--get-file-name-mode-and-masks): Move up to
529 beginning of file to shoosh compiler warnings
530 (define-obsolete-variable-alias): Delete many obsolete aliases.
531
532 * lisp/progmodes/flymake.el (flymake-error-bitmap)
533 (flymake-warning-bitmap, flymake-note-bitmap)
534 (flymake-fringe-indicator-position)
535 (flymake-start-syntax-check-on-newline)
536 (flymake-no-changes-timeout, flymake-gui-warnings-enabled)
537 (flymake-start-syntax-check-on-find-file, flymake-log-level)
538 (flymake-wrap-around, flymake-error, flymake-warning)
539 (flymake-note): Don't need :group in these defcustom and defface.
540 (flymake--run-backend): Clarify comment
541 (flymake-mode-map): Remove.
542 (flymake-make-diagnostic): Fix docstring.
543 (flymake--highlight-line, flymake--overlays): Identify flymake
544 overlays with just ’flymake.
545 (flymake--overlays): Reverse order of invocation for
546 cl-remove-if-not and cl-sort.
547 (flymake-mode-on)
548 (flymake-mode-off): Make obsolete.
549 (flymake-goto-next-error, flymake-goto-prev-error): Fix docstring.
550 (flymake-diagnostic-functions): Clarify keyword arguments in
551 docstring.
552
553 Maybe squash in that one where I remove many obsoletes
554
5552017-10-03 João Távora <joaotavora@gmail.com>
556
557 Explicitly add a(n empty) keymap for Flymake
558
559 Too early to decide what will be in it, if anything. Though "M-n" and
560 "M-p" would be great.
561
562 * lisp/progmodes/flymake-ui.el (flymake-mode-map): New variable
563
5642017-10-03 João Távora <joaotavora@gmail.com>
565
566 Flymake uses some new fringe bitmaps
567
568 Also fix behaviour whereby flymake wouldn't react to a change in the
569 variable.
570
571 * lisp/progmodes/flymake-ui.el (flymake-error-bitmap)
572 (flymake-warning-bitmap): Update bitmaps.
573 (flymake-note-bitmap): New defcustom.
574 (flymake-double-exclamation-mark): New bitmap.
575 (flymake-error, flymake-warning, flymake-note)
576 (flymake--highlight-line): 'bitmap property must be a symbol.
577 Also set default face to flymake-error.
578 (flymake--fringe-overlay-spec): Bitmap property can be a
579 variable symbol.
580
5812017-10-03 João Távora <joaotavora@gmail.com>
582
583 Remove old flymake-display-err-menu-for-current-line, it's useless
584
585 See https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00949.html
586
587 * lisp/progmodes/flymake-ui.el
588 (flymake-popup-current-error-menu): Remove.
589
5902017-10-03 João Távora <joaotavora@gmail.com>
591
592 Treat Flymake errors as just another type of diagnostic
593
594 * lisp/progmodes/flymake.el (flymake--diag-errorp): Remove.
595 (flymake--handle-report, flymake-popup-current-error-menu):
596 Don't use it.
597
5982017-10-03 João Távora <joaotavora@gmail.com>
599
600 Fix three Flymake bugs when checking C header files
601
602 The first of these problems is longstanding: if an error-less B.h is
603 included from error-ridden A.h, flymake's legacy parser will panic
604 (and disable itself) since it sees a non-zero exit for a clean file.
605 To fix this, recommend returning 'true' in the documentation for the
606 check-syntax target.
607
608 Another problem was introduced by the parser rewrite. For error
609 patterns spanning more than one line, point may be left in the middle
610 of a line and thus render other patterns useless. Those patterns were
611 written for the old line-by-line parser. To make them useful again,
612 move to the beginning of line in those situations.
613
614 The third problem was also longstanding and happened on newer GCC's:
615 The "In file included from" prefix confused
616 flymake-proc-get-real-file-name. Fix this.
617
618 Also updated flymake--diag-region to fallback to highlighting a full
619 line less often.
620
621 Add automatic tests to check this.
622
623 * lisp/progmodes/flymake-proc.el
624 (flymake-proc--diagnostics-for-pattern): Fix bug when patterns
625 accidentally spans more than one line. Don't create
626 diagnostics without error messages.
627 (flymake-proc-real-file-name-considering-includes): New
628 helper.
629 (flymake-proc-allowed-file-name-masks): Use it.
630
631 * lisp/progmodes/flymake.el (flymake-diag-region): Make COL
632 argument explicitly optional. Only fall back to full line in extreme
633 cases.
634
635 * test/lisp/progmodes/flymake-tests.el
636 (included-c-header-files): New test.
637 (different-diagnostic-types): Update.
638
639 * test/lisp/progmodes/flymake-resources/Makefile
640 (check-syntax): Always return success (0) error code.
641 (CC_OPTS): Add -Wextra
642
643 * test/lisp/progmodes/flymake-resources/errors-and-warnings.c
644 (main): Rewrite comments.
645
646 * test/lisp/progmodes/flymake-resources/errors-and-warnings.c:
647 Include some dummy header files.
648
649 * test/lisp/progmodes/flymake-resources/no-problems.h: New file.
650
651 * test/lisp/progmodes/flymake-resources/some-problems.h: New file.
652
653 * doc/misc/flymake.texi (Example---Configuring a tool called
654 via make): Recommend adding "|| true" to the check-syntax target.
655
6562017-10-03 João Távora <joaotavora@gmail.com>
657
658 Add interactive flymake-start function
659
660 * lisp/progmodes/flymake.el (flymake-on-timer-event)
661 (flymake-after-change-function, flymake-mode): Call
662 flymake-start.
663 (flymake-start): Rename from flymake--start-syntax-check.
664
6652017-10-03 João Távora <joaotavora@gmail.com>
666
667 A couple of Flymake backends for emacs-lisp-mode
668
669 Loading flymake-elisp.el doesn't setup flymake-mode to turn on
670 automatically, but it affects emacs-lisp-mode-hook so that
671 flymake-diagnostic-functions is setup with a suitable buffer-local
672 value. The variable flymake-diagnostic-funtions in every live
673 emacs-lisp-mode buffer is also adjusted.
674
675 * lisp/progmodes/flymake.el (top): Require flymake-elisp.
676
677 * lisp/progmodes/flymake-elisp.el: New file.
678
6792017-10-03 João Távora <joaotavora@gmail.com>
680
681 Fancy Flymake mode-line construct displays status
682
683 Imitates compilation-mode's mode-line a bit, and uses its faces.
684
685 * lisp/progmodes/flymake.el
686 (flymake-error, flymake-warning, flymake-note): Add
687 mode-line-face to these flymake error types.
688 (flymake-note): Notes don't need a noisy fringe bitmap.
689 (flymake-lighter): Delete.
690 (flymake--update-lighter): Delete.
691 (flymake--mode-line-format): New function and variable.
692 (flymake--diagnostics-table): New buffer-local variable.
693 (flymake--handle-report): Don't update "lighters". Affect
694 flymake--diagnostics-table.
695 (flymake--run-backend): Init flymake--diagnostics-table for backend.
696 (flymake-mode): Use flymake--mode-line-format.
697 (flymake-mode): Don't update lighter.
698 (flymake--highlight-line): Be more careful when overriding a
699 nil default overlay property.
700
7012017-10-03 João Távora <joaotavora@gmail.com>
702
703 Tweak Flymake commands flymake-goto-[next/prev]-error
704
705 Add filters, useful for backends like the upcoming
706 flymake-elisp-checkdoc backend, for example, which litters everything
707 with low-priority notes.
708
709 Also re-implement wraparound for flymake-goto-next-error. Manual
710 mentions this, so it's probably a good idea to keep it. Added a new
711 customization variable flymake-wrap-around to control it.
712
713 * lisp/progmodes/flymake.el (flymake-goto-prev-error)
714 (flymake-goto-next-error): Accept FILTER argument.
715 (flymake-wrap-around): New variable.
716 (flymake-goto-next-error): Wrap around according to flymake-wrap-around.
717
718 * test/lisp/progmodes/flymake-tests.el
719 (different-diagnostic-types, dummy-backends): Pass FILTER to
720 flymake-goto-prev-error.
721 (different-diagnostic-types)
722 (dummy-backends): Use flymake-wrap-around.
723
7242017-10-03 João Távora <joaotavora@gmail.com>
725
726 Flymake's flymake-proc.el backend slightly easier to debug
727
728 Misc cleanup in flymake-proc.el
729
730 Improve description of what this file contains.
731
732 Better name for the backend function. Fix the case where it is run
733 interactively.
734
735 Keep the output buffer alive iff the external process panics.
736
737 * lisp/progmodes/flymake-proc.el
738 (flymake-proc-legacy-flymake): Rename from
739 flymake-proc-start-syntax-check. Allow running interactively.
740 (flymake-start-syntax-check): Obsolete alias for
741 flymake-proc-legacy-flymake.
742 (flymake-proc-start-syntax-check): Delete.
743 (flymake-diagnostic-functions): Include flymake-proc-legacy-flymake
744 (flymake-proc--process-sentinel): Keep output buffer alive.
745 Clarify with comments.
746 (flymake-proc--diagnostics-for-pattern)
747 (flymake-proc--process-sentinel)
748 (flymake-proc--safe-delete-directory)
749 (flymake-proc--start-syntax-check-process): Use condition-case-unless-debug.
750
7512017-10-03 João Távora <joaotavora@gmail.com>
752
753 Simplify Flymake logging and erroring
754
755 Use display-warning and a dedicated *Flymake log* buffer.
756
757 To ease readability, flymake log messages are now prefixed with a
758 common prefix and the buffer that originated them.
759
760 Some situations of over-zealous logging are fixed.
761
762 Use byte-compiler info, if available, to determine whence the
763 flymake-related log message is coming.
764
765 * lisp/progmodes/flymake-proc.el
766 (flymake-proc--diagnostics-for-pattern): Improve log message.
767 (flymake-proc--panic): Always flymake-log an error
768 (flymake-proc--safe-delete-file)
769 (flymake-proc--safe-delete-directory):
770 Downgrade warning
771 (flymake-proc-start-syntax-check): Simplify slightly.
772 (flymake-proc--start-syntax-check-process): Simplify.
773 (flymake-proc--init-find-buildfile-dir)
774 (flymake-proc--init-create-temp-source-and-master-buffer-copy):
775 No need to warn twice.
776
777 * lisp/progmodes/flymake.el (flymake-log): Convert to macro.
778 (flymake--log-1): New helper.
779 (flymake-log-level): Deprecate.
780 (flymake-error): New helper.
781 (flymake-ler-make-ler, flymake--handle-report, flymake-mode):
782 Use flymake-error.
783 (flymake-on-timer-event)
784 (flymake--handle-report, flymake--disable-backend)
785 (flymake--run-backend, flymake-start, flymake-mode-on)
786 (flymake-mode-off, flymake-after-change-function)
787 (flymake-after-save-hook, flymake-find-file-hook): Adjust
788 flymake-log calls.
789
790 * test/lisp/progmodes/flymake-tests.el
791 (flymake-tests--call-with-fixture): Only log errors.
792
7932017-10-03 Philipp Stephani <phst@google.com>
794
795 Work around deprecation of gtk_style_context_get_background_color
796
797 * src/gtkutil.c (xg_check_special_colors): Replace call to
798 gtk_style_context_get_background_color with its definition.
799
8002017-10-03 João Távora <joaotavora@gmail.com>
801
802 New Flymake API variable flymake-diagnostic-functions
803
804 Lay groundwork for multiple active backends in the same buffer.
805
806 Backends are lisp functions called when flymake-mode sees fit. They
807 are responsible for examining the current buffer and telling
808 flymake.el, via return value, if they can syntax check it.
809 Backends should return quickly and inexpensively, but they are also
810 passed a REPORT-FN argument which they may or may not call
811 asynchronously after performing more expensive work.
812
813 REPORT-FN's calling convention stipulates that a backend calls it with
814 a list of diagnostics as argument, or, alternatively, with a symbol
815 denoting an exceptional situation, usually some panic resulting from a
816 misconfigured backend. In keeping with legacy behaviour,
817 flymake.el's response to a panic is to disable the issuing backend.
818
819 The flymake--diag object representing a diagnostic now also keeps
820 information about its source backend. Among other uses, this allows
821 flymake to selectively cleanup overlays based on which backend is
822 updating its diagnostics.
823
824 * lisp/progmodes/flymake-proc.el (flymake-proc--report-fn):
825 New dynamic variable.
826 (flymake-proc--process): New variable.
827 (flymake-can-syntax-check-buffer): Remove.
828 (flymake-proc--process-sentinel): Simplify. Use
829 unwind-protect. Affect flymake-proc--processes here.
830 Bind flymake-proc--report-fn.
831 (flymake-proc--process-filter): Bind flymake-proc--report-fn.
832 (flymake-proc--post-syntax-check): Delete
833 (flymake-proc-start-syntax-check): Take mandatory
834 report-fn. Rewrite. Bind flymake-proc--report-fn.
835 (flymake-proc--process-sentinel): Rewrite and simplify.
836 (flymake-proc--panic): New helper.
837 (flymake-proc--start-syntax-check-process): Record report-fn
838 in process. Use flymake-proc--panic.
839 (flymake-proc-stop-all-syntax-checks): Use mapc. Don't affect
840 flymake-proc--processes here. Record interruption reason.
841 (flymake-proc--init-find-buildfile-dir)
842 (flymake-proc--init-create-temp-source-and-master-buffer-copy):
843 Use flymake-proc--panic.
844 (flymake-diagnostic-functions): Add
845 flymake-proc-start-syntax-check.
846 (flymake-proc-compile): Call
847 flymake-proc-stop-all-syntax-checks with a reason.
848
849 * lisp/progmodes/flymake.el (flymake-backends): Delete.
850 (flymake-check-was-interrupted): Delete.
851 (flymake--diag): Add backend slot.
852 (flymake-delete-own-overlays): Take optional filter arg.
853 (flymake-diagnostic-functions): New user-visible variable.
854 (flymake--running-backends, flymake--disabled-backends): New
855 buffer-local variables.
856 (flymake-is-running): Now a function, not a variable.
857 (flymake-mode-line, flymake-mode-line-e-w)
858 (flymake-mode-line-status): Delete.
859 (flymake-lighter): flymake's minor-mode "lighter".
860 (flymake-report): Delete.
861 (flymake--backend): Delete.
862 (flymake--can-syntax-check-buffer): Delete.
863 (flymake--handle-report, flymake--disable-backend)
864 (flymake--run-backend, flymake--run-backend): New helpers.
865 (flymake-make-report-fn): Make a lambda.
866 (flymake--start-syntax-check): Iterate
867 flymake-diagnostic-functions.
868 (flymake-mode): Use flymake-lighter. Simplify. Initialize
869 flymake--running-backends and flymake--disabled-backends.
870 (flymake-find-file-hook): Simplify.
871
872 * test/lisp/progmodes/flymake-tests.el
873 (flymake-tests--call-with-fixture): Use flymake-is-running the
874 function. Check if flymake-mode already active before activating it.
875 Add a thorough test for flymake multiple backends
876
877 * lisp/progmodes/flymake.el (flymake--start-syntax-check):
878 Don't use condition-case-unless-debug, use condition-case
879
880 * test/lisp/progmodes/flymake-tests.el
881 (flymake-tests--assert-set): New helper macro.
882 (dummy-backends): New test.
883
8842017-10-03 João Távora <joaotavora@gmail.com>
885
886 More Flymake cleanup before advancing to backend redesign
887
888 Diagnostics are reported for buffers, not necessarily files. It’s the
889 backend’s responsibility to compute the buffer where the diagnostic is
890 applicable. For now, this has to match the buffer where flymake-mode
891 is active and which is at the origin of the backend call.
892
893 flymake.el knows nothing about line/column diagnostics (except for
894 backward-compatible flymake-ler-make-ler, which must yet be tested).
895 It’s also the backend’s reponsibility to compute a BEG and END
896 positions for the diagnostic in the relevant buffer.
897
898 * lisp/progmodes/flymake-proc.el
899 (flymake-proc--diagnostics-for-pattern): Convert LINE/COL to
900 region here. Check file buffer here.
901 (flymake-proc--process-sentinel): Don’t kill output buffer if
902 high enough log level.
903
904 * lisp/progmodes/flymake.el (flymake-diag-region): Make this a utility
905 function. (flymake--highlight-line): Diagnostic has region now.
906 (flymake-popup-current-error-menu): Don’t add file and line numbers to
907 already this silly menu. (flymake--fix-line-numbers): Remove.
908 (flymake-report): No need to fix diagnostics here.
909
9102017-10-03 João Távora <joaotavora@gmail.com>
911
912 Protect Flymake's eager checks against commands like fill-paragraph
913
914 If flymake-start-syntax-check-on-newline is t, check should start as
915 soon as a newline is seen by after-change-functions. But don't rush
916 it: since the buffer state might not be final, we might end up with
917 invalid diagnostic regions after some commands silently insert and
918 delete newlines (looking at you, fill-paragraph).
919
920 * lisp/progmodes/flymake.el (flymake-after-change-function): Pass
921 `deferred' to flymake--start-syntax-check.
922 (flymake--start-syntax-check): Take optional `deferred' arg.
923
9242017-10-03 João Távora <joaotavora@gmail.com>
925
926 Flymake highlights GCC info/notes as detected by flymake-proc.el
927
928 * lisp/progmodes/flymake-proc.el
929 (flymake-proc--diagnostics-for-pattern): Rewrite (using cl-loop) to
930 honour more sophisticated flymake-proc-diagnostic-type-pred.
931 (flymake-warning-re): Is now an obsolete alias for
932 flymake-proc-diagnostic-type-pred.
933 (flymake-proc-diagnostic-type-pred): Rename and augment from
934 flymake-proc-warning-predicate. (flymake-proc-warning-predicate):
935 Delete.
936
937 * lisp/progmodes/flymake.el (flymake-note): New face.
938 (flymake-diagnostic-types-alist): Simplify.
939 (flymake-note): New overlay category.
940 (flymake--lookup-type-property): Only lookup single keys, not lists.
941 (flymake--diag-errorp): Rewrite.
942 (flymake--highlight-line): Use flymake--lookup-type-property.
943
944 * test/lisp/progmodes/flymake-tests.el
945 (different-diagnostic-types): Rename from errors-and-warnings.
946 Check notes.
947 (flymake-tests--call-with-fixture): Use
948 flymake-proc-diagnostic-type-pred.
949
9502017-10-03 João Távora <joaotavora@gmail.com>
951
952 Flymake checks file names before considering diagnostics
953
954 The error patterns for gcc picked up errors for the Makefile itself,
955 for example. These shouldn't count as actual errors.
956
957 * lisp/progmodes/flymake.el (flymake-report): Check
958 matching file names.
959
9602017-10-03 João Távora <joaotavora@gmail.com>
961
962 Echo Flymake error messages when navigating errors interactively
963
964 Perhaps binding M-n and M-p to flymake-goto-next-error and
965 flymake-goto-prev-error also wouldn't be a bad idea.
966
967 * lisp/progmodes/flymake.el (flymake-goto-next-error): Use
968 target overlay's help-echo.
969
9702017-10-03 João Távora <joaotavora@gmail.com>
971
972 Add a new Flymake test for multiple errors and warnings
973
974 * test/lisp/progmodes/flymake-tests.el
975 (flymake-tests--call-with-fixture): Save excursion.
976 (errors-and-warnings): New test.
977
978 * test/lisp/progmodes/flymake-resources/errors-and-warnings.c:
979 New test fixture.
980
9812017-10-03 João Távora <joaotavora@gmail.com>
982
983 Flymake warning face easier to distinguish
984
985 A orange wavy underline is very hard to tell from a red wavy
986 underline.
987
988 * lisp/progmodes/flymake.el (flymake-warning): Change color to
989 "deep sky blue"
990
9912017-10-03 João Távora <joaotavora@gmail.com>
992
993 Flymake's flymake-proc.el parses column numbers from gcc/javac errors
994
995 Column numbers are not a great way of marking diagnostic regions, but
996 that's probably all that can be expected from the flymake-proc.el
997 backend. For now, try (end-of-thing 'sexp) to discover the
998 diagnostic's end position.
999
1000 * lisp/progmodes/flymake-proc.el ()
1001 (flymake-proc-err-line-patterns): Also parse column numbers,
1002 if available, for gcc/javac warnings.
1003
10042017-10-03 João Távora <joaotavora@gmail.com>
1005
1006 New Flymake variable flymake-diagnostic-types-alist and much cleanup
1007
1008 A new user-visible variable is introduced where different diagnostic
1009 types can be categorized. Flymake backends can also contribute to
1010 this variable. Anything that doesn’t match an existing error type
1011 is considered.
1012
1013 The variable’s alists are used to propertize the overlays pertaining
1014 to each error type. The user can override the built-in properties by
1015 either by modifying the alist, or by modifying the properties of a
1016 special "category" symbol, named by the `flymake-category' entry in
1017 the alist.
1018
1019 The `flymake-category' entry is especially useful for, say, the author
1020 of foo-flymake-backend, who issues diagnostics of type :foo-note, that
1021 should behave like notes, except with no fringe bitmap:
1022
1023 (add-to-list 'flymake-diagnostic-types-alist
1024 '(:foo-note
1025 . ((flymake-category . flymake-note)
1026 (bitmap . nil))))
1027
1028 For essential properties like `severity', `priority', etc, a default
1029 value is produced. Some properties like `evaporate' cannot be
1030 overriden.
1031
1032 * lisp/progmodes/flymake.el (flymake--diag): Rename from
1033 flymake-ler.
1034 (flymake-ler-make): Obsolete alias for flymake-diagnostic-make
1035 (flymake-ler-errorp): Rewrite using flymake--severity.
1036 (flymake--place-overlay): Delete.
1037 (flymake--overlays): Now a cl-defun with &key args. Document.
1038 Use `overlays-at' if BEG is non-nil and END is nil.
1039 (flymake--lookup-type-property): New helper.
1040 (flymake--highlight-line): Rewrite.
1041 (flymake-diagnostic-types-alist): New API variable.
1042 (flymake--diag-region)
1043 (flymake--severity, flymake--face)
1044 (flymake--fringe-overlay-spec): New helper.
1045 (flymake-popup-current-error-menu): Use new flymake-overlays.
1046 (flymake-popup-current-error-menu, flymake-report): Use
1047 flymake--diag-errorp.
1048 (flymake--fix-line-numbers): Use flymake--diag-line.
1049 (flymake-goto-next-error): Pass :key to flymake-overlays
1050
1051 * lisp/progmodes/flymake-proc.el
1052 (flymake-proc--diagnostics-for-pattern): Use flymake-diagnostic-make.
1053
10542017-10-03 João Távora <joaotavora@gmail.com>
1055
1056 Refactor Flymake tests in preparation for more tests
1057
1058 Introduce a slightly more generic fixture macro.
1059
1060 Also make flymake-tests.el friendlier to interactive runs, by not
1061 killing buffers visited by the user.
1062
1063 * test/lisp/progmodes/flymake-tests.el
1064 (flymake-tests--call-with-fixture): New helper from
1065 flymake-tests--current-face. Don't kill file buffers already
1066 being visited before the test starts.
1067 (flymake-tests--with-flymake): New macro.
1068 (flymake-tests--current-face): Delete.
1069 (warning-predicate-rx-gcc, warning-predicate-function-gcc)
1070 (warning-predicate-rx-perl, warning-predicate-function-perl):
1071 Use flymake-test--with-flymake.
1072
10732017-10-03 João Távora <joaotavora@gmail.com>
1074
1075 Allow running Flymake tests from interactive sessions
1076
1077 * test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
1078 Expand to reasonable value if no
1079 EMACS_TEST_DIRECTORY. (flymake-tests--current-face): Work around
1080 "weirdness" of bug 17647 with read-event.
1081
10822017-10-03 João Távora <joaotavora@gmail.com>
1083
1084 Flymake diagnostics now apply to arbitrary buffer regions
1085
1086 Make Flymake UI some 150 lines lighter
1087
1088 Strip away much of the original implementation's complexity in
1089 manipulating objects representing diagnostics as well as creating and
1090 navigating overlays.
1091
1092 Lay some groundwork for a more flexible approach that allows for
1093 different classes of diagnostics, not necessarily line-based.
1094 Importantly, one overlay per diagnostic is created, whereas the
1095 original implementation had one per line, and on it it concatenated
1096 the results of errors and warnings.
1097
1098 This means that currently, an error and warning on the same line are
1099 problematic and the warning might be overlooked but this will soon be
1100 fixed by setting appropriate priorities.
1101
1102 Since diagnostics can highlight arbitrary regions, not just lines, the
1103 faces were renamed.
1104
1105 Tests pass and backward compatibility with interactive functions is
1106 maintained, but probably any third-party extension or customization
1107 relying on more than a trivial set of flymake.el internals has stopped
1108 working.
1109
1110 * lisp/progmodes/flymake-proc.el
1111 (flymake-proc--diagnostics-for-pattern): Use new flymake-ler-make
1112 constructor syntax.
1113
1114 * lisp/progmodes/flymake.el (flymake-ins-after)
1115 (flymake-set-at, flymake-er-make-er, flymake-er-get-line)
1116 (flymake-er-get-line-err-info-list, flymake-ler-set-file)
1117 (flymake-ler-set-full-file, flymake-ler-set-line)
1118 (flymake-get-line-err-count, flymake-get-err-count)
1119 (flymake-highlight-err-lines, flymake-overlay-p)
1120 (flymake-make-overlay, flymake-region-has-flymake-overlays)
1121 (flymake-find-err-info)
1122 (flymake-line-err-info-is-less-or-equal)
1123 (flymake-add-line-err-info, flymake-add-err-info)
1124 (flymake-get-first-err-line-no)
1125 (flymake-get-last-err-line-no, flymake-get-next-err-line-no)
1126 (flymake-get-prev-err-line-no, flymake-skip-whitespace)
1127 (flymake-goto-line, flymake-goto-next-error)
1128 (flymake-goto-prev-error, flymake-patch-err-text): Delete
1129 functions no longer used.
1130 (flymake-goto-next-error, flymake-goto-prev-error): Rewrite.
1131 (flymake-report): Rewrite.
1132 (flymake-popup-current-error-menu): Rewrite.
1133 (flymake--highlight-line): Rename from
1134 flymake-highlight-line. Call `flymake--place-overlay.
1135 (flymake--place-overlay): New function.
1136 (flymake-ler-errorp): New predicate.
1137 (flymake-ler): Simplify.
1138 (flymake-error): Rename from
1139 flymake-errline.
1140 (flymake-warning): Rename from flymake-warnline.
1141 (flymake-warnline, flymake-errline): Obsoletion aliases.
1142
1143 * test/lisp/progmodes/flymake-tests.el (warning-predicate-rx-gcc)
1144 (warning-predicate-function-gcc, warning-predicate-rx-perl)
1145 (warning-predicate-function-perl): Use face `flymake-warning'.
1146
11472017-10-03 João Távora <joaotavora@gmail.com>
1148
1149 Move symbols in flymake-proc.el to separate namespace
1150
1151 Every symbol in this flymake now starts with the prefix flymake-proc-.
1152
1153 Make obsolete aliases for (almost?) every symbol.
1154
1155 Furthermore, many flymake-proc.el symbols are prefixed with
1156 "flymake-proc--", that is they were considered internal.
1157
1158 Some customization variables, interactive functions, and other symbols
1159 considered useful to user customizations or third-party libraries are
1160 considered "public" or "external" and so use a "flymake-proc-" prefix.
1161
1162 * lisp/progmodes/flymake-proc.el: Every symbol renamed.
1163
1164 * test/lisp/progmodes/flymake-tests.el
1165 (flymake-tests--current-face): Use
1166 flymake-proc-warning-predicate, not flymake-warning-predicate.
1167
1168 * lisp/progmodes/flymake-proc.el
1169 (flymake-proc--get-project-include-dirs-function)
1170 (flymake-proc--get-project-include-dirs-imp)
1171 (flymake-proc--get-include-dirs-dot) (flymake-proc--get-tex-args)
1172 (flymake-proc--find-make-buildfile)
1173 (flymake-proc--get-syntax-check-program-args)
1174 (flymake-proc--init-create-temp-source-and-master-buffer-copy)
1175 (flymake-proc--init-find-buildfile-dir)
1176 (flymake-proc--get-full-nonpatched-file-name)
1177 (flymake-proc--get-full-patched-file-name) (flymake-proc--base-dir,
1178 flymake-proc--temp-master-file-name) (flymake-proc--master-file-name)
1179 (flymake-proc--temp-source-file-name)
1180 (flymake-proc--delete-temp-directory) (flymake-proc--kill-process)
1181 (flymake-proc--start-syntax-check-process)
1182 (flymake-proc--compilation-is-running)
1183 (flymake-proc--safe-delete-directory) (flymake-proc--safe-delete-file)
1184 (flymake-proc--get-program-dir) (flymake-proc--restore-formatting)
1185 (flymake-proc--clear-project-include-dirs-cache)
1186 (flymake-proc--project-include-dirs-cache)
1187 (flymake-proc--get-system-include-dirs)
1188 (flymake-proc--get-project-include-dirs)
1189 (flymake-proc--add-project-include-dirs-to-cache)
1190 (flymake-proc--get-project-include-dirs-from-cache)
1191 (flymake-proc--post-syntax-check) (flymake-proc--process-sentinel)
1192 (flymake-proc--process-filter) (flymake-proc--create-master-file)
1193 (flymake-proc--find-buffer-for-file)
1194 (flymake-proc--copy-buffer-to-temp-buffer)
1195 (flymake-proc--read-file-to-temp-buffer)
1196 (flymake-proc--save-buffer-in-file) (flymake-proc--replace-region,
1197 flymake-proc--check-include)
1198 (flymake-proc--check-patch-master-file-buffer)
1199 (flymake-proc--master-file-compare)
1200 (flymake-proc--find-possible-master-files)
1201 (flymake-proc--included-file-name, flymake-proc--same-files)
1202 (flymake-proc--fix-file-name, flymake-proc--find-buildfile)
1203 (flymake-proc--clear-buildfile-cache)
1204 (flymake-proc--add-buildfile-to-cache)
1205 (flymake-proc--get-buildfile-from-cache)
1206 (flymake-proc--find-buildfile-cache)
1207 (flymake-proc--get-real-file-name-function)
1208 (flymake-proc--get-cleanup-function) (flymake-proc--get-init-function)
1209 (flymake-proc--get-file-name-mode-and-masks)
1210 (flymake-proc--processes): Rename to internal symbol from
1211 flymake-proc- version.
1212
12132017-10-03 João Távora <joaotavora@gmail.com>
1214
1215 Completely rewrite Flymake's subprocess output processing
1216
1217 Instead of parsing and matching regexps line-by-line, insert
1218 subprocess output in a separate buffer and parse using
1219 `search-forward-regexp'. This eventually enables multi-line error
1220 patterns and simplifies code all around. Store per-check information
1221 in the subprocess using `process-get' and `process-put'. Treat error
1222 messages, warnings, etc. more generically as "diagnostics". Create
1223 these objects as soon as possible, reusing existing `flymake-ler'
1224 structure. Fix some whitespace.
1225
1226 * lisp/progmodes/flymake.el (cl-lib): Require also when
1227 loading.
1228 (flymake--fix-line-numbers): Rename from
1229 flymake-fix-line-numbers. Simplify.
1230 (flymake-report): Call flymake--fix-line-numbers. Rearrange
1231 plain diagnostics list into alist format expected by
1232 flymake-highlight-err-lines.
1233
1234 * lisp/progmodes/flymake-proc.el (flymake-process-filter): Insert
1235 process output and parse in dedicated output buffer.
1236 (flymake-proc--diagnostics-for-pattern): New helper function.
1237 (flymake-process-sentinel): Call flymake-post-syntax-check with
1238 collected diagnostics. Kill output buffer.
1239 (flymake-post-syntax-check): Receive diagnostics as third argument.
1240 (flymake-parse-output-and-residual, flymake-new-err-info)
1241 (flymake-parse-residual, flymake-parse-err-lines)
1242 (flymake-split-output, flymake-proc-parse-line)
1243 (flymake-output-residual): Delete.
1244 (flymake-start-syntax-check-process): Use make-process. Setup
1245 dedicated an output buffer
1246
12472017-10-03 João Távora <joaotavora@gmail.com>
1248
1249 Flymake provides flymake-report re-entry point for backends
1250
1251 * lisp/progmodes/flymake-proc.el (flymake-post-syntax-check):
1252 Simplify. Call flymake-report.
1253
1254 * lisp/progmodes/flymake.el (flymake-report): New function.
1255
12562017-10-03 João Távora <joaotavora@gmail.com>
1257
1258 Split Flymake into flymake.el into flymake-proc.el (again!)
1259
1260 After deciding that this work would continue on master only, which
1261 caused two commits named
1262
1263 Revert "Split flymake.el into flymake-proc.el and flymake-ui.el"
1264
1265 and
1266
1267 Revert "Add flymake-backends defcustom"
1268
1269 to be added to the emacs-26 branch, further discussion reversed that
1270 decision.
1271
1272 See:
1273
1274 https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg01020.html
1275 https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg01030.html
1276
1277 This means that those two commits MUST be merged to master AFTER ALL.
1278
1279 flymke-proc.el contains the main syntax-checking backend, while
1280 flymake.el keeps mostly the UI part.
1281
1282 * lisp/progmodes/flymake-proc.el: New file. Require flymake.
1283
1284 * lisp/progmodes/flymake.el: Require flymake-proc.el at the end.
1285
12862017-10-03 Nicolas Petton <nicolas@petton.fr>
1287
1288 Update authors.el
1289
1290 * admin/authors.el (authors-ignored-files, authors-valid-file-names)
1291 (authors-renamed-files-alist): Additions.
1292
12932017-10-03 Noam Postavsky <npostavs@gmail.com>
1294
1295 Give more helpful messages for python completion setup failures
1296
1297 * lisp/progmodes/python.el (python-shell-completion-native-setup): In
1298 case the completion setup failed with some exception, print out the
1299 exception type and message. If libedit is detected, raise an
1300 exception, since this is known to fail.
1301
13022017-10-02 Eli Zaretskii <eliz@gnu.org>
1303
1304 Fix the --without-x build
1305
1306 * src/frame.c (Ficonify_frame) [HAVE_WINDOW_SYSTEM]: Use
1307 frame_parent only in GUI builds to avoid compilation errors in
1308 --without-x builds. (Bug#28611)
1309
13102017-10-02 Paul Eggert <eggert@day>
1311
1312 Fix customization of zoneinfo-style-world-list
1313
1314 A customizable variable's initial value cannot depend on that of
1315 another customizable variable, since the variables are initialized
1316 in other than textual order. Problem reported by N. Jackson
1317 (Bug#24291).
1318 * lisp/time.el (display-time-world-list): Default to t,
1319 a special value that expands to zoneinfo-style-word-list
1320 if that works, and to legacy-style-word-list otherwise.
1321 (time--display-world-list): New function.
1322 (display-time-world, display-time-world-timer): Use it.
1323
13242017-10-02 Alan Mackenzie <acm@muc.de>
1325
1326 Fix a CC Mode brace stack cache bug.
1327
1328 * lisp/progmodes/cc-engine.el (c-update-brace-stack): Call
1329 c-beginning-of-current-token after a failing search operation, to ensure we
1330 don't cache a point inside a token.
1331
13322017-10-02 Paul Eggert <eggert@cs.ucla.edu>
1333
1334 * etc/PROBLEMS: Document Bug#26638.
1335
13362017-10-02 Paul Eggert <eggert@cs.ucla.edu>
1337
1338 Prefer HTTPS to HTTP for gnu.org
1339
1340 This fixes some URLs I omitted from my previous pass,
1341 notably those in lists.gnu.org. Although lists.gnu.org
1342 does not yet support TLS 1.1, TLS 1.0 is better than nothing.
1343 * lisp/erc/erc.el (erc-official-location):
1344 * lisp/mail/emacsbug.el (report-emacs-bug):
1345 Use https:, not http:.
1346
13472017-10-02 Paul Eggert <eggert@cs.ucla.edu>
1348
1349 Merge from Gnulib
1350
1351 This is mostly to change http: to https: in licenses.
1352 * COPYING, build-aux/config.guess, build-aux/config.sub:
1353 * doc/emacs/doclicense.texi, doc/emacs/gpl.texi:
1354 * doc/lispintro/doclicense.texi, doc/lispref/doclicense.texi:
1355 * doc/lispref/gpl.texi, doc/misc/doclicense.texi:
1356 * doc/misc/gpl.texi, etc/COPYING, leim/COPYING:
1357 * lib-src/COPYING, lib/COPYING, lisp/COPYING, lwlib/COPYING:
1358 * msdos/COPYING, nt/COPYING, src/COPYING:
1359 Copy from Gnulib.
1360
13612017-10-01 Simen Heggestøyl <simenheg@gmail.com>
1362
1363 Keep eww buffer current when looking up CSS on MDN
1364
1365 * lisp/textmodes/css-mode.el (css-lookup-symbol): Keep the eww buffer
1366 current when looking up CSS documentation on MDN. This fixes a bug
1367 where the eww buffer's content sometimes get mangled when switching
1368 buffers mid-render.
1369
13702017-10-01 Charles A. Roelli <charles@aurox.ch>
1371
1372 Workaround for faulty localtime() under macOS 10.6
1373
1374 * lisp/org/org-clock.el (org-clock--oldest-date): Only execute
1375 'decode-time' on times later than year -2**31 under macOS 10.6.
1376 See Bug#27706.
1377
13782017-10-01 Alan Mackenzie <acm@muc.de>
1379
1380 Doc amendment for syntax-ppss.
1381
1382 * doc/elisp/syntax.texi (Position Parse): Note, twice, that syntax-ppss is
1383 equivalent to parse-partial-sexp from the beginning of THE VISIBLE PART OF the
1384 buffer. Final part of the fix for bug #22983.
1385
13862017-10-01 Charles A. Roelli <charles@aurox.ch>
1387
1388 Remove incorrect NEWS entry about 'find-library'
1389
1390 * etc/NEWS (Changes in Emacs 26.1): Remove an entry about
1391 'find-library' taking a prefix argument to pop to a different
1392 window. This behavior was added in "Allow a prefix argument to
1393 find-library to pop to a different window" (commit e1f2d14a), and
1394 then removed in "New commands: find-library-other-window,
1395 find-library-other-frame" (commit 021430f4).
1396
13972017-10-01 Alan Mackenzie <acm@muc.de>
1398
1399 Remove inadvertent changes to syntax.texi in last commit.
1400
1401 * doc/lispref/syntax.texi (Position Parse): revert changes.
1402
14032017-10-01 Alan Mackenzie <acm@muc.de>
1404
1405 Amend documentation for text-quoting-style becoming a user option.
1406
1407 * doc/lispref/control.texi (Signaling Errors):
1408 * doc/lispref/display.texi (Displaying Messages):
1409 * doc/lispref/strings.texi (Formatting Strings):
1410 Edit for brevity, farming out the details to the new
1411 Text Quoting Style node.
1412 * doc/lispref/help.texi (Text Quoting Style): New section.
1413 Move detailed discussion of text-quoting-style here.
1414 Add discussion about how to output grave accent and apostrophe in
1415 documentation and messages. Adjust xrefs to point to this section
1416 when appropriate.
1417 * etc/NEWS: text-quoting-style semantics have not changed.
1418
14192017-10-01 Alan Mackenzie <acm@muc.de>
1420
1421 Make the value nil in text-quoting-style mean what it does in Emacs 25.
1422
1423 This is a partial reversion of yesterday's commit by the same author, which
1424 changed the meaning of nil and introduced the new value t.
1425
1426 * src/doc.c (text_quoting_style, text-quoting-style)
1427 (internal--text-quoting-flag): Revert yesterday's changes.
1428
1429 * lisp/cus-start.el: (top level): Amend the entry for text-quoting-style.
1430
1431 * etc/NEWS: Amend the entry for text-quoting-style.
1432
1433 * doc/lispref/control.texi (Signalling Errors)
1434 * doc/lispref/display.texi (Displaying Messages)
1435 * doc/lispref/strings.texi (Formatting Strings): Bind text-quoting-style to
1436 grave rather than nil to inhibit translation of quotes.
1437
1438 * doc/lispref/help.texi (Keys in Documentation): Revert the description of the
1439 proposed new default, t.
1440
14412017-10-01 Alan Mackenzie <acm@muc.de>
1442
1443 Make text-quoting-style customizable. Introduce t and new meaning for nil.
1444
1445 A value of nil for text-quoting-style now means "no translation". t means
1446 "Use curved quotes if displayable".
1447
1448 * src/doc.c (text-quoting-style (function)): modify for new semantics.
1449 (text-quoting-style (variable)): Amend the doc string, set the default value
1450 to t.
1451
1452 * lisp/cus-start.el: (top level): Create a customize entry for
1453 text-quoting-style in group display.
1454
1455 * etc/NEWS: Amend the entry for text-quoting-style.
1456
1457 * doc/emacs/display.texi (Text Display): Describe the translation of ASCII
1458 quotes to curved quotes, and how to influence or inhibit it.
1459
1460 * doc/lispref/control.texi (Signalling Errors)
1461 * doc/lispref/display.texi (Displaying Messages)
1462 * doc/lispref/strings.texi (Formatting Strings): Describe binding
1463 text-quoting-style to nil to inhibit unwanted quote translation.
1464
1465 * doc/lispref/help.texi (Keys in Documentation): Change text-quoting-style
1466 from a variable to a user option. Describe its changed set of values. State
1467 that it can be customized freely.
1468
14692017-10-01 Michael Albinus <michael.albinus@gmx.de>
1470
1471 eshell.texi improvements
1472
1473 * doc/misc/eshell.texi (Built-ins): eshell/sudo is a compiled
1474 Lisp function in `em-tramp.el'. Mention also $*, $1, $2, ...
1475 (Aliases): Add $*, $1, $2, ... to the variable index.
1476
14772017-08-15 Alan Third <alan@breton-build.holly.idiocy.org>
1478
1479 Fix ns-win.el on GNUstep
1480
1481 * lisp/term/ns-win.el: Appkit version check only works on macOS, so
1482 don't try it when not using Cocoa.
1483
14842017-10-01 Martin Rudalics <rudalics@gmx.at>
1485
1486 Fix reference style in org.texi
1487
1488 * doc/misc/org.texi (A Texinfo example): Fix reference style.
1489
14902017-10-01 Martin Rudalics <rudalics@gmx.at>
1491
1492 Improve handling of iconification of child frames (Bug#28611)
1493
1494 * src/frame.c (Ficonify_frame): Handle `iconify-child-frame' option.
1495 (syms_of_frame): New symbols Qiconify_top_level and Qmake_invisible.
1496 (iconify_child_frame): New option.
1497 * lisp/cus-start.el (iconify-child-frame): Add customization
1498 properties.
1499 * doc/lispref/frames.texi (Child Frames): Describe new option
1500 `iconify-child-frame'. Don't index "top-level frame" twice.
1501
15022017-10-01 Noam Postavsky <npostavs@gmail.com>
1503
1504 Revert "Don't lose arguments to eshell aliases (Bug#27954)"
1505
1506 It broke the established argument handling methods provided by eshell
1507 aliases (Bug#28568).
1508 * doc/misc/eshell.texi (Aliases): Fix example, call out use of
1509 arguments in aliases.
1510 * lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias): Ignore
1511 ARGS.
1512
15132017-10-01 Noam Postavsky <npostavs@gmail.com>
1514
1515 Make "unsafe directory" error message more informative (Bug#865)
1516
1517 * lisp/server.el (server-ensure-safe-dir): Produce a description for
1518 each "unsafe" condition.
1519
15202017-10-01 Eric Abrahamsen <eric@ericabrahamsen.net>
1521
1522 Fix slot typecheck in eieio-persistent
1523
1524 * lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
1525 An `or' form can specify multiple potential classes (or null) as
1526 valid types for a slot, but previously only the final element of the
1527 `or' was actually checked. Now returns all valid classes in the `or'
1528 form.
1529 (eieio-persistent-validate/fix-slot-value): Check if proposed value
1530 matches any of the valid classes.
1531 * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
1532 (eieio-test-multiple-class-slot): Test this behavior.
1533
15342017-09-30 Dmitry Gutov <dgutov@yandex.ru>
1535
1536 Fix semantic-ia-fast-jump
1537
1538 * lisp/cedet/semantic/ia.el (semantic-ia--fast-jump-helper):
1539 Use `pop-to-buffer-same-window' (bug#28645).
1540
15412017-09-30 Kaushal Modi <kaushal.modi@gmail.com>
1542
1543 Bind vc-region-history
1544
1545 * lisp/vc/vc-hooks.el (vc-prefix-map):
1546 Bind `vc-region-history' to 'C-x v h', which was earlier bound to
1547 `vc-insert-headers' (Bug#27644).
1548 * doc/emacs/maintaining.texi (VC Change Log): Mention the new binding.
1549 * doc/emacs/vc1-xtra.texi (Version Headers): Remove the association of
1550 'C-x v h' with `vc-insert-headers'.
1551 (http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00957.html)
1552
15532017-09-30 Allen Li <vianchielfaura@gmail.com> (tiny change)
1554
1555 Exit macro definition on undefined keys
1556
1557 * lisp/subr.el (undefined): Error out of kmacro definition, if any.
1558 (Bug#28008)
1559
15602017-09-30 Tim Landscheidt <tim@tim-landscheidt.de> (tiny change)
1561
1562 Reset bidi-paragraph-direction on article rendering
1563
1564 * lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Reset
1565 bidi-paragraph-direction on article rendering. (Bug#28454)
1566
15672017-09-30 Eli Zaretskii <eliz@gnu.org>
1568
1569 Fix url-http use of url-current-object
1570
1571 * lisp/url/url-http.el (url-http): Bind url-current-object before
1572 calling url-http-find-free-connection. (Bug#28515)
1573
15742017-09-30 Andy Moreton <andrewjmoreton@gmail.com>
1575
1576 Avoid assertions in vc-hg.el on MS-Windows
1577
1578 * lisp/vc/vc-hg.el (vc-hg--pcre-to-elisp-re)
1579 (vc-hg--slurp-hgignore, vc-hg--read-repo-requirements)
1580 (vc-hg-state-fast): Use file-name-absolute-p and directory-name-p
1581 instead of relying on Unix file-name syntax. This avoids
1582 assertion violations on MS-Windows.
1583
15842017-09-30 Eli Zaretskii <eliz@gnu.org>
1585
1586 Improve documentation of 'copy-sequence'
1587
1588 * src/fns.c (Fcopy_sequence):
1589 * doc/lispref/sequences.texi (Sequence Functions): Mention the
1590 exception when copying an empty sequence. (Bug#28627)
1591
15922017-09-30 Eli Zaretskii <eliz@gnu.org>
1593
1594 Minor update of ack.texi
1595
1596 * doc/emacs/ack.texi (Acknowledgments): Update Eli Zaretskii's
1597 contributions.
1598
15992017-09-30 N. Jackson <nljlistbox2@gmail.com> (tiny change)
1600
1601 * doc/emacs/emacs.texi (Acknowledgments): Add more contributors.
1602
16032017-09-30 Eli Zaretskii <eliz@gnu.org>
1604
1605 Improve indexing of multi-file/buffer Isearch commands
1606
1607 * doc/emacs/maintaining.texi (Identifier Search): Change wording
1608 of index entries to make them different from those for multi-file
1609 isearch commands. (Bug#28584)
1610 * doc/emacs/search.texi (Other Repeating Search): Index the
1611 multi-* commands. (Bug#28584) Rearrange the indexing to keep
1612 each index entry close to its subject.
1613
16142017-09-30 Mark Oteiza <mvoteiza@udel.edu>
1615
1616 Add CAM02 JCh and CAM02-UCS J'a'b' conversions
1617
1618 * src/lcms.c (rad2deg, parse_jch_list, parse_jab_list, xyz_to_jch):
1619 (jch_to_xyz, jch_to_jab, jab_to_jch): New functions.
1620 (lcms-jch->xyz, lcms-jch->xyz, lcms-jch->jab, lcms-jab->jch): New Lisp
1621 functions.
1622 (lcms-cam02-ucs): Refactor.
1623 (syms_of_lcms2): Declare new functions.
1624 * test/src/lcms-tests.el (lcms-roundtrip, lcms-ciecam02-gold):
1625 (lcms-jmh->cam02-ucs-silver): New tests.
1626 * etc/NEWS: Mention new functions.
1627
16282017-09-30 Eli Zaretskii <eliz@gnu.org>
1629
1630 Fix uses of @kindex in the Emacs manual
1631
1632 * doc/emacs/programs.texi (Expressions, Semantic, Hungry Delete):
1633 * doc/emacs/mark.texi (Global Mark Ring)
1634 (Disabled Transient Mark):
1635 * doc/emacs/buffers.texi (Select Buffer):
1636 * doc/emacs/mule.texi (File Name Coding): Fix @kindex entries
1637 which used @key. Reported by Marcin Borkowski <mbork@mbork.pl>.
1638
16392017-09-30 Paul Eggert <eggert@cs.ucla.edu>
1640
1641 Merge from gnulib
1642
1643 This incorporates:
1644 2017-09-28 string: code style
1645 2017-09-25 sys_types: update URL
1646 2017-09-23 install-sh: do not assume / = //
1647 2017-09-21 mktime: port to OpenVMS
1648 * build-aux/install-sh, m4/mktime.m4, m4/string_h.m4:
1649 * m4/sys_types_h.m4: Copy from Gnulib.
1650 * lib/gnulib.mk.in: Regenerate.
1651
16522017-09-30 Paul Eggert <eggert@cs.ucla.edu>
1653
1654 Prefer HTTPS to HTTP for gnu.org
1655
1656 This catches some URLs I missed in my previous scan,
1657 or perhaps were added after the scan.
1658
16592017-09-30 Noam Postavsky <npostavs@gmail.com>
1660
1661 Wait for frame visibility with timeout in w32term too
1662
1663 * src/w32term.c (syms_of_w32term) [x-wait-for-event-timeout]: New
1664 variable.
1665 (x_make_frame_visible): Wait for frame to become visible according to
1666 its value.
1667 (input_signal_count): Remove.
1668
16692017-09-30 Noam Postavsky <npostavs@gmail.com>
1670
1671 Bring back the busy wait after x_make_frame_visible (Bug#25521)
1672
1673 But wait specfically for a MapNotify event, and only for a
1674 configurable amount of time.
1675 * src/xterm.c (syms_of_xterm) [x-wait-for-event-timeout]: New
1676 variable.
1677 (x_wait_for_event): Use it instead of hardcoding the wait to 0.1s.
1678 (x_make_frame_visible): Call x_wait_for_event at the end.
1679 * etc/NEWS: Announce x_wait_for_event.
1680
16812017-09-29 Eli Zaretskii <eliz@gnu.org>
1682
1683 Fix last doc string change in simple.el
1684
1685 * lisp/simple.el (shell-command-saved-pos)
1686 (region-extract-function, region-bounds): Doc fixes. (Bug#28609)
1687
16882017-09-29 Eli Zaretskii <eliz@gnu.org>
1689
1690 Revert "bug#28609: simple.el"
1691
1692 This reverts commit a75ab3b3fb8ab69ef38a94403d061f88f3b5b63e.
1693
16942017-09-29 Devon Sean McCullough <Emacs-Hacker2017@jovi.net>
1695
1696 bug#28609: simple.el
1697
1698 Correct grammar; also, call a pair a pair.
1699
1700 (cherry picked from commit 25ef543a97a80718cc4eb33734d393420a43f41e)
1701
17022017-09-29 Rasmus <rasmus@gmx.us>
1703
1704 Merge branch 'emacs-26' into scratch/org-mode-merge
1705
17062017-09-29 Noam Postavsky <npostavs@gmail.com>
1707
1708 Fix ert backtrace saving for non-`signal'ed errors (Bug#28333)
1709
1710 * lisp/emacs-lisp/ert.el (ert--run-test-debugger): Take the frames
1711 above the `debugger' frame, rather than assuming there will be a
1712 `signal' frame.
1713
17142017-09-28 Alan Third <alan@idiocy.org>
1715
1716 Revert "Fix build on macOS (bug#28571)"
1717
1718 This reverts commit fec63089d53d2196b0348086aeed70277fbc02c0.
1719
1720 Prematurely pushed.
1721
17222017-09-28 Alan Third <alan@idiocy.org>
1723
1724 Fix build on macOS (bug#28571)
1725
1726 * src/conf_post.h (HAVE_FUTIMENS, HAVE_FUTIMESAT, HAVE_UTIMENSAT)
1727 [DARWIN_OS]: Undefine.
1728
17292017-09-28 Simen Heggestøyl <simenheg@gmail.com>
1730
1731 Add tests for `css-current-defun-name'
1732
1733 * test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name)
1734 (css-test-current-defun-name-nested)
1735 (css-test-current-defun-name-complex): New tests for
1736 `css-current-defun-name'.
1737
17382017-09-28 Martin Rudalics <rudalics@gmx.at>
1739
1740 In w32fullscreen_hook don't add decorations to undecorated frames
1741
1742 * src/w32term.c (w32fullscreen_hook): Do not add (or try to
1743 remove) decorations for undecorated frames.
1744
17452017-09-28 João Távora <joaotavora@gmail.com>
1746
1747 Revert "Split flymake.el into flymake-proc.el and flymake-ui.el"
1748
1749 In other words, re-coalesce the two files,
1750 lisp/progmodes/flymake-proc.el and lisp/progmodes/flymake-ui.el, back
1751 into a single one, lisp/progmodes/flymake.el.
1752
1753 The changesets "Prefer HTTPS to FTP and HTTP in documentation" and
1754 "allow nil init in flymake-allowed-file-name-masks to disable flymake"
1755 are kept in place in the new lisp/progmodes/flymake.el.
1756
1757 This reverts Git commit eb34f7f5a29e7bf62326ecb6e693f28878be28cd.
1758
1759 Don't merge this back to master as development happening there builds
1760 upon this work. See also
1761 https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00932.html.
1762
17632017-09-28 João Távora <joaotavora@gmail.com>
1764
1765 Revert "Add flymake-backends defcustom"
1766
1767 This reverts Git commit 13993c46a21495167517f76d2e36b6c09ac5e89e.
1768
1769 Don't merge this back to master as development happening there builds
1770 upon this work. See also
1771 https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00932.html
1772
17732017-09-27 Paul Eggert <eggert@cs.ucla.edu>
1774
1775 * src/editfns.c (styled_format): Fix typo in previous change.
1776
17772017-09-27 Paul Eggert <eggert@cs.ucla.edu>
1778
1779 Avoid some unnecessary copying in Fformat etc.
1780
1781 This patch is just for performance; it should not affect behavior.
1782 On my platform, it made the microbenchmark (format "%S" load-path)
1783 run about 45% faster. It should also speed up calls like (message
1784 "%s" STRING).
1785 * src/callint.c (Fcall_interactively):
1786 * src/dbusbind.c (XD_OBJECT_TO_STRING):
1787 * src/editfns.c (Fmessage, Fmessage_box):
1788 * src/xdisp.c (vadd_to_log, Ftrace_to_stderr):
1789 Use styled_format instead of Fformat or Fformat_message,
1790 to avoid unnecessary copying.
1791 * src/editfns.c (styled_format): New arg NEW_RESULT.
1792 All uses changed. Reuse an input string if it has the
1793 right value and if !NEW_RESULT.
1794 * src/lisp.h (style_format): New decl.
1795
17962017-09-26 John Wiegley <johnw@newartisans.com>
1797
1798 lisp/simple.el: Indicate when a list of pairs is meant in a docstring
1799
18002017-09-26 Devon Sean McCullough <Emacs-Hacker2017@jovi.net>
1801
1802 bug#28609: simple.el
1803
1804 Correct grammar; also, call a pair a pair.
1805
18062017-09-26 Dmitry Gutov <dgutov@yandex.ru>
1807
1808 Use a separate syntax-ppss cache for narrowed buffers
1809
1810 * lisp/emacs-lisp/syntax.el (syntax-ppss-wide):
1811 New variable, to contain the data from `syntax-ppss-last' and
1812 `syntax-ppss-cache'.
1813 (syntax-ppss-cache, syntax-ppss-last): Remove.
1814 (syntax-ppss-narrow, syntax-ppss-narrow-start): New variables.
1815 (syntax-ppss-flush-cache): Flush both caches.
1816 (syntax-ppss--data): Return the appropriate last result and
1817 buffer cache for the current restriction.
1818 (syntax-ppss, syntax-ppss-debug): Use it (bug#22983).
1819
18202017-09-26 Joerg Behrmann <behrmann@physik.fu-berlin.de> (tiny change)
1821
1822 Improve python3-compatibility of fallback completion (Bug#28499)
1823
1824 * lisp/progmodes/python.el (python-eldoc-setup-code): Use
1825 inspect.getfullargspec instead of inspect.getargspec to avoid a
1826 deprecation warning on every usage of eldoc in python-mode.
1827
18282017-09-26 Noam Postavsky <npostavs@gmail.com>
1829
1830 Fix subr-x-tests when running from elc
1831
1832 * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-and-let*-test-group-1):
1833 Use `eval' around the `should-error' cases.
1834
18352017-09-26 Noam Postavsky <npostavs@gmail.com>
1836
1837 * lisp/eshell/esh-util.el (eshell-condition-case): Add debug declaration.
1838
18392017-09-26 Noam Postavsky <npostavs@gmail.com>
1840
1841 Make sh-indentation into an alias for sh-basic-offset (Bug#21751)
1842
1843 * lisp/progmodes/sh-script.el (sh-indentation): Redefine as obsolete
1844 variable alias for `sh-basic-offset'.
1845 (sh-mode, sh-smie--indent-continuation)
1846 (sh-smie-rc-rules, sh-basic-indent-line): Replace `sh-indentation'
1847 with `sh-basic-offset'.
1848
18492017-09-26 Noam Postavsky <npostavs@gmail.com>
1850
1851 Fix loading of smie-config rules (Bug#24848)
1852
1853 * lisp/emacs-lisp/smie.el (smie-config--setter): Use `set-default'
1854 instead of `setq-default'.
1855 (smie-config): Use `custom-initialize-set' instead of
1856 `custom-initialize-default' as the :initialize argument.
1857
1858 * lisp/progmodes/sh-script.el (sh-learn-buffer-indent): Mention that
1859 we call `smie-config-guess' so that the user will have a chance to
1860 find the correct docstring to consult. Remove hedging comments
1861 regarding use of abnormal hooks.
1862
18632017-09-26 Dmitry Gutov <dgutov@yandex.ru>
1864
1865 Reset default-directory inside *xref-grep* buffer
1866
1867 * lisp/progmodes/xref.el (xref-collect-matches):
1868 Reset default-directory, too. (Bug#28575)
1869
18702017-09-25 Michael Albinus <michael.albinus@gmx.de>
1871
1872 * test/lisp/tramp-tests.el (tramp-test21-file-links): Special code for smb.
1873
18742017-09-25 Mark Oteiza <mvoteiza@udel.edu>
1875
1876 Loosen strict parsing requirement for desktop files
1877
1878 There are other desktop-looking files, for instance those having to do
1879 with MIME typess, that would benefit from being able to be read by this
1880 function. It helps to have some flexibility.
1881 * lisp/xdg.el (xdg-desktop-read-file): Remove an error condition.
1882 * test/lisp/xdg-tests.el: Remove a test.
1883
18842017-09-25 Mark Oteiza <mvoteiza@udel.edu>
1885
1886 * lisp/xdg.el (xdg-thumb-uri): Fix doc string.
1887
18882017-09-25 Martin Rudalics <rudalics@gmx.at>
1889
1890 Fix documentation of `make-frame' and related variables and hooks
1891
1892 * lisp/frame.el (before-make-frame-hook)
1893 (after-make-frame-functions, frame-inherited-parameters)
1894 (make-frame): Fix doc-strings.
1895 * doc/lispref/frames.texi (Creating Frames): Fix description
1896 of `make-frame' and related variables and hooks.
1897
18982017-09-24 Eric Abrahamsen <eric@ericabrahamsen.net>
1899
1900 Accept new `always' value for option `buffer-offer-save'
1901
1902 Also revert ee512e9a82
1903
1904 * lisp/files.el (buffer-offer-save): In addition to nil and t, now
1905 allows a third symbol value, `always'. A buffer where this option is
1906 set to `always' will always be offered for save by
1907 `save-some-buffers'.
1908 (save-some-buffers): Check the exact value of this buffer-local
1909 variable. No longer check the buffer name, or the value of
1910 `write-contents-functions'.
1911 * doc/lispref/buffers.texi (Killing Buffers): Note change in manual.
1912 * doc/lispref/files.texi (Saving Buffers): Remove note about buffer
1913 names.
1914 * etc/NEWS: Mention in NEWS.
1915
19162017-09-24 Alan Third <alan@idiocy.org>
1917
1918 Improve new NS scrolling variable names
1919
1920 * src/nsterm.m (ns-use-system-mwheel-acceleration): Replace with
1921 'ns-use-mwheel-acceleration'.
1922 (ns-touchpad-scroll-line-height): Replace with
1923 'ns-mwheel-line-height'.
1924 (ns-touchpad-use-momentum): Replace with 'ns-use-mwheel-momentum'.
1925 * etc/NEWS: Change variable names.
1926
19272017-09-24 Philipp Stephani <phst@google.com>
1928
1929 Document 'replace-buffer-contents' in the manual.
1930
1931 * doc/lispref/text.texi (Replacing): New node.
1932
19332017-09-23 Alan Third <alan@idiocy.org>
1934
1935 Fix undecorated frame resizing issues on NS (bug#28512)
1936
1937 * src/nsterm.m (EmacsView::updateFrameSize): Don't wait for the
1938 toolbar on undecorated frames.
1939 (EmacsView::initFrameFromEmacs): Group window flags correctly.
1940
19412017-09-23 Eli Zaretskii <eliz@gnu.org>
1942
1943 Fix doc string of 'dired-listing-switches'
1944
1945 * lisp/dired.el (dired-listing-switches): Fix the quoting
1946 example. (Bug#28569)
1947
19482017-09-23 Eli Zaretskii <eliz@gnu.org>
1949
1950 Documentation improvements for 'display-line-numbers'
1951
1952 * doc/emacs/display.texi (Display Custom): Document a few more
1953 options for display-line-numbers. (Bug#28533) Fix a typo.
1954
19552017-09-22 Eli Zaretskii <eliz@gnu.org>
1956
1957 Fix last change in bat-mode.el
1958
1959 * lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Fix last
1960 change. (Bug#28311)
1961
19622017-09-22 Eli Zaretskii <eliz@gnu.org>
1963
1964 Fix restoring in GUI sessions desktop saved in TTY sessions
1965
1966 * lisp/frameset.el (frameset-filter-font-param): New function.
1967 (frameset-persistent-filter-alist): Use it for processing the
1968 'font' frame parameter. (Bug#17352)
1969
19702017-09-22 Eli Zaretskii <eliz@gnu.org>
1971
1972 Improve syntax highlighting in bat-mode
1973
1974 * lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Improve
1975 font-locking of environment variables. Suggested by Achim Gratz
1976 <Stromeko@nexgo.de>. (Bug#28311) (Bug#18405)
1977
19782017-09-22 Eli Zaretskii <eliz@gnu.org>
1979
1980 Document the 'list-FOO' convention
1981
1982 * doc/lispref/tips.texi (Coding Conventions): Document the
1983 list-FOO convention.
1984
19852017-09-22 Mark Oteiza <mvoteiza@udel.edu>
1986
1987 Expose viewing conditions in CAM02-UCS metric
1988
1989 Also add tests from the colorspacious library. Finally, catch an
1990 errant calculation, where degrees were not being converted to radians.
1991 * src/lcms.c (deg2rad, default_viewing_conditions):
1992 (parse_viewing_conditions): New functions.
1993 (lcms-cam02-ucs): Add comments pointing to references used. Expand
1994 the docstring and explain viewing conditions. JCh hue is given in
1995 degrees and needs to be converted to radians.
1996 (lcms-d65-xyz): Remove. No need to duplicate this in Lisp or make the
1997 API needlessly impure.
1998 * test/src/lcms-tests.el: Reword commentary.
1999 (lcms-rgb255->xyz): New function.
2000 (lcms-cri-cam02-ucs): Fix let-binding.
2001 (lcms-dE-cam02-ucs-silver): New test, assimilated from colorspacious.
2002
20032017-09-21 Alan Third <alan@idiocy.org>
2004
2005 Revert "Set frame size to actual requested size (bug#18215)"
2006
2007 This reverts commit d31cd79b40dbd5459b16505a4ee4340210499277.
2008
2009 See bug#28536. I misunderstood bug#18215. It wasn't a bug.
2010
20112017-09-21 Gemini Lasswell <gazally@runbox.com>
2012
2013 Add tests for Edebug
2014
2015 * tests/lisp/emacs-lisp/edeug-tests.el: New file.
2016 * tests/lisp/emacs-lisp/edebug-resources/edebug-test-code.el: New file.
2017
20182017-09-21 Gemini Lasswell <gazally@runbox.com>
2019
2020 Catch more messages in ert-with-message-capture
2021
2022 * lisp/emacs-lisp/ert-x.el (ert-with-message-capture): Capture
2023 messages from prin1, princ and print.
2024 (ert--make-message-advice): New function.
2025 (ert--make-print-advice): New function.
2026
20272017-09-21 Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
2028
2029 Support setting region from secondary selection and vice versa
2030
2031 * lisp/mouse.el (secondary-selection-exist-p): New function to
2032 allow callers to tell existence of the secondary selection
2033 in current buffer.
2034 (secondary-selection-to-region): New function to set
2035 beginning and end of the region from those of the secondary
2036 selection.
2037 (secondary-selection-from-region): New function to set
2038 beginning and end of the secondary selection from those of
2039 the region. (Bug#27530)
2040
2041 * etc/NEWS: Mention the new functions.
2042
20432017-09-20 Paul Eggert <eggert@cs.ucla.edu>
2044
2045 Fix new copy-directory bug with empty dirs
2046
2047 Problem reported by Afdam Plaice (Bug#28520) and by Eli Zaretskii
2048 (Bug#28483#34). This is another bug that I introduced in my
2049 recent copy-directory changes.
2050 * lisp/files.el (copy-directory): Work with empty subdirectories, too.
2051 * test/lisp/files-tests.el (files-tests--copy-directory):
2052 Test for this bug.
2053
20542017-09-20 Eli Zaretskii <eliz@gnu.org>
2055
2056 * doc/lispref/strings.texi (Formatting Strings): Improve indexing.
2057
20582017-09-20 Eli Zaretskii <eliz@gnu.org>
2059
2060 Fix 2 testsuite tests for MS-Windows
2061
2062 * test/lisp/ibuffer-tests.el (test-buffer-list): Don't try to
2063 create files with "*" in their names.
2064 * test/src/editfns-tests.el (format-time-string-with-zone): Adapt
2065 results to MS-Windows build. Reported by Fabrice Popineau
2066 <fabrice.popineau@gmail.com>.
2067
20682017-09-20 Mark Oteiza <mvoteiza@udel.edu>
2069
2070 Rename timer-list to list-timers
2071
2072 * doc/emacs/anti.texi (Antinews):
2073 * doc/lispref/os.texi (Timers):
2074 * etc/NEWS:
2075 * lisp/emacs-lisp/timer-list.el:
2076 (timer-list-mode): Rename timer-list to list-timers.
2077
20782017-09-19 Alan Third <alan@idiocy.org>
2079
2080 Provide native touchpad scrolling on macOS
2081
2082 * etc/NEWS: Describe changes.
2083 * lisp/term/ns-win.el (mouse-wheel-scroll-amount,
2084 mouse-wheel-progressive-speed): Set to smarter values for macOS
2085 touchpads.
2086 * src/nsterm.m (emacsView::mouseDown): Use precise scrolling deltas to
2087 calculate scrolling for touchpads and mouse wheels.
2088 (syms_of_nsterm): Add variables 'ns-use-system-mwheel-acceleration',
2089 'ns-touchpad-scroll-line-height' and 'ns-touchpad-use-momentum'.
2090 * src/keyboard.c (make_lispy_event): Pass on .arg when relevant.
2091 * src/termhooks.h (event_kind): Update comments re. WHEEL_EVENT.
2092 * lisp/mwheel.el (mwheel-scroll): Use line count.
2093 * lisp/subr.el (event-line-count): New function.
2094
20952017-09-19 Eli Zaretskii <eliz@gnu.org>
2096
2097 Fix MinGW64 build broken by recent MinGW64 import libraries
2098
2099 * configure.ac (W32_LIBS): Put -lusp10 before -lgdi32, as latest
2100 MinGW64 import libraries require that. (Bug#28493)
2101
2102 * src/Makefile.in: Adjust commentary to the new order of w32
2103 libraries.
2104
21052017-09-19 Eli Zaretskii <eliz@gnu.org>
2106
2107 Fix crashes in 'move-point-visually' in minibuffer windows
2108
2109 * src/xdisp.c (Fmove_point_visually): Fix off-by-one error in
2110 comparing against the last valid glyph_row of a window glyph
2111 matrix. (Bug#28505)
2112
21132017-09-19 Eli Zaretskii <eliz@gnu.org>
2114
2115 * src/emacs.c (usage_message): Don't mention 'find-file'.
2116
21172017-09-19 Eli Zaretskii <eliz@gnu.org>
2118
2119 Fix a minor inaccuracy in the Emacs manual
2120
2121 * doc/emacs/cmdargs.texi (Action Arguments): Don't mention
2122 'find-file', as the implementation has changed. Reported by
2123 Everton J. Carpes <everton.carpes@gmail.com> in
2124 http://lists.gnu.org/archive/html/help-gnu-emacs/2017-09/msg00146.html.
2125
21262017-09-19 Eli Zaretskii <eliz@gnu.org>
2127
2128 Fix errors in flyspell-post-command-hook
2129
2130 * lisp/textmodes/ispell.el (ispell-get-decoded-string): Handle the
2131 case of a nil Nth element of the language dictionary slot. This
2132 avoids errors in 'flyspell-post-command-hook' when switching
2133 dictionaries with some spell-checkers. (Bug#28501)
2134
21352017-09-19 Michael Albinus <michael.albinus@gmx.de>
2136
2137 Work on Tramp's file-truename
2138
2139 * lisp/net/tramp-sh.el (tramp-perl-file-truename):
2140 Check also for symlinks.
2141 (tramp-sh-handle-file-truename): Move check for a symlink
2142 cycle to the end. Do not blame symlinks which look like a
2143 remote file name.
2144
2145 * lisp/net/tramp.el (tramp-handle-file-truename): Expand result.
2146
21472017-09-19 Paul Eggert <eggert@cs.ucla.edu>
2148
2149 Fix bug with make-directory on MS-Windows root
2150
2151 * lisp/files.el (files--ensure-directory): Treat any error, not
2152 just file-already-exists, as an opportunity to check whether DIR
2153 is already a directory (Bug#28508).
2154
21552017-09-19 Tom Tromey <tom@tromey.com>
2156
2157 Fix log-view-diff-common when point is after last entry
2158
2159 Bug#28466
2160 * lisp/vc/log-view.el (log-view-diff-common): If point is after last
2161 entry, look at the previous revision.
2162
21632017-09-18 Ken Brown <kbrown@cornell.edu>
2164
2165 Adapt fileio-tests--symlink-failure to Cygwin
2166
2167 * test/src/fileio-tests.el (fileio-tests--symlink-failure)
2168 [CYGWIN]: Skip the case of a symlink target starting with '\';
2169 this is treated specially on Cygwin.
2170
21712017-09-18 Eric Abrahamsen <eric@ericabrahamsen.net>
2172
2173 Ignore buffers whose name begins with a space in save-some-buffers
2174
2175 * lisp/files.el (save-some-buffers): Consider these buffers
2176 "internal", and don't prompt the user to save them.
2177 * doc/lispref/files.texi: Document.
2178
21792017-09-18 Michael Albinus <michael.albinus@gmx.de>
2180
2181 Improve tramp-interrupt-process robustness
2182
2183 * lisp/net/tramp.el (tramp-interrupt-process): Wait, until the
2184 process has disappeared.
2185
21862017-09-18 Michael Albinus <michael.albinus@gmx.de>
2187
2188 Minor Tramp doc update
2189
2190 * doc/misc/tramp.texi (Frequently Asked Questions):
2191 Mention `vc-handled-backends'.
2192
21932017-09-18 Mark Oteiza <mvoteiza@udel.edu>
2194
2195 Fix gensym
2196
2197 * lisp/subr.el (gensym): Actually implement the default prefix.
2198 * test/lisp/subr-tests.el (subr-tests--gensym): New test.
2199
22002017-09-18 Rasmus <rasmus@gmx.us>
2201
2202 Update Org to v9.1.1
2203
2204 Please see etc/ORG-NEWS for major changes.
2205
22062017-09-18 Michael Albinus <michael.albinus@gmx.de>
2207
2208 Cleanup in files-tests.el
2209
2210 * test/lisp/files-tests.el (files-tests--make-directory)
2211 (files-tests--copy-directory): Cleanup temporary directories.
2212
22132017-09-18 Paul Eggert <eggert@cs.ucla.edu>
2214
2215 Remove old cl-assert calls in 'newline'
2216
2217 * lisp/simple.el (newline): Remove cl-assert calls
2218 that didn't seem to be helping us debug Bug#18913,
2219 and that caused problems as reported in Bug#28280.
2220 Suggested by Glenn Morris (Bug#28280#8).
2221
22222017-09-18 Paul Eggert <eggert@cs.ucla.edu>
2223
2224 Avoid crash with C-g C-g in GC
2225
2226 Problem reported by Richard Stallman (Bug#17406).
2227 Based on fix suggested by Eli Zaretskii (Bug#28279#16).
2228 * src/term.c (tty_send_additional_strings):
2229 Use only safe accessors, to avoid crash when C-g C-g in GC.
2230
22312017-09-18 Paul Eggert <eggert@cs.ucla.edu>
2232
2233 Fix format-time-string %Z bug with negative tz
2234
2235 * src/editfns.c (tzlookup): Fix sign error in %Z when a purely
2236 numeric zone is negative (Bug#28746).
2237 * test/src/editfns-tests.el (format-time-string-with-zone):
2238 Add test for this bug.
2239
22402017-09-18 Paul Eggert <eggert@cs.ucla.edu>
2241
2242 message-citation-line-format %Z is now tz name
2243
2244 * etc/NEWS:
2245 * lisp/gnus/message.el (message-citation-line-format):
2246 Fix doc to match new behavior (Bug#28476).
2247
22482017-09-18 Mark Oteiza <mvoteiza@udel.edu>
2249
2250 Use doc-view or pdf-tools on any window-system
2251
2252 * lisp/net/mailcap.el (mailcap-mime-data): Simply check for
2253 window-system.
2254
22552017-09-18 Paul Eggert <eggert@cs.ucla.edu>
2256
2257 Fix bug with min and max and NaNs
2258
2259 * src/data.c (minmax_driver): Fix bug with (min 0 NaN), which
2260 mistakenly yielded 0. Also, pacify GCC in a better way.
2261 * test/src/data-tests.el (data-tests-min): Test for the bug.
2262
22632017-09-17 Paul Eggert <eggert@cs.ucla.edu>
2264
2265 Fix recently-introduced copy-directory bug
2266
2267 Problem reported by Andrew Christianson (Bug#28451):
2268 * lisp/files.el (copy-directory): If COPY-CONTENTS, make the
2269 destination directory if it does not exist, even if it is a
2270 directory name. Simplify, and omit unnecessary test for an
2271 already-existing non-directory target, since make-directory
2272 diagnoses that for us now.
2273 * test/lisp/files-tests.el (files-tests--copy-directory):
2274 Test for this bug.
2275
22762017-09-17 Paul Eggert <eggert@cs.ucla.edu>
2277
2278 Merge from Gnulib
2279
2280 This incorporates:
2281 2017-09-16 manywarnings: port to GCC on 64-bit MS-Windows
2282 2017-09-13 all: Replace many more http URLs by https URLs
2283 * build-aux/config.guess, build-aux/config.sub:
2284 * build-aux/gitlog-to-changelog, doc/misc/texinfo.tex:
2285 * lib/allocator.h, lib/count-leading-zeros.h:
2286 * lib/count-trailing-zeros.h, lib/dup2.c, lib/filevercmp.c:
2287 * lib/fstatat.c, lib/fsync.c, lib/ftoastr.c, lib/ftoastr.h:
2288 * lib/intprops.h, lib/signal.in.h, lib/stdio-impl.h, lib/stdio.in.h:
2289 * lib/unistd.in.h, lib/utimens.c, m4/alloca.m4, m4/extern-inline.m4:
2290 * m4/fstatat.m4, m4/gnulib-common.m4, m4/manywarnings.m4:
2291 * m4/std-gnu11.m4, m4/sys_types_h.m4, m4/vararrays.m4:
2292 Copy from Gnulib.
2293 * lib/gnulib.mk.in: Regenerate.
2294
22952017-09-17 Michael Albinus <michael.albinus@gmx.de>
2296
2297 Fix compatibility problem in Tramp
2298
2299 * lisp/net/tramp.el (tramp-interrupt-process): Better error handling.
2300
2301 * lisp/net/tramp-compat.el (default-toplevel-value): Move up.
2302 (top): Do not call `tramp-change-syntax' anymore.
2303 (tramp-compat-directory-name-p): New defalias.
2304
2305 * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
2306 * lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
2307 * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
2308 (tramp-smb-handle-copy-file): Use it.
2309
2310 * test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
2311 Modify test.
2312
23132017-09-17 Eli Zaretskii <eliz@gnu.org>
2314
2315 Avoid GCC 7 compilation warning in eval.c
2316
2317 * src/eval.c (push_handler_nosignal): Use CACHEABLE to work around
2318 GCC compilation warning. Suggested by Paul Eggert <eggert@cs.ucla.edu>
2319 in http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00492.html.
2320
23212017-09-17 Michael Albinus <michael.albinus@gmx.de>
2322
2323 Adapt Tramp version. Do not merge
2324
2325 * doc/misc/trampver.texi:
2326 * lisp/net/trampver.el: Change version to "2.3.3.26.1".
2327 (customize-package-emacs-version-alist): Add Tramp version
2328 integrated in Emacs 26.1.
2329
23302017-09-17 Tom Tromey <tom@tromey.com>
2331
2332 Search for Syntax section when viewing MDN
2333
2334 * lisp/textmodes/css-mode.el (css--mdn-after-render): Also search for
2335 "Syntax" section.
2336
23372017-09-17 Tom Tromey <tom@tromey.com>
2338
2339 Allow smerge-keep-current to work for empty hunks
2340
2341 Bug#25555
2342 * lisp/vc/smerge-mode.el (smerge-get-current): Allow point to be at
2343 match-end.
2344 * test/lisp/vc/smerge-mode-tests.el: New file.
2345
23462017-09-17 Tom Tromey <tom@tromey.com>
2347
2348 Call vc-setup-buffer in vc-git-log-{in,out}going
2349
2350 Bug#28427:
2351 * lisp/vc/vc-git.el (vc-git-log-incoming, vc-git-log-outgoing): Call
2352 vc-setup-buffer.
2353
23542017-09-17 Stefan Monnier <monnier@iro.umontreal.ca>
2355
2356 Fix last change to textmodes/page-ext.el
2357
2358 * lisp/textmodes/page-ext.el (pages-directory): Make buffer writable
2359 while we build it (bug#28431).
2360
23612017-09-16 Glenn Morris <rgm@gnu.org>
2362
2363 * test/src/lcms-tests.el (lcms-cri-cam02-ucs): Skip if lcms2 not present.
2364
23652017-09-16 Glenn Morris <rgm@gnu.org>
2366
2367 * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.
2368
2369 (cherry picked from commit 8081df26911c63aadfce4ee8f6a7223d814baeaf)
2370
23712017-09-16 Eli Zaretskii <eliz@gnu.org>
2372
2373 Fix compilation warning in etags.c
2374
2375 * lib-src/etags.c (etags_mktmp) [DOS_NT]: Don't dereference a NULL
2376 pointer. Reported by Richard Copley <rcopley@gmail.com>.
2377
23782017-09-16 Mark Oteiza <mvoteiza@udel.edu>
2379
2380 Add lisp variable lcms-d65-xyz
2381
2382 This serves as the default optional argument for functions in this
2383 library.
2384 * src/lcms.c (lcms-d65-xyz): New variable.
2385 (lcms-cam02-ucs): Use it. Use better word in docstring. Fix bug
2386 color1 -> color2.
2387 * test/src/lcms-tests.el: Add some tests for lcms-cri-cam02-ucs.
2388 (lcms-colorspacious-d65): New variable.
2389
23902017-09-16 Gemini Lasswell <gazally@runbox.com>
2391
2392 * lisp/emacs-lisp/cl-macs.el (cl-letf): Fix Edebug spec (bug#24765)
2393
23942017-09-16 Andy Moreton <andrewjmoreton@gmail.com>
2395
2396 Avoid MinGW64 compiler warnings in unexw32.c
2397
2398 * src/unexw32.c (pDWP) [MINGW_W64]: Define to "16llx" only for the
2399 64-bit build.
2400
24012017-09-16 Eli Zaretskii <eliz@gnu.org>
2402
2403 Start emacs-26 release branch
2404
2405 * configure.ac:
2406 * nt/README.W32:
2407 * README:
2408 * msdos/sed2v2.inp: Increment Emacs version to 26.0.60.
2409
2410 * lisp/cus-edit.el (customize-changed-options-previous-release):
2411 Update value to "25.3".
2412
24132017-09-16 Alan Mackenzie <acm@muc.de>
2414
2415 Cope better with C++ and Objective-C protection keywords in class declarations
2416
2417 This fix fixes the fontification of a method inside a class at the time it is
2418 typed, when there is a protection keyword clause preceding it.
2419
2420 * lisp/progmodes/cc-engine.el (c-forward-keyword-clause): Handle protection
2421 keywords.
2422 (c-looking-at-decl-block): Avoid scanning forward over protection keyword
2423 clauses too eagerly.
2424
2425 * lisp/progmodes/cc-langs.el (c-protection-key c-post-protection-token): New
2426 lang defconsts and defvars.
2427
2428 * lisp/progmodes/cc-mode.el (c-fl-decl-start): When we encounter a protection
2429 keyword following a semicolon or brace, move forward over it before attempting
2430 to parse a type.
2431
24322017-09-16 Eli Zaretskii <eliz@gnu.org>
2433
2434 Fix order of sorted overlays returned by 'overlays-at'
2435
2436 * src/buffer.c (Foverlays_at): If SORTED is non-nil, reverse the
2437 list of results, to have their order as per the documentation.
2438 (Bug#28390)
2439
2440 * etc/NEWS: Mention the change in the behavior of overlays-at.
2441
24422017-09-16 Eli Zaretskii <eliz@gnu.org>
2443
2444 Disable execution of unsafe Lisp by Enriched Text mode
2445
2446 * src/xdisp.c (handle_display_spec): If the display property is
2447 wrapped in 'disable-eval' form, disable Lisp evaluation while
2448 processing this property.
2449 (handle_single_display_spec): Accept new argument ENABLE_EVAL_P.
2450 If that argument is false, don't evaluate Lisp while processing
2451 display properties.
2452
2453 * lisp/textmodes/enriched.el
2454 (enriched-allow-eval-in-display-props): New defcustom.
2455 (enriched-decode-display-prop): If
2456 enriched-allow-eval-in-display-props is nil, wrap the display
2457 property with 'disable-eval' to disable Lisp evaluation when the
2458 display property is processed for display. (Bug#28350)
2459 * lisp/gnus/mm-view.el (mm-inline-text): Re-enable processing of
2460 enriched text.
2461
2462 * doc/lispref/display.texi (Display Property): Document the
2463 'disable-eval' wrapping of 'display' properties.
2464 * doc/emacs/text.texi (Enriched Properties): Document
2465 'enriched-allow-eval-in-display-props'.
2466
2467 * etc/NEWS: Describe the security issues with Enriched Text mode
2468 and their solution.
2469
24702017-09-16 Eli Zaretskii <eliz@gnu.org>
2471
2472 Avoid MinGW64 compilation warning in w32.c
2473
2474 * src/w32.c (sys_strerror): Provide a prototype for MinGW64.
2475
24762017-09-16 Eli Zaretskii <eliz@gnu.org>
2477
2478 Fix MS-Windows build broken by recent changes in lcms.c
2479
2480 * src/lcms.c [WINDOWSNT]: Define types for cmsWhitePointFromTemp
2481 and cmsxyY2XYZ function pointers.
2482 (init_lcms_functions) [WINDOWSNT]: Load cmsWhitePointFromTemp and
2483 cmsxyY2XYZ from liblcms2.
2484 (cmsWhitePointFromTemp, cmsxyY2XYZ) [WINDOWSNT]: Redirect to the
2485 corresponding function pointers.
2486 (Flcms_temp_to_white_point): Minor stylistic changes. Doc fix.
2487 (syms_of_lcms2): Defsubr Slcms_temp_to_white_point.
2488
24892017-09-16 Eli Zaretskii <eliz@gnu.org>
2490
2491 Avoid GCC 7 compilation warning in data.c
2492
2493 * src/data.c (minmax_driver): Use UNINIT to avoid compilation
2494 warnings. Reported by Fabrice Popineau
2495 <fabrice.popineau@centralesupelec.fr>.
2496
24972017-09-16 Mark Oteiza <mvoteiza@udel.edu>
2498
2499 Add lcms-temp->white-point and initial tests
2500
2501 * src/lcms.c (lcms-temp->white-point): New function.
2502 * test/src/lcms-tests.el: New file.
2503
25042017-09-16 Mark Oteiza <mvoteiza@udel.edu>
2505
2506 Use cl-print in timer list
2507
2508 * lisp/emacs-lisp/timer-list.el (timer-list): Use cl-print
2509 for handling functions.
2510 (timer-list-mode): Capitalize major mode name. Set bidi direction
2511 as in tabulated-list-mode.
2512
25132017-09-15 Vincent Belaïche <vincentb1@users.sourceforge.net>
2514
2515 Make landscape layout with geometry package rather than a PostScript special.
2516
2517 * lisp/calendar/cal-tex.el (cal-tex-preamble): Make 12pt the
2518 default class option.
2519 (cal-tex-year, cal-tex-cursor-month-landscape): Pass landscape
2520 request to `cal-tex-insert-preamble' function call within the
2521 class option string.
2522 (cal-tex-cursor-month): Don't pass any longer "12pt" argument
2523 to `cal-tex-insert-preamble' function, as it is default.
2524 (cal-tex-insert-preamble): Suppress landscape and size
2525 argument, and replace them by a class-options string
2526 argument. Do not insert any longer "\special{landscape}" in
2527 case of landscape layout, as the job is made by the geometry
2528 package.
2529
25302017-09-15 Mark Oteiza <mvoteiza@udel.edu>
2531
2532 * lisp/json.el (json-read-keyword): Revert previous change to catch EOL.
2533
25342017-09-15 Eli Zaretskii <eliz@gnu.org>
2535
2536 One more attempt to avoid GCC 7 warnings in dispnew.c
2537
2538 * src/dispnew.c (adjust_glyph_matrix): Use eassume instead of
2539 eassert, to avoid compilation warnings about NULL pointer
2540 dereferences.
2541
25422017-09-15 Mark Oteiza <mvoteiza@udel.edu>
2543
2544 Fix color-distance docstring
2545
2546 Also feed the translated color to the metric argument.
2547 * src/xfaces.c (color-distance): Reword docstring to be more helpful.
2548 Avoid duplicating effort in lcms2 by passing the translated 16 bit RGB
2549 instead of the function's color arguments.
2550
25512017-09-15 Michael Albinus <michael.albinus@gmx.de>
2552
2553 Improve Tramp behaviour according to bug#27986
2554
2555 * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
2556 * lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
2557 * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
2558 (tramp-smb-handle-copy-file): Check, that NEWNAME is a
2559 directory name when existing. Use `file-name-as-directory'
2560 where appropriate.
2561
25622017-09-15 Mark Oteiza <mvoteiza@udel.edu>
2563
2564 More JSON optimization
2565
2566 Last I checked, inlining json-skip-whitespace didn't make much
2567 difference. However, changing defsubsts to define-inline results
2568 in roughly 15% reduction in read time on a 200K file.
2569 * lisp/json.el (json-advance, json-peek, json-pop):
2570 (json-skip-whitespace): Inline with define-inline.
2571 (json-read-keyword): Don't use whitespace syntax.
2572 (json-add-to-object): Simpler condition.
2573
25742017-09-15 Eli Zaretskii <eliz@gnu.org>
2575
2576 Avoid crashes due to invalid error forms from sentinels/filters
2577
2578 * src/process.c (exec_sentinel_error_handler): Make sure the error
2579 form passed to cmd_error_internal is a cons cell. (Bug#28430)
2580
25812017-09-15 Eli Zaretskii <eliz@gnu.org>
2582
2583 Avoid compilation warnings with GCC 7 on MS-Windows
2584
2585 * src/w32term.c (w32_setup_relief_color, construct_mouse_click)
2586 (w32_read_socket): Initialize variables to shut up bogus
2587 compilation warnings from GCC 7.
2588 * src/unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Cast to DWORD_PTR
2589 to avoid compiler warnings about printing signed values using %x
2590 format spec.
2591 * src/dispnew.c (adjust_glyph_matrix): Add eassert to avoid
2592 compiler warning about possible NULL pointer dereference.
2593 * src/lisp.h (pI): Tweak the definition some more for MinGW64.
2594
25952017-09-15 Martin Rudalics <rudalics@gmx.at>
2596
2597 Define gnutls_rnd for WINDOWSNT and HAVE_GNUTLS3 case only
2598
2599 * src/fns.c (gnutls_rnd): Define for WINDOWSNT and HAVE_GNUTLS3
2600 case only to avoid unused macros warning otherwise.
2601
26022017-09-15 Martin Rudalics <rudalics@gmx.at>
2603
2604 In w32heap.c bump up DUMPED_HEAP_SIZE
2605
2606 * src/w32heap.c (DUMPED_HEAP_SIZE): Bump up DUMPED_HEAP_SIZE
2607 to 13*1024*1024 for 32-bit non-wide-integer builds.
2608
26092017-09-15 Mark Oteiza <mvoteiza@udel.edu>
2610
2611 Bind n,p in timer-list
2612
2613 * lisp/emacs-lisp/timer-list.el (timer-list-mode-map): Bind n and p
2614 to next- and previous-line, respectively.
2615
26162017-09-14 Glenn Morris <rgm@gnu.org>
2617
2618 * lisp/net/tls.el (tls-program): Fix :version.
2619
26202017-09-14 Eli Zaretskii <eliz@gnu.org>
2621
2622 * configure.ac (--with-lcms2, --without-lcms2): New options.
2623
26242017-09-14 Eli Zaretskii <eliz@gnu.org>
2625
2626 Avoid 64-bit compilation warnings in unexw32.c
2627
2628 * src/unexw32.c (pDWP): New macro.
2629 (COPY_CHUNK, COPY_PROC_CHUNK): Declare 'count' as DWORD_PTR. Use
2630 pDWP for printing values that can be either 32-bit or 64-bit wide.
2631
26322017-09-14 Eli Zaretskii <eliz@gnu.org>
2633
2634 Fix warnings about formats in printf-like functions on MS-Windows
2635
2636 * src/lisp.h (pI) [__MINGW32__]: Provide definition that will
2637 hopefully DTRT with both MinGW64 and mingw.org's MinGW. See
2638 http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00171.html
2639 for the details.
2640 * src/conf_post.h (PRINTF_ARCHETYPE) [MINGW_W64]: Separate
2641 definition specific to MinGW64.
2642 (PRINTF_ARCHETYPE) [__MINGW32__]: For mingw.org's MinGW, use
2643 __mingw_printf__ in ANSI-compatible mode.
2644
26452017-09-14 Eli Zaretskii <eliz@gnu.org>
2646
2647 Support lcms2 in MS-Windows builds
2648
2649 * lisp/term/w32-win.el (dynamic-library-alist): Include
2650 association for the lcms2 library.
2651
2652 * src/lcms.c [WINDOWSNT]: Include windows.h and w32.h. Use
2653 DEF_DLL_FN to define pointers to dynamically loaded lcms2
2654 functions.
2655 (cmsCIE2000DeltaE, cmsCIECAM02Init, cmsCIECAM02Forward)
2656 (cmsCIECAM02Done): New macros.
2657 (init_lcms_functions, Flcms2_available_p): New functions.
2658 (Flcms_cie_de2000, Flcms_cam02_ucs) [WINDOWSNT]: Call
2659 init_lcms_functions.
2660 (syms_of_lcms2): Defsubr lcms2-available-p.
2661 * src/w32fns.c (syms_of_w32fns): DEFSYM Qlcms2.
2662
2663 * configure.ac: Include lcms2 in the final report and in
2664 emacs_config_features.
2665
2666 * nt/INSTALL:
2667 * nt/INSTALL.W64: Update with the information about lcms2 library.
2668
26692017-09-14 Paul Eggert <eggert@cs.ucla.edu>
2670
2671 Port renameat_noreplace to openSUSE 12.3
2672
2673 Problem reported by M. Nomiya in:
2674 http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00363.html
2675 * src/sysdep.c (renameat_noreplace):
2676 Call renameat2 only if CYGWIN.
2677
26782017-09-14 Paul Eggert <eggert@cs.ucla.edu>
2679
2680 Prefer HTTPS to FTP and HTTP in documentation
2681
2682 Most of this change is to boilerplate commentary such as license URLs.
2683 This change was prompted by ftp://ftp.gnu.org's going-away party,
2684 planned for November. Change these FTP URLs to https://ftp.gnu.org
2685 instead. Make similar changes for URLs to other organizations moving
2686 away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
2687 fsf.org when this works, as this will further help defend against
2688 man-in-the-middle attacks (for this part I omitted the MS-DOS and
2689 MS-Windows sources and the test tarballs to keep the workload down).
2690 HTTPS is not fully working to lists.gnu.org so I left those URLs alone
2691 for now.
2692
26932017-09-14 Paul Eggert <eggert@cs.ucla.edu>
2694
2695 Prefer HTTPS to HTTP for gnu.org
2696
2697 This patch just changes code files; a followup companion patch
2698 (much larger) will affect the commentary. This part is
2699 separated out to make it easier to review.
2700 * .dir-locals.el (change-log-mode):
2701 * lisp/org/org-info.el (org-info-other-documents)
2702 (org-info-map-html-url):
2703 * lisp/org/ox-html.el (org-html-creator-string):
2704 * lisp/startup.el (fancy-startup-text, fancy-about-text)
2705 (fancy-splash-head):
2706 * test/lisp/ffap-tests.el (ffap-other-window--bug-25352):
2707 * test/lisp/thingatpt-tests.el (thing-at-point-test-data):
2708 Use HTTPS instead of HTTP.
2709
27102017-09-13 Simen Heggestøyl <simenheg@gmail.com>
2711
2712 Add tests for color.el
2713
2714 * lisp/color.el (color-name-to-rgb, color-complement): Clarify in
2715 docstrings that RGB triplets should use four digits per component.
2716 (color-rgb-to-hsl): Break line to avoid "Hidden behind deeper element"
2717 warning.
2718
2719 * test/lisp/color-tests.el: New file.
2720
27212017-09-13 Lars Ingebrigtsen <larsi@gnus.org>
2722
2723 Make gnutls-verify-error work again with url-retrieve-synchronously
2724
2725 * lisp/url/url-gw.el (url-open-stream): Only use :nowait if
2726 we're doing async connections (bug#26835).
2727
2728 * lisp/url/url-parse.el (url): Add an asynchronous slot.
2729
2730 * lisp/url/url.el (url-asynchronous): New variable.
2731 (url-retrieve-internal): Store the value.
2732 (url-retrieve-synchronously): Bind the variable.
2733
27342017-09-13 Michael Albinus <michael.albinus@gmx.de>
2735
2736 Improve backward compatibility of tramp-tests
2737
2738 * test/lisp/net/tramp-tests.el (seq): Don't require.
2739 (tramp--test-emacs26-p): New defun.
2740 (tramp-test10-write-region, tramp-test11-copy-file)
2741 (tramp-test12-rename-file, tramp-test15-copy-directory)
2742 (tramp-test21-file-links): Use it.
2743 (tramp-test16-file-expand-wildcards): Use `copy-sequence'.
2744
27452017-09-13 Michael Albinus <michael.albinus@gmx.de>
2746
2747 * lisp/net/trampver.el (customize-package-emacs-version-alist):
2748
2749 Add Tramp version integrated in Emacs 25.3.
2750
27512017-09-13 Mark Oteiza <mvoteiza@udel.edu>
2752
2753 Add clarification to if-let* docstring
2754
2755 Also make its behaviour consistent with and-let* in that empty bindings
2756 results in success, not failure.
2757 * lisp/emacs-lisp/subr-x.el: Edit docstring, change else to then.
2758
27592017-09-13 Lars Ingebrigtsen <larsi@gnus.org>
2760
2761 Make fully qualified domain names more fully qualified
2762
2763 * lisp/gnus/message.el (message-make-fqdn): Don't try to use a
2764 system-name without any periods as a fully qualified domain name.
2765
27662017-09-13 Paul Eggert <eggert@cs.ucla.edu>
2767
2768 Remove unused file lib/getopt_.h
2769
2770 * lib/getopt_.h: Remove. It was renamed to lib/getopt.in.h etc.
2771 on 2011-01-08, but I forgot to remove the old file.
2772
27732017-09-13 Mark Oteiza <mvoteiza@udel.edu>
2774
2775 Remove "baroque" use of prefix argument from gensym
2776
2777 'cl-gensym' was simply moved here, but let us take an opportunity to
2778 shed some historical baggage.
2779 * lisp/subr.el (gensym): Remove special treatment of PREFIX as a
2780 number. Use "g" as prefix to differentiate from cl-gensym defaults.
2781 * doc/lispref/symbols.texi (Creating Symbols): Update accordingly.
2782 * lisp/emacs-lisp/cl-macs.el (cl--gensym-counter, cl-gensym): Restore.
2783
27842017-09-13 Mark Oteiza <mvoteiza@udel.edu>
2785
2786 Provide an lcms2 feature
2787
2788 * src/lcms.c (syms_of_lcms2): Provide "lcms2".
2789
27902017-09-13 Mark Oteiza <mvoteiza@udel.edu>
2791
2792 Add lcms2 interface
2793
2794 configure.ac: Add boilerplate for configuring and detecting liblcms2.
2795 etc/NEWS: Mention new configure option and color-distance change.
2796 src/Makefile.in: Add references to lcms.c and liblcms.
2797 src/emacs.c: Define lcms2 symbols.
2798 src/lcms.c: New file.
2799 src/lisp.h: Add declaration for lcms2.
2800 src/xfaces.c: Add optional METRIC argument.
2801
28022017-09-13 Mark Oteiza <mvoteiza@udel.edu>
2803
2804 Add other D series white points and some simple conversions
2805
2806 * lisp/color.el (color-d75-xyz, color-d55-xyz, color-d50-xyz): New
2807 constants.
2808 (color-xyz-to-xyy, color-xyy-to-xyz, color-lab-to-lch):
2809 (color-lch-to-lab): New functions.
2810
28112017-09-13 Mark Oteiza <mvoteiza@udel.edu>
2812
2813 Permit non-integral color gradients
2814
2815 * lisp/color.el (color-gradient): Float the step-number.
2816
28172017-09-13 Katsumi Yamaoka <yamaoka@jpl.org>
2818
2819 Protect against malformed MIME messages that cause inf-loop (bugfix)
2820
2821 * lisp/gnus/gnus-art.el (gnus-article-mime-handles):
2822 Protect against malformed MIME messages that cause inf-loop.
2823
28242017-09-13 Paul Eggert <eggert@cs.ucla.edu>
2825
2826 Merge from Gnulib
2827
2828 This incorporates:
2829 2017-09-13 all: prefer https: URLs
2830 This just changes http: to https: in comments,
2831 in files copied from Gnulib.
2832
28332017-09-13 Dmitry Gutov <dgutov@yandex.ru>
2834
2835 Call vc-resynch-buffer in vc-git-resolve-when-done
2836
2837 * lisp/vc/vc-git.el (vc-git-resolve-when-done):
2838 Call vc-resynch-buffer on the current file (bug#28121).
2839 Move its autoload to before this function.
2840
28412017-09-13 Eric Abrahamsen <eric@ericabrahamsen.net>
2842
2843 Allow write-contents-functions to short-circuit buffer save
2844
2845 Bug#28412
2846
2847 * lisp/files.el (basic-save-buffer): Re-arrange function so that
2848 write-contents-functions are run earlier. If they return non-nil,
2849 consider the buffer saved without requiring the buffer to be
2850 visiting a file.
2851 (save-some-buffers): This function should consider any buffer with a
2852 buffer-local value for write-contents-functions eligible for
2853 saving.
2854 * test/lisp/files-tests.el (files-test-no-file-write-contents): New
2855 test.
2856 * doc/lispref/files.texi (Saving Buffers): Mention in docs.
2857 * etc/NEWS: And in NEWS.
2858
28592017-09-12 Paul Eggert <eggert@cs.ucla.edu>
2860
2861 * etc/NEWS.25: Copy from emacs-25 etc/NEWS.
2862
28632017-09-12 Paul Eggert <eggert@cs.ucla.edu>
2864
2865 Less chatter for ’make info/dir’
2866
2867 * Makefile.in (${srcdir}/info/dir): Tweak shell command so
2868 that an ordinary make says just "GEN info/dir" rather than
2869 also having a seemingly-unrelated mv line.
2870
28712017-09-12 Paul Eggert <eggert@cs.ucla.edu>
2872
2873 Tweak Gnus doc re gnus-copy-file
2874
2875 * doc/misc/gnus.texi (Saving Articles):
2876 Document behavior with directory name targets (Bug#27986).
2877 Problem reported by Katsumi Yamaoka in:
2878 http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00216.html
2879
28802017-09-12 Mark Oteiza <mvoteiza@udel.edu>
2881
2882 Update uses of if-let and when-let
2883
2884 * lisp/dom.el (dom-previous-sibling):
2885 * lisp/emacs-lisp/package.el (package--with-work-buffer):
2886 (package--sort-deps-in-alist, package--sort-by-dependence):
2887 (package-install-from-archive, package-install):
2888 (package-menu-execute, package-menu--populate-new-package-list):
2889 * lisp/filenotify.el (file-notify--rm-descriptor):
2890 (file-notify--event-watched-file, file-notify--event-file-name):
2891 (file-notify--event-file1-name, file-notify-rm-watch):
2892 (file-notify-valid-p):
2893 * lisp/gnus/message.el (message-toggle-image-thumbnails):
2894 * lisp/gnus/nnimap.el (nnimap-request-move-article):
2895 * lisp/ibuf-ext.el (ibuffer-repair-saved-filters):
2896 * lisp/mpc.el (mpc-format):
2897 * lisp/net/eww.el (eww-tag-meta, eww-process-text-input):
2898 (eww-save-history):
2899 * lisp/net/shr.el (shr-tag-base, shr-tag-object, shr-make-table-1):
2900 * lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
2901 * lisp/svg.el (svg-remove):
2902 * lisp/textmodes/css-mode.el (css--named-color):
2903 (css--colon-inside-funcall):
2904 * lisp/textmodes/sgml-mode.el (html-current-buffer-classes):
2905 (html-current-buffer-ids): Use if-let* and when-let* instead.
2906
29072017-09-12 Mark Oteiza <mvoteiza@udel.edu>
2908
2909 Implement and-let*
2910
2911 This also includes changes to if-let and when-let. The single tuple
2912 special case is ambiguous, and binding a symbol to nil is not as
2913 useful as binding it to its value outside the lexical scope of the
2914 binding. (Bug#28254)
2915 * etc/NEWS: Mention.
2916 * lisp/emacs-lisp/subr-x.el (internal--listify):
2917 (internal--build-binding-value-form): Extend to account for
2918 solitary symbols and (EXPR) items in binding varlist.
2919 (if-let*, when-let*): Nix single tuple case and incumbent
2920 bind-symbol-to-nil behavior.
2921 (and-let*): New macro.
2922 (if-let, when-let): Mark obsolete. Redefine in terms of if-let*, so
2923 they implicitly gain the new features without breaking existing code.
2924 * test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of
2925 single-tuple special case, lack of binding solitary symbols to nil,
2926 and the introduction of uninterned symbols for (EXPR) bindings. Add
2927 SRFI-2 test suite adapted to Elisp.
2928
29292017-09-12 Eli Zaretskii <eliz@gnu.org>
2930
2931 Fix minor typos in the Emacs manual
2932
2933 * doc/emacs/text.texi (Org Organizer):
2934 * doc/emacs/ack.texi (Acknowledgments): Fix spelling of Org nodes.
2935
29362017-09-12 Paul Eggert <eggert@cs.ucla.edu>
2937
2938 Merge Emacs 25.3 fixes
2939
2940 The security patches released for Emacs 25.3 were less drastic
2941 than what we had immediately put into master. Adjust master to
2942 match 25.3 (Bug#28350).
2943 * lisp/textmodes/enriched.el (enriched-translations):
2944 Re-enable FUNCTION and display translations that are safe.
2945 (enriched-handle-display-prop): Bring back.
2946 (enriched-decode-display-prop): Bring back, but disable
2947 the unsafe part.
2948
29492017-09-12 Alan Mackenzie <acm@muc.de>
2950
2951 Don't match C++ template delims starting within a token. FIxes bug #28418.
2952
2953 * lisp/progmodes/cc-engine.el (c-restore-<>-properties): After failing an
2954 attempted match from the start of a token (in particular, "<<"), move to the
2955 next token rather than the nex character before searching for the next "<".
2956
29572017-09-12 Mark Oteiza <mvoteiza@udel.edu>
2958
2959 Move gensym to core Elisp
2960
2961 * doc/lispref/symbols.texi (Creating Symbols): Mention gensym right
2962 after make-symbol.
2963 * etc/NEWS: Mention.
2964 * lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Alias to
2965 gensym-counter.
2966 (cl-gensym): Alias to gensym.
2967 * lisp/emacs-lisp/cl.el: Remove gensym from list of aliases.
2968 * lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper):
2969 * lisp/emacs-lisp/ert-x.el (ert-with-message-capture):
2970 (ert--expand-should-1, ert--expand-should):
2971 (ert--should-error-handle-error):
2972 * lisp/emacs-lisp/generator.el (cps--gensym):
2973 * lisp/emacs-lisp/gv.el (setf):
2974 * lisp/emacs-lisp/inline.el (inline--do-letlisteval):
2975 * lisp/emacs-lisp/pcase.el (pcase--make-docstring, pcase-dolist):
2976 (pcase--funcall, pcase--u1): Use gensym.
2977 * lisp/subr.el (gensym-counter): New variable.
2978 (gensym): New function, assimilated from cl-lib.
2979
29802017-09-12 Mark Oteiza <mvoteiza@udel.edu>
2981
2982 Fix cl-gentemp
2983
2984 * lisp/emacs-lisp/cl-macs.el (cl--gentemp-counter): New variable.
2985 (cl-gentemp): Use it. Change prefix to "T".
2986
29872017-09-12 Sam Steingold <sds@gnu.org>
2988
2989 gnus-score-file-name: Do not append empty suffix.
2990
29912017-09-12 Michael Albinus <michael.albinus@gmx.de>
2992
2993 Extend tramp-tests according to bug#27986
2994
2995 * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
2996 (tramp-test12-rename-file, tramp-test15-copy-directory)
2997 (tramp-test21-file-links): Extend tests.
2998 (tramp-test13-make-directory, tramp-test14-delete-directory):
2999 Specifiy error symbol in `should-error'.
3000
30012017-09-12 Mark Oteiza <mvoteiza@udel.edu>
3002
3003 Add cl-print method for hash tables
3004
3005 * lisp/emacs-lisp/cl-print.el (cl-print-object): New method.
3006
30072017-09-12 Mark Oteiza <mvoteiza@udel.edu>
3008
3009 Add docstrings to cl-print entry points
3010
3011 * lisp/emacs-lisp/cl-print.el (cl-print-compiled): Fix docstring.
3012 (cl-prin1, cl-prin1-to-string): Add docstrings.
3013
30142017-09-12 Glenn Morris <rgm@gnu.org>
3015
3016 Improve reproducibility of generated leim-list.el
3017
3018 * lisp/international/quail.el (quail-update-leim-list-file):
3019 Sort the quail directory listing, for more stable output.
3020
30212017-09-11 Mark Oteiza <mvoteiza@udel.edu>
3022
3023 Include sxhash of object with printed bytecode
3024
3025 This printing, while succint, is rather opaque. At least give an
3026 immediate clue of whether different byte code printouts are for the
3027 same or different byte code objects.
3028 * lisp/emacs-lisp/cl-print.el (cl-print-object): Add object sxhash to
3029 printed token "#<bytecode>".
3030
30312017-09-11 Eli Zaretskii <eliz@gnu.org>
3032
3033 Update documentation of 'max-lisp-eval-depth'
3034
3035 * doc/lispref/eval.texi (Eval): Update the documented default
3036 value of 'max-lisp-eval-depth'.
3037
30382017-09-11 Eli Zaretskii <eliz@gnu.org>
3039
3040 Another place to produce debugging output in etags
3041
3042 * lib-src/etags.c (Ruby_functions): One more place to print
3043 debugging output under --debug.
3044
30452017-09-11 Eli Zaretskii <eliz@gnu.org>
3046
3047 Improve documentation of etags-related features
3048
3049 * doc/emacs/maintaining.texi (Looking Up Identifiers): Document
3050 'xref-prompt-for-identifier'. (Bug#28403)
3051 (Etags Regexps): Document \D back references in etags regexps.
3052
30532017-09-11 Alan Third <alan@idiocy.org>
3054
3055 Fix macOS compatibility versions for vibrant dark theme (bug#28415)
3056
3057 * src/nsterm.m (ns_set_appearance, EmacsView::initFrameFromEmacs):
3058 Change macOS compatibility from 10.9 to 10.10.
3059
30602017-09-11 Michael Albinus <michael.albinus@gmx.de>
3061
3062 Further optimization in Tramp's file name decomposition
3063
3064 * lisp/net/tramp.el (tramp-syntax): Recompute all file name
3065 components. Call `custom-set-variables' after loading.
3066 (tramp-build-prefix-format, tramp-build-prefix-regexp)
3067 (tramp-build-method-regexp)
3068 (tramp-build-postfix-method-format)
3069 (tramp-build-postfix-method-regexp)
3070 (tramp-build-prefix-ipv6-format)
3071 (tramp-build-prefix-ipv6-regexp)
3072 (tramp-build-postfix-ipv6-format)
3073 (tramp-build-postfix-ipv6-regexp)
3074 (tramp-build-postfix-host-format)
3075 (tramp-build-postfix-host-regexp)
3076 (tramp-build-file-name-regexp)
3077 (tramp-build-completion-file-name-regexp): New defuns.
3078 (tramp-prefix-format, tramp-prefix-regexp)
3079 (tramp-method-regexp, tramp-postfix-method-format)
3080 (tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
3081 (tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
3082 (tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
3083 (tramp-postfix-host-regexp)
3084 (tramp-remote-file-name-spec-regexp)
3085 (tramp-file-name-structure, tramp-file-name-regexp)
3086 (tramp-completion-file-name-regexp): Convert defuns into defvars.
3087 (tramp-prefix-regexp-alist)
3088 (tramp-postfix-method-regexp-alist)
3089 (tramp-prefix-ipv6-regexp-alist)
3090 (tramp-postfix-ipv6-regexp-alist)
3091 (tramp-postfix-host-regexp-alist)
3092 (tramp-remote-file-name-spec-regexp-alist): Remove.
3093 (tramp-build-remote-file-name-spec-regexp)
3094 (tramp-build-file-name-structure): Simplify.
3095 (tramp-completion-file-name-regexp-alist): New defconst.
3096 (tramp-tramp-file-p, tramp-dissect-file-name)
3097 (tramp-make-tramp-file-name)
3098 (tramp-completion-make-tramp-file-name)
3099 (tramp-rfn-eshadow-update-overlay-regexp)
3100 (tramp-register-file-name-handlers)
3101 (tramp-completion-handle-file-name-all-completions)
3102 (tramp-completion-dissect-file-name, tramp-clear-passwd):
3103 * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
3104 * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
3105 (tramp-compute-multi-hops): Use variables but functions for
3106 file name components.
3107
3108 * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
3109 Use variables but functions for file name components.
3110
31112017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3112
3113 Port tramp-tests to new copy-directory behavior
3114
3115 * test/lisp/net/tramp-tests.el (tramp-test15-copy-directory):
3116 Use directory name as arg for copy-directory when we want
3117 the special behavior.
3118
31192017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3120
3121 Adjust thumbs to new rename-file behavior
3122
3123 * etc/NEWS: Mention this.
3124 * lisp/thumbs.el (thumbs-rename-images): Treat the destination
3125 as special only if it is a directory name. When there is
3126 a marked list, turn the destination into a directory name
3127 if it is not already.
3128
31292017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3130
3131 Adjust ob-tangle to new copy-file behavior
3132
3133 * lisp/org/ob-tangle.el (org-babel-tangle-publish):
3134 Port to new copy-file behavior.
3135
31362017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3137
3138 Make gnus-copy-file act like copy-file etc.
3139
3140 * etc/NEWS: Mention this.
3141 * lisp/gnus/gnus-util.el (gnus-copy-file): Treat the destination
3142 as special only if it is a directory name.
3143
31442017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3145
3146 Make write-file act like copy-file etc.
3147
3148 Change write-file to be consistent with the new behavior
3149 of copy-file, etc.
3150 * etc/NEWS: Mention this.
3151 * lisp/files.el (write-file): Treat the destination as special
3152 only if it is a directory name.
3153
31542017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3155
3156 Make copy-directory act like copy-file etc.
3157
3158 Do the special dance with the destination only if it is a
3159 directory name, for consistency with copy-file etc. (Bug#27986).
3160 * doc/emacs/files.texi (Copying and Naming):
3161 * doc/lispref/files.texi (Create/Delete Dirs):
3162 * etc/NEWS: Document this.
3163 * lisp/files.el (copy-directory): Treat NEWNAME as special
3164 only if it is a directory name.
3165
31662017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3167
3168 Fix some make-directory bugs
3169
3170 * lisp/files.el (files--ensure-directory): New function.
3171 (make-directory): Use it to avoid bugs when (make-directory FOO t)
3172 is invoked on a non-directory, or on a directory hierarchy that
3173 is being built by some other process while Emacs is running.
3174 * test/lisp/files-tests.el (files-tests--make-directory): New test.
3175
31762017-09-11 Paul Eggert <eggert@cs.ucla.edu>
3177
3178 Fix race with rename-file etc. with dir NEWNAME
3179
3180 This changes the behavior of rename-file etc. slightly.
3181 The old behavior mostly disagreed with the documentation, and had
3182 a race condition bug that could allow attackers to modify victims'
3183 write-protected directories (Bug#27986).
3184 * doc/lispref/files.texi (Changing Files): Document that in
3185 rename-file etc., NEWFILE is special if it is a directory name.
3186 * etc/NEWS: Document the change in behavior.
3187 * src/fileio.c (directory_like): Remove. All uses removed.
3188 (expand_cp_target): Test only whether NEWNAME is a directory name,
3189 not whether it is currently a directory. This avoids a race.
3190 (Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
3191 Document behavior if NEWNAME is a directory name.
3192 (Frename_file): Simplify now that the destdir behavior occurs
3193 only when NEWNAME is a directory name.
3194 * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
3195 (tramp-test12-rename-file, tramp--test-check-files):
3196 Adjust tests to match new behavior.
3197
31982017-09-10 Eli Zaretskii <eliz@gnu.org>
3199
3200 Extend --debug printouts in etags
3201
3202 * lib-src/etags.c (regex_tag_multiline, readline): Under
3203 "--debug", print tags found via regexps.
3204
32052017-09-10 Eli Zaretskii <eliz@gnu.org>
3206
3207 Add --debug option to etags
3208
3209 * lib-src/etags.c (make_tag): Print found tags under --debug.
3210 (longopts): Add --debug.
3211
32122017-09-10 Paul Eggert <eggert@cs.ucla.edu>
3213
3214 Spelling fixes
3215
3216 * lisp/progmodes/cc-langs.el:
3217 (c-ambiguous-overloadable-or-identifier-prefixes): Rename from
3218 c-ambiguous-overloadable-or-identifier-prefices. Caller changed.
3219
32202017-09-10 Paul Eggert <eggert@cs.ucla.edu>
3221
3222 Merge from gnulib
3223
3224 This incorporates:
3225 2017-09-08 stddef: Avoid conflict with system-defined max_align_t
3226 2017-08-24 warnings: fix compilation with old autoconf
3227 2017-08-23 glob: merge from glibc with Zanella glob changes
3228 2017-08-17 random: Fix test compilation failure on Cygwin 1.5.25
3229 * doc/misc/texinfo.tex, lib/flexmember.h, lib/stddef.in.h:
3230 * lib/stdlib.in.h, m4/manywarnings.m4, m4/stdlib_h.m4:
3231 * m4/warnings.m4:
3232 Copy from Gnulib.
3233 * lib/gnulib.mk.in: Regenerate.
3234
32352017-09-10 Ken Brown <kbrown@cornell.edu>
3236
3237 Implement renameat_noreplace on recent Cygwin
3238
3239 * src/sysdep.c [CYGWIN]: Include cygwin/fs.h.
3240 (renameat_noreplace) [RENAME_NOREPLACE]: Use renameat2.
3241 (Bug#27986)
3242
32432017-09-10 Eli Zaretskii <eliz@gnu.org>
3244
3245 Avoid warnings about file names in autoloads on MS-Windows
3246
3247 * configure.ac (srcdir) [mingw32]: Downcase the drive letter, to
3248 avoid warnings from find-file-noselect when making autoloads. For
3249 the details, see
3250 http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00049.html.
3251
32522017-09-10 Mark Oteiza <mvoteiza@udel.edu>
3253
3254 Avoid looking at localized strings
3255
3256 * lisp/xdg.el (xdg-desktop-read-group): Add condition to catch
3257 localized strings.
3258 * test/lisp/xdg-tests.el (xdg-desktop-parsing): Add test to ensure
3259 parsing l10n strings doesn't error but is essentially a no-op.
3260
32612017-09-10 Paul Eggert <eggert@cs.ucla.edu>
3262
3263 * etc/NEWS.25: Document 25.3 changes.
3264
32652017-09-10 Lars Ingebrigtsen <larsi@gnus.org>
3266
3267 Remove unsafe enriched mode translations
3268
3269 * lisp/gnus/mm-view.el (mm-inline-text):
3270 Do not worry about enriched or richtext type.
3271 * lisp/textmodes/enriched.el (enriched-translations):
3272 Remove translations for FUNCTION, display (Bug#28350).
3273 (enriched-handle-display-prop, enriched-decode-display-prop): Remove.
3274
32752017-09-09 Paul Eggert <eggert@cs.ucla.edu>
3276
3277 Be more consistent about "directory name" in manual
3278
3279 This clarifies the documentation, partly in response to the
3280 discussion in Bug#27986.
3281
32822017-09-09 Eli Zaretskii <eliz@gnu.org>
3283
3284 Remove more compilation warnings in MinGW64 build
3285
3286 * src/w32.c (faccessat, map_w32_filename):
3287 * src/w32fns.c (w32_wnd_proc):
3288 * src/w32term.c (w32_horizontal_scroll_bar_handle_click)
3289 (w32_scroll_bar_handle_click): Use FALLTHROUGH to avoid compiler
3290 warnings with GCC 7 and later.
3291
32922017-09-09 Paul Eggert <eggert@cs.ucla.edu>
3293
3294 Improve --enable-gcc-warnings for MinGW64
3295
3296 This partially reverts my 2016-05-30 patch. Apparently MinGW64
3297 still requires pacifications that GCC 7.1.1 x86-64 (Fedora 26)
3298 does not. Also, pacify tparam.c, which isn’t used on Fedora.
3299 * lib-src/etags.c (process_file_name, TeX_commands):
3300 * src/buffer.c (fix_overlays_before):
3301 * src/data.c (Fmake_variable_buffer_local, cons_to_unsigned)
3302 (cons_to_signed):
3303 * src/editfns.c (Ftranslate_region_internal):
3304 Prefer UNINIT to some stray value, as this simplifies
3305 code-reading later.
3306 * src/eval.c (CACHEABLE): New macro.
3307 (internal_lisp_condition_case): Use it.
3308 * src/tparam.c (tparam1): Use FALLTHROUGH to pacify GCC.
3309
33102017-09-09 Eli Zaretskii <eliz@gnu.org>
3311
3312 Fix font-lock in Compilation mode
3313
3314 * lisp/progmodes/compile.el (compilation-face): Restore function
3315 lost during recent changes. (Bug#28349)
3316
33172017-09-09 Mark Oteiza <mvoteiza@udel.edu>
3318
3319 Add function to read all entries in a group
3320
3321 Use that to extend xdg-desktop-read-file. Also fix a bug where all
3322 entries in all groups were read and returned by xdg-desktop-read-file.
3323 * lisp/xdg.el (xdg-desktop-read-group): New function.
3324 (xdg-desktop-read-file): Use it.
3325 * test/data/xdg/malformed.desktop: New file.
3326 * test/data/xdg/test.desktop: Add another section.
3327 * test/lisp/xdg-tests.el (xdg-desktop-parsing): Test presence of a key
3328 in another group. Test reading a prescribed group. Test detecting a
3329 malformed key=value.
3330
33312017-09-09 Gemini Lasswell <gazally@runbox.com>
3332
3333 Reduce Tramp's memory usage
3334
3335 Construct Tramp syntax strings and regular expressions once instead
3336 of every time they are used, and store them in alists keyed by Tramp
3337 syntax.
3338 * tramp.el (tramp-build-remote-file-name-spec-regexp)
3339 (tramp-build-file-name-structure): New functions.
3340 (tramp-prefix-format-alist, tramp-prefix-regexp-alist)
3341 (tramp-method-regexp-alist)
3342 (tramp-postfix-method-format-alist)
3343 (tramp-postfix-method-regexp-alist)
3344 (tramp-prefix-ipv6-format-alist, tramp-prefix-ipv6-regexp-alist)
3345 (tramp-postfix-ipv6-format-alist)
3346 (tramp-postfix-ipv6-regexp-alist)
3347 (tramp-postfix-host-format-alist)
3348 (tramp-postfix-host-regexp-alist)
3349 (tramp-remote-file-name-spec-regexp-alist)
3350 (tramp-file-name-structure-alist): New constants.
3351 (tramp-lookup-syntax): New function.
3352 (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp)
3353 (tramp-postfix-method-format, tramp-postfix-method-regexp)
3354 (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp)
3355 (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp)
3356 (tramp-postfix-host-format, tramp-postfix-host-regexp)
3357 (tramp-remote-file-name-spec-regexp, tramp-file-name-structure):
3358 Use it.
3359
33602017-09-09 Eli Zaretskii <eliz@gnu.org>
3361
3362 Fix compilation warnings in MinGW64 build using GCC 7
3363
3364 Reported by Richard Copley <rcopley@gmail.com>.
3365 * src/w32heap.c (init_heap): Declare enable_lfh only for
3366 mingw.org's MinGW build.
3367
3368 * src/w32console.c (w32con_write_glyphs):
3369 * src/unexw32.c (get_section_info, COPY_CHUNK, unexec): Fix some
3370 mismatches of data type vs format spec.
3371
3372 * src/w32fns.c (compute_tip_xy):
3373 * src/w32proc.c (stop_timer_thread):
3374 * src/w32notify.c (remove_watch):
3375 * src/eval.c (internal_lisp_condition_case):
3376 * src/editfns.c (Ftranslate_region_internal):
3377 * src/data.c (Fmake_variable_buffer_local, cons_to_unsigned)
3378 (cons_to_signed):
3379 * src/buffer.c (fix_overlays_before): Initialize variables to
3380 avoid compiler warnings.
3381
3382 * lib-src/etags.c (TeX_commands, process_file_name): Initialize
3383 variables to avoid compilation warnings.
3384
33852017-09-09 Eli Zaretskii <eliz@gnu.org>
3386
3387 Avoid infloop when scrolling under scroll-preserve-screen-position
3388
3389 * src/window.c (window_scroll_pixel_based): If screen position is
3390 to be preserved, make sure its recorded Y coordinate is outside
3391 the scroll margin. (Bug#28342)
3392
33932017-09-09 Michael Albinus <michael.albinus@gmx.de>
3394
3395 Clarification in tramp-texi
3396
3397 * doc/misc/tramp.texi (Connection caching): Two connections are
3398 regarded as different now when they differ in the port number only.
3399
34002017-09-09 Miles Bader <miles@gnu.org>
3401
3402 * admin/quick-install-emacs: Tweak configure.ac parsing
3403
34042017-09-09 Miles Bader <miles@gnu.org>
3405
3406 Use text-property buttons in rcirc-markup-urls
3407
3408 * lisp/net/rcirc.el (rcirc-markup-urls): Use `make-text-button'
3409 instead of `make-button'; the former is much more efficient in large
3410 buffers, and for the purposes of rcirc, changes no functionality.
3411
34122017-09-08 Eli Zaretskii <eliz@gnu.org>
3413
3414 Fix line-pixel-height for lines of variable height
3415
3416 * src/xdisp.c (Fline_pixel_height): Start moving from the
3417 beginning of the screen line, to capture the full metrics of the
3418 line. (Bug#28391)
3419
34202017-09-08 Alex Branham <branham@utexas.edu> (tiny change)
3421
3422 New variable 'dired-confirm-killing-deleted-buffers'
3423
3424 * lisp/dired-x.el (dired-clean-confirm-killing-deleted-buffers):
3425 New variable.
3426 * lisp/dired.el (dired-clean-up-after-deletion): Kill buffers
3427 visiting deleted files without confirming if
3428 dired-clean-confirm-killing-deleted-buffers is nil. (Bug#28373)
3429 * etc/NEWS: Document the change.
3430
34312017-09-08 Alfred M. Szmidt <ams@gnu.org> (tiny change)
3432
3433 Support SVN files with svn:externals property
3434
3435 * lisp/vc/vc-svn.el (vc-svn-parse-status): Don't ignore files
3436 marked with the svn:externals property.
3437
34382017-09-08 Alfred M. Szmidt <ams@gnu.org> (tiny change)
3439
3440 List locally removed files in vc-dir with SVN back-end
3441
3442 * lisp/vc/vc-svn.el (vc-svn-after-dir-status): List files marked
3443 with ?! as needs-update.
3444
34452017-09-08 Ken Olum <kdo@cosmos.phy.tufts.edu>
3446
3447 Fix Rmail editing with reapplying encoding to message body
3448
3449 * lisp/mail/rmailedit.el (rmail-cease-edit): If no
3450 content-type in edited headers, look for one in original
3451 headers and add it to edited headers. (Bug #26918)
3452 Use a marker to track start of new body, so that
3453 content-transfer-encoding gets applied only to body. (Bug #27353).
3454 Ensure blank line at end of message after encoding, not
3455 before.
3456
34572017-09-08 Eli Zaretskii <eliz@gnu.org>
3458
3459 Document last change in dired.el
3460
3461 * etc/NEWS (Dired): Document the last change in dired.el.
3462 (Bug#27435)
3463
34642017-09-08 Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
3465
3466 Make mouse clicks in Dired more customizable
3467
3468 * lisp/dired.el (dired-mouse-find-file): Allow callers to
3469 specify functions to visit file/directory.
3470 (dired-mouse-find-file-other-window)
3471 (dired-mouse-find-file-other-frame): New functions to visit
3472 files in another window/frame. (Bug#27435)
3473
34742017-09-08 Eli Zaretskii <eliz@gnu.org>
3475
3476 Avoid compiler warnings on MS-Windows with GCC 6 and 7
3477
3478 * src/w32font.c (SUBRANGE): Use unsigned arithmetic for
3479 bit-shifting, to avoid compiler warnings.
3480 (w32font_text_extents): Tell GCC NGLYPHS is non-negative, to avoid
3481 a warning. For details of the warning, see
3482 http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00093.html.
3483 * src/term.c (keys) [WINDOWSNT]: Don't define, as it is not used
3484 in that build.
3485 * src/sound.c (sound_perror): Ifdef away on WINDOWSNT, as this
3486 function is not used in that build.
3487
3488 * configure.ac: Disable -Wsuggest-attribute=format on MS-Windows.
3489
34902017-09-08 Eli Zaretskii <eliz@gnu.org>
3491
3492 Fix 'directory-file-name' on DOS_NT systems as well
3493
3494 * src/fileio.c (directory_file_name) [DOS_NT]: Fix the DOS_NT case
3495 to be consistent with last change.
3496
3497 * test/src/fileio-tests.el (fileio-tests--odd-symlink-chars):
3498 Disable on MS-Windows.
3499 (fileio-tests--directory-file-name-dos-nt)
3500 (fileio-tests--file-name-as-directory-dos-nt): New tests.
3501
35022017-09-08 Wilson Snyder <wsnyder@wsnyder.org>
3503
3504 Fix various verilog-mode.el issues.
3505
3506 * lisp/progmodes/verilog-mode.el (verilog-expand-dirnames): Fix expanding
3507 "*/*", msg2284. Reported by Jonathan Ferguson.
3508 (ignore-errors): Fix ignore-errors error on Emacs 22.3, bug1177. Reported
3509 by Victor Lau.
3510 (verilog-getopt, verilog-getopt-file) (verilog-library-flags,
3511 verilog-substitute-file-name-path): Support -F in verilog getopt files,
3512 bug1171. Reported by George Cuan.
3513 (verilog-do-indent): Fix misindenting symbols starting with t,
3514 bug1169. Reported by Hoai Tran.
3515 (verilog-read-auto-template-middle): Fix slow template matching on
3516 AUTOINST. Reported by Jeffrey Huynh.
3517 (verilog-pretty-expr): The extra whitespace addition before "=" operators
3518 is now done only if the whole assignment block contains the 2-character
3519 "<=" operator. Remove the unused argument _myre. Use `unless',
3520 `save-excursion' and `when' functions where possible. Internal variables
3521 refactored for clarity. Follow elisp convention for closing parentheses.
3522 By Kaushal Modi.
3523 (verilog-get-lineup-indent-2): Update docstring. Internal variables
3524 refactored for clarity. Earlier EDPOS argument was expected to be a
3525 marker; it is now renamed to END and is now expected to be a position.
3526 Use `when' instead of `if'. By Kaushal Modi.
3527 (electric-verilog-terminate-line): Remove the unused second argument from
3528 `verilog-pretty-expr' call. By Kaushal Modi.
3529 (verilog-calc-1): Fix indentation of a virtual class definition after a
3530 typedef class, bug1080. By Kaushal Modi.
3531
35322017-09-08 Katsumi Yamaoka <yamaoka@jpl.org>
3533
3534 Don't use summary window to visit group buffer (bugfix)
3535
3536 * lisp/gnus/gnus-sum.el (gnus-summary-jump-to-group): Make sure that
3537 the window to open the group buffer doesn't visit the summary buffer.
3538 This fixes a bug: `gnus-summary-next-article' sometimes causes an error
3539 by trying to select nonexistent summary window.
3540
35412017-09-08 Paul Eggert <eggert@cs.ucla.edu>
3542
3543 Fix bug: (directory-file-name "///") returned "//"
3544
3545 * src/fileio.c (directory_file_name): For "///" and longer,
3546 return "/", not "//", as per POSIX.
3547 * test/src/fileio-tests.el (fileio-tests--directory-file-name)
3548 (fileio-tests--file-name-as-directory): New tests.
3549
35502017-09-08 Paul Eggert <eggert@cs.ucla.edu>
3551
3552 Remove obsolete vc-mistrust-permissions doc
3553
3554 * doc/emacs/vc1-xtra.texi (RCS and SCCS): Remove documentation
3555 for vc-mistrust-permissions, which no longer exists.
3556
35572017-09-07 Alan Third <alan@idiocy.org>
3558
3559 Set frame size to actual requested size (bug#18215)
3560
3561 * src/nsterm.m (x_set_window_size): Don't use
3562 FRAME_TEXT_TO_PIXEL_WIDTH or FRAME_TEXT_TO_PIXEL_HEIGHT.
3563
35642017-09-07 Paul Eggert <eggert@cs.ucla.edu>
3565
3566 autogen.sh: omit bogus chatter if no .git
3567
3568 Problem reported by Angelo Graziosi in:
3569 http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00045.html
3570 * autogen.sh (git_config): Do not execut 'git' if $do_git fails.
3571
35722017-09-07 Glenn Morris <rgm@gnu.org>
3573
3574 Skip emacsclient tests if --enable-profiling was used
3575
3576 * test/lib-src/emacsclient-tests.el
3577 (emacsclient-test-call-emacsclient): Make it a macro.
3578 Handle "Profiling timer expired" return from emacsclient. (Bug#28319)
3579 (emacsclient-test-alternate-editor-allows-arguments)
3580 (emacsclient-test-alternate-editor-allows-quotes): Update for above.
3581
35822017-09-06 Eli Zaretskii <eliz@gnu.org>
3583
3584 Fix a minor markup problem in ELisp manual
3585
3586 * doc/lispref/functions.texi (Mapping Functions): Fix the order of
3587 @example and @group. For the details, see
3588 http://lists.gnu.org/archive/html/bug-texinfo/2017-09/msg00007.html.
3589
35902017-09-06 Mark Oteiza <mvoteiza@udel.edu>
3591
3592 Add XDG desktop file parsing and tests
3593
3594 * lisp/xdg.el: Add support for Desktop Entry Specification.
3595 (xdg--user-dirs-parse-line): Check if file is readable.
3596 (xdg-desktop-group-regexp, xdg-desktop-entry-regexp): New variables.
3597 (xdg--desktop-parse-line, xdg-desktop-read-file, xdg-desktop-strings):
3598 New functions.
3599 * test/lisp/xdg-tests.el:
3600 * test/data/xdg/test.desktop:
3601 * test/data/xdg/wrong.desktop: New files.
3602
36032017-09-06 Glenn Morris <rgm@gnu.org>
3604
3605 Allow for adjusting line length of test backtraces
3606
3607 * test/Makefile.in (TEST_BACKTRACE_LINE_LENGTH): New option.
3608 (%.log): Respect backtrace line length.
3609
36102017-09-06 Glenn Morris <rgm@gnu.org>
3611
3612 Allow customizing line length of ert backtraces in batch mode
3613
3614 * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin):
3615 Make it a user option.
3616 (ert-run-tests-batch): Handle ert-batch-backtrace-right-margin nil.
3617
36182017-09-06 Glenn Morris <rgm@gnu.org>
3619
3620 Minor emacsclient-tests simplification
3621
3622 * test/lib-src/emacsclient-tests.el (emacsclient-test-emacs):
3623 Simplify. Also work when running installed.
3624
36252017-09-06 Alan Third <alan@idiocy.org>
3626
3627 Revert "Force screen update after drawing cursor glyph (bug#23774)"
3628
3629 This reverts commit 1b492fa5456e2b6face8d0856f11d17e432693b0.
3630
3631 See bug#28358
3632
36332017-09-05 Mark Oteiza <mvoteiza@udel.edu>
3634
3635 Refactor some loops in mailcap.el
3636
3637 * lisp/net/mailcap.el (mailcap-mime-types):
3638 (mailcap-file-default-commands): Convert nested maps to loops.
3639
36402017-09-05 Glenn Morris <rgm@gnu.org>
3641
3642 emacsclient-tests: remove some debug statements
3643
3644 * test/lib-src/emacsclient-tests.el
3645 (emacsclient-test-call-emacsclient): Remove debug statements.
3646
36472017-09-05 Simen Heggestøyl <simenheg@gmail.com>
3648
3649 Handle non-zero exit status from psql more gracefully
3650
3651 * lisp/progmodes/sql.el (sql-postgres-list-databases): Handle non-zero
3652 exit statuses from `psql -ltX' more gracefully by returning nil.
3653
3654 * test/lisp/progmodes/sql-tests.el
3655 (sql-tests-postgres-list-databases-error): New test.
3656
36572017-09-05 Eli Zaretskii <eliz@gnu.org>
3658
3659 Avoid losing Ctrl-C keystrokes in compilation mode on MS-Windows
3660
3661 * src/w32proc.c (sys_kill): Preserve the up/down state of the
3662 Ctrl key across the simulated Ctrl-C keystroke. (Bug#28348)
3663
36642017-09-05 Andreas Schwab <schwab@linux-m68k.org>
3665
3666 * src/image.c (Fimagemagick_types): Doc fix.
3667
36682017-09-05 Mark Oteiza <mvoteiza@udel.edu>
3669
3670 Move soundex.el test to a proper test
3671
3672 * test/lisp/soundex-tests.el: New file.
3673 * lisp/soundex.el: Use lexical-binding. Remove commented test.
3674
36752017-09-05 Mark Oteiza <mvoteiza@udel.edu>
3676
3677 Add tests for mailcap.el
3678
3679 * test/data/mailcap/mime.types: New file.
3680 * test/lisp/net/mailcap-tests.el: New file.
3681
36822017-09-05 Michael Albinus <michael.albinus@gmx.de>
3683
3684 Doc precisment about remote link targets
3685
3686 * doc/lispref/files.texi (Truenames): Explain handling of
3687 targets of `file-truename' and `make-symbolic-link', which
3688 look like a remote file name.
3689
3690 * etc/NEWS: Precise examples for symlinks which look like
3691 remote file names. MUSTBENEW of `write-region' is not
3692 propagated to file name handlers.
3693
36942017-09-05 John Wiegley <johnw@newartisans.com>
3695
3696 Remove an opinionated section on "What Eshell is not"
3697
3698 I don't find this information to accurately reflect possible use cases
3699 for Eshell; plus, it doesn't offer much in the way of information,
3700 just opinion.
3701
37022017-09-05 Ken Brown <kbrown@cornell.edu>
3703
3704 Fix configure test for Xpm
3705
3706 Problem reported by Ashish Shukla in
3707 https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00020.html.
3708 * configure.ac (HAVE_XPM) [HAVE_X11]: Include X11/xpm.h instead of
3709 noX/xpm.h in configure test.
3710
37112017-09-04 Paul Eggert <eggert@cs.ucla.edu>
3712
3713 Revert recent float→double Motif change
3714
3715 Problem reported by Martin Rudalics in:
3716 http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00014.html
3717 * src/xterm.c (xm_scroll_callback, xaw_jump_callback)
3718 (x_set_toolkit_scroll_bar_thumb)
3719 (x_set_toolkit_horizontal_scroll_bar_thumb):
3720 Go back to using ‘float’ temporaries rather than ‘double’.
3721 Although quite possibly this masks an underlying bug,
3722 we lack time to look into that now.
3723
37242017-09-04 Glenn Morris <rgm@gnu.org>
3725
3726 emacsclient-tests: add some debug statements
3727
3728 * test/lib-src/emacsclient-tests.el
3729 (emacsclient-test-call-emacsclient): Add debug statements.
3730
37312017-09-04 Michael Albinus <michael.albinus@gmx.de>
3732
3733 Work on Tramp's (symbolic) links
3734
3735 * doc/misc/tramp.texi (Traces and Profiles): Mention the
3736 backtrace when tramp-verbose is greater than or equal to 10.
3737
3738 * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
3739 Use `tramp-handle-add-name-to-file'.
3740
3741 * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
3742 `tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.
3743
3744 * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.
3745
3746 * lisp/net/tramp-smb.el (tramp-smb-errors):
3747 Add "NT_STATUS_CONNECTION_DISCONNECTED" and
3748 "NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
3749 (tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
3750 (tramp-smb-do-file-attributes-with-stat): Return non-nil only
3751 if one of the attributes is non-nil.
3752 (tramp-smb-handle-file-local-copy): Use `file-truename'.
3753 (tramp-smb-handle-file-truename): Move to tramp.el.
3754 (tramp-smb-handle-insert-directory): Show symlinks.
3755 (tramp-smb-handle-make-symbolic-link): Improve.
3756 (tramp-smb-read-file-entry): Handle extended file modes in Samba.
3757
3758 * lisp/net/tramp.el (tramp-handle-add-name-to-file)
3759 (tramp-handle-file-truename): New defuns.
3760
3761 * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
3762 (tramp--test-check-files): Make check for "smb".
3763
37642017-09-04 Mark Oteiza <mvoteiza@udel.edu>
3765
3766 Embed JSON readtable into json-read
3767
3768 Also unroll dispatch into a cond.
3769 * lisp/json.el (json-readtable): Remove.
3770 (json-readtable-dispatch): New macro. Assimilate json-readtable.
3771 (json-read): Use the macro.
3772
37732017-09-04 Mark Oteiza <mvoteiza@udel.edu>
3774
3775 Hexify strings in EWW search queries
3776
3777 Previously, inputting "cats & dogs" would lose dogs because the
3778 ampersand signifies a query parameter. Instead, hexify each word while
3779 preserving quotes with split-string.
3780 * lisp/net/eww.el (eww--dwim-expand-url): Join hexified words together
3781 with + separators, instead of replacing whitespace with +.
3782
37832017-09-03 Glenn Morris <rgm@gnu.org>
3784
3785 emacsclient-tests: call-process may return non-integer
3786
3787 * test/lib-src/emacsclient-tests.el
3788 (emacsclient-test-alternate-editor-allows-arguments)
3789 (emacsclient-test-alternate-editor-allows-quotes):
3790 Handle non-integer return from call-process.
3791
37922017-09-03 Eli Zaretskii <eliz@gnu.org>
3793
3794 * lisp/simple.el (visual-line-mode): Doc fix. (Bug#28337)
3795
37962017-09-03 Alan Third <alan@idiocy.org>
3797
3798 Force screen update after drawing cursor glyph (bug#23774)
3799
3800 * src/nsterm.m (ns_draw_window_cursor): Force a screen update after
3801 drawing the glyph over the cursor.
3802
38032017-09-03 Alan Mackenzie <acm@muc.de>
3804
3805 Correct the fontification of quote marks after buffer changes in CC Mode.
3806
3807 * lisp/progmodes/cc-defs.el
3808 (c-search-forward-char-property-with-value-on-char): New macro.
3809
3810 * lisp/progmodes/cc-mode.el (c-parse-quotes-before-change)
3811 (c-parse-quotes-after-change): Rewrite the functions, simplifying
3812 considerably, and removing unnecessary optimisations. Invalidate two caches
3813 after manipulating text properties.
3814
38152017-09-03 Alan Mackenzie <acm@muc.de>
3816
3817 Fix fontification of "operator~" in C++ Mode.
3818
3819 * lisp/progmodes/cc-langs.el (c-ambiguous-overloadable-or-identifier-prefices)
3820 (c-ambiguous-overloadable-or-identifier-prefix-re): New c-lang-defconsts/vars.
3821
3822 * lisp/progmodes/cc-engine.el (c-forward-name): Do not try to parse "~" (and
3823 two other symbols) as a cast without good evidence. Prefer an overloaded
3824 operator in ambiguous cases.
3825
38262017-09-03 Martin Rudalics <rudalics@gmx.at>
3827
3828 In delete_frame do not delete terminal for any toolkit build
3829
3830 * src/frame.c (delete_frame): Neither delete terminal for
3831 non-GTK toolkit builds (Bug#5802, Bug#21509, Bug#23499,
3832 Bug#27816).
3833
38342017-09-02 Philipp Stephani <phst@google.com>
3835
3836 Improve error messages for improper plists (Bug#27726)
3837
3838 * src/fns.c (Fplist_put, Flax_plist_get, Flax_plist_put)
3839 (Fplist_member, syms_of_fns): Use ‘plistp’ as pseudo-predicate for
3840 improper plists instead of ‘listp.’
3841
3842 * test/src/fns-tests.el (plist-get/odd-number-of-elements)
3843 (lax-plist-get/odd-number-of-elements)
3844 (plist-put/odd-number-of-elements)
3845 (lax-plist-put/odd-number-of-elements)
3846 (plist-member/improper-list): Add unit tests.
3847
38482017-09-02 Eli Zaretskii <eliz@gnu.org>
3849
3850 Fix decrypting in plstore.el on MS-Windows
3851
3852 * lisp/plstore.el (plstore-open): Bind coding-system-for-read to
3853 raw-text, instead of using insert-file-contents-literally.
3854 (Bug#28114)
3855
38562017-09-02 Eli Zaretskii <eliz@gnu.org>
3857
3858 * src/fileio.c (Fexpand_file_name): Doc fix. (Bug#27982)
3859
38602017-09-02 Eli Zaretskii <eliz@gnu.org>
3861
3862 Rewrite Antinews for Emacs 26
3863
3864 * doc/lispref/anti.texi (Antinews): Rewrite for Emacs 26.
3865 * doc/lispref/elisp.texi (Top): Update the top-level menu's
3866 Antinews entry.
3867 * doc/emacs/anti.texi (Antinews): Rewrite for Emacs 26.
3868 * doc/emacs/emacs.texi (Top): Update the top-level menu's Antinews
3869 entry.
3870
3871 * etc/NEWS: Rearrange some entries in a more reasonable order.
3872
38732017-09-02 Reuben Thomas <rrt@sc3d.org>
3874
3875 Fix a mis-binding in a test
3876
3877 * test/lisp/progmodes/python-tests.el
3878 (python-shell-calculate-process-environment-3): Fix binding of
3879 process-environment. A level of parens was missing.
3880
3881 This was found after Glenn Morris noticed a similar problem with the
3882 patch for Bug#28319.
3883
38842017-09-02 Reuben Thomas <rrt@sc3d.org>
3885
3886 Fix a mis-binding and a bad defun name in a test (Bug#28319)
3887
3888 test/lib-src/emacs-client-tests.el (call-emacsclient): Rename
3889 emacsclient-test-call-emacsclient.
3890 (emacsclient-test-alternate-editor-allows-arguments)
3891 (emacsclient-test-alternate-editor-allows-quotes): Fix let-binding of
3892 process-environment.
3893
3894 Thanks to Glenn Morris for noticing these errors.
3895
38962017-09-02 Glenn Morris <rgm@gnu.org>
3897
3898 * test/Makefile.in (check-no-automated-subdir): Silence by default.
3899
3900 * test/Makefile.in (ELFILES): Sort, for a reproducible order.
3901
39022017-09-01 Mark Oteiza <mvoteiza@udel.edu>
3903
3904 Turn off checkdoc complaint about default argument order
3905
3906 * etc/NEWS: Mention change.
3907 * lisp/emacs-lisp/checkdoc.el (checkdoc-arguments-in-order-flag):
3908 Disable by default, note version.
3909
39102017-09-01 Reuben Thomas <rrt@sc3d.org>
3911
3912 Stop emacsclient tests hanging (Bug#28319)
3913
3914 * test/lib-src/emacsclient-tests.el
3915 (emacsclient-test-alternate-editor-allows-arguments): Use a
3916 non-existent file to communicate with server, so that any existing
3917 default server will not be hijacked (in fact, the test does
3918 not need a server).
3919 (emacsclient-test-alternate-editor-allows-quotes): Likewise.
3920
39212017-09-01 Stefan Monnier <monnier@iro.umontreal.ca>
3922
3923 * lisp/obsolete/html2text.el: Don't require CL
3924
3925 (html2text-clean-anchor): Mark unused arg.
3926
39272017-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
3928
3929 Don't remove undisplayers from inlined MIME parts (bugfix)
3930
3931 * lisp/gnus/gnus-art.el (gnus-mime-buttonize-attachments-in-header):
3932 Don't remove undisplayers from inlined MIME parts (bugfix);
3933 Simplify criterion that finds attachments.
3934
39352017-08-31 Mark Oteiza <mvoteiza@udel.edu>
3936
3937 Make ucs-names a hash table (Bug#28302)
3938
3939 * etc/NEWS: Mention the type change.
3940 * lisp/descr-text.el (describe-char): Use gethash to access ucs-names.
3941 Hardcode BEL's name into the function instead of needlessly mapping
3942 over the hash table in the spirit of rassoc.
3943 * lisp/international/mule-cmds.el (ucs-names): Fix variable and
3944 function docstrings. Initialize a hash table for ucs-names--the
3945 number of entries is 42845 here. Switch to hash-table
3946 getters/setters.
3947 (mule--ucs-names-annotation): Use hash-table getter.
3948 (char-from-name): Upcase the string if ignore-case is truthy.
3949 * lisp/leim/quail/latin-ltx.el: Use maphash instead of dolist.
3950
39512017-08-31 Alan Third <alan@idiocy.org>
3952
3953 Remove unneeded version checks (bug#28222)
3954
3955 * src/macfont.h (CGContextSetFontSmoothingStyle): Remove version
3956 check.
3957 * src/macfont.m (macfont_draw): Remove version check, and test for
3958 existence of CGContextSetFontSmoothingStyle.
3959
39602017-08-31 Alan Mackenzie <acm@muc.de>
3961
3962 Fix a glitch in CC Mode's syntactic whitespace cache.
3963
3964 * lisp/progmodes/cc-engine.el (c-forward-sws): Deal correctly with a block
3965 comment close at the end of a macro.
3966
39672017-08-31 Alan Mackenzie <acm@muc.de>
3968
3969 Correct the fontification of C++ Mode enclosed declarations.
3970
3971 * lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): abolish the
3972 spurious check that the character before the start of an enclosed declaration
3973 must be ; or }. It might also be {.
3974
39752017-08-31 Martin Rudalics <rudalics@gmx.at>
3976
3977 In xterm.c fix some recently introduced compiler warnings
3978
3979 * src/xterm.c (xaw_jump_callback)
3980 (x_set_toolkit_scroll_bar_thumb): Fix some recently introduced
3981 -Wdouble-promotion warnings.
3982
39832017-08-31 Martin Rudalics <rudalics@gmx.at>
3984
3985 Restrict fix of Bug#24963 and Bug#25887 to GTK builds
3986
3987 * src/xterm.c (handle_one_xevent): Restrict earlier fix of
3988 Bug#24963 and Bug#25887 to avoid that a non-GTK Emacs won't
3989 react to state changes received via ConfigureNotify.
3990
39912017-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
3992
3993 Respect directory a user enters (bug#28299)
3994
3995 * lisp/gnus/mm-decode.el (mm-save-part):
3996 Respect directory a user enters (bug#28299).
3997
39982017-08-31 Samuel Freilich <sfreilich@google.com>
3999
4000 Do not split line before width of fill-prefix
4001
4002 When auto-filling a paragraph, don't split a line before the width of the
4003 fill-prefix, creating a subsequent line that is as long or longer (Bug#20774).
4004 * lisp/simple.el (do-auto-fill): Only consider break-points that are later in
4005 the line than the width of the fill-prefix. This is a more general solution
4006 than the previous logic, which only skipped over the exact fill-prefix. The
4007 fill-prefix doesn't necessarily match the prefix of the first line of a
4008 paragraph in adaptive-fill-mode.
4009
40102017-08-31 Noam Postavsky <npostavs@gmail.com>
4011
4012 Support lazy loading for autogenerated usage docstrings too (Bug#27748)
4013
4014 * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble):
4015 Consider any documentation that ended up in code as a docstring (e.g.,
4016 autogenerated (fn ARG1 ARG2) type things), not just what the user
4017 passed.
4018
40192017-08-31 Noam Postavsky <npostavs@gmail.com>
4020
4021 Drop docstrings from cl-defsubst produced inline bodies (Bug#27748)
4022
4023 * lisp/emacs-lisp/cl-macs.el (cl-defsubst): Use macroexp-parse-progn
4024 to drop the docstring. Add a simple docstring to the compiler-macro.
4025
40262017-08-30 Paul Eggert <eggert@cs.ucla.edu>
4027
4028 Quote file-truename symlink to "../foo:bar:"
4029
4030 Problem reported by Michael Albinus (Bug#28264#19).
4031 * lisp/files.el (files--splice-dirname-file): Fix bug where
4032 a relative symlink to "../foo:bar:" did not quote the result.
4033
40342017-08-30 Reuben Thomas <rrt@sc3d.org>
4035
4036 Add support for arguments in emacsclient's ALTERNATE_EDITOR (Bug #25082)
4037
4038 * lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or
4039 corresponding command-line argument, into quote- or space-separated
4040 tokens. If a token starts with a quote, then it naturally is expected
4041 to end with a quote; escaping is not supported. This is enough to cope
4042 with the typical case of requiring the initial path to be quoted,
4043 common on Windows where it may contain spaces.
4044 * etc/NEWS: Document.
4045 * doc/emacs/misc.texi: Likewise.
4046 * doc/man/emacsclient.1: Tweak to remove the implication that only an
4047 editor can be specified (the manual already mentions a “command”).
4048 Fix a small error where “EDITOR” is referred to rather than
4049 “ALTERNATE_EDITOR”.
4050 * test/lib-src/emacsclient-tests.el: Add tests.
4051
40522017-08-30 Stefan Monnier <monnier@iro.umontreal.ca>
4053
4054 * lisp/man.el (Man-softhyphen-to-minus): Avoid string-as-multibyte.
4055
40562017-08-30 Devon Sean McCullough <Emacs-Hacker2017@jovi.net> (tiny change)
4057
4058 Correct "hide others" shortcut on macOS (bug#28215)
4059
4060 * lisp/term/ns-win.el: Fix shortcut for ns-do-hide-others.
4061
40622017-08-30 Eli Zaretskii <eliz@gnu.org>
4063
4064 Sync NEWS with the documentation
4065
4066 * etc/NEWS: Mark entries according to documentation.
4067
4068 * doc/lispref/functions.texi (Mapping Functions): Document 'mapcan'.
4069
40702017-08-30 Michael Albinus <michael.albinus@gmx.de>
4071
4072 Improve symlinks for Tramp
4073
4074 * lisp/files.el (files--splice-dirname-file): Quote whole file.
4075
4076 * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
4077 Do not expand TARGET, it could be remote.
4078 (tramp-sh-handle-file-truename): Check for cyclic symlink also
4079 in case of readlink. Quote result if it looks remote.
4080 (tramp-sh-handle-file-local-copy): Use `file-truename'.
4081
4082 * test/lisp/net/tramp-tests.el (tramp-test08-file-local-copy)
4083 (tramp-test09-insert-file-contents): Test also file missing.
4084 (tramp-test21-file-links): Extend test.
4085
40862017-08-30 Martin Rudalics <rudalics@gmx.at>
4087
4088 Preserve display's foreground color when clearing internal borders (Bug#28278)
4089
4090 * src/xterm.c (x_after_update_window_line): Preserve display's
4091 foreground color when clearing internal borders (Bug#28278).
4092
40932017-08-30 Noam Postavsky <npostavs@gmail.com>
4094
4095 Use cl-print for all values printed by `describe-variable'
4096
4097 * lisp/help-fns.el (describe-variable): Use cl-prin1 for original and
4098 global values too.
4099
41002017-08-30 Noam Postavsky <npostavs@gmail.com>
4101
4102 Minor simplification for byte-compile-constant-push
4103
4104 * lisp/emacs-lisp/bytecomp.el (byte-compile-constant): Move the meat
4105 of the code from here...
4106 (byte-compile-constant-push): ... to here. No need to bind
4107 byte-compile--for-effect anymore.
4108
41092017-08-30 Paul Eggert <eggert@cs.ucla.edu>
4110
4111 Prefer file-name-quote to concat "/:"
4112
4113 Suggested by Michael Albinus (Bug#28264#13).
4114 * lisp/files.el (files--splice-dirname-file): Use file-name-quote
4115 rather than attempting to do it by hand.
4116
41172017-08-30 Paul Eggert <eggert@cs.ucla.edu>
4118
4119 * configure.ac: fix typo in previous change
4120
41212017-08-29 Paul Eggert <eggert@cs.ucla.edu>
4122
4123 Be more conservative in link time optimization doc
4124
4125 While testing --enable-link-time-optimization with GCC 7.1.1
4126 I ran into a serious GCC code-generation bug which makes me
4127 think that --enable-link-time-optimization should be
4128 discouraged for typical installs (Bug#28213). See:
4129 https://bugzilla.redhat.com/show_bug.cgi?id=1486455
4130
41312017-08-29 Paul Eggert <eggert@cs.ucla.edu>
4132
4133 Make garbage collection more conservative
4134
4135 Check for a pointer anywhere within the object, as opposed to just
4136 the start of the object. This is needed for gcc -Os -flto on
4137 x86-64 (Bug#28213). This change means that the garbage collector
4138 is more conservative, and will incorrectly keep objects that it
4139 does not need to, but that is better than incorrectly discarding
4140 objects that should be kept.
4141 * src/alloc.c (ADVANCE, VINDEX): Now functions, not macros;
4142 this is easier to debug.
4143 (setup_on_free_list): Rename from SETUP_ON_FREE_LIST.
4144 Now a function with two args, not a macro with three.
4145 All callers changed.
4146 (live_string_holding, live_cons_holding, live_symbol_holding)
4147 (live_misc_holding, live_vector_holding, live_buffer_holding):
4148 New functions, which check for any object containing the addressed
4149 byte, not just for an object at the given address.
4150 (live_string_p, live_cons_p, live_symbol_p, live_misc_p)
4151 (live_vector_p, live_buffer_p):
4152 Redefine in terms of the new functions.
4153 (live_float_p): Refactor slightly to match the new functions.
4154 (mark_maybe_object, mark_maybe_pointer): Use the new functions.
4155 Don’t bother checking mark bits, as mark_object already does that,
4156 and omitting the checks here simplifies the code. Although
4157 mark_maybe_object can continue to insist that tagged pointers
4158 still address the start of the object, mark_maybe_pointer now is
4159 more conservative and checks for pointers anywhere into an object.
4160
41612017-08-29 Paul Eggert <eggert@cs.ucla.edu>
4162
4163 Improve stack-top heuristic
4164
4165 This is needed for gcc -Os -flto on x86-64; otherwise, GC misses part
4166 of the stack when scanning for heap roots, causing Emacs to crash
4167 later (Bug#28213). The problem is that Emacs's hack for getting an
4168 address near the stack top does not work when link-time optimization
4169 moves stack variables around.
4170 * configure.ac (HAVE___BUILTIN_FRAME_ADDRESS): New macro.
4171 * lib-src/make-docfile.c (DEFUN_noinline): New constant.
4172 (write_globals, scan_c_stream): Support noinline.
4173 * src/alloc.c (NEAR_STACK_TOP): New macro.
4174 (SET_STACK_TOP_ADDRESS): Use it.
4175 (flush_stack_call_func, Fgarbage_collect): Now noinline.
4176
41772017-08-29 Paul Eggert <eggert@cs.ucla.edu>
4178
4179 Align stack bottom properly.
4180
4181 This is needed for gcc -Os -flto on x86-64 (Bug#28213).
4182 * src/emacs.c (main): Align stack-bottom variable as a pointer,
4183 since mark_memory requires this.
4184
41852017-08-29 Eli Zaretskii <eliz@gnu.org>
4186
4187 Avoid spinning waiting for git-gui.exe on Windows
4188
4189 * src/w32proc.c (waitpid): If GetExitCodeProcess returns
4190 STILL_ACTIVE, and we were called with WNOHANG, pretend that the
4191 process exited. (Bug#28268)
4192
41932017-08-29 Eli Zaretskii <eliz@gnu.org>
4194
4195 Document '--module-assertions'
4196
4197 * doc/emacs/cmdargs.texi (Initial Options): Document the
4198 '--module-assertions' command-line option.
4199 * doc/lispref/loading.texi (Dynamic Modules): Add a
4200 cross-reference to the description of '--module-assertions'.
4201
4202 * etc/NEWS: Update the NEWS entry for --module-assertions.
4203
42042017-08-29 Alan Third <alan@idiocy.org>
4205
4206 Add news entry about new macOS features
4207
4208 * etc/NEWS: Add entry about ns-appearance, ns-transparent-titlebar and
4209 ns-use-thin-smoothing.
4210
42112017-08-29 Alan Third <alan@idiocy.org>
4212
4213 Fix cross macOS version building (bug#28222)
4214
4215 * src/macfont.h (CGContextSetFontSmoothingStyle): Function
4216 declaration.
4217 * src/macfont.m (macfont_draw): Limit new code to macOS 10.8 and up.
4218
42192017-08-29 Ben Bonfil <bonfil@gmail.com> (tiny change)
4220
4221 Enable thin font smoothing in macOS (bug#28222)
4222
4223 * src/nsterm.m (syms_of_nsterm): Define var ns-use-thin-smoothing.
4224 * src/macfont.m (macfont_draw): Use font smoothing.
4225
42262017-08-29 Eli Zaretskii <eliz@gnu.org>
4227
4228 Minor improvement in documentation of display-line-numbers
4229
4230 * doc/emacs/display.texi (Display Custom): Document the
4231 display-line-numbers-mode and related options.
4232
42332017-08-29 Eli Zaretskii <eliz@gnu.org>
4234
4235 Avoid aborting in 'waitpid' on MS-Windows
4236
4237 * src/w32proc.c (waitpid): Don't allow quitting if called with
4238 WNOHANG in OPTIONS. (Bug#28268)
4239
42402017-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
4241
4242 * lisp/progmodes/sh-script.el: Test "in-string" of the right char!
4243
4244 (sh-syntax-propertize-function): Fix off-by-one error.
4245 Fixes bug#23526.
4246
42472017-08-29 Rasmus <rasmus@gmx.us>
4248
4249 Update Org to v9.0.10
4250
4251 Please see etc/ORG-NEWS for major changes. Note, this is a bugfix
4252 release.
4253
42542017-08-29 Paul Eggert <eggert@cs.ucla.edu>
4255
4256 Silence false alarms for symlinks to sources
4257
4258 Problem reported by Glenn Morris (Bug#28264).
4259 * lisp/files.el (files--splice-dirname-file): New function.
4260 (file-truename, file-chase-links): Use it.
4261
42622017-08-29 Paul Eggert <eggert@cs.ucla.edu>
4263
4264 Simplify remove_slash_colon
4265
4266 * src/process.c (remove_slash_colon): Simplify
4267 and avoid a special case for "/:" by itself.
4268
42692017-08-28 Tassilo Horn <tsdh@gnu.org>
4270
4271 Remove font family from minibuffer-prompt face
4272
4273 * etc/themes/tsdh-light-theme.el (tsdh-light): Remove font family from
4274 minibuffer-prompt face.
4275
42762017-08-28 Michael Albinus <michael.albinus@gmx.de>
4277
4278 Further fixes in tramp-smb.el
4279
4280 * lisp/net/tramp-smb.el (tramp-smb-handle-file-truename): New defun.
4281 (tramp-smb-file-name-handler-alist): Use it.
4282 (tramp-smb-handle-make-symbolic-link): Unquote target.
4283
4284 * test/lisp/net/tramp-tests.el
4285 (tramp--test-ignore-make-symbolic-link-error): New defmacro.
4286 (tramp-test18-file-attributes, tramp-test21-file-links)
4287 (tramp--test-check-files): Use it.
4288
42892017-08-28 Paul Eggert <eggert@cs.ucla.edu>
4290
4291 Don’t assume -g3 in .gdbinit
4292
4293 * src/.gdbinit (EMACS_INT_WIDTH, USE_LSB_TAG):
4294 Use reasonable defaults if not in the symbol table.
4295
42962017-08-28 Robert Pluim <rpluim@gmail.com> (tiny change)
4297
4298 Use string-match to check for dotfiles in ido
4299
4300 * lisp/ido.el (ido-make-file-list): Use string-match to check
4301 for dotfiles instead of substring, as when using tramp
4302 simplified syntax ido-temp-list may contain empty strings.
4303
43042017-08-28 Mark Oteiza <mvoteiza@udel.edu>
4305
4306 Font-lock FDO desktop files correctly
4307
4308 Single and double quotes do not have a special meaning in
4309 desktop files.
4310 https://standards.freedesktop.org/desktop-entry-spec/latest/
4311 * etc/NEWS: Mention new mode.
4312 * lisp/files.el (auto-mode-alist): Split out an entry for handling
4313 the .desktop extension with conf-desktop-mode.
4314 * lisp/textmodes/conf-mode.el (conf-desktop-font-lock-keywords): New
4315 variable with rules for booleans and format specifiers.
4316 (conf-unix-mode): Remove desktop file entry example from docstring.
4317 (conf-desktop-mode): New derived major mode.
4318
43192017-08-27 Tom Tromey <tom@tromey.com>
4320
4321 Fix auto-fill bug in js-mode
4322
4323 * lisp/progmodes/js.el (js-do-auto-fill): New function.
4324 (js-mode): Set normal-auto-fill-function.
4325 * test/lisp/progmodes/js-tests.el (js-mode-fill-comment-bug): New
4326 test.
4327
43282017-08-27 Noam Postavsky <npostavs@gmail.com>
4329
4330 Disable completion while entering python multiline statements
4331
4332 The "legacy" completion mechanism sends newlines to the running python
4333 process to get the list of completions, which confuses things if the
4334 user is in the middle of entering a multiline statement (Bug#28051).
4335 It's better to disable completion in this case.
4336 * lisp/progmodes/python.el (python-shell--block-prompt): New variable.
4337 (python-shell-prompt-set-calculated-regexps): Set it.
4338 (python-shell-completion-at-point): Return 'ignore' as the completion
4339 function when the current prompt is a block prompt.
4340
43412017-08-27 Michael Albinus <michael.albinus@gmx.de>
4342
4343 Tramp cleanup
4344
4345 * lisp/net/tramp-sh.el (tramp-sh-extra-args): Remove compat code.
4346 (tramp-sh-handle-make-symbolic-link): More robust check for
4347 TARGET remoteness.
4348
4349 * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
4350 Disable copying by tar temporarily, it doesn't work reliably.
4351 (tramp-smb-do-file-attributes-with-stat): Resolve symlink.
4352 (tramp-smb-handle-make-symbolic-link): Fix implementation.
4353
4354 * lisp/net/tramp.el (tramp-handle-file-symlink-p): Simplify.
4355
4356 * test/lisp/net/tramp-tests.el (tramp-test21-file-links):
4357 Extend test.
4358
43592017-08-27 Glenn Morris <rgm@gnu.org>
4360
4361 Fix previous xterm.h change for non-gtk builds
4362
4363 * src/xterm.h (GTK_CHECK_VERSION) [!USE_GTK]: Define it.
4364
43652017-08-27 Philipp Stephani <phst@google.com>
4366
4367 Fix GdkSettings-related deprecation warnings
4368
4369 * src/gtkutil.c (xg_initialize): Don’t set deprecated and ignored
4370 gtk-menu-bar-accel setting in new versions of GTK+. Use g_object_set
4371 instead of deprecated gtk_settngs_set_string_property otherwise.
4372
43732017-08-27 Philipp Stephani <phst@google.com>
4374
4375 Always use gtk_window_move in new versions
4376
4377 * src/gtkutil.c (my_log_handler): Don’t define in new versions of
4378 GTK+.
4379 (xg_set_geometry): Always use gtk_window_move in new versions of GTK+.
4380
4381 * src/xterm.c (syms_of_xterm): Document that x-gtk-use-window-move
4382 is ignored.
4383
4384 * lisp/subr.el (x-gtk-use-window-move): Make obsolete.
4385
43862017-08-27 Charles A. Roelli <charles@aurox.ch>
4387
4388 Fix 'diff-goto-source' when buffer is narrowed (Bug#21262)
4389
4390 * lisp/vc/diff-mode.el (diff-find-file-name): Save the current
4391 narrowing, and widen the buffer before searching for the name of the
4392 file corresponding to the diff.
4393
4394 With thanks to Noam Postavsky.
4395
43962017-08-27 Philipp Stephani <phst@google.com>
4397
4398 Remove use of a deprecated GTK+ function in new versions
4399
4400 * src/gtkutil.c (xg_make_tool_item): Use gtk_widget_set_focus_on_click
4401 if available
4402
44032017-08-27 Philipp Stephani <phst@google.com>
4404
4405 Stop using deprecated GdkScreen monitor functions in newer GDK
4406
4407 * src/xfns.c (Fx_display_monitor_attributes_list): Use GdkMonitor
4408 objects instead of the deprecated GdkScreen functions in GDK 3.22+
4409
44102017-08-27 Philipp Stephani <phst@google.com>
4411
4412 Use GdkSeat in new GDK versions
4413
4414 * src/gtkutil.c (xg_event_is_for_scrollbar): Use GdkSeat instead of
4415 GdkDeviceManager in GDK 3.20+
4416
44172017-08-27 Philipp Stephani <phst@google.com>
4418
4419 * src/xterm.c (XTflash): Don’t use gdk_cairo_create in GDK 3.22+
4420
44212017-08-27 Philipp Stephani <phst@google.com>
4422
4423 Remove call of deprecated GDK function
4424
4425 * src/xterm.h (XSync): Don’t call gdk_window_process_all_updates in
4426 GDK 3.22 or later.
4427
44282017-08-27 Alan Mackenzie <acm@muc.de>
4429
4430 Amend the CC Mode macro cache to cope with changes at the macro start
4431
4432 Fixes bug #28233.
4433
4434 * lisp/progmodes/cc-engine.el (c-invalidate-macro-cache): Fix an off-by-1
4435 error.
4436
44372017-08-27 Paul Eggert <eggert@cs.ucla.edu>
4438
4439 Fix over-protection of byte-compiled files
4440
4441 Problem reported by Sven Joachim (Bug#28244).
4442 Also, fix similar problem for autoload files.
4443 * lisp/emacs-lisp/autoload.el (autoload--save-buffer):
4444 Set temp file modes to the buffer-file-name file modes (or 666
4445 if not available) as adjusted by umask.
4446 * lisp/emacs-lisp/bytecomp.el (byte-compile-file):
4447 Set temp file modes to 666 as adjusted by umask.
4448
44492017-08-27 Tom Tromey <tom@tromey.com>
4450
4451 Refine conf-toml-mode font-lock
4452
4453 Bug#28218
4454 * lisp/textmodes/conf-mode.el (conf-toml-font-lock-keywords): Use
4455 conf-toml-recognize-section. Use \s- in variable regexp.
4456 (conf-toml-recognize-section): New function.
4457
44582017-08-27 Paul Eggert <eggert@cs.ucla.edu>
4459
4460 Do not munge contents of local symbolic links
4461
4462 This lets Emacs deal with arbitrary local symlinks without
4463 mishandling their contents (Bug#28156). For example,
4464 (progn (shell-command "ln -fs '~' 'x'") (rename-file "x" "/tmp/x"))
4465 now consistently creates a symbolic link from '/tmp/x' to '~'.
4466 Formerly, it did that only if the working directory was on the
4467 same filesystem as /tmp; otherwise, it expanded the '~' to
4468 the user's home directory.
4469 * lisp/dired.el (dired-get-filename): Use files--name-absolute-system-p
4470 instead of rolling our own code.
4471 * lisp/files.el (files--name-absolute-system-p): New function.
4472 (file-truename, file-chase-links): Use it to avoid mishandling
4473 symlink contents that begin with ~.
4474 (copy-directory, move-file-to-trash):
4475 Use concat rather than expand-file-name, to avoid mishandling
4476 symlink contents that begin with ~.
4477 * src/fileio.c (Fmake_symbolic_link): Do not expand leading "~" in the
4478 target unless interactive. Strip leading "/:" if interactive.
4479 (emacs_readlinkat): Do not prepend "/:" to the link target if
4480 it starts with "/" and contains ":" before NUL.
4481 * test/src/fileio-tests.el (try-link): Rename from try-char,
4482 and accept a string instead of a char. All uses changed.
4483 (fileio-tests--symlink-failure): Also test leading ~, and "/:",
4484 to test the new behavior.
4485
44862017-08-27 Reuben Thomas <rrt@sc3d.org>
4487
4488 Remove invalid regexp for shell builtins for wksh
4489
4490 * lisp/progmodes/sh-script.el (sh-builtins): Shell built-ins have to
4491 be literal strings, so remove a regexp for wksh. In any case, it’s a
4492 defunct proprietary shell.
4493
44942017-08-26 Paul Eggert <eggert@cs.ucla.edu>
4495
4496 Improve doc for file-name-absolute-p.
4497
44982017-08-26 Michael Albinus <michael.albinus@gmx.de>
4499
4500 Fix Tramp part of Bug#28156
4501
4502 * lisp/files.el (file-name-non-special): Use `file-name-quote'
4503 instead prefixing "/:", the file could already be quoted.
4504
4505 * lisp/net/tramp.el (tramp-error): Handle null arguments.
4506 (tramp-handle-make-symbolic-link):
4507 * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
4508 (tramp-sh-handle-add-name-to-file):
4509 * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
4510 (tramp-smb-handle-make-symbolic-link): Adapt implementation to
4511 stronger semantics in Emacs. (Bug#28156)
4512
4513 * test/lisp/net/tramp-tests.el (tramp-test21-file-links):
4514 Extend test.
4515
45162017-08-26 Eli Zaretskii <eliz@gnu.org>
4517
4518 Fix bugs merged with bug#25428
4519
4520 * lisp/simple.el (auto-fill-mode, visual-line-mode): Doc fix.
4521 (Bug#13926) (Bug#25434) (Bug#25435)
4522
45232017-08-26 Eli Zaretskii <eliz@gnu.org>
4524
4525 Improve documentation of Info virtual files and nodes
4526
4527 * lisp/info.el (Info-virtual-files, Info-virtual-nodes): Doc fix.
4528 (Bug#28237)
4529
45302017-08-26 Eli Zaretskii <eliz@gnu.org>
4531
4532 * lisp/delsel.el (delete-selection-mode): Doc fix. (Bug#25428)
4533
45342017-08-26 Grégory Mounié <Gregory.Mounie@imag.fr> (tiny change)
4535
4536 Support multi-lingual detection of SEE ALSO man sections
4537
4538 * lisp/man.el (Man-see-also-regexp): Add support for SEE ALSO
4539 section detection in several langages: French, German, Spanish,
4540 Portugese, Italian, Polish, Turkish, Japanese, Chinese. (Bug#28142)
4541
45422017-08-26 Paul Eggert <eggert@cs.ucla.edu>
4543
4544 Improve expand-file-name doc
4545
4546 * doc/lispref/files.texi (Relative File Names, Directory Names)
4547 (File Name Expansion):
4548 * doc/lispref/minibuf.texi (Reading File Names):
4549 Document expand-file-name behavior with ~ more clearly
4550 and accurately.
4551 * doc/misc/org.texi (Batch execution): Simplify example
4552 script so that it does not need expand-file-name and thus
4553 will not mishandle file names with leading ~.
4554
45552017-08-26 Jefferson Carpenter <jeffersoncarpenter2@gmail.com> (tiny change)
4556
4557 Support all perl variable declarators and prefixes (Bug#27613)
4558
4559 * lisp/progmodes/perl-mode.el (perl-imenu-generic-expression)
4560 (perl-font-lock-keywords-2): Match declators 'anon', 'argument', 'has',
4561 'local', 'state', 'supersede', 'let', and 'temp'.
4562
45632017-08-25 Paul Eggert <eggert@cs.ucla.edu>
4564
4565 Fix file-attributes race on GNU hosts
4566
4567 * doc/lispref/files.texi (File Attributes):
4568 Document file-attributes atomicity.
4569 * etc/NEWS: Document the fix.
4570 * src/dired.c (file_attributes): New args DIRNAME and FILENAME,
4571 for diagnostics. All callers changed. On platforms like
4572 GNU/Linux that support O_PATH, fix a race condition in
4573 file-attributes and similar functions, so that these functions do
4574 not return nonsense if a directory entry is replaced while getting
4575 its attributes. On non-GNU platforms, do a better (though not
4576 perfect) job of detecting the race, and return nil if detected.
4577
45782017-08-25 Paul Eggert <eggert@cs.ucla.edu>
4579
4580 Simplify expand_and_dir_to_file
4581
4582 * src/fileio.c (expand_and_dir_to_file): Simplify by omitting 2nd
4583 argument, since in practice it always has the default value. All
4584 callers changed. Prefer C99 style decls in nearby code.
4585
45862017-08-25 Eli Zaretskii <eliz@gnu.org>
4587
4588 Fix file-name completion on network shares
4589
4590 * src/w32.c (faccessat): Don't assume that F_OK is non-zero.
4591 (Bug#28207)
4592
45932017-08-25 Reuben Thomas <rrt@sc3d.org>
4594
4595 Fix a FIXME with an exegetical comment
4596
4597 * lisp/progmodes/sh-script.el (sh-builtins): Explain why we have a
4598 regexp for wksh builtins.
4599
46002017-08-25 Reuben Thomas <rrt@sc3d.org>
4601
4602 Minor docstring language fix
4603
4604 * lisp/progmodes/sh-script.el (sh-show-indent): Remove spurious “the”.
4605
46062017-08-25 Reuben Thomas <rrt@sc3d.org>
4607
4608 Remove old commented code from sh-script.el
4609
4610 * lisp/progmodes/sh-script.el (sh-abbrevs): Remove commented function
4611 and variable, commented since 2001.
4612
46132017-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
4614
4615 * lisp/emacs-lisp/package.el: Don't let failure stop us
4616
4617 (package-activate-1): Don't throw an error for missing deps.
4618 (package-unpack): Don't bother compiling if activation failed.
4619 (package-initialize): Report failures but keep activating other packages.
4620
46212017-08-25 Paul Eggert <eggert@cs.ucla.edu>
4622
4623 Prefer ‘double’ for FP temps in xterm.c
4624
4625 * src/xterm.c (xm_scroll_callback, xaw_jump_callback)
4626 (x_set_toolkit_scroll_bar_thumb)
4627 (x_set_toolkit_horizontal_scroll_bar_thumb): Prefer ‘double’ to
4628 ‘float’ for individual local floating-point temporaries.
4629
46302017-08-24 Reuben Thomas <rrt@sc3d.org>
4631
4632 Avoid using string-to-multibyte in ispell.el
4633
4634 * lisp/textmodes/ispell.el (ispell-get-decoded-string): Use
4635 decode-coding-string instead. Note that decode-coding-string returns a
4636 string that satisfies multibyte-string-p even if its input is pure
4637 ASCII and the third argument is t, so the result of
4638 ispell-get-decoded-string is always a multibyte string.
4639
46402017-08-24 Tino Calancha <tino.calancha@gmail.com>
4641
4642 Store the regexp just when there are matches
4643
4644 * lisp/hi-lock.el (hi-lock-set-pattern): When font-lock-mode is
4645 disabled and there are no matches do not store REGEXP
4646 in hi-lock-interactive-patterns.
4647
46482017-08-24 Tino Calancha <tino.calancha@gmail.com>
4649
4650 Keep face available if there are no matches
4651
4652 If font-lock-mode is disabled in the current buffer, and
4653 there are no matches for REGEXP, then keep FACE available
4654 for a next search.
4655 * lisp/hi-lock.el (hi-lock-set-pattern): Add FACE into
4656 hi-lock--unused-faces if font-lock-mode is disabled and
4657 there are no matches.
4658 * test/lisp/hi-lock-tests.el (hi-lock-test-set-pattern): Add test.
4659
46602017-08-24 Michael Albinus <michael.albinus@gmx.de>
4661
4662 Minor improvements for tramp-interrupt-process, documentation
4663
4664 * doc/lispref/processes.texi (Signals to Processes):
4665 * etc/NEWS: Document interrupt-process-functions.
4666
4667 * lisp/net/tramp.el (tramp-interrupt-process): Test also for
4668 `process-live-p'.
4669
4670 * src/process.c (Vinterrupt_process_functions): Fix docstring.
4671
4672 * test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
4673 Extend test.
4674
46752017-08-24 Reuben Thomas <rrt@sc3d.org>
4676
4677 Fix a comment whitespace typo.
4678
4679 src/fileio.c: A double space was added after "..", used in a code
4680 example. Make it a single space.
4681
46822017-08-24 Reuben Thomas <rrt@sc3d.org>
4683
4684 Remove old commented code and obsolete comments
4685
4686 * lisp/files.el (locate-dominating-files): Remove old commented
4687 implementation from 9 years ago. Since the current version
4688 appears (at least to me) not just more efficient but clearer than the
4689 version removed, also delete a comment in the new version referring to
4690 the old version. Remove old commented heuristic code,
4691 and explanatory comments.
4692
46932017-08-24 Reuben Thomas <rrt@sc3d.org>
4694
4695 Remove old duplicate commented code
4696
4697 * lisp/files.el (file-relative-name): Remove old commented version,
4698 replaced 14 years ago in commit 753ad9889.
4699
47002017-08-24 Tom Tromey <tom@tromey.com>
4701
4702 Add conf-toml-mode
4703
4704 * etc/NEWS: Mention conf-toml-mode.
4705 * lisp/files.el (auto-mode-alist): Add entry for .toml.
4706 * lisp/textmodes/conf-mode.el (conf-toml-mode-syntax-table)
4707 (conf-toml-font-lock-keywords): New defvars.
4708 (conf-toml-mode): New mode.
4709
47102017-08-23 Alan Third <alan@idiocy.org>
4711
4712 Use lisp type in log message (bug#28176)
4713
4714 * src/nsimage.m (ns_load_image): Use make_number on index.
4715
47162017-08-23 Alan Third <alan@idiocy.org>
4717
4718 Fix PNGs on macOS (bug#28176)
4719
4720 * src/nsimage.m (ns_load_image): Remove index check.
4721 (EmacsImage::getAnimatedBitmapImageRep): New function.
4722 (EmacsImage::getMetadata): Use getAnimatedBitmapImageRep.
4723 (EmacsImage::setFrame): Use getAnimatedBitmapImageRep and check index
4724 is valid.
4725
47262017-08-23 Alan Third <alan@idiocy.org>
4727
4728 Add ability to change macOS WM theme (bug#27973)
4729
4730 * src/frame.c (make_frame, frame_parms, syms_of_frame)
4731 [NS_IMPL_COCOA]: Add ns-appearance and ns-transparent-titlebar
4732 options.
4733 * src/frame.h (ns_appearance_type) [NS_IMPL_COCOA]: Add enum to
4734 represent NSAppearance options.
4735 (struct frame) [NS_IMPL_COCOA]: Add ns_appearance and
4736 ns_transparent_titlebar frame parameters.
4737 * src/nsfns.m (ns_frame_parm_handlers) [NS_IMPL_COCOA]: Add
4738 ns_set_appearance and ns_set_transparent_titlebar handlers.
4739 (Sx_create_frame): Handle ns-appearance and ns-transparent-titlebar
4740 frame parameters.
4741 (Qdark): Add new symbol for use with ns-appearance.
4742 * src/nsterm.h (ns_set_appearance, ns_set_transparent_titlebar)
4743 [NS_IMPL_COCOA]: Add prototypes.
4744 * src/nsterm.m (ns_set_appearance, ns_set_transparent_titlebar)
4745 [NS_IMPL_COCOA]: New functions.
4746 (initFrameFromEmacs) [NS_IMPL_COCOA]: Handle ns-appearance and
4747 ns-transparent-titlebar frame parameters.
4748 * doc/lispref/frames.texi (Window Management Parameters): Document
4749 ns-apperance and ns-transparent-titlebar.
4750
47512017-08-22 Alan Mackenzie <acm@muc.de>
4752
4753 When looking for the end of a declarator, prevent macros fouling up the search
4754
4755 The practical implication of this bug was a random jit-lock chunk remaining
4756 entirely unfontified.
4757
4758 * lisp/progmodes/cc-mode (c-fl-decl-end): If point starts inside a macro,
4759 restrict two forward searches to the end of that macro.
4760
47612017-08-22 Michael Albinus <michael.albinus@gmx.de>
4762
4763 Test `file-expand-wildcards' for Tramp
4764
4765 * lisp/net/tramp-compat.el (tramp-advice-file-expand-wildcards):
4766 Remove, not needed anymore.
4767
4768 * test/lisp/net/tramp-tests.el (top): Require seq.el.
4769 (tramp-test16-directory-files): Simplify.
4770 (tramp-test16-file-expand-wildcards): New test.
4771 (tramp-test28-interrupt-process): Skip for older Emacsen.
4772
47732017-08-22 Alexander Gramiak <agrambot@gmail.com>
4774
4775 Add tests for cl-macs.el (Bug#27559)
4776
4777 * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-loop): Remove
4778 duplicate.
4779 (cl-loop-destructuring-with): Move to cl-macs-tests.el.
4780 * test/lisp/emacs-lisp/cl-macs-tests.el: New file.
4781
47822017-08-22 Noam Postavsky <npostavs@gmail.com>
4783
4784 Optimize skkdic conversion (Bug#28043)
4785
4786 The primary speedup comes from the optimizing lookup-nested-alist and
4787 set-nested-alist for the case where the key is a string. This brings
4788 the time down to less than half the original.
4789
4790 * lisp/international/mule-util.el (lookup-nested-alist)
4791 (set-nested-alist): Use `assq' instead of `assoc' when KEYSEQ is a
4792 string.
4793
4794 * lisp/international/ja-dic-cnv.el (skkdic-collect-okuri-nasi)
4795 (skkdic-convert-okuri-nasi): Use progress-reporter functions instead
4796 of calculating ratio of work done inline.
4797
4798 (skkdic-reduced-candidates): Call `char-category-set' on the first
4799 character of the string directly, instead of using a regexp for the
4800 character category.
4801 (skkdic--japanese-category-set): New constant.
4802 (skkdic-collect-okuri-nasi): Just set
4803 `skkdic-okuri-nasi-entries-count' at once at the end rather than
4804 updating it throughout the loop.
4805
4806 (skkdic-convert-postfix skkdic-convert-prefix)
4807 skkdic-get-candidate-list, skkdic-collect-okuri-nasi)
4808 (skkdic-extract-conversion-data): Use `match-string-no-properties'
4809 instead of `match-string'.
4810
48112017-08-22 Reuben Thomas <rrt@sc3d.org>
4812
4813 Treat tests in lib-src like tests in src
4814
4815 * test/Makefile.in (test_template): Depend on a .c source file for a
4816 test under lib-src, as for src. (Thanks, Glenn Morris for pointing me
4817 in the right direction.)
4818
48192017-08-22 Paul Eggert <eggert@cs.ucla.edu>
4820
4821 Port /bin/sh scripts to Solaris 10
4822
4823 Its /bin/sh builtin ‘test’ command does not support -e.
4824 * autogen.sh, build-aux/git-hooks/pre-commit:
4825 * build-aux/gitlog-to-emacslog, make-dist:
4826 Use test -r, not test -e.
4827
48282017-08-21 Eli Zaretskii <eliz@gnu.org>
4829
4830 Avoid losing the buffer restriction in flyspell-mode
4831
4832 * src/intervals.c (get_local_map): Don't allow C-g to quit as long
4833 as we have the buffer widened, to make sure the restriction is
4834 preserved. (Bug#28161)
4835
48362017-08-21 Sven Joachim <svenjoac@gmx.de>
4837
4838 Fix the 'versionclean' target in src/Makefile
4839
4840 * src/Makefile.in (versionclean): Don't accidentally remove
4841 emacs-module.h. (Bug#28169)
4842
48432017-08-21 Michael Albinus <michael.albinus@gmx.de>
4844
4845 Implement `interrupt-process-functions'
4846
4847 * lisp/net/tramp.el (tramp-interrupt-process): Rename from
4848 `tramp-advice-interrupt-process'. Adapt according to changed API.
4849 (top): Add it to `interrupt-process-functions'.
4850
4851 * src/process.c (Finternal_default_interrupt_process): New defun.
4852 (Finterrupt_process): Change implementation, based on
4853 Vinterrupt_process_functions.
4854 (Vinterrupt_process_functions): New defvar.
4855
4856 * test/lisp/net/tramp-tests.el (tramp-test40-unload): Do not
4857 test removal of advice.
4858
48592017-08-21 Eli Zaretskii <eliz@gnu.org>
4860
4861 Avoid floating-point exceptions while drawing underwave
4862
4863 * src/w32term.c (x_get_scale_factor):
4864 * src/xterm.c (x_get_scale_factor): Don't let the scale factors
4865 become less than 1. Reported by Yuri D'Elia <wavexx@thregr.org> in
4866 http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00459.html.
4867
48682017-08-21 Sam Steingold <sds@gnu.org>
4869
4870 mark flymake-mode as safe local variable when the value is nil
4871
48722017-08-21 Sam Steingold <sds@gnu.org>
4873
4874 allow nil init in flymake-allowed-file-name-masks to disable flymake
4875
4876 (flymake-allowed-file-name-masks): Update doc and :type.
4877 (flymake-get-file-name-mode-and-masks): Handle nil init.
4878
48792017-08-20 Dmitry Gutov <dgutov@yandex.ru>
4880
4881 Remove the workaround for bug#20719
4882
4883 * lisp/cedet/semantic/symref/grep.el
4884 (semantic-symref-grep-use-template): Remove the workaround for
4885 bug#20719, it's been fixed for a while now.
4886
48872017-08-20 Dmitry Gutov <dgutov@yandex.ru>
4888
4889 Fix byte-compilation warnings in semantic/symref/grep
4890
4891 * lisp/cedet/semantic/symref/grep.el (greppattern): Remove.
4892 (grepflags): Rename to semantic-symref-grep-flags.
4893 (semantic-symref-grep-expand-keywords): Update accordingly.
4894 (semantic-symref-grep-use-template): Remove the last two
4895 arguments to make sure they don't shadow the (not renamed)
4896 global variables.
4897 (semantic-symref-perform-search)
4898 (semantic-symref-parse-tool-output-one-line): Use slot names
4899 instead of keywords, like the byte-compiler wants us to.
4900
49012017-08-20 Dmitry Gutov <dgutov@yandex.ru>
4902
4903 Simplify eldoc-message
4904
4905 * lisp/emacs-lisp/eldoc.el (eldoc-message): Simplify.
4906 Don't use ARGS because no callers pass them. Discussed in bug#27230.
4907
49082017-08-20 Noam Postavsky <npostavs@gmail.com>
4909
4910 Work around w32-python-2.x bug to fix prompt detection (Bug#21376)
4911
4912 * lisp/progmodes/python.el (python-shell-prompt-detect): Don't put
4913 carriage returns into the temporary file when running in unbuffered
4914 mode, the w32 build of python 2.7 chokes on them.
4915
49162017-08-20 Reuben Thomas <rrt@sc3d.org>
4917
4918 Add missing require
4919
4920 * lisp/textmodes/ispell.el: Require subr-x. (Thanks, Eli Zaretskii.)
4921
49222017-08-20 Michael Albinus <michael.albinus@gmx.de>
4923
4924 Implement `interrupt-process' for remote processes (Bug#28066)
4925
4926 * lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process):
4927 Support sending signals remotely.
4928 (tramp-open-connection-setup-interactive-shell):
4929 Trace "remote-tty" connection property.
4930
4931 * lisp/net/tramp.el (tramp-advice-interrupt-process): New defun.
4932 (top): Add advice to `interrupt-process'. (Bug#28066)
4933
4934 * test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
4935 New test.
4936 (tramp-test29-shell-command)
4937 (tramp-test30-environment-variables)
4938 (tramp-test30-environment-variables-and-port-numbers)
4939 (tramp-test31-explicit-shell-file-name)
4940 (tramp-test32-vc-registered)
4941 (tramp-test33-make-auto-save-file-name)
4942 (tramp-test34-make-nearby-temp-file)
4943 (tramp-test35-special-characters)
4944 (tramp-test35-special-characters-with-stat)
4945 (tramp-test35-special-characters-with-perl)
4946 (tramp-test35-special-characters-with-ls, tramp-test36-utf8)
4947 (tramp-test36-utf8-with-stat, tramp-test36-utf8-with-perl)
4948 (tramp-test36-utf8-with-ls)
4949 (tramp-test37-asynchronous-requests)
4950 (tramp-test38-recursive-load, tramp-test39-remote-load-path)
4951 (tramp-test40-unload): Rename.
4952 (tramp-test40-unload): Test also removal of advice.
4953
49542017-08-20 Reuben Thomas <rrt@sc3d.org>
4955
4956 Document Enchant support
4957
4958 * doc/emacs/fixit.texi: Mention Enchant.
4959 * doc/misc/efaq.texi: Likewise.
4960 * etc/NEWS: Add an item on Enchant support.
4961
49622017-08-20 Reuben Thomas <rrt@sc3d.org>
4963
4964 Remove old comments and a redundant FIXME
4965
4966 * lisp/textmodes/ispell.el (ispell-process-line): Remove some old
4967 commented code, a redundant FIXME, and outdated usage instructions.
4968
49692017-08-20 Reuben Thomas <rrt@sc3d.org>
4970
4971 Add Enchant support to ispell.el (Bug#17742)
4972
4973 * lisp/textmodes/ispell.el (ispell-program-name): Add “enchant”.
4974 (ispell-really-enchant): Add variable.
4975 (ispell-check-version): If using Enchant, check it’s new enough (at
4976 least 1.6.1). (Like the ispell check, this is absolute: cannot work
4977 without.)
4978 (ispell-enchant-dictionary-alist): Add variable.
4979 (ispell-find-enchant-dictionaries): Add function, based on
4980 ispell-find-aspell-dictionaries.
4981 (ispell-set-spellchecker-params): Allow dictionary auto-detection for
4982 Enchant, and call ispell-find-enchant-dictionaries to find them. Use
4983 old ispell name to locale mapping code for Enchant too.
4984 (ispell-send-replacement): Make it work with Enchant.
4985
49862017-08-20 Noam Postavsky <npostavs@gmail.com>
4987
4988 * lisp/term.el (term-mode): Use `window-text-height' (Bug#5615).
4989
49902017-08-20 Noam Postavsky <npostavs@gmail.com>
4991
4992 Stop printing '4' in .elc files after 'define-symbol-prop' calls
4993
4994 * lisp/emacs-lisp/bytecomp.el (byte-compile-define-symbol-prop):
4995 Return nil in case we have compiled the form, to prevent a redundant
4996 constant from getting added to the compiled output.
4997
49982017-08-20 Paul Eggert <eggert@cs.ucla.edu>
4999
5000 Change recent symlink tests to just test ASCII
5001
5002 * test/src/fileio-tests.el (fileio-tests--symlink-failure):
5003 Be less ambitious about testing non-ASCII chars and encoding
5004 errors, as there are too many portability issues.
5005
50062017-08-20 Paul Eggert <eggert@cs.ucla.edu>
5007
5008 Don’t adjust CRLF in file names
5009
5010 * doc/misc/gnus.texi (Non-ASCII Group Names):
5011 * etc/NEWS:
5012 * test/lisp/net/tramp-tests.el (tramp--test-utf8):
5013 Use utf-8-unix, not utf-8, for default-file-name-coding-system, so
5014 that CRLF in file names is left alone.
5015 * lisp/international/mule-cmds.el (set-default-coding-systems):
5016 Do not alter CRLF in file name coding systems.
5017 (prefer-coding-system): Ignore differences in CRLF processing when
5018 checking whether we used the user-specified file name coding system.
5019 * test/src/fileio-tests.el: New file.
5020
50212017-08-19 Eli Zaretskii <eliz@gnu.org>
5022
5023 Make list-processes support display-line-numbers
5024
5025 * lisp/simple.el (process-menu-mode): Move the call to
5026 tabulated-list-init-header from here...
5027 (list-processes--refresh): ...to here. (Bug#27895)
5028
50292017-08-19 Eli Zaretskii <eliz@gnu.org>
5030
5031 Improve support of display-line-numbers in package.el
5032
5033 * lisp/emacs-lisp/package.el (package-menu--refresh): Redisplay
5034 the header. (Bug#27895)
5035 * lisp/emacs-lisp/tabulated-list.el
5036 (tabulated-list-line-number-width): Fix the case when
5037 display-line-numbers is nil.
5038
50392017-08-19 Eli Zaretskii <eliz@gnu.org>
5040
5041 Improve support of display-line-numbers in tabulated-list-mode
5042
5043 * lisp/emacs-lisp/tabulated-list.el
5044 (tabulated-list-line-number-width): New function.
5045 (tabulated-list-init-header, tabulated-list-print-entry): Use it.
5046 (Bug#27895)
5047
50482017-08-19 Martin Rudalics <rudalics@gmx.at>
5049
5050 Fix one more issue reported by Alex (Bug#27999)
5051
5052 * doc/lispref/windows.texi (Preserving Window Sizes)
5053 (Window Parameters): Use the term `window-preserved-size'
5054 instead of `preserved-size' (Bug#27999).
5055
50562017-08-19 Martin Rudalics <rudalics@gmx.at>
5057
5058 Rename `no-delete-other-window' to `no-delete-other-windows'
5059
50602017-08-19 Martin Rudalics <rudalics@gmx.at>
5061
5062 Fix two side window problems noted by Alex (Bug#27999)
5063
5064 * lisp/window.el (display-buffer-in-side-window): Fix doc-string
5065 typo.
5066 (delete-other-windows): Rename the `no-delete-other-window'
5067 parameter to `no-delete-other-windows' (see the discussion in
5068 Bug#27999 for the rationale of this change).
5069 * doc/lispref/windows.texi (Deleting Windows)
5070 (Frame Layouts with Side Windows, Window Parameters): Rename
5071 `no-delete-other-window' to `no-delete-other-windows'.
5072
50732017-08-19 Alex Schroeder <alex@gnu.org>
5074
5075 Use define-minor-mode for rcirc-omit-mode
5076
50772017-08-19 Paul Eggert <eggert@cs.ucla.edu>
5078
5079 Clarify behavior of symlinks and directories
5080
5081 * doc/lispref/files.texi (Saving Buffers): Document how functions
5082 like rename-file work with symlinks and directories. This patch
5083 attempts to document the current behavior better, in preparation
5084 for possibly changing it. See Bug#27986.
5085
50862017-08-19 Paul Eggert <eggert@cs.ucla.edu>
5087
5088 Fix recently-introduced file descriptor leak
5089
5090 * src/fileio.c (Fmake_temp_file_internal):
5091 Don’t leak a file descriptor if write_region signals an error.
5092
50932017-08-19 Paul Eggert <eggert@cs.ucla.edu>
5094
5095 Improve make-temp-file performance on local files
5096
5097 * lisp/files.el (make-temp-file): Let make-temp-file-internal do
5098 the work of inserting the text.
5099 * src/fileio.c (Fmake_temp_file_internal): New arg TEXT.
5100 All callers changed.
5101
51022017-08-19 Noam Postavsky <npostavs@gmail.com>
5103
5104 Don't lose arguments to eshell aliases (Bug#27954)
5105
5106 * lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias): Use ARGS.
5107
51082017-08-19 Ted Zlatanov <tzz@lifelogs.com>
5109
5110 * lisp/files.el (make-temp-file): Fix directory use case.
5111
51122017-08-19 Ted Zlatanov <tzz@lifelogs.com>
5113
5114 Fix and document make-temp-file optional text parameter
5115
5116 * lisp/files.el (make-temp-file): Fix initial TEXT parameter.
5117 (files--make-magic-temp-file): Support optional TEXT parameter.
5118 * etc/NEWS: Document it.
5119 * doc/lispref/files.texi: Document it.
5120 * test/lisp/auth-source-tests.el: Minor reformat.
5121
51222017-08-19 Ted Zlatanov <tzz@lifelogs.com>
5123
5124 * test/lisp/auth-source-tests.el: Avoid `string-join' to be simple.
5125
5126 * test/lisp/auth-source-tests.el: Minor cleanups to use CL.
5127
51282017-08-19 João Távora <joaotavora@gmail.com>
5129
5130 Fix default value of electric-pair-pairs and electric-pair-text-pairs
5131
5132 (Bug#24901)
5133
5134 A previous change, titled "Add support for curly quotation marks to
5135 electric-pair-mode", attempted to add these characters to the default
5136 value of these variables. But it did so in a quoted list, preventing
5137 evaluation of the relevant expressions and resulting in an invalid
5138 format.
5139
5140 * lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs):
5141 Use backquote and comma.
5142
51432017-08-19 Noam Postavsky <npostavs@gmail.com>
5144
5145 * lisp/elec-pair.el (electric-pair-text-pairs): Don't autoload (Bug#24901).
5146
5147 * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Require `elec-pair'
5148 explicitly in the interactive case.
5149
51502017-08-19 Mats Lidell <mats.lidell@cag.se>
5151
5152 * etc/tutorials/TUTORIAL.sv: synced with TUTORIAL
5153
51542017-08-19 Ted Zlatanov <tzz@lifelogs.com>
5155
5156 Add auth-source tests and codify its API better
5157
5158 The auth-source behavior was unclear in some API use cases, so these
5159 extra tests codify and test it. For details see
5160 https://github.com/DamienCassou/auth-password-store/issues/29
5161
5162 * lisp/files.el (make-temp-file): Add new initial TEXT parameter.
5163 * test/lisp/auth-source-tests.el (auth-source-test-searches): Add
5164 auth-source tests and simplify them with the new `make-temp-file'.
5165
51662017-08-18 Eli Zaretskii <eliz@gnu.org>
5167
5168 Don't call the same hook twice due to obsolete aliases
5169
5170 * lisp/international/robin.el (robin-activate):
5171 * lisp/international/quail.el (quail-activate):
5172 * lisp/international/mule-cmds.el (deactivate-input-method):
5173 * lisp/emulation/viper-init.el (viper-deactivate-input-method):
5174 Don't call the same hook twice, when the obsolete and the
5175 advertised symbols are aliased. (Bug#28118)
5176
51772017-08-18 Felipe Ochoa <felipe@fov.space> (tiny change)
5178
5179 A new face for show-paren in expression mode
5180
5181 * lisp/faces.el (show-paren-match-expression): Define the new face.
5182 * lisp/paren.el (show-paren-function): Apply the different face
5183 when in expression mode. (Bug#28047)
5184
51852017-08-18 Eli Zaretskii <eliz@gnu.org>
5186
5187 Non-ASCII support for man page section and header names
5188
5189 * lisp/man.el (Man-name-regexp, Man-page-header-regexp)
5190 (Man-heading-regexp): Replace ASCII character classes by
5191 equivalent classes that allow non-ASCII characters. Suggested by
5192 Grégory Mounié <Gregory.Mounie@imag.fr>. (Bug#27978)
5193
51942017-08-18 Eli Zaretskii <eliz@gnu.org>
5195
5196 Implement HiDPI support for underwave on MS-Windows
5197
5198 * src/w32term.c (x_get_scale_factor): New function.
5199 (w32_draw_underwave): Use it.
5200 * src/xterm.c (x_draw_underwave): Offset the wave starting point
5201 to make it identical with original code.
5202
52032017-08-18 Stephen Pegoraro <spegoraro@tutive.com> (tiny change)
5204
5205 Support HiDPI displays for wave style underlines
5206
5207 * src/xterm.c (x_draw_underwave): Compute height, length and thickness
5208 based on scale factor.
5209 (x_get_scale_factor): New function.
5210
52112017-08-18 Bastien <bzg@gnu.org>
5212
5213 Delete library-of-babel.org
5214
5215 * etc/org/library-of-babel.org: Delete file.
5216
52172017-08-18 Glenn Morris <rgm@gnu.org>
5218
5219 * doc/emacs/files.texi (Copying and Naming): Avoid confusing texi2pdf.
5220
52212017-08-18 Noam Postavsky <npostavs@gmail.com>
5222
5223 Remove custom version parsing from epg-config.el (Bug#27963)
5224
5225 * lisp/epg-config.el (epg-config--compare-version)
5226 (epg-config--parse-version): Remove.
5227 (epg-check-configuration): Use `version<=' instead.
5228
52292017-08-18 Mark Oteiza <mvoteiza@udel.edu>
5230
5231 Treat control characters in JSON strings as invalid
5232
5233 * lisp/json.el (json-peek): Reduce to following-char.
5234 (json-pop, json-read): Zero (null char) means end of file.
5235 (json-read-escaped-char): Delimit URL properly.
5236 (json-read-string): Signal error for ASCII control characters.
5237 * test/lisp/json-tests.el (test-json-peek): Check for zero instead of
5238 :json-eof symbol.
5239 (test-json-read-string): New test for control characters in JSON
5240 strings.
5241
52422017-08-17 Eli Zaretskii <eliz@gnu.org>
5243
5244 Support Posix semantics of 'rename' on MS-Windows
5245
5246 * src/w32.c (sys_rename_replace): Support Posix semantics of
5247 'rename': return an error if OLD is a directory while NEW is not,
5248 or vice versa.
5249
52502017-08-17 Eli Zaretskii <eliz@gnu.org>
5251
5252 * src/w32.c (sys_rename_replace): Support renaming a directory.
5253
52542017-08-17 Eli Zaretskii <eliz@gnu.org>
5255
5256 Fix the MS-Windows build
5257
5258 * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_open): Omit Gnulib module
5259 'open'.
5260
5261 * lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]: Restore definition.
5262
52632017-08-17 João Távora <joaotavora@gmail.com>
5264
5265 Add flymake-backends defcustom
5266
5267 * lisp/progmodes/flymake-proc.el (flymake-proc-can-syntax-check-buffer):
5268 Rename from flymake-can-syntax-check-file. Suitable for adding to
5269 flymake-backends.
5270 (flymake-proc-start-syntax-check): Rename from
5271 flymake-start-syntax-check. Don't check again if buffer can be
5272 checked.
5273 (add-to-list flymake-backends): Hook only flymake-ui.el
5274
5275 * lisp/progmodes/flymake-ui.el (flymake-backends): New
5276 defcustom.
5277 (flymake-on-timer-event, flymake-after-change-function)
5278 (flymake-after-save-hook, flymake-find-file-hook): Call new
5279 flymake--start-syntax-check-buffer and
5280 flymake--can-syntax-check-buffer.
5281 (flymake-mode): Call flymake--can-syntax-check-buffer and set
5282 flymake-backend.
5283 (flymake--backend): New buffer-local variable.
5284
52852017-08-17 João Távora <joaotavora@gmail.com>
5286
5287 Split flymake.el into flymake-proc.el and flymake-ui.el
5288
5289 flymake.el is now a stub that requires both files.
5290
5291 * lisp/progmodes/flymake-proc.el: New file.
5292
5293 * lisp/progmodes/flymake-ui.el: New file.
5294
5295 * lisp/progmodes/flymake.el: Split into flymake-ui.el and
5296 flymake-proc.el. Require both files.
5297
52982017-08-17 Michael Albinus <michael.albinus@gmx.de>
5299
5300 Set `default-directory' for watchdog in tramp-test.el
5301
5302 * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests):
5303 Set `default-directory' for watchdog.
5304
53052017-08-17 Andreas Schwab <schwab@suse.de>
5306
5307 * lisp/term/konsole.el: New file.
5308
53092017-08-17 Noam Postavsky <npostavs@gmail.com>
5310
5311 * lisp/woman.el (woman-push, woman-pop): Remove. (Bug#27962)
5312
5313 (woman2-RS): Use plain `push' instead of `woman-push'.
5314 (woman2-RE): Conditionally `pop' instead of `woman-pop'.
5315
53162017-08-16 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
5317
5318 Merge from Gnulib; use ‘open’ for O_CLOEXEC
5319
5320 This incorporates:
5321 2017-08-15 renameat: ensure declaration in <stdio.h> on NetBSD
5322 2017-08-15 extensions: enable NetBSD specific extensions
5323 2017-08-14 open: support O_CLOEXEC
5324 2017-08-13 reallocarray: new module
5325 * admin/merge-gnulib (AVOIDED_MODULES): Remove ‘open’, since
5326 it now supports O_CLOEXEC and this simplifies Emacs.
5327 * build-aux/config.guess, lib/fcntl.in.h, lib/stdio.in.h:
5328 * lib/stdlib.in.h, m4/extensions.m4, m4/stdlib_h.m4:
5329 Copy from Gnulib.
5330 * lib/cloexec.c, lib/cloexec.h, lib/open.c:
5331 * m4/mode_t.m4, m4/open-cloexec.m4, m4/open.m4:
5332 New files, copied from Gnulib.
5333 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
5334 * lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]:
5335 Remove, as Gnulib does this for us.
5336 * src/filelock.c (create_lock_file):
5337 * src/sysdep.c (emacs_open, emacs_pipe):
5338 Don’t worry about O_CLOEXEC == 0, as Gnulib no longer sets it to 0.
5339
53402017-08-16 Alan Third <alan@idiocy.org>
5341 Charles A. Roelli <charles@aurox.ch>
5342
5343 Allow use of run-time OS version checks on macOS (bug#27810)
5344
5345 * src/nsterm.h (NSWindowTabbingMode): Define in pre-Sierra macOS.
5346 (MAC_OS_X_VERSION_10_6, MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8,
5347 MAC_OS_X_VERSION_10_9, MAC_OS_X_VERSION_10_12, HAVE_NATIVE_FS): Remove
5348 defines.
5349 (NSWindowStyleMaskFullScreen,
5350 NSWindowCollectionBehaviorFullScreenPrimary,
5351 NSApplicationPresentationFullScreen,
5352 NSApplicationPresentationAutoHideToolbar): Define in macOS 10.6.
5353 * src/nsterm.m (colorForEmacsRed, colorUsingDefaultColorSpace,
5354 check_native_fs, ns_read_socket, ns_select, runAlertPanel,
5355 initFrameFromEmacs, windowDidMiniaturize, windowDidEnterFullScreen,
5356 windowDidExitFullScreen, isFullscreen, updateCollectionBehavior,
5357 toggleFullScreen, constrainFrameRect, scrollerWidth, syms_of_nsterm):
5358 Allow use of run-time checks and replace version check macros.
5359 * src/nsfns.m (ns_screen_name): Use run-time OS version checks.
5360 * src/macfont.m (macfont_draw): Use run-time OS version checks.
5361 * src/nsmenu.m (menuWillOpen): Use run-time OS version checks.
5362
53632017-08-16 Alan Third <alan@idiocy.org>
5364
5365 Add multiframe image support to NS port (bug#21714)
5366
5367 * src/nsimage.m (ns_load_image): Handle multiple frames.
5368 (EmacsImage::getMetadata, EmacsImage::setFrame): New functions.
5369 * src/nsterm.h (EmacsImage::getMetadata, EmacsImage::setFrame): New
5370 function prototypes.
5371
53722017-08-16 Tino Calancha <tino.calancha@gmail.com>
5373
5374 files-tests.el: Remove unused lexical variable
5375
5376 * test/lisp/files-tests.el (file-test--do-local-variables-test);
5377 Remove unused var 'files-test-queried'.
5378
53792017-08-16 Michael Albinus <michael.albinus@gmx.de>
5380
5381 * doc/emacs/files.texi (Copying and Naming): Mention
5382
5383 restrictions to add-name-to-file and make-symbolic-link on
5384 remote systems.
5385
53862017-08-16 Michael Albinus <michael.albinus@gmx.de>
5387
5388 * lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Further support ftp-ssl.
5389
53902017-08-16 Noam Postavsky <npostavs@gmail.com>
5391
5392 Add tests for previous commit
5393
5394 * test/lisp/progmodes/elisp-mode-tests.el
5395 (elisp-mode-tests--face-propertized-string): New function.
5396 (elisp--highlight-function-argument-indexed)
5397 (elisp--highlight-function-argument-keyed-1)
5398 (elisp--highlight-function-argument-keyed-2): New tests.
5399
54002017-08-16 Thierry Volpiatto <thierry.volpiatto@gmail.com>
5401
5402 Fix eldoc highlighting for &key args (Bug#27272)
5403
5404 * lisp/progmodes/elisp-mode.el (elisp--highlight-function-argument):
5405 Only switch to keyword-based searching if INDEX point beyond `&key' in
5406 the argument list. All arguments prior to the `&key' are position
5407 based. Additionally, be more strict about what is a keyword when
5408 searching for the current keyword.
5409
54102017-08-15 Paul Eggert <eggert@cs.ucla.edu>
5411
5412 Do not assume regular Git .git/hooks dir
5413
5414 Apparently Gitlab doesn’t create .git/hooks, like regular Git does.
5415 Problem reported by Ted Zlatanov in:
5416 http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00380.html
5417 * autogen.sh (git_sample_hook_src): New function. Use it to work
5418 even if .git/hooks or its samples do not exist.
5419
54202017-08-15 Paul Eggert <eggert@cs.ucla.edu>
5421
5422 New manual section "Copying and Naming"
5423
5424 * doc/emacs/files.texi (Copying and Naming):
5425 New section, split off from Misc File Ops and containing the
5426 operations that copy, name or rename files. This fixes some
5427 confusion caused by the incorrect phrase "The same rule applies
5428 to all the remaining commands in this section" in the old manual.
5429 This change does not affect the confusion about directories (see
5430 Bug#27986 for ongoing discussion).
5431
54322017-08-15 Eli Zaretskii <eliz@gnu.org>
5433
5434 Fix the MS-Windows build
5435
5436 * src/fileio.c (Frename_file): Don't use ENOTSUP if it is equal to
5437 ENOSYS. (Bug#28097) (Bug#27986)
5438
54392017-08-15 Ted Zlatanov <tzz@lifelogs.com>
5440
5441 * .gitlab-ci.yml: run "autogen.sh autoconf" to avoid Git.
5442
5443 * .gitlab-ci.yml: add Git to the installed packages.
5444
54452017-08-15 Simen Heggestøyl <simenheg@gmail.com>
5446
5447 Support indentation of detached Less CSS rulesets
5448
5449 * lisp/textmodes/css-mode.el (css-smie-rules): Provide better support
5450 for indentation of detached rulesets passed to Less mixins.
5451
5452 * test/manual/indent/less-css-mode.less: New file.
5453
54542017-08-15 Simen Heggestøyl <simenheg@gmail.com>
5455
5456 Fixes and tweaks for the new Less CSS mode
5457
5458 * etc/NEWS: Add an entry for the new mode.
5459
5460 * lisp/textmodes/less-css-mode.el (less-css): Tweak docstring.
5461 (less-css-lessc-command): Tweak docstring. Don't mark it as
5462 safe. Don't autoload.
5463 (less-css-compile-at-save, less-css-lessc-options)
5464 (less-css-output-directory): Tweak docstrings. Don't autoload.
5465 (less-css-output-file-name): Tweak docstring. Don't mark it as safe.
5466 (less-css-input-file-name): Tweak docstring. Don't autoload.
5467 (less-css-compile-maybe): Use `when' for one-armed `if'.
5468 (less-css--output-path): Tweak docstring.
5469 (less-css--maybe-shell-quote-command): Remove function.
5470 (less-css-compile): Don't autoload. Tweak docstring and message. Fix
5471 compiler warning. Use `string-join' instead of `mapconcat'.
5472 (less-css-font-lock-keywords): Use `font-lock-variable-name-face' for
5473 variables.
5474 (less-css-mode-syntax-table, less-css-mode-map): New variables.
5475 (less-css-mode): Change status line mode name from "LESS" to
5476 "Less". Tweak docstring. Move syntax table definitions to
5477 `less-css-mode-syntax-table'.
5478 (less-css-indent-line): Remove function.
5479
54802017-08-15 Steve Purcell <steve@sanityinc.com>
5481
5482 New major mode: Less CSS mode
5483
5484 * lisp/textmodes/less-css-mode.el: New file.
5485
54862017-08-15 Tino Calancha <tino.calancha@gmail.com>
5487
5488 archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
5489
5490 * lisp/arc-mode.el (archive-int-to-mode):
5491 Swap order of 2048 and 1024 tests (Bug#28092).
5492 * test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
5493 Update test.
5494
54952017-08-15 Paul Eggert <eggert@cs.ucla.edu>
5496
5497 Improve rename-file port to macOS
5498
5499 * src/fileio.c (Frename_file): On macOS, renameat_noreplace can
5500 fail with errno == ENOTSUP on file systems where it is not
5501 supported, according to the Apple documentation.
5502
55032017-08-15 Noam Postavsky <npostavs@gmail.com>
5504
5505 Speed up ./configure with more caching (Bug#27960)
5506
5507 * configure.ac: Cache the 'GTK compiles', 'GSettings is in gio',
5508 'LN_S', '-znocombreloc', 'sysinfo', 'gcc autodepends', '-b link',
5509 'Xkb', 'Xpm preprocessor', 'tputs library' 'GLib', 'signals via
5510 characters', and 'Windows API header' checks. Remove pause after
5511 warning about GTK bug.
5512
55132017-08-15 Paul Eggert <eggert@cs.ucla.edu>
5514
5515 Improve rename-file behavior on macOS
5516
5517 Problem reported by Philipp Stephani (Bug#27986).
5518 * src/fileio.c (Frename_file):
5519 Worry about file name case sensitivity only if CYGWIN or DOS_NT.
5520 * src/sysdep.c (renameat_noreplace): Use renameatx_np on macOS,
5521 since this provides the necessary atomicity guarantees.
5522
55232017-08-14 Glenn Morris <rgm@gnu.org>
5524
5525 Clean up temp files after some tests
5526
5527 * test/lisp/emacs-lisp/bytecomp-tests.el
5528 (bytecomp-tests--with-temp-file): Also delete .elc file if present.
5529 * test/lisp/progmodes/etags-tests.el
5530 (etags-buffer-local-tags-table-list): Delete temp file at end.
5531
55322017-08-14 Eli Zaretskii <eliz@gnu.org>
5533
5534 Implement renameat_noreplace for MS-Windows
5535
5536 * src/sysdep.c (renameat_noreplace) [WINDOWSNT]: Implement minimal
5537 emulation for MS-Windows. (Bug#27986)
5538
55392017-08-14 Eli Zaretskii <eliz@gnu.org>
5540
5541 Fix 'rename' on MS-Windows
5542
5543 * src/w32.c (sys_rename_replace): Use the FORCE argument only if
5544 the primitive rename errors out with EEXIST.
5545
55462017-08-14 Michael Albinus <michael.albinus@gmx.de>
5547
5548 * lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Support ftp-ssl.
5549
55502017-08-14 Mark Oteiza <mvoteiza@udel.edu>
5551
5552 Tiny JSON performance improvement
5553
5554 Get rid of some needless uses of apply. Measuring with
5555 (benchmark-run 10 (json-read-file "test.json"))
5556 showed 1.5-2.5% reduction of execution time.
5557 * lisp/json.el (json-peek): Nix let-binding.
5558 (json-read-string): Use concat for making a string from chars.
5559 (json-read-array): Use cond and more appropriate conversion instead
5560 of blindly applying.
5561
55622017-08-13 Paul Eggert <eggert@cs.ucla.edu>
5563
5564 Be consistent in spelling 'ok-if-already-exists'.
5565
55662017-08-13 Alexander Gramiak <agrambot@gmail.com>
5567
5568 Use 'header-line-highlight' face in proced and erc
5569
5570 * lisp/erc/erc-list.el (erc-list-button):
5571 * lisp/proced.el (proced-format): Use the 'header-line-highlight
5572 face. (Bug#28033)
5573
55742017-08-13 Ulf Jasper <ulf.jasper@web.de>
5575
5576 Remove feeds with dead uris from newsticker--raw-url-list-defaults
5577
5578 * lisp/net/newst-backend.el (newsticker--raw-url-list-defaults):
5579 Remove feeds with dead uris.
5580
55812017-08-13 Eli Zaretskii <eliz@gnu.org>
5582
5583 Fix vertical cursor motion when cursor is on the fringe
5584
5585 * lisp/simple.el (line-move-visual): Fix an off-by-one error in
5586 setting temporary-goal-column when newline overflows into the
5587 fringe. Support that use case in R2L paragraphs as well.
5588
55892017-08-13 Eli Zaretskii <eliz@gnu.org>
5590
5591 Fix vertical cursor motion across too wide images
5592
5593 * src/indent.c (Fvertical_motion): If lines are truncated and we
5594 end up beyond the right margin of the window, don't assume we are
5595 in the next screen line, unless VPOS actually says so. (Bug#28071)
5596
55972017-08-13 Tino Calancha <tino.calancha@gmail.com>
5598
5599 Add test suites for arc-mode and tar-mode
5600
5601 * test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode)
5602 * test/lisp/tar-mode-tests.el (tar-mode-test-tar-grind-file-mode):
5603 New tests.
5604
56052017-08-13 Tino Calancha <tino.calancha@gmail.com>
5606
5607 * lisp/tar-mode.el (tar-grind-file-mode): Fix docstring
5608
56092017-08-13 Ulf Jasper <ulf.jasper@web.de>
5610
5611 Fix uri of Emacs Wiki
5612
5613 * lisp/net/newst-backend.el (newsticker--raw-url-list-defaults): Fix
5614 uri of Emacs Wiki. (Bug#27981)
5615
56162017-08-13 Paul Eggert <eggert@cs.ucla.edu>
5617
5618 Fix make-temp-file bug with ""/"."/".." prefix
5619
5620 The bug with "." and ".." has been present for a while; I
5621 introduced the bug with "" earlier today in my patch for Bug#28023.
5622 * lisp/files.el (make-temp-file): Do not use expand-file-name if
5623 PREFIX is empty or "." or "..", as it does the wrong thing.
5624 Compute absolute-prefix here ...
5625 (files--make-magic-temp-file): ... instead of here ...
5626 * src/fileio.c (Fmake_temp_file_internal): ... or here.
5627
5628 * lisp/files.el (make-temp-file): If the prefix is empty, append
5629 "/" to the absolute prefix so that the new files are children
5630 rather than siblings of temporary-file-directory. This fixes a
5631 bug introduced in the previous change.
5632 * test/lisp/files-tests.el (files-test-make-temp-file-empty-prefix):
5633 New test, for the bug.
5634
56352017-08-13 Paul Eggert <eggert@cs.ucla.edu>
5636
5637 Improve make-temp-file performance on local files
5638
5639 For the motivation behind this patch, please see Bug#28023 and:
5640 http://emacshorrors.com/posts/make-temp-name.html
5641 Although, given the recent changes to Tramp, the related security
5642 problem in make-temp-file is already fixed, make-temp-file still has
5643 several unnecessary system calls. In the typical case on GNU/Linux,
5644 this patch replaces 8 syscalls (symlink, open, close, readlinkat, uname,
5645 getpid, unlink, umask) by 2 (open, close).
5646 * admin/merge-gnulib (GNULIB_MODULES): Add tempname, now
5647 that Emacs is using it directly.
5648 * configure.ac (AUTO_DEPEND): Remove AC_SYS_LONG_FILE_NAMES;
5649 no longer needed.
5650 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
5651 * lisp/files.el (files--make-magic-temp-file): Rename from
5652 make-temp-file.
5653 (make-temp-file): Use make-temp-file-internal for
5654 non-magic file names.
5655 * src/fileio.c: Include tempname.h.
5656 (make_temp_name_tbl, make_temp_name_count)
5657 (make_temp_name_count_initialized_p, make_temp_name): Remove.
5658 (Fmake_temp_file_internal): New function.
5659 (Fmake_temp_name): Use it.
5660 * src/filelock.c (get_boot_time): Use Fmake_temp_file_internal
5661 instead of make_temp_name.
5662
56632017-08-12 Paul Eggert <eggert@cs.ucla.edu>
5664
5665 Document internal-use naming conventions
5666
5667 * doc/lispref/functions.texi (Function Names):
5668 * doc/lispref/variables.texi (Tips for Defining):
5669 Document naming conventions for internal-use functions and vars.
5670 See Bug#28023#59.
5671
56722017-08-12 Paul Eggert <eggert@cs.ucla.edu>
5673
5674 Simplify re and document 'autoconf.sh all'
5675
5676 * GNUmakefile (ALL_IF_GIT): Remove; no longer needed, now that
5677 ./autogen.sh defaults to "all". All uses removed.
5678 * README: Mention autoconf.sh's effect on Git configuration.
5679
56802017-08-12 Paul Eggert <eggert@cs.ucla.edu>
5681
5682 Default autogen.sh to 'all'
5683
5684 This addresses a problem noted by RMS in:
5685 http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00052.html
5686 * autogen.sh (do_git): Set to true if this script is invoked
5687 with no arguments and there is a .git subdirectory.
5688
56892017-08-12 Paul Eggert <eggert@cs.ucla.edu>
5690
5691 Adjust jka-compr to recent Tramp changes.
5692
5693 * lisp/jka-compr.el (jka-compr-write-region):
5694 Two new args LOCKNAME and MUSTBENEW.
5695
56962017-08-12 Eli Zaretskii <eliz@gnu.org>
5697
5698 Improve doc strings of 2 functions in simple.el
5699
5700 * lisp/simple.el (beginning-of-visual-line)
5701 (move-beginning-of-line): Doc fix. Reported by
5702 Justin Burkett <justin@burkett.cc>.
5703
57042017-08-12 Eli Zaretskii <eliz@gnu.org>
5705
5706 Fix completion on directory names on MS-DOS/MS-Windows
5707
5708 * src/msdos.c (faccessat):
5709 * src/w32.c (faccessat): Support relative file names, and add D_OK
5710 to 'mode' if the argument is a directory. This unbreaks file-name
5711 completion when the completion result is a directory.
5712
57132017-08-12 Michael Albinus <michael.albinus@gmx.de>
5714
5715 Implement EXCL of write-region for Tramp
5716
5717 * lisp/net/ange-ftp.el (ange-ftp-write-region):
5718 * lisp/net/tramp-adb.el (tramp-adb-handle-write-region)
5719 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
5720 * lisp/net/tramp-sh.el (tramp-sh-handle-write-region)
5721 * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
5722 Implement MUSTBENEW.
5723
5724 * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
5725 * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
5726 (tramp-sh-handle-add-name-to-file)
5727 (tramp-do-copy-or-rename-file)
5728 * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
5729 Adapt error message for `file-already-exists'.
5730
5731 * src/lisp.h:
5732 * src/eval.c (call8): New function.
5733
5734 * src/fileio.c (write_region): Pass also lockname and
5735 mustbenew to the file name handler.
5736
5737 * test/lisp/net/tramp-tests.el (tramp-test10-write-region):
5738 Add tests for MUSTBENEW.
5739
57402017-08-12 Eli Zaretskii <eliz@gnu.org>
5741
5742 Adapt Proced display to display-line-numbers
5743
5744 * lisp/proced.el (proced-header-line): Account for the width taken
5745 by display-line-numbers. (Bug#27895)
5746
57472017-08-12 Eli Zaretskii <eliz@gnu.org>
5748
5749 Adapt tabulated list when display-line-number is turned on
5750
5751 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Add
5752 a hook to revert the display when display-line-numbers is turned
5753 on. (Bug#27895)
5754
57552017-08-12 Eli Zaretskii <eliz@gnu.org>
5756
5757 Use Gnulib 'tempname' on MS-Windows
5758
5759 * lib-src/ntlib.h (mkdir, open): Remove redefinitions. They are
5760 now in nt/inc/ms-w32.h.
5761 * lib-src/ntlib.c (sys_mkdir, sys_open): New functions.
5762 (mkostemp): Remove.
5763
5764 * src/w32.c (mkostemp): Remove.
5765 (sys_mkdir): Accept a second (unused) argument.
5766 * src/fileio.c (Fmake_directory_internal): Remove the WINDOWSNT
5767 specific call to mkdir. (Bug#28023)
5768
5769 * nt/inc/ms-w32.h (mkdir): Remove from "#ifdef emacs" and redefine
5770 to accept 2 arguments.
5771 (open): Remove from "#ifdef emacs".
5772 * nt/mingw-cfg.site (ac_cv_func_mkostemp): Remove.
5773 * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_mkostemp)
5774 (OMIT_GNULIB_MODULE_tempname): Remove.
5775
57762017-08-12 Alexander Gramiak <agrambot@gmail.com>
5777
5778 Add new face 'header-line-highlight'
5779
5780 * lisp/faces.el: Define the face.
5781 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
5782 * lisp/info.el (Info-fontify-node): Use the new face.
5783 * doc/emacs/display.texi (Standard Faces):
5784 * etc/NEWS: Document the new face. (Bug#28033)
5785
57862017-08-12 Arash Esbati <arash@gnu.org>
5787
5788 Make a case-sensitive match for strings
5789
5790 * lisp/textmodes/reftex.el (reftex-typekey-check): Temporarily
5791 let-bind `case-fold-search' to nil in order to be case-sensitive
5792 when matching a string. (Bug#27518)
5793
57942017-08-11 Stephen Berman <steve@rosalinde.fritz.box>
5795
5796 Fix a minor todo-mode regression
5797
5798 * lisp/calendar/todo-mode.el (todo-get-overlay): Wrap in
5799 save-excursion. This fixes a regression introduced by the fix
5800 for bug#27609, whereby trying to raise the priority of the
5801 first item or lower the priority of the last item, which
5802 should be noops, moves point to the item's start. Clarify
5803 comment.
5804
5805 * test/lisp/calendar/todo-mode-tests.el
5806 (todo-test-raise-lower-priority): Add test cases for trying to
5807 raise first item and lower last item.
5808 (with-todo-test): Clear abbreviated-home-dir, since we change HOME.
5809 (todo-test-toggle-item-header02): Remove ":expected-result
5810 :failed" and tests of point after todo-next-item, since the
5811 effect when using Todo mode is not reproducible in the test
5812 environment. Add commentary about this.
5813
58142017-08-11 Paul Eggert <eggert@cs.ucla.edu>
5815
5816 Improve performance for rename-file etc.
5817
5818 Although this does not fix Bug#27986, it is a step forward.
5819 I plan to propose a more-significant patch later.
5820 * lisp/files.el (directory-name-p): Move from here ...
5821 * src/fileio.c (Fdirectory_name_p): ... to here.
5822 (directory_like, cp_like_target): New static functions.
5823 (Fcopy_file, Frename_file, Fadd_name_to_file)
5824 (Fmake_symbolic_link):
5825 Use them, to avoid directory-testing syscalls on file names that
5826 must be directories if they exist. Omit unnecessary
5827 initializations and CHECK_STRING calls.
5828 (Frename_file): Don't call file_name_case_insensitive_p
5829 twice on the same file. Compare both file names expanded, instead
5830 of the old name expanded and the new one unexpanded.
5831
58322017-08-11 Noam Postavsky <npostavs@gmail.com>
5833
5834 Respect buffer-local value of tags-table-list (Bug#27772)
5835
5836 * lisp/progmodes/etags.el (visit-tags-table-buffer): Save the current
5837 buffer around the `tags-table-including' calls so as to get buffer
5838 local variables from the right buffer later.
5839 * test/lisp/progmodes/etags-tests.el (etags-visit-tags-table-buffer):
5840 New test.
5841 * test/lisp/progmodes/etags-tests.el (etags-tests--test-dir): New
5842 constant.
5843 (etags-bug-158, etags-bug-23164): Use it so that when running the test
5844 interactively, setting EMACS_TEST_DIRECTORY is not needed.
5845
58462017-08-10 Tom Tromey <tom@tromey.com>
5847
5848 Fix auto-filling regression
5849
5850 Bug#28003
5851 * lisp/newcomment.el (comment-indent-new-line): Check
5852 comment-auto-fill-only-comments. Reverts earlier change.
5853 * lisp/simple.el (internal-auto-fill): Call auto-fill-function, not
5854 do-auto-fill.
5855
58562017-08-09 Paul Eggert <eggert@cs.ucla.edu>
5857
5858 Merge from gnulib
5859
5860 This incorporates:
5861 2017-08-09 tempname: do not depend on secure_getenv
5862 2017-08-08 extensions: add _OPENBSD_SOURCE
5863 2017-08-06 manywarnings: Add support for C++
5864 2017-08-06 warnings, manywarnings: Add support for multiple languages
5865 * admin/merge-gnulib: Don't use m4/manywarnings-c++.m4.
5866 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
5867 * lib/secure_getenv.c, m4/secure_getenv.m4: Remove.
5868 * lib/tempname.c, m4/extensions.m4, m4/manywarnings.m4, m4/warnings.m4:
5869 Copy from gnulib.
5870
58712017-08-09 Eli Zaretskii <eliz@gnu.org>
5872
5873 Fix crashing emacs-module tests on MS-Windows
5874
5875 * src/w32fns.c (syms_of_w32fns) <w32-disable-abort-dialog>: New
5876 variable.
5877 (emacs_abort): If w32-disable-abort-dialog is non-nil, abort right
5878 away, without displaying the Abort dialog, which waits for the user.
5879
5880 * test/src/emacs-module-tests.el (module--test-assertion): Run the
5881 inferior Emacs with the w32 abort dialog disabled. Expect the
5882 status of the aborted Emacs sub-process to be 3 on MS-Windows and
5883 2 on MS-DOS.
5884
58852017-08-09 Tino Calancha <tino.calancha@gmail.com>
5886
5887 dired-delete-file: Dont't ask for empty dirs
5888
5889 * lisp/dired.el (dired--yes-no-all-quit-help): New defun.
5890 (dired-delete-file): Use it. Dont't ask for empty dirs (Bug#27940).
5891
5892 * test/lisp/dired-tests.el (dired-test-with-temp-dirs):
5893 New auxiliar macro.
5894 (dired-test-bug27940): Add new test.
5895
58962017-08-09 Tino Calancha <tino.calancha@gmail.com>
5897
5898 Ask files for deletion in buffer order: top first, botton later
5899
5900 * lisp/dired.el (dired-do-flagged-delete, dired-do-delete):
5901 Call `nreverse' t invert the output of `dired-map-over-marks'.
5902
59032017-08-09 Alexander Gramiak <agrambot@gmail.com>
5904
5905 Use help-mode xrefs in describe-font
5906
5907 * lisp/international/mule-diag.el (describe-font): Use help-setup-xref
5908 (Bug#27890).
5909
59102017-08-09 Katsumi Yamaoka <yamaoka@jpl.org>
5911
5912 Don't try to jump to non-existent part (bug#28013)
5913
5914 * lisp/gnus/gnus-art.el (gnus-article-edit-part): Don't try to jump to
5915 the next part if there is the only one part in the article (bug#28013).
5916
59172017-08-08 Mark Oteiza <mvoteiza@udel.edu>
5918
5919 Replace some uses of eval
5920
5921 There are a number of places where eval is used unnecessarily to get
5922 or set the value of a symbol.
5923 * lisp/calendar/calendar.el (diary-date-forms): Use default-value in
5924 custom setter.
5925 * lisp/desktop.el (desktop-clear): Use set-default instead.
5926 * lisp/international/ogonek.el (ogonek-read-encoding): Use
5927 symbol-value.
5928
59292017-08-08 Mark Oteiza <mvoteiza@udel.edu>
5930
5931 Convert uses of looking-at in viper-ex to following-char
5932
5933 * lisp/emulation/viper-ex.el (viper-get-ex-token): Bind
5934 (following-char) and use it in the subsequent cond's clauses.
5935 (viper-ex, ex-quit, viper-get-ex-file): Use following-char instead.
5936 Convert single branch ifs to when
5937
59382017-08-08 Mark Oteiza <mvoteiza@udel.edu>
5939
5940 Some cleanup in message.el
5941
5942 * lisp/gnus/message.el (message-cross-post-insert-note):
5943 (message-strip-forbidden-properties): Mark unused args.
5944 (message-canlock-generate): Remove extinct variable
5945 sha1-maximum-internal-length.
5946 (message-make-mail-followup-to): Use loop's thereis clause.
5947
59482017-08-08 Paul Eggert <eggert@cs.ucla.edu>
5949
5950 Document make-temp-name magic limitations
5951
5952 * doc/lispref/files.texi (Unique File Names):
5953 * src/fileio.c (Fmake_temp_name): Document that make-temp-name
5954 does not guarantee uniqueness on magic file names.
5955
59562017-08-08 Tom Tromey <tom@tromey.com>
5957
5958 Show number of errors in compilation-mode mode-line
5959
5960 Bug#25354
5961 * lisp/progmodes/compile.el (compilation-num-errors-found): Provide
5962 default value.
5963 (compilation-num-warnings-found, compilation-num-infos-found): New
5964 defvars.
5965 (compilation-mode-line-errors): New defconst.
5966 (compilation-face): Remove.
5967 (compilation-type, compilation--note-type): New functions.
5968 (compilation-parse-errors): Call compilation--note-type.
5969 (compilation-start): Include compilation-mode-line-errors in
5970 mode-line-process.
5971 (compilation-setup): Initialize compilation-num-* variables to 0.
5972 (compilation-handle-exit): Include compilation-mode-line-errors in
5973 mode-line-process.
5974 * doc/emacs/building.texi (Compilation): Document new feature.
5975
59762017-08-08 Mark Oteiza <mvoteiza@udel.edu>
5977
5978 Do some cleanup in mailcap.el
5979
5980 * lisp/net/mailcap.el: Use lexical-binding.
5981 (mailcap--set-user-mime-data, mailcap-possible-viewers): Use pcase
5982 destructuring.
5983 (mailcap-mime-data): Remove some entries for ancient functions.
5984 (mailcap-parse-mailcaps, mailcap-mime-info): Nix single-branch ifs.
5985 (mailcap-parse-mimetype-file): Just use append.
5986 (mailcap-command-p): Remove unused function.
5987
59882017-08-08 Tino Calancha <tino.calancha@gmail.com>
5989
5990 query-replace: Undo replacements performed with 'comma
5991
5992 During a `query-replace', the char ',' replaces the character
5993 at point and doesn't move point; right after, the char 'u'
5994 must undo such replacement (Bug#27268).
5995 * lisp/replace.el (replace--push-stack):
5996 New macro extracted from `perform-replace'.
5997 (perform-replace): Use it.
5998 * test/lisp/replace-tests.el (query-replace--undo): Add test.
5999
60002017-08-08 Noam Postavsky <npostavs@gmail.com>
6001
6002 Don't define gv expanders in compiler's runtime (Bug#27016)
6003
6004 This prevents definitions being compiled from leaking into the current
6005 Emacs doing the compilation.
6006 * lisp/emacs-lisp/gv.el (gv-define-expander): Use function-put instead
6007 of `put' with `eval-and-compile'.
6008 * test/lisp/emacs-lisp/gv-tests.el: New tests.
6009
60102017-08-08 Noam Postavsky <npostavs@gmail.com>
6011
6012 Let the cl-typep effects of defclass work during compilation (Bug#27718)
6013
6014 * lisp/emacs-lisp/eieio.el (defclass): Use `define-symbol-prop'
6015 instead of `put'.
6016 * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
6017 (eieio-tests--dummy-function): Remove.
6018 (eieio-test-25-slot-tests, eieio-test-23-inheritance-check): Don't
6019 expect to fail if compiled.
6020
60212017-08-08 Stefan Monnier <monnier@IRO.UMontreal.CA>
6022 Noam Postavsky <npostavs@gmail.com>
6023
6024 Let `define-symbol-prop' take effect during compilation
6025
6026 * src/fns.c (syms_of_fns): New variable `overriding-plist-environment'.
6027 (Fget): Consult it.
6028 * lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables): Let-bind
6029 it to nil.
6030 (byte-compile-define-symbol-prop): New function, handles compilation
6031 of top-level `define-symbol-prop' and `function-put' calls by putting
6032 the symbol setting into `overriding-plist-environment'.
6033
60342017-08-08 Gemini Lasswell <gazally@runbox.com>
6035
6036 Add a test of handling of circular values to testcover-tests
6037
6038 * test/lisp/emacs-lisp-testcover-resources/testcases.el
6039 (testcover-testcase-cyc1): New function.
6040 (testcover-tests-circular-lists-bug-24402): New test.
6041
60422017-08-08 Noam Postavsky <npostavs@gmail.com>
6043
6044 Don't error on circular values in testcover
6045
6046 * lisp/emacs-lisp/testcover.el (testcover-after, testcover-1value):
6047 Consider circular lists to be non-equal instead of signaling error.
6048
60492017-08-08 Alexander Gramiak <agrambot@gmail.com>
6050
6051 Catch argument and macroexpansion errors in ert
6052
6053 This kludge catches errors caused by evaluating arguments in ert's
6054 should, should-not, and should-error macros; it also catches
6055 macroexpansion errors inside of the above macros (Bug#24402).
6056
6057 * lisp/emacs-lisp/ert.el: (ert--should-signal-hook): New function.
6058 (ert--expand-should-1): Catch macroexpansion errors.
6059 * test/lisp/emacs-lisp/ert-tests.el (ert-test-should-error-argument)
6060 (ert-test-should-error-macroexpansion): Tests for argument and
6061 expansion errors.
6062
60632017-08-07 Reuben Thomas <rrt@sc3d.org>
6064
6065 Revert "Add Enchant support to ispell.el (Bug#17742)"
6066
6067 This reverts commit 7136e6723d87b51ae3089f5ceef6b14621bfaf87.
6068
60692017-08-07 Reuben Thomas <rrt@sc3d.org>
6070
6071 Revert "Add support for arguments in ALTERNATE_EDITOR to emacsclient"
6072
6073 This reverts commit 28f1fe97daa13e13714e6c43c9a6fbb0c0e99a26.
6074
60752017-08-07 Reuben Thomas <rrt@sc3d.org>
6076
6077 Add support for arguments in ALTERNATE_EDITOR to emacsclient
6078
6079 * lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or
6080 corresponding command-line argument, into space-separated tokens.
6081 * etc/NEWS: Document.
6082 * test/lib-src/emacsclient-tests.el: Add a test.
6083
60842017-08-07 Reuben Thomas <rrt@sc3d.org>
6085
6086 Add Enchant support to ispell.el (Bug#17742)
6087
6088 * lisp/textmodes/ispell.el (ispell-program-name): Add “enchant”.
6089 (ispell-really-enchant): Add variable.
6090 (ispell-check-version): If using Enchant, check it’s new enough (at
6091 least 1.6.1). (Like the ispell check, this is absolute: cannot work
6092 without.)
6093 (ispell-enchant-dictionary-alist): Add variable.
6094 (ispell-find-enchant-dictionaries): Add function, based on
6095 ispell-find-aspell-dictionaries.
6096 (ispell-set-spellchecker-params): Allow dictionary auto-detection for
6097 Enchant, and call ispell-find-enchant-dictionaries to find them. Use
6098 old ispell name to locale mapping code for Enchant too.
6099 (ispell-send-replacement): Make it work with Enchant.
6100
61012017-08-07 Reuben Thomas <rrt@sc3d.org>
6102
6103 Allow async command output buffer to be shown only on output
6104
6105 * lisp/simple.el (async-shell-command-display-buffer): Add
6106 defcustom.
6107 (shell-command): Use the new defcustom to determine whether to show
6108 the buffer immediately, or add a process filter that shows it only
6109 when there is some output.
6110 * etc/NEWS: Document the new variable.
6111 * doc/emacs/misc.texi: Likewise.
6112
6113 Thanks to Juri Linkov and Eli Zaretskii for advice and guidance.
6114
61152017-08-07 Eli Zaretskii <eliz@gnu.org>
6116
6117 Fix infinite recursion under prettify-symbols-mode and linum-mode
6118
6119 * src/xdisp.c (get_overlay_strings_1)
6120 (handle_single_display_spec, push_prefix_prop): Invalidate the
6121 composition information before starting to iterate on a string.
6122 Otherwise we might think in set_iterator_to_next that we are
6123 delivering characters from a composition, and do all kinds of
6124 nonsensical things, like over-step the string end. (Bug#27761)
6125
61262017-08-07 Stefan Monnier <monnier@iro.umontreal.ca>
6127
6128 * lisp/gnus/gnus-bcklg.el (gnus-backlog-request-article): Fix thinko.
6129
61302017-08-07 Martin Rudalics <rudalics@gmx.at>
6131
6132 Fix doc-string of `delete-other-windows'
6133
6134 * lisp/window.el (delete-other-windows): Fix doc-string.
6135
61362017-08-07 Paul Eggert <eggert@cs.ucla.edu>
6137
6138 Fix a couple more make-temp-file races
6139
6140 * lisp/files.el (basic-save-buffer-2, move-file-to-trash):
6141 Use make-temp-name, not make-temp-file with retry.
6142 (basic-save-buffer-2): Use condition-case, instead of
6143 unwind-protect with a success flag.
6144
61452017-08-07 Noam Postavsky <npostavs@gmail.com>
6146
6147 Merge null and without-null regexp alists (Bug#27840, Bug#27873)
6148
6149 * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Allow for NUL
6150 characters following filename in grep context lines.
6151 (grep--regexp-alist-column, grep--regexp-alist-bin-matcher)
6152 (grep-with-null-regexp-alist, grep-fallback-regexp-alist): Remove.
6153 (grep-regexp-alist): Recombine their contents here.
6154 (grep-mode):
6155 * lisp/cedet/semantic/symref/grep.el
6156 (semantic-symref-parse-tool-output-one-line):
6157 * lisp/progmodes/xref.el (xref-collect-matches): Use the variable
6158 `grep-regexp-alist' rather than the function.
6159
61602017-08-07 Paul Eggert <eggert@cs.ucla.edu>
6161
6162 Fix some crashes on self-modifying Elisp code
6163
6164 Prompted by a problem report by Alex in:
6165 http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00143.html
6166 * src/eval.c (For, Fprogn, Fsetq, FletX, eval_sub):
6167 Compute XCDR (x) near XCAR (x); although this doesn't fix any bugs,
6168 it is likely to run a bit faster with typical hardware caches.
6169 (Fif): Use Fcdr instead of XCDR, to avoid crashing on
6170 self-modifying S-expressions.
6171 (Fsetq, Flet, eval_sub): Count the number of arguments as we go
6172 instead of trusting an Flength prepass, to avoid problems when the
6173 code is self-modifying.
6174 (Fquote, Ffunction, Fdefvar, Fdefconst): Prefer !NILP to CONSP
6175 where either will do. This is mostly to document the fact that
6176 the value must be a proper list. It's also a tiny bit faster on
6177 typical machines nowadays.
6178 (Fdefconst, FletX): Prefer XCAR+XCDR to Fcar+Fcdr when either will do.
6179 (eval_sub): Check that the args are a list as opposed to some
6180 other object that has a length. This prevents e.g. (if . "string")
6181 from making Emacs dump core in some cases.
6182 * test/src/eval-tests.el (eval-tests--if-dot-string)
6183 (eval-tests--let-with-circular-defs, eval-tests--mutating-cond):
6184 New tests.
6185
61862017-08-06 Eli Zaretskii <eliz@gnu.org>
6187
6188 * etc/tutorials/TUTORIAL.he: Update to match recent changes to TUTORIAL.
6189
61902017-08-06 Tino Calancha <tino.calancha@gmail.com>
6191
6192 Minor tweak in a dired test
6193
6194 * test/lisp/dired-tests.el (dired-test-bug27968):
6195 Ensure the new header has different length than the original one.
6196
61972017-08-06 Tino Calancha <tino.calancha@gmail.com>
6198
6199 dired-delete-file: Do not TAB complete the user answer
6200
6201 This action might delete directories containing valuable information.
6202 Before previous commit, we prompted users with `yes-or-no-p'
6203 which doesn't TAB complete the user answer. Let's play safe and
6204 keep requiring full answers.
6205 * emacs-master/lisp/dired.el (dired-delete-file): Use `read-string'
6206 instead of `completing-read' to read the user answers.
6207
62082017-08-06 Tino Calancha <tino.calancha@gmail.com>
6209
6210 dired-do-delete: Allow to delete dirs recursively without prompts
6211
6212 * lisp/dired.el (dired-delete-file): Accept 2 additional answers:
6213 'all', to delete all directories recursively and no prompt anymore.
6214 'quit', to cancel directory deletions (Bug#27940).
6215 Show help message when user inputs 'help'.
6216 (dired-do-flagged-delete): Bind locally dired-recursive-deletes
6217 so that we can overwrite its global value.
6218 Wrapp the loop within a catch '--delete-cancel to catch when
6219 the user abort the directtry deletion.
6220 * doc/emacs/dired.texi (Dired Deletion): Update manual.
6221 * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.1):
6222 Announce this change.
6223
62242017-08-06 Paul Eggert <eggert@cs.ucla.edu>
6225
6226 Fix a couple of make-temp-file races
6227
6228 * lisp/emacs-lisp/autoload.el (autoload--save-buffer):
6229 * lisp/emacs-lisp/bytecomp.el (byte-compile-file):
6230 Use make-temp-file, not make-temp-name, to avoid an unlikely race
6231 that could lose data. Remove the deletion hook as quickly as
6232 possible after the file is renamed; though a race still remains
6233 here, it is smaller than before.
6234
62352017-08-06 Tino Calancha <tino.calancha@gmail.com>
6236
6237 Dired w/ eshell-ls: Handle shell wildcards in file name
6238
6239 * lisp/eshell/em-ls.el (eshell-ls--insert-directory):
6240 Use eshell-extended-glob (Bug#27844).
6241 * test/lisp/dired-tests.el (dired-test-bug27844): Add test.
6242
62432017-08-06 Tino Calancha <tino.calancha@gmail.com>
6244
6245 dired-revert: save line numbers instead of positions
6246
6247 Positions might change if the length of one dired header line
6248 changes; this happen, for instance, if we add new files.
6249 Instead, line numbers are invariant under shrinks/enlargements
6250 of the file header.
6251 https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html
6252 * lisp/dired.el (dired-save-positions): Save the line numbers at point.
6253 (dired-restore-positions): Use forward-line to restore the original
6254 position (Bug#27968).
6255 * test/lisp/dired-tests.el (dired-test-bug27968): Add test.
6256
62572017-08-06 Tom Tromey <tom@tromey.com>
6258
6259 Respect comment-auto-fill-only-comments
6260
6261 Respect comment-auto-fill-only-comments when auto-filling and a
6262 comment syntax is defined.
6263
6264 * lisp/newcomment.el (comment-indent-new-line): Do not check
6265 comment-auto-fill-only-comments.
6266 * lisp/simple.el (internal-auto-fill): New defun.
6267 * src/cmds.c (internal_self_insert): Call Qinternal_auto_fill, not
6268 auto_fill_function.
6269 (syms_of_cmds): Define Qinternal_auto_fill.
6270
62712017-08-05 Richard Stallman <rms@gnu.org>
6272
6273 * etc/tutorials/TUTORIAL: Update.
6274
62752017-08-05 Eli Zaretskii <eliz@gnu.org>
6276
6277 Unify CNS11643-15 in a way that avoids segfaults
6278
6279 * lisp/international/mule-conf.el: Redo unification of
6280 cns11643-15. (Bug#27964)
6281 (chinese-cns11643-15): Add the missing :unify-map attribute.
6282
62832017-08-05 Eli Zaretskii <eliz@gnu.org>
6284
6285 Avoid segfaults while producing Punct.el
6286
6287 * lisp/international/mule-conf.el: Undo unification of
6288 cns11643-15, as that causes segfaults during bootstrap.
6289 (Bug#27964)
6290
62912017-08-05 Eli Zaretskii <eliz@gnu.org>
6292
6293 Make header line in some modes be sensitive to display-line-numbers
6294
6295 * lisp/ruler-mode.el (ruler-mode-ruler, ruler-mode-window-col):
6296 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header)
6297 (tabulated-list-print-entry): Account for the width taken by
6298 line-number display. (Bug#27895)
6299
63002017-08-05 Eli Zaretskii <eliz@gnu.org>
6301
6302 Fix a bug in 'generate-new-buffer-name'
6303
6304 * src/buffer.c (Fgenerate_new_buffer_name): Test IGNORE for being
6305 nil before calling string-equal, since the latter will compare
6306 "nil and 'nil' as equal. (Bug#27966)
6307
6308 * test/src/buffer-tests.el
6309 (test-generate-new-buffer-name-bug27966): New test.
6310
63112017-08-05 Eli Zaretskii <eliz@gnu.org>
6312
6313 Unify CNS11643-15
6314
6315 * lisp/international/mule-conf.el (chinese-cns11643-15): Add a
6316 unify-charset form for it. (Bug#27964)
6317
63182017-08-05 Eli Zaretskii <eliz@gnu.org>
6319
6320 Improve test of error message when Emacs cannot be suspended
6321
6322 * lisp/term/x-win.el (x-win-suspend-error):
6323 * lisp/term/ns-win.el (ns-suspend-error): Improve the error
6324 message. (Bug#27901)
6325
63262017-08-05 Alexander Gramiak <agrambot@gmail.com>
6327
6328 Make "C-h o" show faces as well as variables
6329
6330 * lisp/faces.el (describe-face): Return (buffer-string). Reorder
6331 the placement of variables/faces in describe-symbol, to put more
6332 emphasis on the variable entry rather than the face. (Bug#24543)
6333
63342017-08-05 Eli Zaretskii <eliz@gnu.org>
6335
6336 Fix files-tests.el for MS-Windows
6337
6338 * test/lisp/files-tests.el
6339 (files-tests--file-name-non-special--subprocess): Fix this test
6340 for MS-Windows.
6341
63422017-08-05 Eli Zaretskii <eliz@gnu.org>
6343
6344 Improve documentation of 'region-extract-function'
6345
6346 * lisp/simple.el (region-extract-function): Rename the argument to
6347 METHOD. Doc fix. (Bug#27927)
6348
63492017-08-05 Paul Eggert <eggert@cs.ucla.edu>
6350
6351 Merge from gnulib
6352
6353 This incorporates:
6354 2017-08-04 manywarnings: port to 64-bit GCC builds of Emacs
6355 2017-08-01 manywarnings: port to 32-bit GCC bug
6356 * lib/gnulib.mk.in: Regenerate.
6357 * m4/manywarnings.m4: Copy from gnulib.
6358
63592017-08-05 Paul Eggert <eggert@cs.ucla.edu>
6360
6361 Port recent rename changes to Ubuntu 14.04
6362
6363 * src/sysdep.c (renameat_noreplace) [!RENAME_NOREPLACE]:
6364 Don’t use syscall. Problem reported by Tino Calancha (Bug#27946#10).
6365
63662017-08-05 Tino Calancha <tino.calancha@gmail.com>
6367
6368 insert-directory-wildcard-in-dir-p: Tweak regexp
6369
6370 This function must return non-nil for a wildcard like '/*/*.txt'.
6371 * lisp/files.el (insert-directory-wildcard-in-dir-p): Adjust regexp.
6372 * test/lisp/files-tests.el (files-tests--insert-directory-wildcard-in-dir-p):
6373 Add test.
6374
63752017-08-04 Toby S. Cubitt <tsc25@cantab.net>
6376
6377 Implement iterator generator for avl-trees.
6378
6379 * lisp/emacs-lisp/avl-tree.el (avl-tree-iter): New iter-defun.
6380
63812017-08-04 Tino Calancha <tino.calancha@gmail.com>
6382
6383 ls-lisp: Drop eshell dependencies
6384
6385 Use 'file-expand-wildcards' instead of 'eshell-extended-glob' to
6386 expand the wildcards.
6387 Suggested by Fabrice Popineau in:
6388 https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00108.html
6389 * lisp/ls-lisp.el (ls-lisp--dired): Use file-expand-wildcards.
6390
63912017-08-04 Tino Calancha <tino.calancha@gmail.com>
6392
6393 Fix dired-test-bug27631 on MS-Windows
6394
6395 Skip the test if Dired use 'ls' emulation with lisp. The same
6396 bug is tested in their respective test suites: ls-lisp-tests.el
6397 and em-ls-tests.el.
6398 * test/lisp/dired-tests.el (dired-test-bug27631): Skip test if 'ls-lisp'
6399 or 'eshell' features are enabled.
6400
64012017-08-04 Eli Zaretskii <eliz@gnu.org>
6402
6403 Fix dired-test-bug25609 on MS-Windows
6404
6405 * test/lisp/dired-tests.el (dired-test-bug25609): On MS-Windows,
6406 pass temporary files through file-truename, to avoid bogus
6407 failures due to file-name comparison as strings.
6408
64092017-08-04 Tino Calancha <tino.calancha@gmail.com>
6410
6411 Fix 2 tests that fail in MS-Windows
6412
6413 https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html
6414 * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
6415 Add comments to explain the test logic.
6416 Pass '--binary' option to 'patch' program in windows environments.
6417 Check explicitely that a backup is created before compare file contents.
6418
6419 * test/lisp/dired-tests.el (dired-test-bug25609):
6420 Declare variable 'dired-dwim-target' right before the test.
6421 Add comments to explain the test logic.
6422 Ensure, before test the bug condition, that we are displaying the
6423 2 dired buffers created in this test, and no other dired buffer
6424 is shown.
6425
64262017-08-04 Stefan Monnier <monnier@iro.umontreal.ca>
6427
6428 * lisp/shell.el (explicit-shell-file-name): Mention shell-file-name
6429
6430 * lisp/files.el (insert-directory): Don't hardcode "-c".
6431 * lisp/term.el (term, ansi-term): Use shell-file-name.
6432
64332017-08-04 Paul Eggert <eggert@cs.ucla.edu>
6434
6435 Fix version numbers for some GnuTLS features
6436
6437 Problem reported by Glenn Morris (Bug#27708#58).
6438 * src/gnutls.c (HAVE_GNUTLS_X509_SYSTEM_TRUST):
6439 New macro. Use it instead of low-level version number checks.
6440 (HAVE_GNUTLS_AEAD): Move here from gnutls.h, and rename from
6441 HAVE_GNUTLS3_AEAD. All uses changed. Indent preprocessor lines.
6442 * src/gnutls.h (HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_DIGEST)
6443 (HAVE_GNUTLS3_HMAC): Remove, since these were available
6444 before GnuTLS 3.0.0 and the code checks them only if HAVE_GNUTLS3
6445 is defined. Remove all uses; this simplifies the code a bit.
6446
64472017-08-04 Paul Eggert <eggert@cs.ucla.edu>
6448
6449 Port recent rename changes to RHEL 7 + NFS
6450
6451 Problem reported by Ted Zlatanov in:
6452 http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00082.html
6453 * src/fileio.c (Frename_file): On RHEL 7 + NFS, renameat2 can fail
6454 with errno == EINVAL when it is not supported. So treat that case
6455 like errno == ENOSYS. Also, when ok_if_already_exists is neither
6456 nil nor an integer, just call plain rename; this avoids an extra
6457 syscall to renameat2 when the latter fails with errno == EINVAL or
6458 ENOSYS or ENOENT.
6459
64602017-08-03 Paul Eggert <eggert@cs.ucla.edu>
6461
6462 Port GnuTLS usage to Ubuntu 16.04.2 LTS
6463
6464 * src/gnutls.h (HAVE_GNUTLS3_AEAD): Define only if GnuTLS 3.5.1 or
6465 later, as opposed to the old 3.4.0 or later.
6466
64672017-08-03 Paul Eggert <eggert@cs.ucla.edu>
6468
6469 Simplify configuration of HAVE_GNUTLS3 etc.
6470
6471 There's only one GnuTLS, so configuring these symbols at
6472 'configure' time is overkill. Simplify things by moving their
6473 configuration to src/gnutls.h (Bug#27708).
6474 * configure.ac (HAVE_GNUTLS3, HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD)
6475 (HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_DIGEST): Move these definitions
6476 from here ...
6477 * src/gnutls.h: ... to here, and simplify.
6478
64792017-08-03 Paul Eggert <eggert@cs.ucla.edu>
6480
6481 Default to --with-mailutils if it is installed
6482
6483 * configure.ac (with_mailutils): Default to 'yes' if GNU Mailutils
6484 is installed. See:
6485 http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00054.html
6486
64872017-08-02 Paul Eggert <eggert@cs.ucla.edu>
6488
6489 Clarify when autogen.sh should run only autoconf
6490
6491 * Makefile.in (configure, bootstrap): Run ‘./autogen.sh autoconf’,
6492 not plain ‘./autogen.sh’, to make it clear that only
6493 autoconf-related tools should be run here.
6494
64952017-08-02 Toon Claes <toon@iotcl.com>
6496
6497 .gitlab-ci.yml: Use stretch Debian image instead of unstable
6498
64992017-08-02 Stephen Berman <stephen.berman@gmx.net>
6500
6501 Add debugging messages to a Dired test
6502
6503 * test/lisp/dired-tests.el (dired-test-bug27243-01): Log
6504 positions saved and restored by dired-revert to try and find
6505 out why the test fails on Hydra.
6506
65072017-08-02 Tino Calancha <tino.calancha@gmail.com>
6508
6509 ls-lisp: Autoload call instead of cookie
6510
6511 * lisp/ls-lisp.el (eshell-extended-glob): autoload call instead of cookie.
6512
65132017-08-02 Paul Eggert <eggert@cs.ucla.edu>
6514
6515 When renaming a file, ask only if EEXIST or ENOSYS
6516
6517 * src/fileio.c (Frename_file): Avoid calling Ffile_directory_p
6518 more than once on FILE. Use renameat_noreplace, so that we can
6519 ask the user (and unlink and retry) only if this fails with errno
6520 == EEXIST or ENOSYS. This avoids the need to ask the user for
6521 permission to do an operation that will fail anyway. Simplify
6522 computation of ok_if_already_exists for subsidiary functions.
6523 * src/filelock.c (rename_lock_file): Prefer renameat_noreplace
6524 if it works, as this avoids the need to link and unlink.
6525 * src/lisp.h (renameat_noreplace): New decl.
6526 * src/sysdep.c [HAVE_LINUX_FS_H]: Include linux/fs.h and sys/syscall.h.
6527 (renameat_noreplace): New function.
6528
65292017-08-02 Paul Eggert <eggert@cs.ucla.edu>
6530
6531 When creating a link, ask only if EEXIST
6532
6533 * src/fileio.c (Fadd_name_to_file, Fmake_symbolic_link):
6534 Ask the user (and unlink and retry) only if link creation fails
6535 with errno == EEXIST. This avoids the need to ask the user for
6536 permission to do an operation that will fail anyway.
6537
65382017-08-02 Tino Calancha <tino.calancha@gmail.com>
6539
6540 dired-align-file: Inherit text properties in inserted spaces
6541
6542 * lisp/dired.el (dired-align-file): Inherit text
6543 properties in inserted spaces (Bug#27899).
6544 * test/lisp/dired-tests.el (dired-test-bug27899): Add test.
6545
65462017-08-02 Tino Calancha <tino.calancha@gmail.com>
6547
6548 Don't assume /bin/sh as the 'sh' location in the local host
6549
6550 * lisp/dired.el (dired-insert-directory): Use executable-find in
6551 a local host.
6552
65532017-08-02 Tino Calancha <tino.calancha@gmail.com>
6554
6555 Move dired tests using ls emulation to different files
6556
6557 Suggested in:
6558 https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html
6559 * test/lisp/dired-tests.el (dired-test-bug27693)
6560 (dired-test-bug27762, dired-test-bug27817)
6561 (dired-test-bug27631, dired-test-bug27843): Delete those
6562 parts requiring either ls-lisp or eshell-ls.
6563
6564 * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27762)
6565 (ls-lisp-test-bug27631, ls-lisp-test-bug27693):
6566 Add all dired tests using ls-lisp here.
6567
6568 * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631)
6569 (em-ls-test-bug27817, em-ls-test-bug27843): New test file. Add
6570 all dired tests using eshell-ls here.
6571
65722017-08-02 Tino Calancha <tino.calancha@gmail.com>
6573
6574 * test/lisp/ls-lisp-tests.el: Rename it from ls-lisp.el
6575
65762017-08-02 Katsumi Yamaoka <yamaoka@jpl.org>
6577
6578 * lisp/gnus/mm-uu.el (mm-uu-org-src-code-block-extract):
6579 Say the handle is already decoded.
6580 cf. <yw.87lgnh5cfv.fsf@alex.chromebook> in the info-gnus-english list.
6581
65822017-08-02 Paul Eggert <eggert@cs.ucla.edu>
6583
6584 Don’t worry about unlink if errno == ENOENT
6585
6586 * src/fileio.c (Fdelete_file):
6587 * src/keyboard.c (Fopen_dribble_file): Do not report failure to
6588 remove a file if unlink fails with errno == ENOENT. This can
6589 happen even if Emacs is the only program removing the file, in
6590 case an NFS cache overflows. The file does not exist if errno ==
6591 ENOENT, so it is OK to proceed.
6592
65932017-08-01 Tino Calancha <tino.calancha@gmail.com>
6594
6595 Fix misalignment in Dired when dired-directory is a cons
6596
6597 * lisp/dired.el (dired--need-align-p, dired--align-all-files):
6598 New defuns.
6599 (dired-internal-noselect): Call dired--align-all-files when
6600 dired-directory is a cons (Bug#27762).
6601 * test/lisp/dired-tests.el (dired-test-bug27762): Test should pass.
6602
66032017-08-01 Eli Zaretskii <eliz@gnu.org>
6604
6605 Fix some dired-tests.el on MS-Windows
6606
6607 * test/lisp/dired-tests.el (dired-test-bug27243-01)
6608 (dired-test-bug27243-02): On MS-Windows, pass test-dir through
6609 file-truename, to avoid bogus failures due to file-name comparison
6610 as strings.
6611
66122017-08-01 Tino Calancha <tino.calancha@gmail.com>
6613
6614 Insert subdir content if dir-or-list is a string w/o wildcards
6615
6616 * lisp/eshell/em-ls.el (eshell-ls--insert-directory):
6617 Append '("-d") into 'eshell-ls-dired-initial-args'
6618 if 'dired-directory' is a cons or there are wildcars (Bug#27843).
6619 * test/lisp/dired-tests.el (dired-test-bug27843): Add test.
6620
66212017-08-01 Stephen Berman <stephen.berman@gmx.net>
6622
6623 Update todo-mode defcustoms in a less hideous way
6624
6625 * lisp/calendar/todo-mode.el (todo-reevaluate-filelist-defcustoms)
6626 (todo-reevaluate-default-file-defcustom)
6627 (todo-reevaluate-category-completions-files-defcustom)
6628 (todo-reevaluate-filter-files-defcustom): Delete these functions.
6629 (todo-update-filelist-defcustoms): New function. This replaces
6630 todo-reevaluate-filelist-defcustoms, using the 'custom-type'
6631 property instead of re-evaluating the defcustoms.
6632 (todo-add-file, todo-rename-file, todo-delete-file)
6633 (todo-delete-category, todo-move-category)
6634 (todo-convert-legacy-files, todo-check-file): Replace call of
6635 todo-reevaluate-filelist-defcustoms by
6636 todo-update-filelist-defcustoms.
6637 (todo-show, todo-category-completions): Replace call of
6638 todo-reevaluate-* function by use of 'custom-type' property.
6639
66402017-08-01 Tino Calancha <tino.calancha@gmail.com>
6641
6642 Add more should form calls in a failing dired test
6643
6644 Some dired tests fail intermittently in hydra. Add few
6645 more should form calls for debugging.
6646 See:
6647 https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html
6648 * test/lisp/dired-tests.el (dired-test-bug27243-01): Add few more should
6649 forms for debugging.
6650
66512017-08-01 Michael Albinus <michael.albinus@gmx.de>
6652
6653 Follow SAUNA recommendations for display-line-numbers-type
6654
6655 * lisp/display-line-numbers.el (display-line-numbers-type): Do not autoload.
6656
6657 * lisp/menu-bar.el (display-line-numbers-type): Declare.
6658
66592017-07-31 Paul Eggert <eggert@cs.ucla.edu>
6660
6661 Avoid most stat calls when completing file names
6662
6663 * admin/merge-gnulib (GNULIB_MODULES): Add d-type.
6664 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
6665 * m4/d-type.m4: New file, copied from gnulib.
6666 * src/dired.c (DT_UNKNOWN, DT_DIR, DT_LINK)
6667 [!HAVE_STRUCT_DIRENT_D_TYPE]: New constants.
6668 (dirent_type): New function.
6669 (file_name_completion): Use it, to avoid unnecessary calls to
6670 stat-like functions on GNU/Linux and other platforms with d_type.
6671 (file_name_completion_stat): Just follow the link; there is no
6672 need to try first with AT_SYMLINK_NOFOLLOW since the directory
6673 entry was already checked to exist.
6674
66752017-07-31 Tino Calancha <tino.calancha@gmail.com>
6676
6677 dired-tests: Unload tested features after test them
6678
6679 Some tests are for Dired with ls-lisp or eshell-ls.
6680 Requiring these features add an advice on `dired' and
6681 might affect other tests.
6682 Do not require these features at the top of the file; require
6683 then inside the tests and unload then at the end.
6684 * test/lisp/dired-tests.el (dired-test-bug27693)
6685 (dired-test-bug7131, dired-test-bug27817, dired-test-bug27631):
6686 require ls-lisp and/or eshell-ls inside the test; unload the
6687 features at the end.
6688
66892017-07-31 Michael Albinus <michael.albinus@gmx.de>
6690
6691 Small adaptions for directory wildcards
6692
6693 * lisp/dired.el (dired-insert-directory): Remove "--dired"
6694 when there are wildcards, and the directory is remote.
6695
6696 * test/lisp/net/tramp-tests.el (tramp--test-make-temp-name):
6697 Adapt docstring.
6698 (tramp-test17-dired-with-wildcards): Skip for all methods but
6699 those from tamp-sh.p.
6700
67012017-07-31 Tino Calancha <tino.calancha@gmail.com>
6702
6703 * lisp/dired (dired-trivial-filenames): Use \` and \' to match string bounds
6704
67052017-07-31 Paul Eggert <eggert@cs.ucla.edu>
6706
6707 Merge from gnulib
6708
6709 This incorporates:
6710 2017-07-30 Don't interpret EOVERFLOW to mean nonexistence
6711 * lib/tempname.c: Copy from gnulib.
6712
67132017-07-30 Tino Calancha <tino.calancha@gmail.com>
6714
6715 ls-lisp: Do not require em-glob at top of the file
6716
6717 Require em-glob inside 'ls-lisp--dired'. This is necessary to
6718 not break the Emacs build.
6719 See following thread for details:
6720 https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01083.html
6721 * lisp/ls-lisp.el (dired-goto-next-file)
6722 (dired-read-dir-and-switches, eshell-extended-glob):
6723 Add function declarations.
6724 * lisp/eshell/em-ls.el (dired-goto-next-file): Fix function declaration.
6725
67262017-07-30 Michael Albinus <michael.albinus@gmx.de>
6727
6728 * lisp/dired.el (dired-insert-directory): Move `file-remote-p' check up.
6729
6730 * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards): New test.
6731
67322017-07-30 Simen Heggestøyl <simenheg@gmail.com>
6733
6734 Change default CSS property face
6735
6736 * lisp/textmodes/css-mode.el (css-property): Inherit from
6737 `font-lock-keyword-face' instead of `font-lock-variable-name-face' to
6738 distinguish CSS properties from variables.
6739
67402017-07-30 Tino Calancha <tino.calancha@gmail.com>
6741
6742 Dired: Handle posix wildcards in directory part
6743
6744 Allow Dired to handle calls like
6745 \(dired \"~/foo/*/*.el\"), that is, with wildcards within
6746 the directory part of the file argument (Bug#27631).
6747 * lisp/files.el (insert-directory-wildcard-in-dir-p): New predicate.
6748 (insert-directory-clean): New defun extracted from insert-directory.
6749 (insert-directory)
6750 * lisp/dired.el (dired-internal-noselect)
6751 (dired-insert-directory): Use the new predicate; when it's true,
6752 handle the directory wildcards with a shell call.
6753 * lisp/eshell/em-ls.el (eshell-ls-use-in-dired): Add/remove both advices.
6754 (eshell-ls-unload-hook): New defun. Use it in
6755 eshell-ls-unload-hook instead of an anonymous function.
6756 (eshell-ls--dired)
6757 * lisp/ls-lisp.el (ls-lisp--dired):
6758 Advice dired to handle wildcards in the directory part with both
6759 eshell-ls and ls-lisp.
6760 * etc/NEWS: Announce it.
6761 * doc/emacs/dired.texi (Dired Enter): Update manual.
6762 * test/lisp/dired-tests.el (dired-test-bug27631): Add test.
6763
67642017-07-29 Tino Calancha <tino.calancha@gmail.com>
6765
6766 * lisp/find-lisp.el: Enable lexical binding
6767
6768 * lisp/find-dired.el: Enable lexical binding
6769
67702017-07-29 Mark Oteiza <mvoteiza@udel.edu>
6771
6772 * lisp/kmacro.el: Use lexical binding.
6773
67742017-07-29 Mark Oteiza <mvoteiza@udel.edu>
6775
6776 Use lexical-binding in dired-aux.el
6777
6778 * lisp/dired.el: Use lexical binding.
6779 (dired-do-shell-command): Remove unused bindings.
6780
67812017-07-29 Mark Oteiza <mvoteiza@udel.edu>
6782
6783 * lisp/ido.el: Use lexical binding.
6784
6785 * lisp/whitespace.el: Use lexical binding.
6786
67872017-07-29 Stephen Berman <stephen.berman@gmx.net>
6788
6789 artist.el: Avoid error with keyboard command invocation
6790
6791 * lisp/textmodes/artist.el (artist-mouse-choose-operation):
6792 Call x-popup-menu with t instead of last-nonmenu-event as the
6793 value of the position argument; this allows invoking the
6794 command from the keyboard without raising an error (bug#27819).
6795
67962017-07-29 Stephen Berman <stephen.berman@gmx.net>
6797
6798 Preserve point under 'dired-auto-revert-buffer' (third case)
6799
6800 * lisp/files.el (find-file): Use pop-to-buffer-same-window
6801 instead of switch-to-buffer. This preserves Dired window
6802 point when dired-auto-revert-buffer is non-nil. (Bug#27243)
6803
6804 * test/lisp/dired-tests.el (dired-test-bug27243-01)
6805 (dired-test-bug27243-02, dired-test-bug27243-03): New tests.
6806 The first two replace a previous test that combined them; that
6807 test intermittently fails in the Hydra build system, so maybe
6808 separating the two cases will help locate the point of
6809 failure. The third test involves find-file but is here
6810 because it, like the others, is testing the effect of
6811 dired-auto-revert-buffer.
6812
68132017-07-29 Allen Li <vianchielfaura@gmail.com> (tiny change)
6814
6815 Do not unset user key remaps in dired-x
6816
6817 * lisp/dired-x.el (dired-x-bind-find-file): Don't map any keys if user
6818 sets dired-x-hands-off-my-keys. (Bug#27828)
6819
68202017-07-29 Eli Zaretskii <eliz@gnu.org>
6821
6822 Improve documentation of 'occur'
6823
6824 * doc/emacs/search.texi (Other Repeating Search):
6825 * lisp/replace.el (occur): Make the documentation of 'occur' be
6826 more accurate when matches overlap. (Bug#27818)
6827
68282017-07-29 Eli Zaretskii <eliz@gnu.org>
6829
6830 Minor copyedits of comments in faces.el
6831
6832 * lisp/faces.el (face-font-family-alternatives): More info about
6833 requirements from "Monospace Serif".
6834
68352017-07-29 Paul Eggert <eggert@cs.ucla.edu>
6836
6837 Do not worry about paxctl on newer NetBSD
6838
6839 Problem reported privately by Thomas Klausner.
6840 * configure.ac (emacs_uname_r): New var. Use it to avoid paxctl
6841 on newer NetBSD platforms, where it is not needed. Also use it to
6842 simplify Cygwin diagnostic.
6843
68442017-07-29 Eli Zaretskii <eliz@gnu.org>
6845
6846 Clarify documentation of ':inherit' face attribute
6847
6848 * doc/lispref/display.texi (Face Attributes): Document the special
6849 treatment of 'unspecified' in the ':inherit' attribute.
6850
68512017-07-28 Stefan Monnier <monnier@iro.umontreal.ca>
6852
6853 * lisp/password-cache.el (password-data): Use a hash-table
6854
6855 * lisp/auth-source.el (auth-source-magic): Remove.
6856 (auth-source-forget+, auth-source-forget-all-cached): Adjust to new
6857 format of password-data.
6858 (auth-source-format-cache-entry): Just use a cons.
6859
6860 (password-cache-remove, password-cache-add, password-reset)
6861 (password-read-from-cache, password-in-cache-p): Adjust accordingly.
6862
6863 (Bug#26699)
6864
68652017-07-28 Stefan Monnier <monnier@iro.umontreal.ca>
6866
6867 * lisp/subr.el (define-symbol-prop): New function
6868
6869 (symbol-file): Make it find symbol property definitions.
6870
6871 * lisp/emacs-lisp/pcase.el (pcase-defmacro):
6872 * lisp/emacs-lisp/ert.el (ert-set-test): Use it instead of `put'.
6873 (ert-describe-test): Adjust call to symbol-file accordingly.
6874
68752017-07-28 Stefan Monnier <monnier@iro.umontreal.ca>
6876
6877 * lisp/subr.el (method-files): Move function to cl-generic.el
6878
6879 * lisp/emacs-lisp/cl-generic.el (cl-generic-p): New function.
6880 (cl--generic-method-files): New function, moved from subr.el.
6881 * lisp/emacs-lisp/edebug.el (edebug-instrument-function): Use them.
6882 * test/lisp/emacs-lisp/cl-generic-tests.el:
6883 * test/lisp/subr-tests.el: Move and adjust method-files tests accordingly.
6884
68852017-07-28 Eli Zaretskii <eliz@gnu.org>
6886
6887 Preserve this-command-keys across recursive-edit invocations
6888
6889 * src/minibuf.c (read_minibuf, read_minibuf_unwind): Save and
6890 restore this-command-keys, to preserve it across recursive-edit.
6891 (Bug#27470)
6892
68932017-07-28 Eli Zaretskii <eliz@gnu.org>
6894
6895 Improve doc string of 'locate-dominating-file'
6896
6897 * lisp/files.el (locate-dominating-file): Doc fix. (Bug#27798)
6898
68992017-07-28 Drew Adams <drew.adams@oracle.com>
6900
6901 New commands 'apropos-local-variable', 'apropos-local-value'
6902
6903 * lisp/apropos.el (apropos-local-variable, apropos-local-value):
6904 New functions. (Bug#27424)
6905
6906 * doc/emacs/help.texi (Apropos): Document 'apropos-local-variable'
6907 and 'apropos-local-value'.
6908 * etc/NEWS: Mention the new commands.
6909
69102017-07-28 Stefan Monnier <monnier@iro.umontreal.ca>
6911
6912 * lisp/loadhist.el (unload-feature): Remove ad-hoc ELP code
6913
6914 * lisp/emacs-lisp/elp.el (loadhist-unload-element): Un-instrument functions.
6915
69162017-07-27 Alan Mackenzie <acm@muc.de>
6917
6918 Fix C++ class initializers not always being fontified at mode start.
6919
6920 The problem here happened when an "outer list" of declarations moved beyond an
6921 "inner list" containing class initializers. These weren't being checked for
6922 by the code.
6923
6924 Also, fix places in c-get-fontification-context where point is undefined.
6925
6926 * lisp/progmodes/cc-fonts.el (c-get-fontification-context): when argument
6927 not-front-decl is set, test for class initializers. Also, anchor point in
6928 places where it is moved and is otherwise undefined.
6929
69302017-07-27 Alan Mackenzie <acm@muc.de>
6931
6932 Fix variables in C++ "for" statement not always being fontified.
6933
6934 The error happened when there was a comma inside template delimiters.
6935
6936 * lisp/progmodes/cc-fonts.el (c-get-fontification-context): In "for"
6937 statements, recognise template delimiters containing "," and "&".
6938
69392017-07-27 Michael Albinus <michael.albinus@gmx.de>
6940
6941 Add watchdog process to tramp-test36-asynchronous-requests
6942
6943 * test/lisp/net/tramp-tests.el (tramp--test-timeout-handler):
6944 New defun.
6945 (tramp-test36-asynchronous-requests): Use a watchdog process,
6946 listening for SIGUSR1.
6947
69482017-07-27 Alan Mackenzie <acm@muc.de>
6949
6950 CC Mode: Fix declarator being cut off from terminator by end of jit-lock chunk
6951
6952 If a declarator is so cut off, extend the fontification chunk to include it.
6953
6954 * lisp/progmodes/cc-mode.el (c-fl-decl-end): New function.
6955 (c-change-expand-fl-region, c-context-expand-fl-region): Use the new function.
6956
69572017-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
6958
6959 * lisp/vc/smerge-mode.el: Avoid N² blow up in degenerate cases
6960
6961 (smerge--refine-long-words): New var.
6962 (smerge--refine-chopup-region): Use it.
6963
69642017-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
6965
6966 * lisp/url/url-cookie.el: Use lexical-binding
6967
6968 (url-cookie-host-can-set-p): Remove unused var `last'.
6969 Use string-suffix-p.
6970 (url-cookie-list): De morgan.
6971 (url-cookie-quit): Remove.
6972 (url-cookie-mode): Inherit from special-mode.
6973 (url-cookie-mode-map): Simplify accordingly.
6974
69752017-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
6976
6977 * lisp/calendar/todo-mode.el (todo-print-buffer-function): Rework docstring.
6978
6979 * lisp/ruler-mode.el (ruler-mode-ruler): Document problem.
6980
69812017-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
6982
6983 * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):
6984
6985 Record this as the function's definition site if it's the first def.
6986
69872017-07-26 Glenn Morris <rgm@gnu.org>
6988
6989 * doc/lispref/loading.texi (When to Autoload): New section.
6990
69912017-07-26 Glenn Morris <rgm@gnu.org>
6992
6993 Stop using unibyte buffers for ert backtraces
6994
6995 * lisp/emacs-lisp/ert.el
6996 (ert-results-pop-to-backtrace-for-test-at-point):
6997 Set multibyte true, not false. This copies a
6998 debugger-setup-buffer change from 2009-08-30, and stops the
6999 "Backtrace for" header line containing ^X and ^Y.
7000
70012017-07-26 Dmitry Gutov <dgutov@yandex.ru>
7002
7003 Fix semantic-symref-parse-tool-output-one-line after 644cdd1aa0
7004
7005 * lisp/cedet/semantic/symref/grep.el
7006 (semantic-symref-grep--line-re): Delete.
7007 (semantic-symref-parse-tool-output-one-line):
7008 Use regexp and group numbers from (grep-regexp-alist).
7009
70102017-07-26 Grégoire Jadi <daimrod@omecha.info>
7011
7012 Fix cl-defmethod indentation
7013
7014 * lisp/emacs-lisp/cl-generic.el (cl-defmethod):
7015 Declare (indent defun). Fixes bug#23994.
7016
70172017-07-26 Martin Rudalics <rudalics@gmx.at>
7018
7019 Fix two customization types in frame.el
7020
7021 * lisp/frame.el (window-divider-default-bottom-width)
7022 (window-divider-default-right-width): Fix customization types.
7023
70242017-07-26 Tino Calancha <tino.calancha@gmail.com>
7025
7026 Dired: Support eshell-ls from the beginning if the user wants to
7027
7028 * lisp/dired.el (dired-insert-directory): Check for eshell-ls
7029 as well (Bug#27817).
7030 * test/lisp/dired-tests.el (dired-test-bug27817): Add test.
7031
70322017-07-26 Mark Oteiza <mvoteiza@udel.edu>
7033
7034 * lisp/progmodes/sh-script.el (sh-mode): Recognize mkshrc.
7035
70362017-07-25 Stefan Monnier <monnier@iro.umontreal.ca>
7037
7038 * lisp/emacs-lisp/eieio-compat.el (eieio--defgeneric-init-form):
7039
7040 Adjust to change in cl-generic-ensure-function.
7041
70422017-07-25 Tino Calancha <tino.calancha@gmail.com>
7043
7044 ls-lisp: Add an unload function and enable lexical binding
7045
7046 Enable lexical binding.
7047 * lisp/ls-lisp.el (ls-lisp-unload-function): New defun.
7048 * test/lisp/ls-lisp.el (ls-lisp-unload): Add test.
7049
70502017-07-25 Tino Calancha <tino.calancha@gmail.com>
7051
7052 register-read-with-preview: Quit if user input C-g or ESC
7053
7054 * lisp/register.el (register-read-with-preview):
7055 Quit if user input C-g or ESC (bug#27634).
7056 * doc/emacs/regs.texi (Registers): Update manual.
7057 * test/lisp/register-tests.el (register-test-bug27634): Add test.
7058
70592017-07-25 Mark Oteiza <mvoteiza@udel.edu>
7060
7061 Recognize MirBSD Korn shell rc file
7062
7063 * lisp/files.el (auto-mode-alist): Add .mkshrc to the list.
7064
70652017-07-25 Glenn Morris <rgm@gnu.org>
7066
7067 * configure.ac: Be explicit about ImageMagick version in summary.
7068
70692017-07-25 Andreas Schwab <schwab@linux-m68k.org>
7070
7071 Properly align global lispsym
7072
7073 * lib-src/make-docfile.c (close_emacs_globals): Wrap struct
7074 Lisp_Symbols inside struct.
7075 * src/alloc.c (sweep_symbols): Update use of lispsym.
7076 * src/lisp.h (builtin_lisp_symbol): Likewise.
7077
70782017-07-25 Paul Eggert <eggert@cs.ucla.edu>
7079
7080 Do not use ImageMagick 7 and later
7081
7082 Suggested by Glenn Morris (Bug#25967#15).
7083 * configure.ac (IMAGEMAGICK_MODULE): Reject 7 and later.
7084
70852017-07-25 Stefan Monnier <monnier@iro.umontreal.ca>
7086
7087 * lisp/progmodes/perl-mode.el: Add support for indented here docs
7088
7089 * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
7090 Recognize the new <<~ syntax for indented here docs.
7091 (perl-syntax-propertize-special-constructs): Adjust search of the
7092 end of here docs accordingly.
7093
7094 * test/manual/indent/perl.perl: Add test for indented here docs.
7095
70962017-07-24 Stefan Monnier <monnier@iro.umontreal.ca>
7097
7098 (loadhist-unload-element): Move ERT and cl-generic methods
7099
7100 * lisp/loadhist.el (loadhist-unload-element): Don't define cl-generic
7101 and ert methods here.
7102 (loadhist-unload-element) <(head define-type)>: Remove unused var `slots'.
7103
7104 * lisp/emacs-lisp/cl-generic.el (loadhist-unload-element): Define
7105 unload method for cl-defmethod.
7106 (cl-generic-ensure-function): Remove redundant `defalias'.
7107
7108 * lisp/emacs-lisp/ert.el (ert-set-test): Move the current-load-list
7109 setting here...
7110 (ert-deftest): ...from here.
7111 (loadhist-unload-element): Define unload method for ert-deftest.
7112
71132017-07-24 Michael Albinus <michael.albinus@gmx.de>
7114
7115 Fix Bug#27371
7116
7117 * lisp/loadhist.el (loadhist-unload-element): Declare for
7118 different entry types of `load-history'.
7119 (loadhist--restore-autoload): New variable.
7120 (loadhist--unload-function): New defun.
7121 (unload-feature): Use `loadhist-unload-element'. Recommended by
7122 Stefan Monnier. (Bug#27371)
7123
7124 * test/lisp/net/tramp-tests.el (tramp-test39-unload):
7125 Check, that the `tramp-file-name' structure has been unloaded.
7126
71272017-07-24 Grégoire Jadi <gjadi@omecha.info>
7128
7129 Ensure that we parse images right in shr.el
7130
7131 * lisp/net/shr.el (shr-image-fetched): Go back to the
7132 beginning of the buffer before trying to parse the image
7133 fetched.
7134
71352017-07-24 Paul Eggert <eggert@cs.ucla.edu>
7136
7137 Update .gitignore for Valgrind and no Automake
7138
7139 * .gitignore: Remove .deps/ since we no longer use Automake.
7140 Add vgcore.*[0-9], for debugging Emacs with Valgrind+GDB.
7141
71422017-07-24 Paul Eggert <eggert@cs.ucla.edu>
7143
7144 Merge from gnulib
7145
7146 This incorporates:
7147 2017-07-23 Rename module 'strftime' to 'nstrftime'
7148 * admin/merge-gnulib (GNULIB_MODULES): Add nstrftime, remove strftime.
7149 * build-aux/config.guess: Copy from gnulib.
7150 * lib/nstrftime.c: Rename from lib/strftime.c.
7151 * m4/nstrftime.m4: Rename from m4/strftime.m4.
7152 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
7153
71542017-07-23 Philipp Stephani <phst@google.com>
7155
7156 Add 'rx' pattern for pcase.
7157
7158 * lisp/emacs-lisp/rx.el (rx): New pcase macro.
7159 * test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add unit test.
7160
71612017-07-23 Mark Oteiza <mvoteiza@udel.edu>
7162
7163 Use a named function for global minor mode turn-on argument
7164
7165 * lisp/display-line-numbers.el (turn-on-display-line-numbers-mode):
7166 New function.
7167 (global-display-line-numbers-mode): Use it.
7168
71692017-07-23 Charles A. Roelli <charles@aurox.ch>
7170
7171 Enable GUI Emacs without 'make install' on macOS (Bug #27645)
7172
7173 * nextstep/INSTALL: Correct it, and mention that Emacs can be run
7174 from 'src/emacs'.
7175
7176 * src/nsterm.m (applicationDidFinishLaunching:): When Emacs is
7177 launched outside of a macOS application bundle, change its
7178 activation policy from the default 'prohibited' to 'regular'.
7179
71802017-07-23 Alan Mackenzie <acm@muc.de>
7181
7182 Convert CC Mode's c-found-types from an obarray to a hash table.
7183
7184 * lisp/progmodes/cc-engine.el (c-clear-found-types): create a hash table
7185 rather than an obarray.
7186 (c-copy-found-types): Remove.
7187 (c-add-type, c-unfind-type, c-check-type, c-list-found-types): Amend to use
7188 the new hash table.
7189 (c-forward-<>-arglist): Use copy-hash-table rather than c-copy-found-types.
7190
71912017-07-23 Lars Ingebrigtsen <larsi@gnus.org>
7192
7193 Fix image/svg+xml display in shr
7194
7195 * lisp/net/shr.el (shr-put-image): Display svg images as svg
7196 (bug#27799). I suspect the previous change was checked in by
7197 accident in conjuction with some other svg changes.
7198
71992017-07-23 Michael Albinus <michael.albinus@gmx.de>
7200
7201 * lisp/display-line-numbers.el (display-line-numbers-type): Autoload it.
7202
72032017-07-23 Glenn Morris <rgm@gnu.org>
7204
7205 Don't automatically enable Gconf if Gsettings was found
7206
7207 * configure.ac (HAVE_GCONF) [HAVE_GSETTINGS]:
7208 Don't test for Gconf unless specifically requested.
7209 Gconf was deprecated in favor of Gsettings several years ago.
7210
72112017-07-23 Glenn Morris <rgm@gnu.org>
7212
7213 * configure.ac (MODULES_SUFFIX): Always give it a value.
7214
7215 This prevents a Makefile thinko like "rm *${MODULE_SUFFIX}".
7216
72172017-07-23 Glenn Morris <rgm@gnu.org>
7218
7219 * doc/emacs/frames.texi (Fonts): Mention Gsettings.
7220
72212017-07-22 Michael Albinus <michael.albinus@gmx.de>
7222
7223 Add line numbers display to the Options menu
7224
7225 * lisp/menu-bar.el (toggle-display-line-numbers): Remove.
7226 (menu-bar-display-line-numbers-mode): New defun.
7227 (menu-bar-showhide-line-numbers-menu): New defvar.
7228 (menu-bar-showhide-menu): Use `menu-bar-showhide-line-numbers-menu'
7229
72302017-07-22 Noam Postavsky <npostavs@gmail.com>
7231
7232 Signal error for symbol names with strange quotes (Bug#2967)
7233
7234 * src/lread.c (read1): Signal an error when a symbol starts with a
7235 non-escaped quote-like character.
7236 * test/src/lread-tests.el (lread-tests--funny-quote-symbols): New
7237 test.
7238 * etc/NEWS: Announce change.
7239
72402017-07-22 Noam Postavsky <npostavs@gmail.com>
7241
7242 Revert "Let delete-selection-mode work with popup-menu commands (Bug#27569)"
7243
7244 It turns out that this change is not needed, and it leaves several
7245 command loops settings not done.
7246
7247 https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00757.html
7248 https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00840.html
7249
72502017-07-22 Alexander Gramiak <agrambot@gmail.com>
7251
7252 Add a minor mode interface for display-line-numbers
7253
7254 * lisp/cus-start.el: Use the new display-line-numbers group.
7255 * lisp/display-line-numbers.el: New file.
7256
7257 * doc/emacs/custom.texi (Init Rebinding): Re-add entry that used to
7258 belong to linum-mode.
7259 * doc/emacs/modes.texi (Minor Modes): Summarize the mode.
7260 * etc/NEWS: Document display-line-numbers-mode and its customization
7261 variables, and mention that display-line-numbers-width is
7262 buffer-local.
7263
7264 * src/xdisp.c (syms_of_xdisp) <display-line-numbers-width>: Fix a
7265 typo.
7266
72672017-07-22 vividsnow <vividsnow@gmail.com> (tiny change)
7268
7269 Support indented HERE-DOCs in cperl-mode
7270
7271 * lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Support
7272 indented here-docs. (Bug#27254) (Bug#27697)
7273
72742017-07-22 Eli Zaretskii <eliz@gnu.org>
7275
7276 Document the support for "scrollBar" X resource
7277
7278 * doc/emacs/xresources.texi (Table of Resources): Document the new
7279 'scrollBar' setting.
7280 * etc/NEWS: Document the new 'scrollBar' setting.
7281
72822017-07-22 Matthew Bauer <mjbauer95@gmail.com> (tiny change)
7283
7284 Add 'scroll-bar-mode' to settings in 'x-apply-session-resources'
7285
7286 * lisp/startup.el (x-apply-session-resources): Add scroll-bar-mode
7287 settings.
7288
72892017-07-22 Alexander Kuleshov <kuleshovmail@gmail.com>
7290
7291 Update ld-script mode (bug#27629)
7292
7293 * lisp/progmodes/ld-script.el: (ld-script-keywords): New commands
7294 NOCROSSREFS_TO and HIDDEN added. Fix documentation sections
7295 numbers for PROVIDE/PROVIDE_HIDDEN commands.
7296 (ld-script-builtins): New builtin function LOG2CEIL added.
7297
72982017-07-22 Eli Zaretskii <eliz@gnu.org>
7299
7300 Index 'rectangle' in the ELisp manual
7301
7302 * doc/lispref/text.texi (Registers): Index the "rectangle" value.
7303 (Bug#27541)
7304
73052017-07-22 Eli Zaretskii <eliz@gnu.org>
7306
7307 * lisp/subr.el (add-to-history): Doc fix. (Bug#27494)
7308
73092017-07-22 Eli Zaretskii <eliz@gnu.org>
7310
7311 Doc fixes for kmacro.el functions
7312
7313 * lisp/kmacro.el (kmacro-start-macro, kmacro-call-macro)
7314 (kmacro-end-and-call-macro): Don't use "permanent name", as that
7315 could be misinterpreted. (Bug#27492)
7316
73172017-07-22 Charles A. Roelli <charles@aurox.ch>
7318
7319 ElDoc: add docstrings and minor refactoring
7320
7321 * lisp/emacs-lisp/eldoc.el (eldoc-edit-message-commands): Add
7322 docstring.
7323 (turn-on-eldoc-mode): Fix capitalization.
7324 (eldoc--supported-p): Add docstring.
7325 (eldoc-schedule-timer): Add docstring and use
7326 'eldoc--supported-p'.
7327 (eldoc-message): Add docstring and make calling convention
7328 clearer.
7329 (eldoc--message-command-p):
7330 (eldoc-pre-command-refresh-echo-area):
7331 (eldoc-display-message-p):
7332 (eldoc-display-message-no-interference-p):
7333 (eldoc-print-current-symbol-info):
7334 (eldoc-docstring-format-sym-doc):
7335 (eldoc-add-command, eldoc-add-command-completions):
7336 (eldoc-remove-command, eldoc-remove-command-completions):
7337 Add docstring. (Bug#27230)
7338
73392017-07-22 Fabrice Bauzac <libnoon@gmail.com> (tiny change)
7340
7341 Mention 'C-M-i' as key binding for 'ispell-complete-word'
7342
7343 * doc/emacs/fixit.texi (Spelling): ispell-complete-word
7344 can also be invoked by C-M-i. (Bug#27349)
7345
73462017-07-22 Fabrice Bauzac <libnoon@gmail.com> (tiny change)
7347
7348 Fix the eww-search-words description in the Emacs manual
7349
7350 * doc/emacs/search.texi (Word Search):
7351 Include the key binding for eww-search-words in the manual.
7352 Fix the spelling of the 'eww-search-words' command.
7353
73542017-07-22 Andrew L. Moore <slewsys@gmail.com>
7355
7356 Introduce defcustom 'executable-prefix-env'
7357
7358 * lisp/progmodes/executable.el (executable-prefix): Update the doc
7359 string.
7360 (executable-prefix-env): New defcustom.
7361 (executable-set-magic): Use executable-prefix-env.
7362
7363 * etc/NEWS: Document the new variable.
7364
73652017-07-22 Glenn Morris <rgm@gnu.org>
7366
7367 * test/lisp/ibuffer-tests.el: Delete temporary files.
7368
73692017-07-21 Glenn Morris <rgm@gnu.org>
7370
7371 Further attempt to avoid hang in network-stream-tests
7372
7373 * test/lisp/net/network-stream-tests.el (connect-to-tls-ipv6-nowait):
7374 Limit the time we wait for the external process.
7375
73762017-07-21 Glenn Morris <rgm@gnu.org>
7377
7378 Stop skipping many ibuffer tests by default
7379
7380 * test/lisp/ibuffer-tests.el (ibuffer-0autoload):
7381 Rename so it sorts first.
7382 (ibuffer-save-filters, ibuffer-filter-inclusion-1)
7383 (ibuffer-filter-inclusion-2, ibuffer-filter-inclusion-3)
7384 (ibuffer-filter-inclusion-4, ibuffer-filter-inclusion-5)
7385 (ibuffer-filter-inclusion-6, ibuffer-filter-inclusion-7)
7386 (ibuffer-filter-inclusion-8, ibuffer-decompose-filter)
7387 (ibuffer-and-filter, ibuffer-or-filter, ibuffer-format-qualifier)
7388 (ibuffer-unary-operand): Require ibuf-ext so tests not skipped.
7389
73902017-07-21 Stefan Monnier <monnier@iro.umontreal.ca>
7391
7392 Use lexical-binding in todo-mode.el
7393
7394 Adjust code accordingly and make various minor improvements.
7395
7396 * lisp/calendar/todo-mode.el: Enable lexical-binding.
7397 (dayname, monthname, day, month, year): Make forward defvars
7398 of these keywords from macros defined in calendar.el; wrap
7399 them in with-no-warnings.
7400 (todo-files, todo-files-function, todo-date-pattern)
7401 (todo-mode-line-function, todo-show, todo-forward-category)
7402 (todo-edit-item--header, todo-set-category-number)
7403 (todo-adjusted-category-label-length)
7404 (todo-total-item-counts, todo-filter-items)
7405 (todo-print-buffer-function, todo-convert-legacy-date-time)
7406 (todo-category-number, todo-category-completions)
7407 (todo-read-file-name, todo-read-category)
7408 (todo-validate-name, todo-read-date)
7409 (todo-set-show-current-file, todo-modes-set-1)
7410 (todo-modes-set-2, todo-modes-set-3, todo-mode):
7411 Use #' instead of ' to quote functions.
7412 (todo-files): Use \' instead of $ in regexp.
7413 (todo--files-type-list): New function.
7414 (todo-default-todo-file, todo-category-completions-files)
7415 (todo-filter-files, todo-multiple-filter-files)
7416 (todo-reevaluate-default-file-defcustom)
7417 (todo-reevaluate-category-completions-files-defcustom)
7418 (todo-reevaluate-filter-files-defcustom): Use it.
7419 (todo-show, todo-rename-file, todo-move-category)
7420 (todo-edit-item--text, todo-edit-quit, todo-edit-item--header)
7421 (todo-item-undone, todo-unarchive-items, todo-search)
7422 (todo-filter-items, todo-filter-items-1, todo-find-item)
7423 (todo-category-select, todo-read-date)
7424 (todo-nondiary-marker-matcher, todo-date-string-matcher)
7425 (todo-diary-expired-matcher, todo-convert-legacy-files)
7426 (todo-read-category): Reformat to avoid code hiding behind a
7427 more deeply embedded element.
7428 (todo-forward-category, todo-set-category-number):
7429 Use 'funcall' instead of 'apply'.
7430 (todo-toggle-mark-item, todo-edit-item--diary-inclusion)
7431 (todo-edit-category-diary-inclusion)
7432 (todo-insert-sort-button, todo-insert-category-line)
7433 (todo-multiple-filter-files): Mark unused local variables.
7434 (todo-edit-item--header, todo-move-item, todo-print-buffer)
7435 (todo-edit-item--header, todo-move-item, todo-check-file)
7436 (todo-edit-item--next-key): Remove unused local variables.
7437 (todo-insert-sort-button, todo-insert-category-line):
7438 Use a closure instead of a backquoted lambda.
7439 (todo-update-categories-display, todo-print-buffer): Simplify code.
7440 (todo-print-buffer-function): Document calling convention.
7441 (todo-category-completions): Use cl-pushnew instead of add-to-list.
7442 (todo-mode-map, todo-archive-mode-map)
7443 (todo-categories-mode-map, todo-filtered-items-mode-map):
7444 Remove superfluous call of suppress-keymap, since it's already
7445 in the parent special-mode-map.
7446
74472017-07-21 Tino Calancha <tino.calancha@gmail.com>
7448
7449 dired: Revert buffer when DIRNAME is a cons
7450
7451 * lisp/dired.el (dired-internal-noselect): Revert buffer if DIR-OR-LIST
7452 is a cons, or dired-directory is a cons and DIR-OR-LIST a string (Bug#7131).
7453 Update the comments.
7454 * test/lisp/dired-tests.el (dired-test-bug7131): Test should pass.
7455
74562017-07-21 Tino Calancha <tino.calancha@gmail.com>
7457
7458 Handle when dired-directory is a cons in some Dired functions
7459
7460 * lisp/dired-aux.el (dired-rename-subdir-1)
7461 * lisp/dired-x.el (dired-mark-omitted):
7462 Handle when dired-directory is a cons.
7463
74642017-07-21 Noam Postavsky <npostavs@gmail.com>
7465
7466 Make eshell-next-prompt more reliable (Bug#27405)
7467
7468 * lisp/eshell/em-prompt.el (eshell-next-prompt): Search for
7469 `eshell-prompt-regexp' (and `read-only' text-property if
7470 `eshell-highlight-prompt' is set) rather than trying to use
7471 `forward-paragraph'.
7472 (eshell-previous-prompt): Don't count prompt on current line.
7473
74742017-07-21 Paul Eggert <eggert@cs.ucla.edu>
7475
7476 Simplify recent gnutls.c changes
7477
7478 * src/gnutls.c (clear_storage) [HAVE_GNUTLS3_AEAD]: Remove.
7479 All uses replaced by calls to explicit_bzero; that’s clear enough.
7480 (gnutls_symmetric_aead) [HAVE_GNUTLS3_AEAD]: Simplify by
7481 coalescing duplicate actions. There is no need to invoke
7482 SAFE_FREE before calling ‘error’.
7483
74842017-07-20 Michael Albinus <michael.albinus@gmx.de>
7485
7486 Stylistic changes in tramp-cache.el
7487
7488 * test/lisp/net/tramp-cache.el (tramp-get-file-property)
7489 (tramp-set-file-property): Use `bound-and-true-p'. Add
7490 counter variables to `tramp-cache-unload-hook'.
7491
74922017-07-20 Glenn Morris <rgm@gnu.org>
7493
7494 * admin/notes/hydra: Small updates.
7495
74962017-07-20 Glenn Morris <rgm@gnu.org>
7497
7498 Make tramp unloading handle debug counter variables
7499
7500 * lisp/net/tramp-cache.el (tramp-get-file-property)
7501 (tramp-set-file-property): Add counter variables to tramp-unload-hook.
7502
75032017-07-20 Eli Zaretskii <eliz@gnu.org>
7504
7505 Fix hscrolling calculations when display-line-numbers is set
7506
7507 * src/xdisp.c (move_it_in_display_line_to): Account for line
7508 numbers in hscrolled lines. (Bug#27756)
7509
75102017-07-20 Katsumi Yamaoka <yamaoka@jpl.org>
7511
7512 Fix the bogus change made 13 years ago (bug#27084)
7513
7514 * lisp/gnus/gnus-sum.el (gnus-summary-toggle-header):
7515 Fix the way to test if there is no visible header (bug#27084).
7516
75172017-07-20 Noam Postavsky <npostavs@gmail.com>
7518
7519 Use grep's --null option (Bug#6843)
7520
7521 * lisp/progmodes/grep.el (grep-use-null-filename-separator): New option.
7522 (grep--regexp-alist-column, grep--regexp-alist-bin-matcher)
7523 (grep-with-null-regexp-alist, grep-fallback-regexp-alist): New
7524 constants, replacing `grep-regexp-alist'.
7525 (grep-regex-alist): Mark the variable obsolete, add a new function of
7526 the same name to replace it.
7527 (grep-compute-defaults): Compute default for
7528 `grep-use-null-filename-separator'.
7529 (grep-mode): Set compilation-error-regexp-alist (buffer locally) to the
7530 value of `grep-with-null-regexp-alist' or `grep-fallback-regexp-alist'
7531 according to `grep-use-null-filename-separator'.
7532 * lisp/progmodes/xref.el (xref-collect-matches): Call
7533 `grep-regex-alist' instead of the obsolete variable. Don't hardcode
7534 grep-regexp-alist match groups.
7535 * etc/NEWS: Announce new use of --null. Move 'grep-save-buffers'
7536 item under "Grep" heading as well.
7537
75382017-07-19 Philipp Stephani <phst@google.com>
7539
7540 * src/gnutls.c (clear_storage): Define only if needed.
7541
75422017-07-19 Stephen Berman <stephen.berman@gmx.net>
7543
7544 Adjust todo-quit to recent change in dired
7545
7546 * lisp/calendar/todo-mode.el (todo-quit): Use quit-window instead of
7547 bury-buffer to exit todo-mode. This restores the desired behavior
7548 of not immediately returning to the exited todo-mode buffer on
7549 quitting another buffer, which a dired bug fix had changed (see
7550 http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00739.html).
7551
75522017-07-19 Tino Calancha <tino.calancha@gmail.com>
7553
7554 Add test for bugs 7131, 27762
7555
7556 Require 'ls-lisp' at top of the file.
7557 * test/lisp/dired-tests.el (dired-test-bug7131, dired-test-bug27762):
7558 New tests.
7559 (dired-test-bug27693): Delete Dired buffer at the end.
7560
75612017-07-18 Michael Albinus <michael.albinus@gmx.de>
7562
7563 * admin/notes/hydra: Mention environment variable EMACS_HYDRA_CI.
7564
75652017-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
7566
7567 * lisp/emacs-lisp/nadvice.el (advice--defalias-fset): Strip advices
7568
7569 This tries to make sure that (defalias F (symbol-function F)) stays a no-op.
7570
75712017-07-18 Glenn Morris <rgm@gnu.org>
7572
7573 Use a more specific test for running on hydra.nixos.org
7574
7575 * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
7576 * test/Makefile.in (WRITE_LOG):
7577 * test/lisp/filenotify-tests.el:
7578 * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
7579 (eieio-test-method-order-list-6):
7580 * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
7581 (eieio-test-37-obsolete-name-in-constructor):
7582 * test/lisp/net/tramp-tests.el: Replace NIX_STORE with EMACS_HYDRA_CI.
7583
75842017-07-18 Eli Zaretskii <eliz@gnu.org>
7585
7586 Avoid infloop due to Eshell's "smart" redisplay
7587
7588 * src/xdisp.c (pos_visible_p): Save and restore the window's
7589 mode-line and header-line height. (Bug#27752)
7590
75912017-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
7592
7593 * emacs-lisp/cl-lib.el (cl--old-struct-type-of): Accept `[]'
7594
75952017-07-18 Eli Zaretskii <eliz@gnu.org>
7596
7597 Fix indentation when display-line-numbers is non-nil
7598
7599 * src/xdisp.c (x_produce_glyphs): Fix a typo in deciding whether
7600 to go one more tab stop to display a TAB. (Bug#27743)
7601
76022017-07-18 Lars Ingebrigtsen <larsi@gnus.org>
7603
7604 Don't use gtk_widget_get_scale_factor on old GTK3 versions
7605
7606 * src/gtkutil.c (xg_get_scale): gtk_widget_get_scale_factor is
7607 only present since GTK 3.10.
7608
76092017-07-18 Noam Postavsky <npostavs@gmail.com>
7610
7611 Let delete-selection-mode work with popup-menu commands (Bug#27569)
7612
7613 * lisp/menu-bar.el (popup-menu): Run `pre-command-hook' with
7614 `this-command' set to the selected command.
7615
76162017-07-18 Paul Eggert <eggert@cs.ucla.edu>
7617
7618 Port gnutls.c to older (buggier?) GnuTLS
7619
7620 Problem reported for GnuTLS 3.2.1 by Glenn Morris in:
7621 http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00716.html
7622 http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00742.html
7623 Although I don't see how this bug can occur with vanilla GnuTLS 3.2.1,
7624 perhaps hydra was using a modified GnuTLS.
7625 * src/gnutls.c (Fgnutls_ciphers): Don't assume GNUTLS_CIPHER_NULL
7626 is at the end of the list returned by gnutls_cipher_list,
7627 or that the earlier ciphers all have non-null names.
7628
76292017-07-17 Vincent Belaïche <vincentb1@users.sourceforge.net>
7630
7631 Fix relocation with named cell referred to by a one-symbol formula.
7632
7633 * lisp/ses.el (ses-replace-name-in-formula): Fix bug for it to
7634 work also with one symbol formulas.
7635
7636 * test/lisp/ses-tests.el
7637 (ses-tests-renaming-cell-with-one-symbol-formula): Add new
7638 test for renaming with relocating a one symbol formula.
7639
76402017-07-17 Vincent Belaïche <vincentb1@users.sourceforge.net>
7641
7642 Fix symbol completion and document it.
7643
7644 * doc/misc/ses.texi (Configuring what printer function
7645 applies): Add description of keys for completing local printer
7646 symbols and listing local printers in a help buffer.
7647 (Formulas): Add decription for key to list the named cell
7648 symbols in a help buffer.
7649
7650 * lisp/ses.el (ses-completion-keys): New constant.
7651 (ses--completion-table): New defvar.
7652 (ses--list-orig-buffer): New defvar.
7653 (ses-mode-edit-map): Fixed for symbol completion, plus add
7654 help functions to list named cells or local printers.
7655 (ses-edit-cell-complete-symbol)
7656 (ses--edit-cell-completion-at-point-function): New defuns for
7657 completion during formula edition.
7658 (ses-edit-cell): Redefine dynamically edit keymap for
7659 completion keys to point at the right function.
7660 (ses-read-printer-complete-symbol)
7661 (ses--read-printer-completion-at-point-function): New defuns
7662 for completion during printer edition.
7663 (ses-read-printer): Redefine dynamically edit keymap for
7664 completion keys to point at the right function.
7665 (ses-list-local-printers): New defun.
7666 (ses-list-named-cells): New defun.
7667
76682017-07-17 Lars Ingebrigtsen <larsi@gnus.org>
7669
7670 Move comments around
7671
76722017-07-17 Lars Ingebrigtsen <larsi@gnus.org>
7673
7674 Make scaling work (?) on pre-GTK3 systems
7675
7676 * src/gtkutil.c (xg_get_gdk_scale): Reinstate function.
7677 (xg_get_scale): Use it on non-GTK3 systems.
7678
76792017-07-17 Lars Ingebrigtsen <larsi@gnus.org>
7680
7681 Always return the GDK scale
7682
7683 * src/gtkutil.c (xg_get_scale): Return the GDK scale always.
7684
76852017-07-17 Lars Ingebrigtsen <larsi@gnus.org>
7686
7687 Remove usage of the GDK_SCALE variable
7688
7689 * src/gtkutil.c (xg_get_gdk_scale): Remove.
7690 (xg_get_default_scrollbar_height)
7691 (xg_get_default_scrollbar_width): Pass in a frame to check for
7692 scaling.
7693 (xg_frame_set_char_size): Use the API for querying scale
7694 instead of looking at the GDK_SCALE variable.
7695 (xg_get_default_scrollbar_width): Ditto.
7696 (xg_get_default_scrollbar_height): Ditto.
7697 (xg_update_scrollbar_pos): Ditto.
7698
7699 * src/xfns.c (x_set_scroll_bar_default_height): Pass in the
7700 frame to get the width.
7701
77022017-07-17 Lars Ingebrigtsen <larsi@gnus.org>
7703
7704 Get positions of menus and tooltips right on HiDPI
7705
7706 * src/gtkutil.c (xg_get_scale): New function.
7707 (xg_show_tooltip): Use it.
7708
7709 * src/xmenu.c (create_and_show_popup_menu): Put menus in the
7710 right place.
7711
77122017-07-17 Eli Zaretskii <eliz@gnu.org>
7713
7714 Allow user control on what starts and ends a paragraph for bidi
7715
7716 * src/buffer.h (struct buffer): New members
7717 bidi_paragraph_separate_re_ and bidi_paragraph_start_re_.
7718 * src/buffer.c (bset_bidi_paragraph_start_re)
7719 (bset_bidi_paragraph_separate_re): New setters/
7720 (Fbuffer_swap_text): Swap the values of bidi-paragraph-start-re and
7721 bidi-paragraph-separate-re.
7722 (init_buffer_once): Init the values of bidi-paragraph-start-re and
7723 bidi-paragraph-separate-re.
7724 (syms_of_buffer) <bidi-paragraph-start-re, bidi-paragraph-separate-re>:
7725 New per-buffer variables.
7726 * src/bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start):
7727 Support bidi-paragraph-start-re and bidi-paragraph-separate-re.
7728 (bidi_move_to_visually_next): Handle correctly the case when the
7729 separator matches an empty string. (Bug#27526)
7730
7731 * doc/emacs/mule.texi (Bidirectional Editing):
7732 * doc/lispref/display.texi (Bidirectional Display): Document
7733 bidi-paragraph-start-re and bidi-paragraph-separate-re.
7734
7735 * etc/NEWS: Mention bidi-paragraph-start-re and
7736 bidi-paragraph-separate-re.
7737
77382017-07-17 Tino Calancha <tino.calancha@gmail.com>
7739
7740 * lisp/emacs-lisp/map.el (map-put): Fix redundancy in docstring.
7741
77422017-07-17 Tino Calancha <tino.calancha@gmail.com>
7743
7744 alist-get: Add optional arg TESTFN
7745
7746 If TESTFN is non-nil, then it is the predicate to lookup
7747 the alist. Otherwise, use 'eq' (Bug#27584).
7748 * lisp/subr.el (alist-get): Add optional arg FULL.
7749 * lisp/emacs-lisp/map.el (map-elt, map-put): Add optional arg TESTFN.
7750 * lisp/emacs-lisp/gv.el (alist-get): Update expander.
7751 * doc/lispref/lists.texi (Association Lists): Update manual.
7752 * etc/NEWS: Announce the changes.
7753 * test/lisp/emacs-lisp/map-tests.el (test-map-put-testfn-alist)
7754 (test-map-elt-testfn): New tests.
7755
77562017-07-17 Michael Albinus <michael.albinus@gmx.de>
7757
7758 Fix `tramp-test39-unload'
7759
7760 * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case-p)
7761 (tramp--test-instrument-test-case): Rename. Adapt all callees.
7762 (tramp-test36-asynchronous-requests): Bind `timer-max-repeats'.
7763 (tramp-test39-unload): Expect it to pass. Ignore buffer-local
7764 variables and autoload functions; they are not removed. Check
7765 also for `-function(s)'.
7766
77672017-07-17 Stephen Berman <stephen.berman@gmx.net>
7768
7769 Preserve point under 'dired-auto-revert-buffer' (second case)
7770
7771 * lisp/dired.el (dired): Use pop-to-buffer-same-window instead
7772 of switch-to-buffer. This preserves Dired window point when
7773 dired-auto-revert-buffer is non-nil. (Bug#27243)
7774
7775 * test/lisp/dired-tests.el (dired-test-bug27243): New test.
7776
77772017-07-17 Martin Rudalics <rudalics@gmx.at>
7778
7779 Have Fgnutls_available_p return Qnil when GNUTLS is undefined
7780
7781 * src/gnutls.c (Fgnutls_available_p): Return Qnil when GNUTLS is
7782 undefined to allow --with-gnutls=no builds to proceed.
7783
77842017-07-17 Paul Eggert <eggert@cs.ucla.edu>
7785
7786 * src/gnutls.c: Restore some comments.
7787
77882017-07-17 Paul Eggert <eggert@cs.ucla.edu>
7789
7790 Use memset, not bzero
7791
7792 * src/ftcrfont.c (ftcrfont_glyph_extents): Use memset instead
7793 of the (less-portable) bzero.
7794
77952017-07-17 Paul Eggert <eggert@cs.ucla.edu>
7796
7797 Use explicit_bzero to clear GnuTLS keys
7798
7799 * admin/merge-gnulib (GNULIB_MODULES): Add explicit_bzero.
7800 * lib/explicit_bzero.c, m4/explicit_bzero.m4: New files.
7801 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
7802 * src/gnutls.c (clear_storage): New function.
7803 (gnutls_symmetric_aead): Use it instead of memset.
7804
78052017-07-17 Paul Eggert <eggert@cs.ucla.edu>
7806
7807 Merge from gnulib
7808
7809 This incorporates:
7810 2017-07-16 explicit_bzero: new module
7811 2017-07-15 getdtablesize: Add minimal support for OpenVMS.
7812 * lib/getdtablesize.c, lib/string.in.h, m4/getdtablesize.m4:
7813 * m4/string_h.m4:
7814 Copy from Gnulib.
7815 * lib/gnulib.mk.in: Regenerate.
7816
78172017-07-17 Dieter Deyke <dieter.deyke@gmail.com>
7818
7819 Fix vc-src-dir-status-files
7820
7821 * lisp/vc/vc-src.el (vc-src-dir-status-files): Fix broken
7822 copy-paste from b1a765b3 (bug#27641).
7823
78242017-07-16 Wilfred Hughes <me@wilfred.me.uk>
7825
7826 Fix mismatched parens
7827
7828 * etc/NEWS.21: Remove excess parenthesis in code example
7829
78302017-07-16 Alan Third <alan@idiocy.org>
7831
7832 Add missing declare-function for new function
7833
7834 * lisp/frame.el: Add declare function for
7835 ns-mouse-absolute-pixel-position.
7836
78372017-07-16 R. Bernstein <rocky@gnu.org>
7838
7839 Realgud for tango themes
7840
78412017-07-16 Noam Postavsky <npostavs@gmail.com>
7842
7843 Fix test when running from test/lisp/subr-tests.elc
7844
7845 * test/lisp/subr-tests.el (subr-test-backtrace-simple-tests): Don't
7846 assume a lambda expression will be `equal' to its quoted form. That's
7847 not true if the lambda expression has been compiled.
7848
78492017-07-15 Alan Third <alan@idiocy.org>
7850
7851 Fix some frame handling issues on NS
7852
7853 * lisp/frame.el (mouse-absolute-pixel-position): Use new NS function.
7854 * src/nsfns.m (Sns_mouse_absolute_pixel_position): New function.
7855 * src/nsterm.m (x_make_frame_visible): Re-establish parent-child
7856 relationship if it's broken.
7857
78582017-07-15 Tino Calancha <tino.calancha@gmail.com>
7859
7860 ls-lisp: Fix file size format
7861
7862 * lisp/ls-lisp.el (ls-lisp-filesize-d-fmt, ls-lisp-filesize-f-fmt)
7863 (ls-lisp-filesize-b-fmt): Add space in front (Bug#27693).
7864 * test/lisp/dired-tests.el (dired-test-bug27693): Add test.
7865
78662017-07-15 Eli Zaretskii <eliz@gnu.org>
7867
7868 Avoid link errors with older versions of GnuTLS
7869
7870 * src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
7871 (Fgnutls_macs, Fgnutls_digests): Conditionally compile code that
7872 calls GnuTLS functions which might be unavailable in older
7873 versions of GnuTLS.
7874
78752017-07-15 Eli Zaretskii <eliz@gnu.org>
7876
7877 Improve comments in faces.el
7878
7879 * lisp/faces.el (face-font-family-alternatives): Improve
7880 commentary.
7881
78822017-07-15 Eli Zaretskii <eliz@gnu.org>
7883
7884 Improve some GnuTL error messages
7885
7886 * src/gnutls.c (gnutls_symmetric_aead, gnutls_symmetric):
7887 * src/fns.c (Fsecure_hash_algorithms): Fix error messages.
7888
78892017-07-15 Eli Zaretskii <eliz@gnu.org>
7890
7891 Fix the Elisp manual wrt GnuTL cryptography
7892
7893 * doc/lispref/elisp.texi (Top): Update the master menu.
7894 * doc/lispref/text.texi (GnuTLS Cryptography): Add a @menu, to
7895 avoid errors in makeinfo.
7896
78972017-07-15 Eli Zaretskii <eliz@gnu.org>
7898
7899 Fix compilation of gnutls.c with older GnuTLS
7900
7901 * src/gnutrls.c (syms_of_gnutls): Condition some defsubr's
7902 on HAVE_GNUTLS3, to avoid compilation errors when GnuTLS
7903 v3.X is not available. Reported by Colin Baxter <m43cap@yandex.com>.
7904
79052017-07-15 rocky <rb@dustyfeet.com>
7906
7907 Realgud for two more light themes
7908
79092017-07-15 Eli Zaretskii <eliz@gnu.org>
7910
7911 Rearrange MS-Windows code that dynamically loads GnuTLS functions
7912
7913 * src/gnutls.c [WINDOWSNT]: Reorganize definitions and loading
7914 of functions using the same preprocessing directives as in the code.
7915
79162017-07-15 Eli Zaretskii <eliz@gnu.org>
7917
7918 Fix the MS-Windows build broken in gnutls.c
7919
7920 * src/gnutls.c (Fgnutls_available_p) [WINDOWSNT]: Move the DLL
7921 loading code to after 'capabilities' has been calculated. Remove
7922 redundant comments.
7923
79242017-07-15 Lars Ingebrigtsen <larsi@gnus.org>
7925
7926 src/image.c (compute_image_size): Remove superfluous checks.
7927
7928 * src/image.c (compute_image_size): Remove superfluous checks.
7929
79302017-07-15 Lars Ingebrigtsen <larsi@gnus.org>
7931
7932 Make combinations of :width/:max-height image specs work reliably
7933
7934 * doc/lispref/display.texi (ImageMagick Images): Document
7935 :width/:max-height combinations (etc) (bug #25583).
7936
7937 * src/image.c (compute_image_size): Handle :width/:max-height
7938 (etc) combinations consistently (by letting "max" win and
7939 preserve ratio).
7940
7941 * test/manual/image-size-tests.el (image-size-tests): Add
7942 tests for :width/:max-height (etc) combinations.
7943
79442017-07-15 Glenn Morris <rgm@gnu.org>
7945
7946 Fix recent theme changes
7947
7948 * etc/themes/manoj-dark-theme.el, etc/themes/tsdh-dark-theme.el:
7949 Fix typos in recent changes.
7950
79512017-07-15 Paul Eggert <eggert@cs.ucla.edu>
7952
7953 GnuTLS integer-overflow and style fixes
7954
7955 This tweaks the recently-added GnuTLS improvements so that
7956 they avoid some integer-overflow problems and follow typical
7957 Emacs style a bit better.
7958 * configure.ac (HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD)
7959 (HAVE_GNUTLS3_CIPHER): Use AC_CACHE_CHECK so that the
7960 configure-time results are displayed.
7961 * src/fns.c (extract_data_from_object): Return char *, not char
7962 const *, since one gnutls caller wants a non-const pointer. Use
7963 CONSP rather than !NILP when testing for conses. Use CAR_SAFE
7964 instead of rolling our own code. Prefer signed types to unsigned
7965 when either will do. Report problems for lengths out of range,
7966 instead of silently mishandling them.
7967 * src/gnutls.c (emacs_gnutls_strerror): New function, to simplify
7968 callers. All callers of gnutls_sterror changed.
7969 (Fgnutls_boot): Check for integers out of range rather than
7970 silently truncating them.
7971 (gnutls_symmetric_aead): Check for integer overflow in size
7972 calculations.
7973 (gnutls_symmetric_aead, Fgnutls_macs, Fgnutls_digests):
7974 Prefer signed to unsigned integers where either will do.
7975 (gnutls_symmetric_aead, gnutls_symmetric):
7976 Work even if ptrdiff_t is wider than ‘long’.
7977 (gnutls_symmetric, Fgnutls_hash_mac, Fgnutls_hash_digest):
7978 Check for integer overflow in algorithm selection.
7979
79802017-07-14 Noam Postavsky <npostavs@gmail.com>
7981
7982 * .gitlab-ci.yml: Don't install a C++ compiler. Suppress apt interaction.
7983
79842017-07-14 Eli Zaretskii <eliz@gnu.org>
7985
7986 Fix the MS-Windows build due to added GnuTLS functions
7987
7988 * src/gnutls.c [WINDOWSNT]: Add DEF_DLL_FN for new functions.
7989 (init_gnutls_functions) [WINDOWSNT]: Add LOAD_DLL_FN for new
7990 functions. Add #define redirections for new functions.
7991 (gnutls_symmetric_aead): Fix format specs to be more portable when
7992 printing ptrdiff_t arguments.
7993 * src/fns.c (gnutls_rnd) [WINDOWSNT]: Redirect to w32_gnutls_rnd
7994 wrapper.
7995 * src/gnutls.h [WINDOWSNT]: Add prototype for w32_gnutls_rnd.
7996
7997 * test/lisp/net/gnutls-tests.el (gnutls-tests-tested-macs)
7998 (gnutls-tests-tested-digests, gnutls-tests-tested-ciphers): Call
7999 gnutls-available-p, otherwise GnuTLS functions might not be loaded
8000 from the DLL on MS-Windows.
8001
80022017-07-14 Stefan Monnier <monnier@iro.umontreal.ca>
8003
8004 * lisp/emacs-lisp/bytecomp.el: Fix bug#14860.
8005
8006 * lisp/emacs-lisp/bytecomp.el (byte-compile--function-signature): New fun.
8007 Dig into advice wrappers to find the "real" signature.
8008 (byte-compile-callargs-warn, byte-compile-arglist-warn): Use it.
8009 (byte-compile-arglist-signature): Don't bother with "new-style" arglists,
8010 since bytecode functions are now handled in byte-compile--function-signature.
8011
8012 * lisp/files.el (create-file-buffer, insert-directory):
8013 Remove workaround introduced for (bug#14860).
8014
8015 * lisp/help-fns.el (help-fns--analyse-function): `nadvice` is preloaded.
8016
8017 * lisp/help.el (help-function-arglist):
8018 Dig into advice wrappers to find the "real" signature.
8019
80202017-07-14 Ted Zlatanov <tzz@lifelogs.com>
8021
8022 GnuTLS HMAC and symmetric cipher support
8023
8024 * etc/NEWS: Add news for new feature.
8025
8026 * doc/lispref/text.texi (GnuTLS Cryptography): Add
8027 documentation.
8028
8029 * configure.ac: Add macros HAVE_GNUTLS3_DIGEST,
8030 HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_AEAD, HAVE_GNUTLS3_HMAC.
8031
8032 * src/fns.c (Fsecure_hash_algorithms): Add function to list
8033 supported `secure-hash' algorithms.
8034 (extract_data_from_object): Add data extraction function that
8035 can operate on buffers and strings.
8036 (secure_hash): Use it.
8037 (Fsecure_hash): Mention `secure-hash-algorithms'.
8038
8039 * src/gnutls.h: Include gnutls/crypto.h.
8040
8041 * src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
8042 (gnutls_symmetric, Fgnutls_symmetric_encrypt, Fgnutls_symmetric_decrypt)
8043 (Fgnutls_macs, Fgnutls_digests, Fgnutls_hash_mac, Fgnutls_hash_digest)
8044 (Fgnutls_available_p): Implement GnuTLS cryptographic integration.
8045
8046 * test/lisp/net/gnutls-tests.el: Add tests.
8047
80482017-07-14 Stefan Monnier <monnier@iro.umontreal.ca>
8049
8050 * lisp/emacs-lisp/cl-lib.el (cl--random-time): Remove as well
8051
8052 It's also defined in cl-extra.el.
8053
80542017-07-14 Paul Eggert <eggert@cs.ucla.edu>
8055
8056 Do not convert ij and IJ to compatibility chars
8057
8058 * lisp/leim/quail/latin-alt.el: Omit lines for ij and IJ in Dutch.
8059 Problem reported by James Cloos (Bug#518#10).
8060
80612017-07-14 Toon Claes <toon@iotcl.com>
8062
8063 Remove Turkish ligatures from Dutch input method
8064
8065 * lisp/leim/quail/latin-alt.el: Remove Turkish ligatures (Bug#518).
8066
80672017-07-14 Paul Eggert <eggert@cs.ucla.edu>
8068
8069 Improve stack-overflow heuristic on GNU/Linux
8070
8071 Problem reported by Steve Kemp (Bug#27585).
8072 * src/eval.c (near_C_stack_top): Remove. All uses replaced
8073 by current_thread->stack_top.
8074 (record_in_backtrace): Set current_thread->stack_top.
8075 This is for when the Lisp interpreter calls itself.
8076 * src/lread.c (read1): Set current_thread->stack_top.
8077 This is for recursive s-expression reads.
8078 * src/print.c (print_object): Set current_thread->stack_top.
8079 This is for recursive s-expression printing.
8080 * src/thread.c (mark_one_thread): Get stack top first.
8081 * src/thread.h (struct thread_state.stack_top): Now void *, not char *.
8082
80832017-07-14 Paul Eggert <eggert@cs.ucla.edu>
8084
8085 Remove duplicate cl--random-state definition
8086
8087 * lisp/emacs-lisp/cl-lib.el (cl--random-state): Remove.
8088 This variable is now defined in cl-extra.el (Bug#27617).
8089
80902017-07-14 Michael Albinus <michael.albinus@gmx.de>
8091
8092 Adjust timer in tramp-test36-asynchronous-requests
8093
8094 * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests):
8095 Adjust timer if it takes too much time.
8096
80972017-07-14 Eli Zaretskii <eliz@gnu.org>
8098
8099 Always display rmail progress report under user control
8100
8101 * lisp/mail/rmail.el (rmail-show-message-1): Delete the second
8102 copy of '(message "Showing message %d..." msg)'. (Bug#27535)
8103
81042017-07-14 Eli Zaretskii <eliz@gnu.org>
8105
8106 Avoid byte-compilation warnings for advised functions
8107
8108 * lisp/files.el (insert-directory, create-file-buffer): Add an
8109 advertised-calling-convention form to shut up byte-compilation
8110 warnings. (Bug#14860)
8111
81122017-07-14 Eli Zaretskii <eliz@gnu.org>
8113
8114 Add assertion related to display-line-numbers
8115
8116 * src/xdisp.c (maybe_produce_line_number): Add assertion for the
8117 condition regarding IT->glyph_row->used[TEXT_AREA] expected by the
8118 code. (Bug#27668)
8119
81202017-07-14 Eli Zaretskii <eliz@gnu.org>
8121
8122 Prevent display corruption when display-line-numbers is set
8123
8124 * src/xdisp.c (try_window_reusing_current_matrix): If giving up
8125 due to display-line-numbers, clear the window's desired glyph
8126 matrix before returning, as the following call to try_window will
8127 call display_line, which expects rows of the desired matrix
8128 cleared. (Bug#27668)
8129
81302017-07-14 Eli Zaretskii <eliz@gnu.org>
8131
8132 Revert "Use fixed-pitch font for display-line-numbers"
8133
8134 This reverts commit d014a5e15c1110af77e7a96f06ccd0f0cafb099f.
8135 * lisp/faces.el (line-number): Don't use a fixed-pitch font, by
8136 popular demand. For relevant discussions, see
8137
8138 http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00433.html
8139 http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00445.html
8140
81412017-07-14 Paul Eggert <eggert@cs.ucla.edu>
8142
8143 Merge from gnulib
8144
8145 This incorporates:
8146 2017-07-13 Improve cross-compilation guesses for native Windows
8147 2017-07-11 More systematic m4 quoting and indentation
8148 2017-07-10 Make sure $host and $host_os are defined when used
8149 2017-07-03 stdioext: Port to OpenVMS
8150 2017-06-24 xalloc-oversized: port to icc
8151 * doc/misc/texinfo.tex, lib/fpending.c, lib/stdio-impl.h:
8152 * lib/xalloc-oversized.h, m4/dirfd.m4, m4/gettimeofday.m4:
8153 * m4/lstat.m4, m4/mktime.m4, m4/pselect.m4, m4/putenv.m4:
8154 * m4/stdint.m4, m4/strtoimax.m4, m4/utimes.m4:
8155 Copy from Gnulib.
8156
81572017-07-13 Alan Mackenzie <acm@muc.de>
8158
8159 C++ Mode. Fix anomaly occurring when a ">" is deleted then reinserted.
8160
8161 This fontification anomaly happened because after deleting the ">",
8162 c-forward-<>-arglist parses the preceding identifier as a putative type but
8163 stores it in c-found-types before it becomes clear it is not an unambiguous
8164 type. c-forward-<>-arglist fails, leaving the spurious type id in
8165 c-found-types. Fix this by "binding" c-found-types "to itself" in
8166 c-forward-<>-arglist, and restoring the original value when that function call
8167 fails.
8168
8169 * lisp/progmodes/cc-engine.el (c-copy-found-types): New function.
8170 (c-forward-<>-arglist): Record the original value of c-found-types at the
8171 beginning of the function, and restore it at the end on failure.
8172
8173 * lisp/progmodes/cc-mode.el (c-unfind-coalesced-tokens): Rewrite more
8174 accurately.
8175
81762017-07-13 Vincent Belaïche <vincentb1@users.sourceforge.net>
8177
8178 Add tests for SES, and fix one more cell renaming bug.
8179
8180 * lisp/ses.el (ses-relocate-all): In case of insertion, do not
8181 relocate value for named cells as they keep the same symbol.
8182 (ses-rename-cell): Set new cell name symbol to cell value --- do not
8183 rely on recalculating. Push cells with updated data --- cell name,
8184 cell reference list, or cell formula --- to deferred write list.
8185
8186 * test/lisp/ses-tests.el: New file, with 7 tests for SES.
8187
81882017-07-12 Alan Mackenzie <acm@muc.de>
8189
8190 Fix some bugs in c-defun-name. This fixes bug #25623.
8191
8192 * lisp/progmodes/cc-cmds.el (c-defun-name): Fix some bugs to do with structs,
8193 etc.
8194
81952017-07-12 Vasilij Schneidermann <mail@vasilij.de>
8196
8197 Make prog-mode-map the parent of c-mode-base-map. Fixes bug #26658.
8198
8199 * lisp/progmodes/cc-mode.el (top level): Make prog-mode-map the parent of
8200 c-mode-base-map if possible.
8201
82022017-07-12 Alan Mackenzie <acm@muc.de>
8203
8204 CC Mode: create and use c-set-keymap-parent.
8205
8206 * lisp/progmodes/cc-defs.el (c-set-keymap-parent): New macro.
8207
8208 * lisp/progmodes/cc-mode.el (top-level): Remove cc-bytecomp-defun for
8209 set-keymap-parents.
8210 (c-make-inherited-keymap): Use c-set-keymap-parent in place of inline code.
8211
82122017-07-12 Martin Rudalics <rudalics@gmx.at>
8213
8214 Minor tweaks of new line number display variables
8215
8216 * src/xdisp.c (Vdisplay_line_numbers): Tweak doc-string.
8217 (Vdisplay_line_number_width): Rename to
8218 Vdisplay_line_numbers_width.
8219 (maybe_produce_line_number): Comply with above rename.
8220 * lisp/cus-start.el (standard):
8221 * lisp/frame.el (top-level):
8222 * etc/NEWS: Comply with renaming of
8223 `display-line-number-width' to `display-line-numbers-width'.
8224
82252017-07-12 Eli Zaretskii <eliz@gnu.org>
8226
8227 Avoid assertion violations in close_infile_unwind
8228
8229 * src/lread.c (close_infile_unwind): A temporary band-aid solution
8230 for bug#27642: allow 'infile' be NULL.
8231
82322017-07-11 Eli Zaretskii <eliz@gnu.org>
8233
8234 Use fixed-pitch font for display-line-numbers
8235
8236 * lisp/faces.el (line-number): Use a fixed-pitch font by default,
8237 even if the default face uses a variable-pitch font. Reported by
8238 James Cloos <cloos@jhcloos.com>.
8239
82402017-07-11 Eli Zaretskii <eliz@gnu.org>
8241
8242 Improve documentation of display-line-numbers
8243
8244 * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Improve the
8245 doc string. Suggested by Alex <agrambot@gmail.com>.
8246
82472017-07-11 Nicolas Petton <nicolas@petton.fr>
8248
8249 Add an optional testfn parameter to assoc
8250
8251 * src/fns.c (assoc): New optional testfn parameter used for comparison
8252 when provided.
8253 * test/src/fns-tests.el (test-assoc-testfn): Add tests for the new
8254 'testfn' parameter.
8255 * src/buffer.c:
8256 * src/coding.c:
8257 * src/dbusbind.c:
8258 * src/font.c:
8259 * src/fontset.c:
8260 * src/gfilenotify.c:
8261 * src/image.c:
8262 * src/keymap.c:
8263 * src/process.c:
8264 * src/w32fns.c:
8265 * src/w32font.c:
8266 * src/w32notify.c:
8267 * src/w32term.c:
8268 * src/xdisp.c:
8269 * src/xfont.c: Add a third argument to Fassoc calls.
8270 * etc/NEWS:
8271 * doc/lispref/lists.texi: Document the new 'testfn' parameter.
8272
82732017-07-10 Michael Albinus <michael.albinus@gmx.de>
8274
8275 Use `with-demoted-errors' in Tramp
8276
8277 * lisp/net/tramp.el (tramp-with-demoted-errors): New defmacro.
8278
8279 * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Use it.
8280
82812017-07-10 Michael Albinus <michael.albinus@gmx.de>
8282
8283 Add Quick Start Guide to Tramp manual
8284
8285 * doc/misc/tramp.texi: Use consequently "@value{tramp}" and
8286 "MS Windows".
8287 (Quick Start Guide): New node.
8288
8289 * doc/misc/trampver.texi:
8290 * lisp/net/trampver.el: Change version to "2.3.3-pre".
8291
82922017-07-10 Glenn Morris <rgm@gnu.org>
8293
8294 Fix failing module tests on GNU/Linux
8295
8296 * test/src/emacs-module-tests.el
8297 (module--test-assertions--load-non-live-object)
8298 (module--test-assertions--call-emacs-from-gc):
8299 Avoid test failures due to backtraces.
8300
83012017-07-10 Paul Eggert <eggert@cs.ucla.edu>
8302
8303 Fix core dump in substitute-object-in-subtree
8304
8305 Without this fix, (substitute-object-in-subtree #0=(#0# 'a) 'a)
8306 would dump core, since the C code would recurse indefinitely through
8307 the infinite structure. This patch adds an argument to the function,
8308 and renames it to lread--substitute-object-in-subtree as the function
8309 is not general-purpose and should not be relied on by outside code.
8310 See Bug#23660.
8311 * src/intervals.c (traverse_intervals_noorder): ARG is now void *,
8312 not Lisp_Object, so that callers need not cons unnecessarily.
8313 All callers changed. Also, remove related #if-0 code that was
8314 “temporary” in the early 1990s and has not been compilable for
8315 some time.
8316 * src/lread.c (struct subst): New type, for substitution closure data.
8317 (seen_list): Remove this static var, as this info is now part of
8318 struct subst. All uses removed.
8319 (Flread__substitute_object_in_subtree): Rename from
8320 Fsubstitute_object_in_subtree, and give it a 3rd arg so that it
8321 doesn’t dump core when called from the top level with an
8322 already-cyclic structure. All callers changed.
8323 (SUBSTITUTE): Remove. All callers expanded and then simplified.
8324 (substitute_object_recurse): Take a single argument SUBST rather
8325 than a pair OBJECT and PLACEHOLDER, so that its address can be
8326 passed around as part of a closure; this avoids the need for an
8327 AUTO_CONS call. All callers changed. If the COMPLETED component
8328 is t, treat every subobject as potentially circular.
8329 (substitute_in_interval): Take a struct subst * rather than a
8330 Lisp_Object, for the closure data. All callers changed.
8331 * test/src/lread-tests.el (lread-lread--substitute-object-in-subtree):
8332 New test, to check that the core dump does not reoccur.
8333
83342017-07-10 Philipp Stephani <phst@google.com>
8335
8336 Minor simplification of module_free_global_ref
8337
8338 * src/emacs-module.c (module_free_global_ref): Remove unused variable
8339 'hashcode'. Inline variable 'value' that's only used once.
8340
83412017-07-10 Philipp Stephani <phst@google.com>
8342
8343 Re-add a useful assertion
8344
8345 * src/emacs-module.c (module_free_global_ref): Re-add assertion that
8346 the reference count is zero. This assertion was removed in commit
8347 8afaa1321f8088bfb877fe4b6676e8517adb0bb7, but it's not included in the
8348 test performed by XFASTINT before, because the previous reference
8349 count could have been zero already in the case of a buggy
8350 implementation. This assertion might have detected Bug#27587.
8351
83522017-07-10 Valentin Gatien-Baron <vgatien-baron@janestreet.com> (tiny change)
8353
8354 Fix bug in module_free_global_ref (Bug#27587)
8355
8356 * src/emacs-module.c (module_free_global_ref): Actually remove entry
8357 from hash table.
8358
83592017-07-09 Philipp Stephani <phst@google.com>
8360
8361 Further improve electric quote support for Markdown (Bug#24709)
8362
8363 Markdown sets both 'comment-start' and 'comment-use-syntax' to non-nil
8364 values. Therefore 'electric-quote-mode' recognized it as a
8365 programming mode. Fix this by first checking whether the current
8366 major mode is derived from 'text-mode'.
8367
8368 * lisp/electric.el (electric-quote-post-self-insert-function): Treat
8369 'text-mode' as stronger signal than comment syntax.
8370
8371 * test/lisp/electric-tests.el (electric-quote-markdown-in-text)
8372 (electric-quote-markdown-in-code): Adapt unit tests.
8373
83742017-07-09 Philipp Stephani <phst@google.com>
8375
8376 Remove pointless code in 'electric-quote-mode'
8377
8378 * lisp/electric.el (electric-quote-post-self-insert-function): Remove
8379 pointless form.
8380
83812017-07-09 Philipp Stephani <phst@google.com>
8382
8383 Refactor 'electric-quote-mode'
8384
8385 * lisp/electric.el (electric-quote-post-self-insert-function): Remove
8386 local variable 'start', which was misnamed and only used once.
8387
83882017-07-09 Saulius Menkevičius <saulius.menkevicius@gmail.com> (tiny change)
8389
8390 Avoid crashes on MS-Windows starting 64-bit .NET executables
8391
8392 * src/w32proc.c (w32_executable_type): Don't assume that the
8393 import directory in a DLL will always be non-NULL. (Bug#27527)
8394
83952017-07-09 Eli Zaretskii <eliz@gnu.org>
8396
8397 Avoid compilation warning in files.el
8398
8399 * lisp/files.el (auto-save-visited-file-name): Avoid obsoletion
8400 warning due to its use in auto-save-visited-mode.
8401
84022017-07-09 Eli Zaretskii <eliz@gnu.org>
8403
8404 Improve indexing of VC-related stuff in the Emacs manual
8405
8406 * doc/emacs/maintaining.texi (Version Control): Add a "VC" index
8407 entry. (Bug#27627)
8408
84092017-07-09 Eli Zaretskii <eliz@gnu.org>
8410
8411 Speed up display of line numbers for very large buffers
8412
8413 * src/xdisp.c (maybe_produce_line_number): Speed up line counting
8414 using values cached by mode-line display of line numbers.
8415 (Bug#27622)
8416
84172017-07-09 Alexander Kuleshov <kuleshovmail@gmail.com>
8418
8419 Define internal_border_parts for window systems only (Bug#27615)
8420
8421 * src/keyboard.c: (internal_border_parts): Define only
8422 when HAVE_WINDOW_SYSTEM is enabled. (Bug#27615)
8423
84242017-07-09 R. Bernstein <rocky@gnu.org>
8425
8426 Add realgud faces faces to whiteboard...
8427
8428 Adjust wheatgrass to use underline for enabled/disabled breakpoints
8429
84302017-07-08 Noam Postavsky <npostavs@gmail.com>
8431
8432 Optimize UCS normalization tests
8433
8434 Brings the the time for `ucs-normalize-part1' from 200s down to 130s.
8435 * test/lisp/international/ucs-normalize-tests.el
8436 (ucs-normalize-tests--parse-column): Use character instead of string
8437 of length 1 for terminator. Convert return value into string since
8438 all callers need that form anyway.
8439 (ucs-normalize-tests--normalization-equal-p): Rename from
8440 ucs-normalize-tests--normalize. Use dedicated buffer instead of
8441 messing with narrowing. Take string to compare against and insert it
8442 into buffer so that compare-buffer-substrings can be used instead of
8443 allocating a new string from buffer contents.
8444 (ucs-normalize-tests--normalization-chareq-p): New macro, specialized
8445 for comparing single character.
8446 (ucs-normalize-tests--rule1-holds-p)
8447 (ucs-normalize-tests--rule2-holds-p): Turn into defsubst.
8448 (ucs-normalize-tests--rule1-failing-for-partX): Use `eq' instead of
8449 `='.
8450
84512017-07-08 Noam Postavsky <npostavs@gmail.com>
8452
8453 Update failing lines for UCS normalize tests
8454
8455 * test/lisp/international/ucs-normalize-tests.el
8456 (ucs-normalize-tests--failing-lines-part2): Update for new
8457 admin/unidata/NormalizationTest.txt version.
8458
84592017-07-08 Noam Postavsky <npostavs@gmail.com>
8460
8461 Semi-automate the procedure for updating UCS normalize test bad lines
8462
8463 * test/lisp/international/ucs-normalize-tests.el: Remove incorrect
8464 commentary describing a manual procedure for producing the updated
8465 failing lines, it did not actually work. Replace it with pointer to
8466 new function which prints the updated values.
8467 (ucs-normalize-tests--rule1-holds-p): Renamed from
8468 ucs-normalize-tests--invariants-hold-p.
8469 (ucs-normalize-tests--rule2-holds-p): Renamed from
8470 ucs-normalize-tests--invariants-rule2-hold-p.
8471 (ucs-normalize-tests--rule1-failing-for-partX): Renamed from
8472 ucs-normalize-tests--invariants-failing-for-part.
8473 (ucs-normalize-tests--rule1-failing-for-lines): Renamed from
8474 ucs-normalize-tests--invariants-failing-for-lines.
8475 (ucs-normalize-tests--part2-rule1-failed-lines): New variable.
8476 (ucs-normalize-part2): Set it.
8477 (ucs-normalize-part1): Always run through to end of test before
8478 checking for failures.
8479 (ucs-normalize-tests--insert-failing-lines)
8480 (ucs-normalize-check-failing-lines): New functions, used to update
8481 the *--failing-lines-part* variables.
8482
84832017-07-08 Paul Eggert <eggert@cs.ucla.edu>
8484
8485 * lisp/cus-start.el (standard): Spelling fix.
8486
84872017-07-08 Philipp Stephani <phst@google.com>
8488
8489 Module assertions: check for garbage collections
8490
8491 It's technically possible to write a user pointer finalizer that calls
8492 into Emacs module functions. This would be disastrous because it
8493 would allow arbitrary Lisp code to run during garbage collection.
8494 Therefore extend the module assertions to check for this case.
8495
8496 * src/emacs-module.c (module_assert_thread): Also check whether a
8497 garbage collection is in progress.
8498
8499 * test/data/emacs-module/mod-test.c (invalid_finalizer)
8500 (Fmod_test_invalid_finalizer): New test module functions.
8501 (emacs_module_init): Register new test function.
8502
8503 * test/src/emacs-module-tests.el (module--test-assertion)
8504 (module--with-temp-directory): New helper macros.
8505 (module--test-assertions--load-non-live-object): Rename existing
8506 unit test, use helper macros.
8507 (module--test-assertions--call-emacs-from-gc): New unit test.
8508
85092017-07-08 Eli Zaretskii <eliz@gnu.org>
8510
8511 Capitalize the menu entry for display-line-numbers
8512
8513 * lisp/menu-bar.el (menu-bar-showhide-menu): Capitalize menu item
8514 for display-line-numbers. Suggested by Martin Rudalics
8515 <rudalics@gmx.at>.
8516
85172017-07-08 Eli Zaretskii <eliz@gnu.org>
8518
8519 Update Unicode data and files to Unicode 10.0
8520
8521 * admin/notes/unicode:
8522 * admin/unidata/README:
8523 * admin/unidata/BidiBrackets.txt:
8524 * admin/unidata/BidiMirroring.txt:
8525 * admin/unidata/Blocks.txt:
8526 * admin/unidata/IVD_Sequences.txt:
8527 * admin/unidata/NormalizationTest.txt:
8528 * admin/unidata/SpecialCasing.txt:
8529 * admin/unidata/UnicodeData.txt:
8530 * lisp/international/characters.el:
8531 * lisp/international/fontset.el (script-representative-chars):
8532 * lisp/international/mule-cmds.el (ucs-names): Update per Unicode 10.0.
8533
85342017-07-08 Alexander Gramiak <agrambot@gmail.com>
8535
8536 Support '=' in Scheme and Lisp tags in 'etags'
8537
8538 * lib-src/etags.c (get_lispy_tag): New function.
8539 (L_getit, Scheme_functions): Use get_lispy_tag (Bug#5624).
8540 * test/manual/etags/CTAGS.good:
8541 * test/manual/etags/ETAGS.good_1:
8542 * test/manual/etags/ETAGS.good_2:
8543 * test/manual/etags/ETAGS.good_3:
8544 * test/manual/etags/ETAGS.good_4:
8545 * test/manual/etags/ETAGS.good_5:
8546 * test/manual/etags/ETAGS.good_6:
8547 * test/manual/etags/Makefile:
8548 * test/manual/etags/el-src/TAGTEST.EL: Update tests.
8549 * test/manual/etags/scm-src/test.scm: New tests for Scheme.
8550
85512017-07-08 Alexander Kuleshov <kuleshovmail@gmail.com>
8552
8553 Avoid compiler warnings in xdisp.c debugging code
8554
8555 * src/xdisp.c (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
8556 Use pD directives for ptrdiff_t values instead of pI, to avoid
8557 compilation warnings on 64-bit hosts. (Bug#27597)
8558
85592017-07-08 Eli Zaretskii <eliz@gnu.org>
8560
8561 Commentary enhancement in frame.el
8562
8563 * lisp/frame.el: Explain how to test whether a variable needs to
8564 be added to the list of those which are watched for buffer
8565 redisplay.
8566
85672017-07-08 Eli Zaretskii <eliz@gnu.org>
8568
8569 Support display of line numbers natively
8570
8571 This merges branch 'line-numbers'.
8572 * src/buffer.c (disable_line_numbers_overlay_at_eob): New
8573 function.
8574 * src/lisp.h (disable_line_numbers_overlay_at_eob): Add prototype.
8575 * src/dispextern.h (struct it): New members pt_lnum, lnum,
8576 lnum_bytepos, lnum_width, and lnum_pixel_width.
8577 * src/indent.c (line_number_display_width): New function,
8578 refactored from line-number width calculations in vertical-motion.
8579 (Fvertical_motion): Call line_number_display_width when the width
8580 of line-number display is needed.
8581 (Fline_number_display_width): New defun.
8582 (syms_of_indent): Defsubr it.
8583 * src/indent.c (Fvertical_motion): Help C-n/C-p estimate correctly
8584 the width used up by line numbers by looking near the window-start
8585 point. If window-start is outside of the accessible portion,
8586 temporarily widen the buffer.
8587 * src/term.c (produce_glyphs): Adjust tab stops for the horizontal
8588 space taken by the line-number display.
8589 * src/xdisp.c (display_count_lines_logically)
8590 (display_count_lines_visually, maybe_produce_line_number)
8591 (should_produce_line_number, row_text_area_empty): New functions.
8592 (try_window_reusing_current_matrix): Don't use this method when
8593 display-line-numbers is in effect.
8594 (try_window_id, try_cursor_movement): Disable these optimizations
8595 when the line-number-current-line face is different from
8596 line-number face and for relative line numbers.
8597 (try_window_id, redisplay_window, try_cursor_movement): For
8598 visual line-number display, disable the same redisplay
8599 optimizations as for relative.
8600 (x_produce_glyphs): Adjust tab stops for the horizontal
8601 space taken by the line-number display.
8602 (hscroll_window_tree): Adjust hscroll calculations to line-number
8603 display.
8604 (DISP_INFINITY): Renamed from INFINITY to avoid clashes with
8605 math.h; all users changed.
8606 (set_cursor_from_row): Fix calculation of cursor X coordinate in
8607 R2L rows with display-produced glyphs at the beginning.
8608 (display_line): Use should_produce_line_number to determine
8609 whether a line number should be produced for each glyph row, and
8610 maybe_produce_line_number to produce line numbers.
8611 Don't display line numbers in the minibuffer and in tooltip
8612 frames.
8613 Call row_text_area_empty to verify that a glyph
8614 row's text area is devoid of any glyphs that came from a buffer or
8615 a string. This fixes a bug with empty-lines indication
8616 disappearing when line numbers or line-prefix are displayed.
8617 (syms_of_xdisp) <display-line-numbers, display-line-numbers-widen>
8618 <display-line-number-width>: New buffer-local variables.
8619 <display-line-numbers-current-absolute>: New variable.
8620
8621 * lisp/cus-start.el (standard): Provide customization forms for
8622 display-line-numbers and its sub-features.
8623 * lisp/faces.el (line-number, line-number-current-line): New faces.
8624 * lisp/frame.el: Add display-line-numbers, display-line-numbers-widen,
8625 display-line-numbers-current-absolute, and
8626 display-line-number-width to the list of variables that should
8627 trigger redisplay of the current buffer.
8628 * lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to
8629 turn display-line-numbers on and off.
8630 (toggle-display-line-numbers): New function.
8631 * lisp/simple.el (last--line-number-width): New internal variable.
8632 (line-move-visual): Use it to adjust temporary-goal-column when
8633 line-number display changes its width.
8634
8635 * doc/emacs/basic.texi (Position Info): Add cross-reference to
8636 "Display Custom", for line-number display.
8637 * doc/emacs/custom.texi (Init Rebinding):
8638 * doc/emacs/modes.texi (Minor Modes): Remove references to
8639 linum-mode.
8640 * doc/emacs/display.texi (Display Custom): Describe the
8641 line-number display.
8642 * doc/lispref/display.texi (Size of Displayed Text): Document
8643 line-number-display-width.
8644
8645 * etc/NEWS: Document display-line-numbers and its customizations.
8646
86472017-07-08 Paul Eggert <eggert@cs.ucla.edu>
8648
8649 Fix more ungetc bugs with encoding errors
8650
8651 * src/lread.c (infile): New variable, replacing ...
8652 (instream): ... this. All uses changed.
8653 (readbyte_from_stdio): New function, which deals with lookahead.
8654 (readbyte_from_file, Fget_file_char): Use it.
8655 (Fget_file_char): When misused, signal an error instead of
8656 relying on undefined behavior.
8657 (close_infile_unwind): New function.
8658 (Fload): Use it.
8659 (readevalloop): 2nd arg is now struct infile *, not FILE *.
8660 All callers changed.
8661 (read1): Handle lookahead when copying doc strings with
8662 encoding errors.
8663
86642017-07-08 Paul Eggert <eggert@cs.ucla.edu>
8665
8666 Avoid ungetc when loading charset maps from files
8667
8668 * src/charset.c (read_hex): New args LOOKAHEAD and TERMINATOR,
8669 replacing the old EOF. All callers changed. This avoids the
8670 need to call ungetc.
8671
86722017-07-08 Paul Eggert <eggert@cs.ucla.edu>
8673
8674 Fix ungetc bug when reading an encoding error
8675
8676 * src/lread.c (readchar, read_emacs_mule_char): Fix off-by-one
8677 error when reading an encoding error from a file, e.g., a symbol
8678 in an .elc file whose name is "\360\220\200\360".
8679
86802017-07-07 Stefan Monnier <monnier@iro.umontreal.ca>
8681
8682 * lisp/wid-edit.el (widget-color--choose-action): Use a closure
8683
8684 * lisp/window.el (display-buffer--special-action): Use a closure.
8685
86862017-07-07 Stephen Berman <stephen.berman@gmx.net>
8687
8688 Add new todo-mode.el tests
8689
8690 * test/lisp/calendar/todo-mode-tests.el (with-todo-test):
8691 Declare an Edebug spec. Restore pre-test-run state of test files.
8692 (todo-test--show, todo-test--move-item)
8693 (todo-test--insert-item): New functions.
8694 (todo-test-get-archive): Remove, as subsumed by
8695 todo-test--show. Adjust all callers.
8696 (todo-test--is-current-buffer): Rename from
8697 todo-test-is-current-buffer and adjust uses.
8698 (todo-test-item-highlighting): Use todo-test--show.
8699 (todo-test-revert-buffer01, todo-test-revert-buffer02)
8700 (todo-test-raise-lower-priority)
8701 (todo-test-todo-mark-unmark-category, todo-test-move-item01)
8702 (todo-test-move-item02, todo-test-move-item03)
8703 (todo-test-move-item04, todo-test-move-item05)
8704 (todo-test-toggle-item-header01)
8705 (todo-test-toggle-item-header02)
8706 (todo-test-toggle-item-header03)
8707 (todo-test-toggle-item-header04)
8708 (todo-test-toggle-item-header05)
8709 (todo-test-toggle-item-header06)
8710 (todo-test-toggle-item-header07): New tests.
8711
8712 * test/lisp/calendar/todo-mode-resources/todo-test-1.toda:
8713 * test/lisp/calendar/todo-mode-resources/todo-test-1.todo:
8714 Modify to accommodate new tests.
8715
87162017-07-07 Stephen Berman <stephen.berman@gmx.net>
8717
8718 todo-mode.el: Fix handling of hidden item headers (bug#27609)
8719
8720 * lisp/calendar/todo-mode.el (todo--item-headers-hidden): New variable.
8721 (todo-toggle-item-header): Use it. Make this command a noop
8722 if the file has no items.
8723 (todo-move-item, todo-item-done): Instead of concatenating the
8724 items to move into one string, make a list of them to
8725 facilitate handling hidden headers. Adjust insertion accordingly.
8726 (todo-archive-done-item): Handle hidden headers in archive file.
8727 (todo-unarchive-items): Handle hidden headers in todo file.
8728 (todo-backward-item): Use todo--item-headers-hidden and handle
8729 moving backward work when item date-time headers are hidden.
8730 (todo-remove-item): Delete date-time header overlay.
8731 (todo-get-overlay, todo-insert-with-overlays): Make them work
8732 with hidden date-time headers.
8733 (todo-modes-set-2): Make todo--item-headers-hidden buffer local.
8734
87352017-07-07 Stephen Berman <stephen.berman@gmx.net>
8736
8737 Fix several todo-mode bugs found while debugging bug#27609
8738
8739 * lisp/calendar/todo-mode.el (todo-toggle-mark-item): Calculate
8740 current category only once.
8741 (todo-mark-category): Update number of marked items to avoid
8742 spurious duplication in todo-categories-with-marks alist and
8743 corruption of the todo-categories alist. Handle empty line
8744 when there are no todo items and done items are shown.
8745 (todo-set-item-priority): Make noop if called from
8746 todo-raise-item-priority or todo-lower-item-priority when
8747 point is on a done todo item or an empty line.
8748 (todo-move-item): Use markers instead of integer positions to
8749 correctly handle deleting the now moved items from the source
8750 category (without markers an infinite loop arises when moving
8751 marked item to a preceding category).
8752 (todo-unarchive-items): Put point on the (first) restored done
8753 item, instead of leaving it at the end of the done items
8754 separator string.
8755 (todo-revert-buffer): Ensure buffer remains read-only after
8756 reverting.
8757
87582017-07-07 Eli Zaretskii <eliz@gnu.org>
8759
8760 Exclude blank columns from value of line-number-display-width
8761
8762 * src/indent.c (Fline_number_display_width): Don't add 2 to the
8763 number of columns we return, to make this consistent with
8764 display-line-number-width.
8765
87662017-07-07 Eli Zaretskii <eliz@gnu.org>
8767
8768 Fix vertical-motion across the place where line-number width changes
8769
8770 * src/indent.c (line_number_display_width): New function,
8771 refactored from line-number width calculations in vertical-motion.
8772 (Fvertical_motion): Call line_number_display_width when the width
8773 of line-number display is needed.
8774 (Fline_number_display_width): New defun.
8775 (syms_of_indent): Defsubr it.
8776
8777 * doc/lispref/display.texi (Size of Displayed Text): Document
8778 line-number-display-width.
8779
8780 * etc/NEWS: Mention line-number-display-width.
8781
8782 * lisp/simple.el (last--line-number-width): New internal variable.
8783 (line-move-visual): Use it to adjust temporary-goal-column when
8784 line-number display changes its width.
8785
87862017-07-07 Martin Rudalics <rudalics@gmx.at>
8787
8788 Remove Vwindow_text_change_functions and related code
8789
8790 Vwindow_text_change_functions had been provided for implementing
8791 line numbers but apparently was never functional or in use.
8792
8793 * src/xdisp.c (redisplay_window): Remove handling of
8794 Vwindow_text_change_functions.
8795 (syms_of_xdisp): Remove Qwindow_text_change_functions.
8796 (Vwindow_text_change_functions): Remove variable.
8797 * doc/lispref/hooks.texi (Standard Hooks): Remove entry for
8798 `window-text-change-functions'.
8799
88002017-07-07 Mark Oteiza <mvoteiza@udel.edu>
8801
8802 Convert more uses of looking-at to following-char
8803
8804 More followup to Karl Fogel's commit a84da83c1.
8805 * lisp/dired-aux.el (dired-add-entry, dired-subdir-hidden-p):
8806 * lisp/dired-x.el (dired-mark-unmarked-files, dired-mark-sexp):
8807 * lisp/help-fns.el (doc-file-to-man, doc-file-to-info):
8808 * lisp/proced.el (proced-toggle-marks):
8809 * lisp/progmodes/f90.el (f90-indent-line):
8810 * lisp/ses.el (ses-load):
8811 * lisp/tar-mode.el (tar-expunge): Replace instances of looking-at with
8812 char comparisons using following-char.
8813
88142017-07-07 Noam Postavsky <npostavs@gmail.com>
8815
8816 Don't skip epg tests (Bug#23561)
8817
8818 * test/lisp/epg-tests.el (with-epg-tests): Ignore REQUIRE-PASSPHRASE
8819 parameter, since we supply the passphrase via pinentry-program for all
8820 GPG versions (as of 2017-02-28 "Fix epg-tests with dummy-pinentry
8821 program (Bug#23619)").
8822 (epg-tests-program-alist-for-passphrase-callback): Remove.
8823
88242017-07-06 Eli Zaretskii <eliz@gnu.org>
8825
8826 Implement line numbers that disregard narrowing
8827
8828 * src/xdisp.c (display_count_lines_logically): New function,
8829 counts line numbers disregarding narrowing. Suggested by Andy
8830 Moreton <andrewjmoreton@gmail.com>.
8831 (maybe_produce_line_number): Call display_count_lines_logically
8832 instead of display_count_lines. Adapt BEGV, ZV, etc. to
8833 display-line-numbers-widen.
8834 (syms_of_xdisp) <display-line-numbers-widen>: New buffer-local
8835 variable.
8836
8837 * lisp/cus-start.el (standard): Provide a customization form for
8838 display-line-numbers-widen.
8839 * lisp/frame.el: Add display-line-numbers-widen,
8840 display-line-numbers-current-absolute, and
8841 display-line-number-width to the list of variables that should
8842 trigger redisplay of the current buffer.
8843
8844 * doc/emacs/display.texi (Display Custom): Document
8845 display-line-numbers-widen.
8846
88472017-07-06 Noam Postavsky <npostavs@gmail.com>
8848
8849 Fix lisp-comment-indent for single-semicolon case
8850
8851 * lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): Only check for
8852 open paren if we're looking at multiple comment characters.
8853 * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-comment-indent-1)
8854 (lisp-comment-indent-2): New tests.
8855
88562017-07-06 Paul Eggert <eggert@cs.ucla.edu>
8857
8858 Spelling fixes
8859
8860 * lisp/org/org-table.el (org-table-sort-lines):
8861 Fix misspelling in prompt.
8862 * lisp/org/ox-ascii.el (org-ascii--describe-datum):
8863 Fix misspelling in call to org-element-lineage.
8864
88652017-07-06 Noam Postavsky <npostavs@gmail.com>
8866
8867 Don't put whitespace between open paren and comment in Lisp modes (Bug#19740)
8868
8869 * lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): If current
8870 line's code ends in open paren, set comment indentation exactly to
8871 column following it.
8872 (lisp-mode-variables): Set `comment-indent-function' to
8873 `lisp-comment-indent'.
8874
88752017-07-06 Noam Postavsky <npostavs@gmail.com>
8876
8877 Allow comment-indent-functions to specify exact indentation (Bug#385)
8878
8879 * lisp/newcomment.el (comment-choose-indent): Interpret a cons of two
8880 integers as indicating a range of acceptable indentation.
8881 (comment-indent): Don't apply `comment-inline-offset',
8882 `comment-choose-indent' already does that.
8883 (comment-indent-function):
8884 * doc/emacs/programs.texi (Options for Comments): Document new
8885 acceptable return values.
8886 * etc/NEWS: Announce it.
8887
88882017-07-06 Paul Eggert <eggert@cs.ucla.edu>
8889
8890 Check for integer overflow in xbm images
8891
8892 * src/image.c (XBM_TK_OVERFLOW): New constant.
8893 (xbm_scan): Check for integer overflow instead of relying on
8894 undefined behavior. Check that octal digits are actually octal.
8895
88962017-07-06 Paul Eggert <eggert@cs.ucla.edu>
8897
8898 Convert hex digits more systematically
8899
8900 This makes the code a bit smaller and presumably faster, as
8901 it substitutes a single lookup for conditional jumps.
8902 * src/character.c (hexdigit): New constant.
8903 (syms_of_character) [HEXDIGIT_IS_CONST]: Initialize it.
8904 * src/character.h (HEXDIGIT_CONST, HEXDIGIT_IS_CONST): New macros.
8905 (hexdigit): New decl.
8906 (char_hexdigit): New inline function.
8907 * src/charset.c: Do not include c-ctype.h.
8908 * src/charset.c (read_hex):
8909 * src/editfns.c (styled_format):
8910 * src/image.c (xbm_scan):
8911 * src/lread.c (read_escape):
8912 * src/regex.c (ISXDIGIT) [emacs]:
8913 Use char_hexdigit insted of doing it by hand.
8914
89152017-07-06 Paul Eggert <eggert@cs.ucla.edu>
8916
8917 Don’t use -Woverride-init
8918
8919 I have some further changes in mind that would also need to
8920 disable the -Woverride-init warnings. In practice these warnings
8921 seem to be more trouble than they’re worth, so disable them in the
8922 cc command line.
8923 * configure.ac: Disable -Woverride-init here ...
8924 * src/bytecode.c: ... rather than here.
8925
89262017-07-05 Glenn Morris <rgm@gnu.org>
8927
8928 * lisp/progmodes/python.el (auto-mode-alist): Add .pyi. (Bug#27847)
8929
8930 * lisp/org/ox-html.el (org-html-infojs-template): Update copyright.
8931
89322017-07-05 Glenn Morris <rgm@gnu.org>
8933
8934 Small fix for bug-reference.el
8935
8936 * lisp/progmodes/bug-reference.el (bug-reference-bug-regexp):
8937 Autoload safety property. (Bug#27481)
8938
89392017-07-05 Michael Albinus <michael.albinus@gmx.de>
8940
8941 Suppress timers in Tramp
8942
8943 * lisp/net/tramp.el (tramp-file-name-handler): Don't trigger timers.
8944
8945 * test/lisp/net/tramp-tests.el
8946 (tramp-test36-asynchronous-requests): Trigger timers.
8947 (tramp-test37-recursive-load, tramp-test38-remote-load-path):
8948 Set `default-directory' to a trustworthy value.
8949
89502017-07-05 rocky <rb@dustyfeet.com>
8951
8952 Add realgud face definitions
8953
8954 Add realgud faces to tdsh-dark-theme
8955
89562017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
8957
8958 * lisp/progmodes/cc-awk.el: Mark unused args
8959
8960 * lisp/progmodes/cc-bytecomp.el: Mark unused args
8961
89622017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
8963
8964 * lisp/progmodes/cc-defs.el (lookup-syntax-properties): Move ...
8965
8966 ... before first use
8967
89682017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
8969
8970 * lisp/progmodes/cc-vars.el: Mark unused args
8971
89722017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
8973
8974 * lisp/progmodes/cc-langs.el: Mark unused args
8975
8976 (c-primary-expr-regexp): Remove unused vars ambiguous-prefix-ops and
8977 unambiguous-prefix-ops.
8978
89792017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
8980
8981 * lisp/progmodes/cc-engine.el: Mark unused args
8982
8983 (c-beginning-of-statement-1, c-guess-basic-syntax):
8984 Remove unused var c-in-literal-cache.
8985 (c-debug-sws-msg): Silence byte-compiler, even if we don't use the arg.
8986 (c-append-to-state-cache): Remove unused var `bra+1s'.
8987 (c-remove-stale-state-cache): Remove unused var `pps-point-state'.
8988 (c-invalidate-state-cache-1): Remove unused var `pa'.
8989 (c-forward-decl-or-cast-1): Change comments so they don't look like
8990 outline headers.
8991 (c-restricted-<>-arglists, c-parse-and-markup-<>-arglists):
8992 Declare before first use.
8993 (c-forward-decl-or-cast-1): Remove unused var `backup-kwd-sym'.
8994 (c-backward-over-enum-header): Remove unused var `up-sexp-pos'.
8995
89962017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
8997
8998 * lisp/progmodes/cc-cmds.el: Remove unused vars
8999
9000 (c-syntactic-context): Declare as dynbound.
9001 (c-beginning-of-defun, c-end-of-defun): Remove unused var `start'.
9002
90032017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
9004
9005 * lisp/progmodes/cc-guess.el: Remove unused var
9006
9007 (c-guess-view-reorder-offsets-alist-in-style): Remove redundantly bound
9008 and computed variable `guessed-syntactic-symbols'.
9009
90102017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
9011
9012 * lisp/progmodes/cc-align.el: Mark unused arguments
9013
90142017-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
9015
9016 * lisp/progmodes/cc-mode.el: Mark unused arguments
9017
9018 (c-parse-quotes-before-change, c-parse-quotes-after-change):
9019 Remove unused vars.
9020
90212017-07-05 Noam Postavsky <npostavs@gmail.com>
9022
9023 Mention `ffap-url-unwrap-local' in find-file-at-point's docstring (Bug#27564)
9024
9025 * lisp/ffap.el (find-file-at-point): Mention `ffap-url-unwrap-local'
9026 and `ffap-url-unwrap-remote'.
9027
90282017-07-05 Noam Postavsky <npostavs@gmail.com>
9029
9030 Fix infloop in uncomment-region-default (Bug#27112)
9031
9032 When `comment-continue' has only blanks, `comment-padright' produces a
9033 regexp that matches the empty string, so `uncomment-region-default'
9034 will loop infinitely.
9035 * lisp/newcomment.el (comment-padright): Only return a regexp if STR
9036 has nonblank characters.
9037
90382017-07-04 Eli Zaretskii <eliz@gnu.org>
9039
9040 Fix display of current line number in visual mode
9041
9042 * src/xdisp.c (maybe_produce_line_number): Fix visual-mode display
9043 of current line when line-number-current-line face was customized.
9044 Reported by Filipe Silva <filipe.silva@gmail.com>.
9045
90462017-07-03 Philipp Stephani <phst@google.com>
9047
9048 Use hook instead of face list to inhibit electric quoting
9049
9050 This is more flexible and doesn't couple electric quoting to font
9051 locking.
9052 Give that 'electric-quote-code-faces' was just introduced, remove it
9053 without formal deprecation.
9054
9055 * lisp/electric.el (electric-quote-inhibit-functions): New abnormal
9056 hook variable.
9057 (electric-quote-post-self-insert-function): Run the hook. Remove
9058 use of old 'electric-quote-code-faces' variable.
9059
9060 * test/lisp/electric-tests.el (electric-quote-markdown-in-text)
9061 (electric-quote-markdown-in-code): Adapt unit tests.
9062
90632017-07-03 Ingo Lohmar <i.lohmar@gmail.com>
9064
9065 Offer non-aligned indentation in lists in js-mode (Bug#27503)
9066
9067 * lisp/progmodes/js.el (js--proper-indentation):
9068 New customization option 'js-indent-align-list-continuation'.
9069 Affects argument lists as well as arrays and object properties.
9070 * test/manual/indent/js-indent-align-list-continuation-nil.js:
9071 Test the change.
9072
90732017-07-03 Eli Zaretskii <eliz@gnu.org>
9074
9075 Avoid errors in vertical-motion when buffer is narrowed
9076
9077 * src/indent.c (Fvertical_motion): If need to start from
9078 window-start, and it is outside of the accessible portion,
9079 temporarily widen the buffer. This avoids errors in evil-mode.
9080 Reported by James Nguyen <james@jojojames.com>.
9081
90822017-07-03 Michael Albinus <michael.albinus@gmx.de>
9083
9084 (Re-)activate remote tests of filenotify-tests.el
9085
9086 * test/lisp/filenotify-tests.el
9087 (file-notify-test-remote-temporary-file-directory):
9088 Declare default host for mock method. Offer home directory
9089 for mock method if it doesn't exist.
9090 (file-notify-test09-watched-file-in-watched-dir-remote):
9091 Remove, it doesn't work reliably.
9092
90932017-07-03 Noam Postavsky <npostavs@gmail.com>
9094
9095 Reset ansi escape context before printing eshell prompt (Bug#27407)
9096
9097 * lisp/eshell/em-prompt.el (eshell-emit-prompt): Reset
9098 `ansi-color-context-region'.
9099
91002017-07-03 Noam Postavsky <npostavs@gmail.com>
9101
9102 Let ansi-color overlay hooks work in eshell (Bug#27407)
9103
9104 * lisp/ansi-color.el (ansi-color-make-extent): Add
9105 `ansi-color-freeze-overlay' to `insert-behind-hooks' as well.
9106 * lisp/eshell/esh-mode.el (eshell-output-filter): Let-bind
9107 `inhibit-modification-hooks' to nil while inserting the string.
9108
91092017-07-03 Noam Postavsky <npostavs@gmail.com>
9110
9111 Fix and simplify ansi escape detection (Bug#21381)
9112
9113 * lisp/ansi-color.el (ansi-color-regexp, ansi-color-drop-regexp):
9114 Remove.
9115 (ansi-color-control-seq-regexp): New constant, matches all escape
9116 sequences.
9117 (ansi-color-filter-apply, ansi-color-apply)
9118 (ansi-color-filter-region, ansi-color-apply-on-region): Use it instead
9119 of matching color sequences separately from ignored sequences.
9120 Differentiate color sequences simply by checking the last character.
9121
91222017-07-03 Damien Cassou <damien@cassou.me>
9123
9124 Add absolute optional parameter to line-number-at-pos (Bug#26417)
9125
9126 * lisp/simple.el (line-number-at-pos): Add a second optional
9127 argument 'absolute'.
9128 * test/list/simple-tests.el: Add tests for 'line-number-at-pos'.
9129
91302017-07-03 R. Bernstein <rocky@gnu.org>
9131
9132 Add realgud faces
9133
91342017-07-03 Michael Albinus <michael.albinus@gmx.de>
9135
9136 Fix tramp-tests.el for hydra
9137
9138 * test/Makefile.in: Remove instrumentation for tramp-tests.
9139
9140 * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests):
9141 Remove instrumentation. Wrap with a timeout. Give hydra
9142 another timer value. Set `default-directory' in timer.
9143
91442017-07-03 Bastien <bzg@gnu.org>
9145
9146 Merge branch 'master' into scratch/org-mode-merge
9147
9148 Merge branch 'master' into scratch/org-mode-merge
9149
91502017-07-03 Tino Calancha <tino.calancha@gmail.com>
9151
9152 dired-do-shell-command: Fix check for wildcards
9153
9154 * lisp/dired-aux.el (dired-do-shell-command): Replace just '?', '*'
9155 and '`?' i.e., keep the whitespaces.
9156 * test/lisp/dired-aux-tests.el (dired-test-bug27496): Add test.
9157
91582017-07-02 Noam Postavsky <npostavs@gmail.com>
9159
9160 Split shr-copy-url dwim behavior into separate functions (Bug#26826)
9161
9162 * lisp/net/shr.el (shr-url-at-point, shr-probe-url)
9163 (shr-probe-and-copy-url, shr-maybe-probe-and-copy-url): New functions,
9164 split out from `shr-copy-url'.
9165 (shr-copy-url): Only copy the url, don't fetch it.
9166 (shr-map): Bind 'w' and 'u' to `shr-maybe-probe-and-copy-url', which
9167 has the same behavior as the old `shr-copy-url'.
9168 * etc/NEWS: Announce changes.
9169
91702017-07-02 Alex Branham <branham@utexas.edu> (tiny change)
9171
9172 Make eww-search-words prompt for query if nothing selected
9173
9174 * lisp/net/eww.el (eww-search-words): Make eww-search-words prompt the
9175 user for a search query if the region is inactive or if the region is
9176 just whitespace.
9177
91782017-07-02 Noam Postavsky <npostavs@gmail.com>
9179
9180 * lisp/emacs-lisp/cl-print.el (cl-print-compiled-button): t by default.
9181
9182 * lisp/emacs-lisp/debug.el (debugger-insert-backtrace):
9183 * lisp/help-fns.el (describe-variable): No need to let-bind
9184 `cl-print-compiled-button' to t anymore.
9185
91862017-07-02 Philipp Stephani <phst@google.com>
9187
9188 Electric quotes: Improve support for Markdown mode (Bug#24709)
9189
9190 Introduce a new user option 'electric-quote-context-sensitive'. If
9191 non-nil, have ' insert an opening quote if sensible.
9192
9193 Also introduce a new variable 'electric-quote-code-faces'. Major
9194 modes such as 'markdown-mode' can add faces to this list to treat text
9195 as inline code and disable electric quoting.
9196
9197 * lisp/electric.el (electric-quote-context-sensitive): New user
9198 option.
9199 (electric-quote-code-faces): New variable.
9200 (electric-quote-post-self-insert-function): Treat ' as ` if
9201 desired and applicable; disable electric quoting for given faces.
9202
9203 * test/lisp/electric-tests.el (electric-quote-opening-single)
9204 (electric-quote-closing-single, electric-quote-opening-double)
9205 (electric-quote-closing-double)
9206 (electric-quote-context-sensitive-backtick)
9207 (electric-quote-context-sensitive-bob-single)
9208 (electric-quote-context-sensitive-bob-double)
9209 (electric-quote-context-sensitive-bol-single)
9210 (electric-quote-context-sensitive-bol-double)
9211 (electric-quote-context-sensitive-after-space-single)
9212 (electric-quote-context-sensitive-after-space-double)
9213 (electric-quote-context-sensitive-after-letter-single)
9214 (electric-quote-context-sensitive-after-letter-double)
9215 (electric-quote-context-sensitive-after-paren-single)
9216 (electric-quote-context-sensitive-after-paren-double)
9217 (electric-quote-markdown-in-text)
9218 (electric-quote-markdown-in-code): New unit tests.
9219
92202017-07-02 Michael Albinus <michael.albinus@gmx.de>
9221
9222 * doc/misc/tramp.texi: Replace ftp:// and http:// URLs by https://.
9223
92242017-07-02 Eli Zaretskii <eliz@gnu.org>
9225
9226 Avoid off-by-one errors in column C-n/C-p calculations
9227
9228 * src/indent.c (Fvertical_motion): Help C-n/C-p estimate correctly
9229 the width used up by line numbers by looking near the window-start
9230 point.
9231
92322017-07-02 Tino Calancha <tino.calancha@gmail.com>
9233
9234 Ask confirmation for all suspicious wildcards
9235
9236 * lisp/dired-aux.el (dired-do-shell-command): Check that all
9237 the wildcards are right. Otherwise, ask for confirmation (Bug#27496).
9238
92392017-07-02 Tino Calancha <tino.calancha@gmail.com>
9240
9241 Extend dired-do-shell-command substitutions
9242
9243 Substitute "`?`" inside command with the current file name.
9244 See details in:
9245 https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00618.html
9246 * lisp/dired-aux.el (dired-quark-subst-regexp, dired-star-subst-regexp):
9247 Mark as obsolete.
9248 (dired-isolated-string-re): New defun.
9249 (dired--star-or-qmark-p): New predicate.
9250 (dired-do-shell-command): Use dired--star-or-qmark-p. Substitute "`?`"
9251 with the current file name.
9252 * doc/emacs/dired.texi (Shell Commands in Dired): Update manual.
9253
92542017-07-02 Alan Mackenzie <acm@muc.de>
9255
9256 Fix bug in yesterday's CC Mode commit.
9257
9258 * lisp/progmodes/cc-mode.el (c-quoted-number-head-before-point): Check a
9259 search has succeded before using the match data.
9260 (c-quoted-number-head-before-point, c-quoted-number-head-after-point):
9261 Specify that the position of the extremity of the head or tail is in the
9262 match data.
9263
92642017-07-02 Philipp Stephani <phst@google.com>
9265
9266 Remove FIXME comments about sentinel values
9267
9268 These FIXMEs can't be addressed because they would require breaking
9269 changes to the module API. Furthermore, other module functions don't
9270 return sentinel values as well, so users generally have to call
9271 non_local_exit_check anyway.
9272
9273 * src/emacs-module.c (module_set_user_ptr)
9274 (module_set_user_finalizer, module_vec_set, module_vec_size): Remove
9275 FIXME comments.
9276
92772017-07-02 Philipp Stephani <phst@google.com>
9278
9279 Adapt Lisp reference to reader changes
9280
9281 The reader now warns about some unescaped character literals, but
9282 still allows them for compatibility reasons. Slightly adapt the
9283 manual to forbid them officially.
9284
9285 * doc/lispref/objects.texi (Basic Char Syntax): Document that
9286 backslashes are now required before some characters.
9287
92882017-07-02 Michael Albinus <michael.albinus@gmx.de>
9289
9290 Fix Bug#27502
9291
9292 * lisp/autorevert.el (auto-revert-find-file-function): New defun.
9293 (find-file-hook): Use it. (Bug#27502)
9294 (auto-revert-remove-current-buffer): New defun.
9295 (auto-revert-mode, auto-revert-buffers): Use it.
9296
92972017-07-02 Noam Postavsky <npostavs@gmail.com>
9298
9299 Let test summary go through even if some logs were not generated
9300
9301 * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Check
9302 for existence of log files before reading.
9303
93042017-07-01 Philipp Stephani <phst@google.com>
9305
9306 * src/module-env-25.h (copy_string_contents): Fix comment.
9307
93082017-07-01 Philipp Stephani <phst@google.com>
9309
9310 Also mark module init function as noexcept if possible
9311
9312 * src/emacs-module.h.in (emacs_module_init): Mark as noexcept if
9313 possible.
9314
93152017-07-01 Philipp Stephani <phst@google.com>
9316
9317 Improve C++98 compatibility
9318
9319 * src/emacs-module.h.in (emacs_funcall_exit): Lose trailing comma.
9320 C++98 doesn't allow trailing commas in enumerations.
9321
93222017-07-01 Eli Zaretskii <eliz@gnu.org>
9323
9324 Minor copyedits of manuals regarding bidi conformance
9325
9326 * doc/emacs/mule.texi (Bidirectional Editing):
9327 * doc/lispref/display.texi (Bidirectional Display): Update the
9328 bidi conformance text.
9329
93302017-07-01 Alan Mackenzie <acm@muc.de>
9331
9332 Make C++ digit separators work. Amend the handling of single quotes generally
9333
9334 Single quotes, even in strings and comments, are now marked with the
9335 "punctuation" syntax-table property, except where they are validly bounding a
9336 character literal. They are font locked with font-lock-warning-face except
9337 where they are valid. This is done in C, C++, ObjC, and Java Modes.
9338
9339 * lisp/progmodes/cc-defs.el (c-clear-char-property-with-value-on-char-function)
9340 (c-clear-char-property-with-value-on-char, c-put-char-properties-on-char): New
9341 functions/macros.
9342
9343 * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes): New function.
9344 (c-basic-matchers-before): invoke c-font-lock-invalid-single-quotes.
9345
9346 * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Remove
9347 c-before-after-change-digit-quote from wherever it occurs. Insert
9348 c-parse-quotes-before-change into the entries for the languages where it is
9349 needed.
9350 (c-before-font-lock-functions): Remove c-before-after-change-digit-quote from
9351 wherever it occurs. Insert c-parse-quotes-after-change into the entries for
9352 the languages which need it.
9353 (c-has-quoted-numbers): New lang-defconst/-defvar.
9354
9355 * lisp/progmodes/cc-mode.el (c-before-after-change-digit-quote): Remove.
9356 (c-maybe-quoted-number-head, c-maybe-quoted-number-tail)
9357 (c-maybe-quoted-number): New defconsts.
9358 (c-quoted-number-head-before-point, c-quoted-number-tail-after-point)
9359 (c-quoted-number-straddling-point, c-parse-quotes-before-change)
9360 (c-parse-quotes-after-change): New functions.
9361
93622017-07-01 Noam Postavsky <npostavs@gmail.com>
9363
9364 Ignore mouse-movement for describe-key-briefly (Bug#12204)
9365
9366 * lisp/help.el (help-read-key-sequence): Add optional argument ot
9367 ignore `mouse-movement' events.
9368 (describe-key-briefly): Use it.
9369 * doc/emacs/help.texi (Key Help):
9370 * etc/NEWS: Mention that mouse movement is ignored.
9371
93722017-07-01 Noam Postavsky <npostavs@gmail.com>
9373
9374 Refactor key describing commands
9375
9376 * lisp/help.el (help-read-key-sequence, help--analyze-key): New
9377 functions, extracted from `describe-key' and `describe-key-briefly'.
9378 (describe-key, describe-key-briefly): Use them.
9379
93802017-07-01 Eli Zaretskii <eliz@gnu.org>
9381
9382 Improve display of tabs with line numbers
9383
9384 * src/xdisp.c (x_produce_glyphs): Improve calculation of next tab
9385 stop in hscrolled lines. Prevent aborts in compute_line_metrics.
9386
93872017-07-01 Alan Third <alan@idiocy.org>
9388
9389 Fix threads on NS (bug#25265)
9390
9391 src/nsterm.h (ns_select): Compiler doesn't like sigmask being const.
9392 (ns_run_loop_break) [HAVE_PTHREAD]: New function.
9393 src/nsterm.m (ns_select): Call thread_select from within ns_select.
9394 (ns_run_loop_break) [HAVE_PTHREAD]: New function.
9395 (ns_send_appdefined): Don't wait for main thread when sending app
9396 defined event.
9397 src/process.c (wait_reading_process_output): Call thread_select from
9398 within ns_select.
9399 src/systhread.c (sys_cond_broadcast) [HAVE_NS]: Break ns_select out of
9400 its event loop using ns_run_loop_break.
9401
94022017-07-01 Eli Zaretskii <eliz@gnu.org>
9403
9404 Avoid slow redisplay under 'visual' mode of line numbers
9405
9406 * src/xdisp.c (display_count_lines_visually): Avoid very slow
9407 redisplay when this function is invoked very far from point.
9408 Reported by Alex <agrambot@gmail.com>.
9409
94102017-07-01 Noam Postavsky <npostavs@gmail.com>
9411
9412 * lisp/help-fns.el (describe-variable): Let-bind cl-print-compiled-button.
9413
94142017-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
9415
9416 * lisp/emacs-lisp/cl-extra.el (cl--random-state): New defstruct
9417
9418 (cl--random-state, cl--random-time): Move from cl-lib.el.
9419 (cl-random): Use struct accessors.
9420 (cl-random-state-p): Remove, provided by the defstruct.
9421 (cl-make-random-state): Rewrite to struct constructor.
9422
94232017-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
9424
9425 * lisp/emacs-lisp/debug.el (debugger-list-functions): Remove obsolete msg
9426
94272017-06-30 Eli Zaretskii <eliz@gnu.org>
9428
9429 Improve documentation of faces related to display-line-numbers
9430
9431 * lisp/faces.el (line-number, line-number-current-line): Warn
9432 against using non-monospaced fonts.
9433
94342017-06-30 Eli Zaretskii <eliz@gnu.org>
9435
9436 Fix relative-number display with non-nil display-line-number-width
9437
9438 * src/xdisp.c (maybe_produce_line_number): Don't treat a zero
9439 value of display-line-number-width as acceptable.
9440 Handle the case of 'relative' with display-line-number-width
9441 non-nil and smaller than the absolute line number requires.
9442 Reported by Alex <agrambot@gmail.com>.
9443
94442017-06-30 Michael Albinus <michael.albinus@gmx.de>
9445
9446 Release Tramp 2.3.2
9447
9448 * doc/misc/tramp.texi (Android shell setup): Show default file name.
9449 Structure section.
9450
9451 * doc/misc/trampver.texi:
9452 * lisp/net/trampver.el: Change version to "2.3.2".
9453
9454 * test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory):
9455 Offer home directory for mock method if it doesn't exist.
9456
94572017-06-30 Eli Zaretskii <eliz@gnu.org>
9458
9459 Add documentation for display-line-numbers
9460
9461 * doc/emacs/custom.texi (Init Rebinding):
9462 * doc/emacs/modes.texi (Minor Modes): Remove references to
9463 linum-mode.
9464 * doc/emacs/display.texi (Display Custom): Describe the
9465 line-number display.
9466 (Optional Mode Line): Fix the index entry to not conflict with
9467 that in "Display Custom".
9468 * doc/emacs/basic.texi (Position Info): Add cross-reference to
9469 "Display Custom", for line-number display.
9470
9471 * src/xdisp.c (syms_of_xdisp): <display-line-numbers>: Mention
9472 display-line-numbers-disable in the doc string.
9473
9474 * lisp/cus-start.el (standard): Fix lst change.
9475
94762017-06-30 Eli Zaretskii <eliz@gnu.org>
9477
9478 Support displaying zero as the number of the current line
9479
9480 * src/xdisp.c (syms_of_xdisp)
9481 <display-line-numbers-current-absolute>: New variable.
9482 <display-line-numbers>: Doc fix.
9483 (maybe_produce_line_number): Support nil value of
9484 display-line-numbers-current-absolute.
9485
9486 * lisp/cus-start.el (standard): Add customization form for
9487 display-line-numbers-current-absolute.
9488
9489 * etc/NEWS: Document recently introduced features.
9490
94912017-06-30 Eli Zaretskii <eliz@gnu.org>
9492
9493 Speed up the visual-mode relative line numbers
9494
9495 * src/xdisp.c (display_count_lines_visually): Introduce a
9496 shortcut: if a relative line number was already calculated for
9497 this iterator object, just increase it instead of the
9498 expensive call to move_it_to. Argument list changed to pass a
9499 pointer to the iterator object.
9500 (maybe_produce_line_number): Adjust for change in signature of
9501 display_count_lines_visually. Record the relative line number and
9502 the corresponding byte position in the iterator object also in the
9503 'visual' mode.
9504
95052017-06-30 Eli Zaretskii <eliz@gnu.org>
9506
9507 Fix hscrolling with line numbers on TTY frames
9508
9509 * src/xdisp.c (hscroll_window_tree): Correct the X offset
9510 calculations on TTY frames.
9511 * src/term.c (produce_glyphs): Use it->lnum_pixel_width instead of
9512 a kludge using it->lnum_width.
9513
95142017-06-30 Eli Zaretskii <eliz@gnu.org>
9515
9516 Fix TAB display when the line-number face uses a smaller/larger font
9517
9518 * src/dispextern.h (struct it): New member lnum_pixel_width.
9519 * src/xdisp.c (maybe_produce_line_number): Compute the width of
9520 the line-number display in pixels.
9521 (x_produce_glyphs): Use it->lnum_pixel_width instead of a kludge
9522 that used it->lnum_width and made assumptions about pixel width.
9523
95242017-06-30 Noam Postavsky <npostavs@gmail.com>
9525
9526 Escape NUL bytes in X selections (Bug#6991)
9527
9528 * lisp/term/w32-win.el (w32--set-selection):
9529 * lisp/select.el (xselect--encode-string): Replace NUL bytes with
9530 "\0".
9531 * doc/emacs/killing.texi: Document new behavior.
9532 * etc/NEWS (times): Announce it.
9533
95342017-06-30 Noam Postavsky <npostavs@gmail.com>
9535
9536 Hide byte code in backtraces (Bug#6991)
9537
9538 * lisp/emacs-lisp/debug.el (debugger-print-function): New defcustom,
9539 defaulting to `cl-print'.
9540 (debugger-insert-backtrace, debugger-setup-buffer): Use it instead of
9541 `prin1'.
9542 * etc/NEWS: Announce it.
9543
95442017-06-30 Noam Postavsky <npostavs@gmail.com>
9545
9546 Don't redundantly cl-print arglist in function docstring again
9547
9548 * lisp/emacs-lisp/cl-print.el (cl-print-object): Don't print arglist
9549 part of docstring.
9550 * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Update
9551 test accordingly.
9552
95532017-06-30 Noam Postavsky <npostavs@gmail.com>
9554
9555 Escape control characters in backtraces (Bug#6991)
9556
9557 * src/print.c (syms_of_print): Add new variable,
9558 print-escape-control-characters.
9559 (print_object): Print control characters with octal escape codes when
9560 print-escape-control-characters is true.
9561 * lisp/subr.el (backtrace):
9562 * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Bind
9563 `print-escape-control-characters' to t.
9564
95652017-06-30 Noam Postavsky <npostavs@gmail.com>
9566
9567 Improve ert backtrace recording
9568
9569 Change ert to use the new `backtrace-frames' function instead of
9570 collecting frames one by one with `backtrace-frame'. Additionally,
9571 collect frames starting from `signal' instead the somewhat arbitrary
9572 "6 from the bottom". Skipping 6 frames would skip the expression that
9573 actually caused the signal that triggered the debugger. Possibly 6
9574 was chosen because in the case of a failed test, the triggering frame
9575 is an `ert-fail' call, which is not so interesting. But in case of a
9576 test throwing an error, this drops the `error' call which is too much.
9577
9578 * lisp/emacs-lisp/debug.el (debugger-make-xrefs): Remove.
9579 * lisp/emacs-lisp/ert.el (ert--make-xrefs-region): Bring in relevant
9580 code from `debugger-make-xrefs'.
9581 (ert--print-backtrace): Add DO-XREFS parameter, delegate to
9582 `debugger-insert-backtrace'.
9583 (ert--run-test-debugger): Record the backtrace frames starting from
9584 the instigating `signal' call.
9585 (ert-run-tests-batch): Pass nil for `ert--print-backtrace's new
9586 DO-XREFS parameter.
9587 (ert-results-pop-to-backtrace-for-test-at-point): Pass t as DO-XREFS
9588 to `ert--print-backtrace' and remove call to `debugger-make-xrefs'.
9589 * test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Check
9590 the backtrace list instead of comparing its string representation.
9591 Expect `signal' to be the first frame.
9592
95932017-06-30 Noam Postavsky <npostavs@gmail.com>
9594
9595 Operate on frame list instead of printed backtrace
9596
9597 * lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function,
9598 prints the given backtrace frames.
9599 (debugger-setup-buffer): Use it instead of editing the backtrace
9600 buffer text.
9601
96022017-06-29 Eli Zaretskii <eliz@gnu.org>
9603
9604 Minor fixes
9605
9606 * src/xdisp.c (maybe_produce_line_number): Fix bug that caused
9607 line numbers to be displayed in empty lines beyond ZV.
9608 (x_produce_glyphs): Start fixing TAB display in truncated lines.
9609
96102017-06-29 Michael Albinus <michael.albinus@gmx.de>
9611
9612 Improve timer handling when Tramp accepts output
9613
9614 * lisp/net/tramp-compat.el: Avoid compiler warning.
9615
9616 * lisp/net/tramp-sh.el (tramp-sh-file-name-handler):
9617 Remove lock machinery.
9618
9619 * lisp/net/tramp.el (tramp-locked, tramp-locker): Move up.
9620 (tramp-file-name-handler): Add lock machinery from
9621 `tramp-sh-file-name-handler'. Allow timers to run.
9622 (tramp-accept-process-output): Remove nasty workaround.
9623 Suppress timers.
9624
9625 * test/lisp/net/tramp-tests.el (shell-command-sentinel):
9626 Suppress run in tests.
9627 (tramp--instrument-test-case-p): New defvar.
9628 (tramp--instrument-test-case): Use it in order to allow nested calls.
9629 (tramp--test-message, tramp--test-backtrace): New defsubst,
9630 will be used for occasional test instrumentation.
9631 (tramp-test00-availability, tramp-test31-vc-registered): Use them.
9632 (tramp-test28-shell-command)
9633 (tramp--test-shell-command-to-string-asynchronously): Suppress
9634 nasty messages. Don't overwrite sentinel.
9635 (tramp-test36-asynchronous-requests): Rewrite major parts.
9636 Expect :passed.
9637
96382017-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
9639
9640 * lisp/url/url-history.el: Use lexical-binding
9641
9642 (url-completion-function): Mark as obsolete.
9643 Mark unused args accordingly.
9644
96452017-06-28 Noam Postavsky <npostavs@gmail.com>
9646
9647 Don't assume url structs are vectors (Bug#27333)
9648
9649 * lisp/url/url-history.el (url-history-update-url): Use `url-p'
9650 instead of `vectorp'.
9651
96522017-06-28 Mark Oteiza <mvoteiza@udel.edu>
9653
9654 Replace with dolist some uses of while
9655
9656 * lisp/calc/calc-units.el (calc-permanent-units):
9657 (math-compare-unit-names, math-simplify-units-quotient):
9658 (math-build-units-table-buffer): Use dolist to replace extra bindings
9659 and some while loops.
9660
96612017-06-28 Noam Postavsky <npostavs@gmail.com>
9662
9663 Make tcl-auto-fill-mode obsolete (Bug#10772)
9664
9665 * lisp/progmodes/tcl.el (tcl-auto-fill-mode): Declare obsolete.
9666 * etc/NEWS: Announce it.
9667
96682017-06-28 Noam Postavsky <npostavs@gmail.com>
9669
9670 Don't read eshell/which output from *Help* buffer (Bug#26894)
9671
9672 * lisp/help-fns.el (help-fns--analyse-function)
9673 (help-fns-function-description-header): New functions, extracted from
9674 describe-function-1.
9675 (describe-function-1): Use them.
9676 * lisp/eshell/esh-cmd.el (eshell/which): Use
9677 `help-fns-function-description-header' instead of
9678 `describe-function-1'.
9679
96802017-06-27 Eli Zaretskii <eliz@gnu.org>
9681
9682 Support default-text-properties
9683
9684 * src/xdisp.c (should_produce_line_number): Call get-char-property
9685 at ZV as well, to support default-text-properties.
9686
96872017-06-27 Eli Zaretskii <eliz@gnu.org>
9688
9689 Avoid segfaults when some display vector is an empty string
9690
9691 * src/xdisp.c (next_element_from_display_vector): Don't try
9692 accessing the dpvec[] array if its size is zero. (Bug#27504)
9693
96942017-06-26 Eli Zaretskii <eliz@gnu.org>
9695
9696 Initial support for visually-relative line numbers
9697
9698 Works very slowly.
9699
9700 * src/xdisp.c (display_count_lines_visually): New function.
9701 (maybe_produce_line_number): Support 'visual' mode of line-number
9702 display.
9703 * src/xdisp.c (maybe_produce_line_number): Update IT's metrics
9704 also when glyph_row is NULL. This is important for move_it_*
9705 functions.
9706 (syms_of_xdisp) <display-line-number-width>: Now buffer-local.
9707 (try_window_id, redisplay_window, try_cursor_movement): For
9708 'visual' line-number display, disable the same redisplay
9709 optimizations as for 'relative'.
9710
9711 * lisp/cus-start.el (standard): Add new value for the
9712 customization form of display-line-numbers.
9713
97142017-06-26 Eli Zaretskii <eliz@gnu.org>
9715
9716 Update IT's metrics while simulating display
9717
9718 * src/xdisp.c (maybe_produce_line_number): Update IT's metrics
9719 also when glyph_row is NULL. This is important for move_it_*
9720 functions.
9721
97222017-06-26 Teemu Likonen <tlikonen@iki.fi>
9723
9724 Fix bug in handling GnuPG's TRUST_MARGINAL status
9725
9726 * lisp/epg.el (epg--status-TRUST_MARGINAL): Change symbol `marginal'
9727 to `good'.
9728
97292017-06-26 Tino Calancha <tino.calancha@gmail.com>
9730
9731 Prefer `when' instead of 1-branch `if'
9732
9733 * lisp/dired-aux.el (dired-do-shell-command): Store condition value
9734 in local variable ok.
9735 Use `when' instead of 1-branch `if'.
9736
97372017-06-26 Tino Calancha <tino.calancha@gmail.com>
9738
9739 Use #' instead of (function ...)
9740
9741 * lisp/dired-aux.el (dired-do-chxxx, dired-clean-directory)
9742 (dired-mark-confirm, dired-query, dired-byte-compile)
9743 (dired-load, dired-update-file-line, dired-after-subdir-garbage)
9744 (dired-relist-file, dired-rename-subdir, dired-do-create-files)
9745 (dired-mark-read-file-name, dired-do-copy, dired-do-symlink)
9746 (dired-do-hardlink, dired-do-rename, dired-do-rename-regexp)
9747 (dired-do-copy-regexp, dired-do-hardlink-regexp)
9748 (dired-do-symlink-regexp, dired-create-files-non-directory)
9749 (dired-upcase, dired-downcase)
9750
9751 * lisp/dired.el (dired-mode, dired-copy-filename-as-kill)
9752 (dired-internal-do-deletions, dired-internal-do-deletions):
9753 Prefer #' instead of (function ...).
9754
97552017-06-26 Tino Calancha <tino.calancha@gmail.com>
9756
9757 Don't quote lambda forms
9758
9759 * lisp/dired.el (dired-re-maybe-mark, dired-map-over-marks)
9760 (dired-mark, dired-desktop-buffer-misc-data)
9761
9762 * lisp/dired-aux.el (dired-do-create-files, dired-do-create-files-regexp)
9763 (dired-create-files-non-directory, dired-insert-subdir-validate)
9764 (dired-alist-sort, dired-do-shell-command): Don't quote lambda forms.
9765
97662017-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
9767
9768 * lisp/progmodes/cc-fonts.el: Remove/mark unused vars
9769
9770 (c-font-lock-declarators): Remove unused vars `id-end', `paren-depth',
9771 and `brackets-after-id'.
9772 (c-font-lock-objc-methods): Mark unused args.
9773
97742017-06-25 Paul Eggert <eggert@cs.ucla.edu>
9775
9776 Omit null-pointer test in intervals.h FRAME
9777
9778 * src/intervals.h (ROOT_INTERVAL_P, ONLY_INTERVAL_P)
9779 (INTERVAL_LAST_POS): Omit unnecessary parens.
9780 (LENGTH): Omit test for null pointer. The argument is never null.
9781 The unnecessary test causes GCC 7.1.0 to assume that the argument
9782 might be null, and therefore to issue false alarms when the
9783 argument is dereferenced in other expressions.
9784
97852017-06-25 Paul Eggert <eggert@cs.ucla.edu>
9786
9787 Parenthesize frame.h macro definitions
9788
9789 * src/frame.h (FRAME_TOOL_BAR_POSITION)
9790 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
9791 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
9792 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT)
9793 (FRAME_OVERRIDE_REDIRECT, FRAME_UNDECORATED, FRAME_PARENT_FRAME)
9794 (FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP)
9795 (FRAME_NO_ACCEPT_FOCUS, FRAME_NO_SPECIAL_GLYPHS, FRAME_Z_GROUP)
9796 (FRAME_Z_GROUP_NONE, FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_BELOW)
9797 (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Parenthesize macro definiens
9798 to allow arbitrary expression arguments.
9799
98002017-06-25 Paul Eggert <eggert@cs.ucla.edu>
9801
9802 Port recent frame changes to GCC 7
9803
9804 * src/frame.c (keep_ratio): New arg P. Caller changed. Since it
9805 is non-null, it avoids a GCC 7 warning that FRAME_PARENT_FRAME
9806 might return null. This also avoids a run-time test.
9807
98082017-06-25 Eli Zaretskii <eliz@gnu.org>
9809
9810 Minor aesthetic fix of last change.
9811
98122017-06-25 Eli Zaretskii <eliz@gnu.org>
9813
9814 Allow to disable display of line numbers beyond EOB
9815
9816 * src/buffer.c (disable_line_numbers_overlay_at_eob): New
9817 function.
9818 * src/lisp.h (disable_line_numbers_overlay_at_eob): Add prototype.
9819 * src/xdisp.c (should_produce_line_number): When at ZV, call
9820 disable_line_numbers_overlay_at_eob to determine whether line
9821 numbers should be displayed beyond ZV.
9822
98232017-06-25 Michael Albinus <michael.albinus@gmx.de>
9824
9825 Fix Android 6/7 problems in Tramp
9826
9827 * lisp/net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): Fix link part.
9828 (tramp-adb-handle-directory-files-and-attributes)
9829 (tramp-adb-handle-file-name-all-completions): Insert "." and
9830 ".." only when needed.
9831 (tramp-adb-get-ls-command): Force one column output for toybox.
9832
98332017-06-25 Stefan-W. Hahn <stefan.hahn@s-hahn.de> (tiny change)
9834
9835 * lisp/subr.el (setq-local): Add debug declaration (Bug#27408).
9836
98372017-06-25 Eli Zaretskii <eliz@gnu.org>
9838
9839 Fix line number display for overlay/display strings with newlines
9840
9841 * src/xdisp.c (maybe_produce_line_number): Fix the condition for
9842 producing space glyphs instead of a line number to include the
9843 case of display strings and overlays.
9844
98452017-06-25 Alan Mackenzie <acm@muc.de>
9846
9847 Make CC Mode load cl-lib rather than cl in Emacs 26.
9848
9849 * lisp/progmodes/cc-cmds.el (c-declaration-limits): Remove unused local
9850 variable.
9851
9852 * lisp/progmodes/cc-defs.el (c--mapcan-status): Remove.
9853 (c--cl-library): New variable.
9854 (Top level): Amend the form which requires library cl or cl-lib.
9855 (c--mapcan, c--set-difference, c--intersection, c--macroexpand-all)
9856 (c--delete-duplicate): Amend to use c--cl-library instead of
9857 c--mapcan-status.
9858
9859 * lisp/progmodes/cc-engine.el (c-syntactic-skip-backward)
9860 (c-back-over-compound-identifier): Remove unused local variables.
9861
9862 * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove an unused
9863 local variable.
9864
9865 * lisp/progmodes/cc-langs.el (Top level): Amend to use c--cl-library instead
9866 of c--mapcan-status.
9867
9868 * lisp/progmodes/cc-styles.el (Top level): Add a cc-bytecomp-defun to try to
9869 silence a compiler warning.
9870
98712017-06-25 Martin Rudalics <rudalics@gmx.at>
9872
9873 Provide additional support for child frames
9874
9875 Provide mouse dragging and resizing of frames. Allow resizing
9876 frames proportionally. Provide additional functionality for
9877 child frames. Minor bug fixes.
9878
9879 * lisp/frame.el (frame-border-width, frame-pixel-width)
9880 (frame-pixel-height): Alias to `frame-internal-border-width',
9881 `frame-native-width' and `frame-native-height'.
9882 (frame-inner-width, frame-inner-height, frame-outer-width)
9883 (frame-outer-height): New functions.
9884 * lisp/minibuffer.el (completion-auto-help): Fix typo.
9885 * lisp/mouse.el (mouse-drag-line, mouse-drag-mode-line)
9886 (mouse-drag-header-line): Allow moving a frame by dragging the
9887 mode line of its bottommost window (on a minibuffer-less frame)
9888 or the header line of its topmost window.
9889 (mouse-drag-vertical-line): Mention argument in doc-string.
9890 (mouse-resize-frame, mouse-drag-frame, mouse-drag-left-edge)
9891 (mouse-drag-top-left-corner, mouse-drag-top-edge)
9892 (mouse-drag-top-right-corner, mouse-drag-right-edge)
9893 (mouse-drag-bottom-right-corner, mouse-drag-bottom-edge)
9894 (mouse-drag-bottom-left-corner): New functions for resizing a
9895 frame by dragging its internal border together with
9896 corresponding key bindings.
9897 * lisp/tooltip.el (tooltip-frame-parameters): Add
9898 'no-special-glyphs' to default parameters and update version
9899 tag.
9900 * lisp/window.el (frame-auto-hide-function): Add choice to make
9901 frame invisible and update version tag.
9902 (window--delete): Handle 'auto-hide-function' frame parameter.
9903 (window--maybe-raise-frame): Respect 'no-focus-on-map' and
9904 'no-accept-focus' frame parameters.
9905 (display-buffer--action-function-custom-type): Add
9906 `display-buffer-in-child-frame'.
9907 (display-buffer): Mention `display-buffer-in-child-frame' in
9908 doc-string.
9909 (display-buffer-in-child-frame): New action function for
9910 `display-buffer'.
9911 (window--sanitize-margin): Return zero when MARGIN cannot be
9912 sanitized.
9913 (fit-frame-to-buffer): Major rewrite to handle child frames and
9914 'fit-frame-to-buffer-sizes' and 'fit-frame-to-buffer-margins'
9915 frame parameters.
9916 (window-largest-empty-rectangle--maximums-1)
9917 (window-largest-empty-rectangle--maximums)
9918 (window-largest-empty-rectangle--disjoint-maximums)
9919 (window-largest-empty-rectangle): New functions.
9920
9921 * src/dispextern.h (WINDOW_WANTS_MODELINE_P)
9922 (WINDOW_WANTS_HEADER_LINE_P): Remove. Functionality is now
9923 provided by corresponding functions window_wants_modeline and
9924 window_wants_header_line in window.c. Adjust users.
9925 * src/dispnew.c (adjust_glyph_matrix)
9926 (buffer_posn_from_coords): Use window_wants_modeline and
9927 window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
9928 WINDOW_WANTS_HEADER_LINE_P.
9929 * src/frame.c (keep_ratio): New function.
9930 (adjust_frame_size): Call keep_ratio for each of F's child
9931 frames.
9932 (make_frame): Initialize no_special_glyphs slot.
9933 (frame_internal_border_part): New function.
9934 (Fframe_pixel_width, Fframe_pixel_height, Fborder_width): Rename
9935 to Fframe_native_width, Fframe_native_height mand
9936 Fframe_internal_border_width.
9937 (frame_parm_table): Add Qno_special_glyphs entry.
9938 (frame_float_type): New enumeration type.
9939 (frame_float): New function to handle frame size and position
9940 ratios.
9941 (x_set_frame_parameters): Handle size and position ratios.
9942 (x_set_no_special_glyphs): New function
9943 (x_figure_window_size): Handle size and position ratios.
9944 (syms_of_frame): Add Qdisplay_monitor_attributes_list,
9945 Qno_special_glyphs, Qframe_edges, Qkeep_ratio, Qwidth_only,
9946 Qheight_only, Qleft_only and Qtop_only.
9947 * src/frame.h (internal_border_part): New enumeration type.
9948 (struct frame): New slot no_special_glyphs.
9949 (FRAME_NO_SPECIAL_GLYPHS): New macro.
9950 * src/gtkutil.c (xg_frame_restack): Return immediately for
9951 GTK versions before 2.18.0.
9952 * src/keyboard.c (internal_border_parts): New array constant.
9953 (make_lispy_position): For frames with border dragging enabled
9954 return internal border part.
9955 (syms_of_keyboard): New symbols Qdrag_internal_border,
9956 Qleft_edge, Qtop_left_corner, Qtop_edge, Qtop_right_corner,
9957 Qright_edge, Qbottom_right_corner, Qbottom_edge and
9958 Qbottom_left_corner.
9959 * src/minibuf.c (read_minibuf_unwind): When exiting the
9960 minibuffer deal with frames that have the 'minibuffer-exit'
9961 parameter set.
9962 (syms_of_minibuf): New symbol Qminibuffer_exit.
9963 * src/nsfns.m (frame_parm_handler): Add entry for
9964 x_set_no_special_glyphs.
9965 (Fx_create_frame): Handle 'no-special-glyphs' parameter.
9966 Intitialize new cursor types for dragging frame borders.
9967 * src/nsterm.h (struct ns_output): Add new cursor types for
9968 dragging frame borders.
9969 * src/w32fns.c (w32_frame_parm_handlers): Add entry for
9970 x_set_no_special_glyphs.
9971 (Fx_create_frame): Handle 'no-special-glyphs' parameter.
9972 Intitialize new cursor types for dragging frame borders.
9973 * src/w32term.h (struct w32_output): Add new cursor types for
9974 dragging frame borders.
9975 * src/window.c (coordinates_in_window)
9976 (Fwindow_line_height, window_internal_height): Use
9977 window_wants_modeline and window_wants_header_line instead of
9978 WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
9979 (Fwindow_lines_pixel_dimensions): New function.
9980 (window_parameter): New function.
9981 (Fwindow_parameter): Call window_parameter.
9982 (window_wants_mode_line, window_wants_header_line): New
9983 functions replacing the macros WINDOW_WANTS_MODELINE_P and
9984 WINDOW_WANTS_HEADER_LINE_P from dispextern.h.
9985 (syms_of_window): New symbols Qmode_line_format and
9986 Qheader_line_format.
9987 * src/window.h: Reorganize and re-comment macros. Use
9988 window_wants_modeline and window_wants_header_line instead of
9989 WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
9990 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P): Minor rewrite.
9991 (WINDOW_BUFFER): New macro.
9992 (WINDOW_BOX_LEFT_EDGE_COL, WINDOW_BOX_RIGHT_EDGE_COL): Remove.
9993 * src/xdisp.c (window_text_bottom_y, window_box_height)
9994 (window_box, start_display)
9995 (compute_window_start_on_continuation_line)
9996 (try_cursor_movement, redisplay_window)
9997 (try_window_reusing_current_matrix, try_window_id)
9998 (display_line, expose_window): Use window_wants_modeline and
9999 window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
10000 WINDOW_WANTS_HEADER_LINE_P.
10001 (pos_visible_p, display_mode_lines): Respect W's
10002 'mode-line-format' and 'header-line-format' window parameters.
10003 (init_iterator): Use window_wants_modeline and
10004 window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
10005 WINDOW_WANTS_HEADER_LINE_P. For tip frames respect
10006 no_special_glyphs value.
10007 (note_mouse_highlight): Set frame border cursors when on
10008 internal border.
10009 (x_draw_right_divider, x_draw_bottom_divider): Try to improve
10010 drawing of window dividers.
10011 * src/xfns.c (mouse_cursor): Add entries for border parts.
10012 (mouse_cursor_types): Add entries for cursor types to drag
10013 frame borders.
10014 (INSTALL_CURSOR): Add entries for new cursor types to drag
10015 frame borders.
10016 (Fx_create_frame): Handle 'no-special-glyphs' parameter.
10017 (x_frame_parm_handlers): Add entry for
10018 x_set_no_special_glyphs.
10019 (Vx_window_left_edge_shape, Vx_window_top_left_corner_shape)
10020 (Vx_window_top_edge_shape, Vx_window_top_right_corner_shape)
10021 (Vx_window_right_edge_shape)
10022 (Vx_window_bottom_right_corner_shape)
10023 (Vx_window_bottom_edge_shape)
10024 (Vx_window_bottom_left_corner_shape): New variables.
10025 (x_frame_restack): Call xg_frame_restack only for GTK versions
10026 starting with 2.18.0.
10027 * src/xterm.c (x_free_frame_resources): Remove new cursors for
10028 dragging frame borders.
10029 * src/xterm.h (struct x_output): Add new cursor types for
10030 dragging frame borders.
10031
10032 * doc/lispref/display.texi (Size of Displayed Text): Document
10033 `window-lines-pixel-dimensions'.
10034 * doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging
10035 Parameters".
10036 * doc/lispref/frames.texi (Frame Size): Replace
10037 frame-pixel-width/-height by frame-native-width/-height. Add
10038 frame-inner-width/-height and frame-outer-width/-height docs.
10039 (Position Parameters): Describe specifying position as ratios.
10040 Clarify remark about positions relative to bottom/ridge display
10041 edge.
10042 (Size Parameters): Describe specifying sizes as ratios.
10043 Describe 'fit-frame-to-buffer-margins' and
10044 'fit-frame-to-buffer-sizes' parameters.
10045 (Layout Parameters): Describe 'no-special-glyphs' parameter.
10046 (Frame Interaction Parameters): Describe 'auto-hide-function',
10047 'minibuffer-exit' and 'keep-ratio' parameters.
10048 (Mouse Dragging Parameters): New section describing
10049 'drag-internal-border', 'drag-with-header-line',
10050 'drag-with-mode-line', 'snap-width', 'top-visible' and
10051 'bottom-visible' parameters.
10052 (Management Parameters): Mention that `override-redirect' has
10053 no effect on MS Windows.
10054 (Font and Color Parameters): Mention child frames for `alpha'
10055 parameter.
10056 (Child Frames): Rewrite section with description and cross
10057 references to new frame parameters added.
10058 * doc/lispref/modes.texi (Mode Line Basics): Mention
10059 'mode-line-format' and 'header-line-format' window parameters.
10060 * doc/lispref/windows.texi (Resizing Windows): Mention effect
10061 of `fit-frame-to-buffer-margins' for child frames.
10062 (Display Action Functions): New action function
10063 `display-buffer-in-child-frame'.
10064 (Quitting Windows): Mention `make-frame-invisible' as optional
10065 value of `frame-auto-hide-function' and `auto-hide-function'
10066 frame paameter.
10067 (Coordinates and Windows): Describe new function
10068 `window-largest-empty-rectangle'.
10069 (Window Parameters): Describe new parameters 'mode-line-format'
10070 and 'header-line-format'. Index all window parameters described
10071 in this section.
10072
100732017-06-25 Paul Eggert <eggert@cs.ucla.edu>
10074
10075 Adjust lm-verify to accept current notices
10076
10077 Problem reported by Mike Kupfer in:
10078 http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00512.html
10079 * lisp/emacs-lisp/lisp-mnt.el (lm-crack-copyright):
10080 Do not require later lines in a copyright notice to have more
10081 indentation than earlier lines.
10082
100832017-06-24 Eli Zaretskii <eliz@gnu.org>
10084
10085 Minor change in NEWS.
10086
10087 Improve documentation in NEWS.
10088
100892017-06-24 Eli Zaretskii <eliz@gnu.org>
10090
10091 Move additional hscrolling code into a suitable 'if'
10092
10093 * src/xdisp.c (hscroll_window_tree): Make additional calculations
10094 regarding glyphs produced for line numbers conditional on
10095 line-number display.
10096
100972017-06-24 Eli Zaretskii <eliz@gnu.org>
10098
10099 Partial fix of hscroll of truncated lines with line numbers
10100
10101 * src/xdisp.c (x_produce_glyphs, hscroll_window_tree): Adjust
10102 hscroll calculations to line-number display.
10103 * src/term.c (produce_glyphs): Adjust tab stop to window's
10104 hscroll. These two changes fix horizontal scrolling when line
10105 numbers are displayed. But there's still a bug: the horizontal
10106 shift of lines that begin with a TAB is different from the rest.
10107 * src/xdisp.c (move_it_in_display_line_to): Call
10108 should_produce_line_number to determine whether a line number
10109 should be produced for this screen line.
10110
101112017-06-24 Noam Postavsky <npostavs@gmail.com>
10112
10113 Don't change byte-compile-delete-errors at runtime (Bug#27340)
10114
10115 * lisp/emacs-lisp/eieio-core.el: Confine `cl-declaim' calls to compile
10116 time.
10117
101182017-06-24 Eli Zaretskii <eliz@gnu.org>
10119
10120 Allow Lisp program to disable line-number display for specific lines
10121
10122 * etc/NEWS: Update the documentation.
10123
10124 * src/xdisp.c (syms_of_xdisp) <display-line-numbers-disable>: New
10125 symbol.
10126 (should_produce_line_number): New function.
10127 (display_line): Use should_produce_line_number to determine
10128 whether a line number should be produced for each glyph row.
10129
101302017-06-24 Stefan Monnier <monnier@iro.umontreal.ca>
10131
10132 * lisp/net/html2text.el: Move to obsolete/.
10133
101342017-06-24 Eli Zaretskii <eliz@gnu.org>
10135
10136 Support a separate face for displaying the current line's number
10137
10138 * lisp/faces.el (line-number-current-line): New face.
10139
10140 * src/xdisp.c (syms_of_xdisp) <line-number-current-line>: New
10141 symbol.
10142 (try_window_id, try_cursor_movement): Disable these optimizations
10143 when the line-number-current-line face is different from
10144 line-number face.
10145 (maybe_produce_line_number): Display the current line in the
10146 line-number-current-line face, if it's different from line-number.
10147
101482017-06-24 Eli Zaretskii <eliz@gnu.org>
10149
10150 Change display of current line in relative mode
10151
10152 * src/xdisp.c (maybe_produce_line_number): In relative mode
10153 display the current line number as its absolute value, not as zero.
10154
101552017-06-24 Eli Zaretskii <eliz@gnu.org>
10156
10157 Rename display-line-width
10158
10159 * etc/NEWS:
10160 * src/xdisp.c (syms_of_xdisp, maybe_produce_line_number):
10161 * lisp/cus-start.el: Rename display-line-width to
10162 display-line-number-width.
10163
101642017-06-24 Eli Zaretskii <eliz@gnu.org>
10165
10166 Fix tab stops when line numbers are displayed
10167
10168 * src/xdisp.c (x_produce_glyphs):
10169 * src/term.c (produce_glyphs): Adjust tab stops for the horizontal
10170 space taken by the line-number display.
10171
101722017-06-24 Eli Zaretskii <eliz@gnu.org>
10173
10174 Fix crashes on TTY frames due to negative lnum_width.
10175
10176 Don't display line numbers in the minibuffer and in tooltip frames.
10177
101782017-06-24 Eli Zaretskii <eliz@gnu.org>
10179
10180 Fix problems with line-number updates in Follow mode
10181
10182 * src/xdisp.c (redisplay_window): If forced window-start requires
10183 to move a window's point, and the window is under relative
10184 line-number display, force another round of redisplay to update
10185 the relative line numbers. This fixes follow-mode "redisplay" of
10186 its window group.
10187
10188 * lisp/frame.el: Add display-line-numbers to the list of variables
10189 that should trigger redisplay of the current buffer.
10190
101912017-06-24 Eli Zaretskii <eliz@gnu.org>
10192
10193 Fix display of line numbers with fonts larger than the default
10194
10195 * src/xdisp.c (maybe_produce_line_number): Update the metrics in
10196 IT, not in IT->glyph_row, since the latter gets overwritten in
10197 display_line. Fixes display of line numbers when the font used
10198 for them is larger than that of the default face.
10199
102002017-06-23 Eli Zaretskii <eliz@gnu.org>
10201
10202 Fix background color beyond EOB and cursor display
10203
10204 * src/xdisp.c: (maybe_produce_line_number): Use the default face
10205 for background of the blank glyphs in the line-number area which
10206 are drawn beyond EOB.
10207 (display_line): Reset the glyph row's displays_text_p flag only on
10208 empty lines that don't display line numbers. This fixes cursor
10209 display beyond EOB. Fix the bidi information in the glyphs
10210 produced for line numbers. Set the avoid_cursor_p flag of glyphs
10211 produced for line numbers.
10212
102132017-06-23 Eli Zaretskii <eliz@gnu.org>
10214
10215 Fix display of indicate-empty-lines when line numbers are displayed
10216
10217 * src/xdisp.c (row_text_area_empty): New function.
10218 (display_line): Call row_text_area_empty to verify that a glyph
10219 row's text area is devoid of any glyphs that came from a buffer or
10220 a string. This fixes a bug with empty-lines indication
10221 disappearing when line numbers or line-prefix are displayed.
10222 (display_line): Delete the argument FORCE; all callers changed.
10223 Remove the condition for actually producing the glyphs for the
10224 line number, as even if the number didn't change we need to
10225 produce empty space.
10226
102272017-06-23 Vincent Belaïche <vincentb1@users.sourceforge.net>
10228
10229 Fix symbol relocation when the relocated cell is renamed.
10230
10231 * lisp/ses.el (ses-sym-rowcol): Check that the renamed cell
10232 hashmap has been instantiated before getting data from it. When
10233 editing several spreadsheets, and you have spreadsheet #1 with a
10234 cell named `foo', and no renamed cell in spreadsheet #2, then if
10235 you make a formula with `foo' in spreadsheet #2, not doing this
10236 check will make an error.
10237 (ses-cell-set-formula): Robustify versus incorrect cell references
10238 given in the user provided formula. An explicit error message is
10239 provided after the action when the user gives an incorrect cell
10240 reference, but the formula edition is not changed. This means that
10241 if the incorrect reference is to a cell that is created someday,
10242 then this new cell will not have the edited cell in its reference
10243 list. Fixing this can still be done by editing again the first
10244 cell formula.
10245 (ses-relocate-symbol): Do not create symbol of referred-to cell
10246 when this is a renamed cell.
10247
102482017-06-23 Rasmus <rasmus@gmx.us>
10249
10250 Synchronize with the "emacs-sync" branch from Org
10251
102522017-06-22 Paul Eggert <eggert@cs.ucla.edu>
10253
10254 Remove getc_unlocked configure-time check
10255
10256 * configure.ac (getc_unlocked): Remove check, as unlocked-io now
10257 does this for us.
10258
102592017-06-22 Paul Eggert <eggert@cs.ucla.edu>
10260
10261 Use unlocked stdio more systematically
10262
10263 This can improve performance significantly on stdio-bottlenecked code.
10264 E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop.
10265 * admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io.
10266 * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
10267 * lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c:
10268 * lib-src/profile.c, lib-src/update-game-score.c:
10269 Include unlocked-io.h instead of stdio.h, since these programs are
10270 single-threaded.
10271 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
10272 * lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib.
10273 * src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c:
10274 * src/lread.c, src/term.c:
10275 Include sysstdio.h, possibly instead of stdio.h, to define
10276 the unlocked functions if the system does not provide them.
10277 * src/charset.c, src/lread.c (getc_unlocked):
10278 Remove, since sysstdio.h now defines it if needed.
10279 * src/cm.c (cmputc, cmcheckmagic):
10280 * src/dispnew.c (update_frame, update_frame_with_menu)
10281 (update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user):
10282 * src/emacs.c (main, Fdump_emacs):
10283 * src/fileio.c (Fdo_auto_save, Fset_binary_mode):
10284 * src/image.c (slurp_file, png_read_from_file, png_load_body)
10285 (our_stdio_fill_input_buffer):
10286 * src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt):
10287 * src/lread.c (readbyte_from_file):
10288 * src/minibuf.c (read_minibuf_noninteractive):
10289 * src/print.c (printchar_to_stream, strout)
10290 (Fredirect_debugging_output):
10291 * src/sysdep.c (reset_sys_modes, procfs_ttyname)
10292 (procfs_get_total_memory):
10293 * src/term.c (tty_ring_bell, tty_send_additional_strings)
10294 (tty_set_terminal_modes, tty_reset_terminal_modes)
10295 (tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
10296 (tty_write_glyphs_with_face, tty_insert_glyphs)
10297 (tty_menu_activate):
10298 * src/xfaces.c (Fx_load_color_file):
10299 Use unlocked stdio when it should be safe.
10300 * src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked)
10301 (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
10302 (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
10303 (putc_unlocked, putchar_unloced): Provide substitutes if not declared.
10304
103052017-06-22 Glenn Morris <rgm@gnu.org>
10306
10307 * lisp/net/shr.el (shr-fill-text): Actually fill the text. (Bug#27399)
10308
103092017-06-22 Michal Nazarewicz <mina86@mina86.com>
10310
10311 unidata: don’t check special casing in unidata-check (bug#26656)
10312
10313 * admin/unidata/unidata-gen.el (unidata-check): Do not test special
10314 casing mapping of characters since that mapping is not constructed from
10315 the unidata.txt file.
10316 Also, check for integer decoder and cons char earlier so that less
10317 unnecessary processing is performed.
10318
103192017-06-22 Stefan Monnier <monnier@iro.umontreal.ca>
10320
10321 * lisp/descr-text.el (describe-char): Avoid string-*-multibyte
10322
10323 Avoid string-to-multibyte and string-as-unibyte.
10324 Don't make *Help* unibyte just because the char was in a unibyte buffer.
10325
103262017-06-22 Rasmus <rasmus@gmx.us>
10327
10328 Add Org schemas.xml contents to Emacs schemas.xml
10329
10330 Entries from the Org version of schemas.xml have been added to
10331 the Emacs version of schemas.xml.
10332
103332017-06-22 Rasmus <rasmus@gmx.us>
10334
10335 Update Org to v9.0.9
10336
10337 Please see etc/ORG-NEWS for details.
10338
103392017-06-22 Vincent Belaïche <vincentb1@users.sourceforge.net>
10340
10341 Do not hard code A1 cell reference, as it may be renamed.
10342
10343 * lisp/ses.el (ses-recalculate-all): `A1' -> `(ses-cell-symbol 0 0)'
10344
103452017-06-22 Martin Rudalics <rudalics@gmx.at>
10346
10347 Fix make_hash_table calls in lread.c
10348
10349 * src/lread.c (readevalloop, read_internal_start): Fix
10350 make_hash_table calls to make build succeed.
10351
103522017-06-22 Ken Raeburn <raeburn@raeburn.org>
10353
10354 Merge several Lisp reader speedups.
10355
103562017-06-22 Ken Raeburn <raeburn@raeburn.org>
10357
10358 Create less garbage to collect while reading symbols.
10359
10360 * src/lread.c (read1): When interning a symbol, only create a new
10361 string object for the name if we're going to use it for a new symbol
10362 object.
10363
103642017-06-22 Ken Raeburn <raeburn@raeburn.org>
10365
10366 Replace read_objects assoc list with two hash tables.
10367
10368 For larger input files with lots of shared data structures, an
10369 association list is too slow.
10370
10371 * src/lread.c (read_objects_map, read_objects_completed): New
10372 variables, replacing read_objects.
10373 (readevalloop): Initialize them with hash tables before starting a
10374 top-level read, if they're not already empty hash tables, and reset
10375 them to Qnil afterwards if something was added to the hash tables.
10376 (read_internal_start): Likewise.
10377 (read1): Store first the placeholder and later the newly read object
10378 into read_objects_map under the specified object number. If the new
10379 object can contain a reference to itself, store it in
10380 read_objects_completed.
10381 (substitute_objects_recurse): Check read_objects_completed instead of
10382 read_objects for the known possibly-recursive objects.
10383 (syms_of_lread): Update initializations.
10384
103852017-06-22 Ken Raeburn <raeburn@raeburn.org>
10386
10387 Use getc_unlocked.
10388
10389 * configure.ac: Check for getc_unlocked.
10390 * src/charset.c (read_hex, load_charset_map_from_file): Use
10391 getc_unlocked instead of getc.
10392 (getc_unlocked) [!HAVE_GETC_UNLOCKED]: Fall back to getc.
10393 * src/lread.c (readbyte_from_file, Fget_file_char, read1,
10394 getc_unlocked): Likewise.
10395
103962017-06-22 Stefan Monnier <monnier@iro.umontreal.ca>
10397
10398 Reduce lread substitutions.
10399
10400 * src/lread.c (read1): After reading an object using the "#n=" syntax,
10401 if the read object is a cons cell, instead of recursively substituting
10402 the placeholder with the new object, mutate the placeholder cons cell
10403 itself to have the correct car and cdr values.
10404
104052017-06-22 Ken Raeburn <raeburn@raeburn.org>
10406
10407 Short-circuit substitutions for some simple types.
10408
10409 Values that don't contain other values cannot be circular, so checking
10410 for circular objects is a waste of cycles.
10411
10412 * src/lread.c (substitute_object_recurse): If the subtree being
10413 examined is a symbol, number, or property-less string, just return
10414 it.
10415
104162017-06-22 Paul Eggert <eggert@cs.ucla.edu>
10417
10418 Limit style_format to MAX_ALLOCA
10419
10420 * src/editfns.c (styled_format): Subtract initial buffer size
10421 from sa_avail, since it is nontrivial.
10422
104232017-06-22 Paul Eggert <eggert@cs.ucla.edu>
10424
10425 Limit bidi_find_bracket_pairs to MAX_ALLOCA
10426
10427 * src/bidi.c (MAX_BPA_STACK): Now a constant, not a macro.
10428 Shrink it to allow for the two struct bidi_it objects in
10429 the same frame.
10430 (PUSH_BPA_STACK): Avoid integer overflow with enormous bidi cache.
10431 (bidi_find_bracket_pairs): Use compile-time check instead of runtime.
10432
104332017-06-22 Paul Eggert <eggert@cs.ucla.edu>
10434
10435 Limit insert-file-contents to MAX_ALLOCA
10436
10437 * src/fileio.c (READ_BUF_SIZE): Don’t allocate more than
10438 MAX_ALLOCA bytes in a single stack array.
10439
104402017-06-21 Paul Eggert <eggert@cs.ucla.edu>
10441
10442 Remove malloc_find_address relic
10443
10444 * src/gmalloc.c (register_heapinfo, _malloc_internal_nolock):
10445 Omit unnecessary initialization.
10446
104472017-06-21 Paul Eggert <eggert@cs.ucla.edu>
10448
10449 Fix temacs hybrid_malloc core dump
10450
10451 Without this patch, ./temacs would dump core sometimes on Fedora
10452 25 x86-64. The problem was that the hybrid allocator assumed that
10453 all pointers into bss_sbrk_buffer are allocated via gmalloc. This
10454 assumption is not true on Fedora, because the standard memory
10455 allocator calls gdefault_morecore, which means its blocks are
10456 interleaved with our blocks. Usually the code happened to work,
10457 because our data structures agreed with the glibc data structures,
10458 but this was merely luck due to a shared pedigree, and as glibc
10459 mutates our luck has run out.
10460 * src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [HYBRID_MALLOC]:
10461 Remove; no longer needed.
10462 (BLOCK): Use unsigned division, as that does the right thing near zero.
10463 (register_heapinfo, __malloc_internal_nolock, __free_internal_nolock)
10464 (_realloc_internal_nolock):
10465 Big blocks now have type -1, not 0, as 0 now means the block is
10466 not ours.
10467 (morecore_nolock): Omit now-unnecessary casts to size_t.
10468 (allocated_via_gmalloc) [HYBRID_MALLOC]: New function.
10469 (hybrid_free, hybrid_realloc) [HYBRID_MALLOC]: Use it, to
10470 avoid calling the wrong free or realloc function in some cases.
10471
104722017-06-21 Katsumi Yamaoka <yamaoka@jpl.org>
10473
10474 Make gnus-article-date-user work
10475
10476 * lisp/gnus/gnus-art.el (article-date-ut):
10477 Work for unfolded multi-line Date header.
10478 (article-transform-date):
10479 Refactor; add header name if it is missing in user-defined date line.
10480 (article-date-user): Fix name of date type.
10481
104822017-06-21 Noam Postavsky <npostavs@gmail.com>
10483
10484 Keep order of completion candidates (Bug#25995, Bug#24676)
10485
10486 * lisp/minibuffer.el (completion-pcm--filename-try-filter)
10487 (completion-pcm--all-completions): Use nreverse to undo the reversing
10488 caused by using push in the loop.
10489
104902017-06-21 Glenn Morris <rgm@gnu.org>
10491
10492 * src/lread.c (syms_of_lread) <load-history>: Doc fix.
10493
104942017-06-21 Alex Gramiak <agrambot@gmail.com>
10495
10496 Mark prolog indent variables as safe (bug#27369)
10497
10498 * lisp/progmodes/prolog.el (prolog-indent-width)
10499 (prolog-left-indent-regexp, prolog-paren-indent-p)
10500 (prolog-paren-indent): Add :safe property.
10501
105022017-06-20 Simen Heggestøyl <simenheg@gmail.com>
10503
10504 Remove `:options' from `css-electric-keys'
10505
10506 * lisp/textmodes/css-mode.el (css-electric-keys): Remove `:options`
10507 since it just duplicates the default value.
10508
105092017-06-20 Paul Eggert <eggert@cs.ucla.edu>
10510
10511 Fix crash when built by GNU Gold linker on x86
10512
10513 Problem reported by Andrés Musetti (Bug#27248).
10514 * src/widget.c (emacsFrameClassRec): Do not initialize superclass here.
10515 (emacsFrameClass): Now a function (which initializes the
10516 superclass) instead of a variable. All uses changed.
10517
105182017-06-20 Paul Eggert <eggert@cs.ucla.edu>
10519
10520 Simplify autogen.sh version checking
10521
10522 * autogen.sh (get_version): Simplify and make more reliable
10523 by using expr rather than echo | sed. Check exit status of program.
10524 Run program in subshell in case it cannot be executed.
10525 (check_version): Check exit status of command rather than its output.
10526 Check return status of get_version.
10527
105282017-06-20 Katsumi Yamaoka <yamaoka@jpl.org>
10529
10530 Delete old Date header in a simple way
10531
10532 * lisp/gnus/gnus-art.el (article-date-ut): Don't rely on text prop
10533 when searching the old Date header boundary in order to delete it.
10534
105352017-06-20 Bastien <bzg@gnu.org>
10536
10537 Revert "Don't bind org-agenda key to an anonymous function"
10538
10539 This reverts commit 49c0ff29c2e0243ba35ec17e3e3af49369be43db.
10540
105412017-06-20 Katsumi Yamaoka <yamaoka@jpl.org>
10542
10543 Bind enable-local-variables to nil globally (fix dbe3e41)
10544
10545 * lisp/gnus/mm-view.el (mm-display-inline-fontify):
10546 Bind enable-local-variables to nil globally instead of making it
10547 buffer-local; remove let-bind of local-enable-local-variables.
10548 cf. <b4mtw3bbfp5.fsf@jpl.org> in the emacs-devel list.
10549
105502017-06-20 Glenn Morris <rgm@gnu.org>
10551
10552 kill-matching-buffers to optionally not confirm
10553
10554 * lisp/files.el (kill-matching-buffers):
10555 Add option to not confirm killing. (Bug#27286)
10556
105572017-06-20 Glenn Morris <rgm@gnu.org>
10558
10559 * lisp/files.el (local-enable-local-variables): Doc fix.
10560
105612017-06-20 Glenn Morris <rgm@gnu.org>
10562
10563 autogen.sh: try to check for tool being present but broken
10564
10565 * autogen.sh (get_version): Check return status of "--version".
10566 (check_version): Try to distinguish between a missing tool
10567 and a broken one. (Bug#27288)
10568
105692017-06-19 Glenn Morris <rgm@gnu.org>
10570
10571 Avoid a custom-variable-type error (bug#27363)
10572
10573 * lisp/cus-edit.el (custom-variable-type):
10574 Avoid an error due to plist-put becoming stricter of late.
10575
105762017-06-19 Glenn Morris <rgm@gnu.org>
10577
10578 Don't put deleted packages in the trash (bug#14967)
10579
10580 * lisp/emacs-lisp/package.el (package-delete):
10581 Don't pay attention to delete-by-moving-to-trash.
10582
105832017-06-19 Nicolas Petton <nicolas@petton.fr>
10584
10585 Revert "Add current-line in simple.el"
10586
10587 This reverts commit ae98cdf9431604d0f722f1db217ca06debfbb7b6.
10588
105892017-06-19 Damien Cassou <damien@cassou.me>
10590
10591 Add current-line in simple.el
10592
10593 * lisp/simple.el (current-line): New function.
10594 * test/list/simple-tests.el: Add tests for current-line.
10595
105962017-06-19 Katsumi Yamaoka <yamaoka@jpl.org>
10597
10598 Don't try to eval local variables in Gnus article
10599
10600 * lisp/gnus/mm-view.el (mm-display-inline-fontify): Disable local vars.
10601
106022017-06-18 Paul Eggert <eggert@cs.ucla.edu>
10603
10604 Fix emacs-module.h cleaning
10605
10606 * src/Makefile.in (clean): Do not remove emacs-module.h.in.
10607 (bootstrap-clean): Remove emacs-module.h.
10608
106092017-06-18 Andreas Schwab <schwab@linux-m68k.org>
10610
10611 * url/url-util.el (url-get-url-at-point): Add missing group in
10612 regex.
10613
106142017-06-18 Paul Eggert <eggert@cs.ucla.edu>
10615
10616 * lib/gettext.h: Merge from gnulib.
10617
106182017-06-18 Paul Eggert <eggert@cs.ucla.edu>
10619
10620 Merge from gnulib
10621
10622 This (and my previous patch) incorporate:
10623 2017-06-17 diffseq: port to GCC 7 with --enable-gcc-warnings
10624 2017-06-15 gettext-h: Update comment
10625 * lib/diffseq.h: Copy from gnulib.
10626
106272017-06-17 Noam Postavsky <npostavs@gmail.com>
10628
10629 * test/Makefile.in: Don't suppress test failure for single tests.
10630
106312017-06-17 Philipp Stephani <phst@google.com>
10632
10633 emacs-module.h: Create emacs_env_26
10634
10635 This was part of the original design of the module
10636 API (https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00960.html),
10637 but I didn't take it into account when adding the should_quit
10638 function.
10639
10640 Instead of duplicating the environment fields or using the C
10641 preprocessor, use configure to build emacs-module.h.
10642
10643 * configure.ac: Expand emacs-module.h template.
10644
106452017-06-17 Eli Zaretskii <eliz@gnu.org>
10646
10647 Improve documentation of replace-buffer-contents
10648
10649 * etc/NEWS (replace-buffer-contents): Fix formatting.
10650
10651 * src/editfns.c (Freplace_buffer_contents): Doc fix.
10652
106532017-06-17 Eli Zaretskii <eliz@gnu.org>
10654
10655 Finish up native display of line numbers
10656
10657 * src/xdisp.c (maybe_produce_line_number): Produce a blank before
10658 the number, for R2L rows. Increment 'g' in the loop even if
10659 glyph_row is NULL. Accept 2nd argument FORCE and produce the
10660 line-number glyphs if it is non-zero.
10661 (move_it_in_display_line_to): Account for the space taken by the
10662 line-number glyphs. Call maybe_produce_line_number with 2nd
10663 argument non-zero.
10664 (set_cursor_from_row): Fix calculation of cursor X coordinate in
10665 R2L rows with display-produced glyphs at the beginning.
10666 (syms_of_xdisp) <line-number>: New face symbol.
10667 <relative, display-line-width>: New symbols.
10668 (maybe_produce_line_number): Use the line-number face for
10669 displaying line numbers. Support relative line-number display.
10670 Support user-defined width for displaying line numbers.
10671 (try_cursor_movement, try_window_id): Disable these optimizations
10672 when displaying relative line numbers.
10673 * src/dispextern.h (struct it): New member 'pt_lnum'.
10674
10675 * lisp/faces.el (line-number): New face.
10676 * lisp/cus-start.el (standard): Provide customization forms for
10677 display-line-numbers and display-line-width.
10678 * lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to
10679 turn display-line-numbers on and off.
10680
10681 * etc/NEWS: Document the new feature.
10682
106832017-06-17 Philipp Stephani <phst@google.com>
10684
10685 Allow local variables section to begin with a square bracket
10686
10687 Fixes Bug#27391.
10688
10689 * lisp/international/mule.el (find-auto-coding): Fix regular
10690 expression for "Local Variables" section.
10691
10692 * test/lisp/international/mule-tests.el (find-auto-coding--bug27391):
10693 Add unit test.
10694
106952017-06-17 Philipp Stephani <phst@google.com>
10696
10697 Remove unnecessary point motion
10698
10699 * src/editfns.c (Freplace_buffer_contents): Remove unnecessary point
10700 motion.
10701
107022017-06-17 Philipp Stephani <phst@google.com>
10703
10704 Add command to replace buffer contents
10705
10706 Add a new command 'replace-buffer-contents' that uses the Myers diff
10707 algorithm to non-destructively replace the accessible portion of the
10708 current buffer. The Myers algorithm is implemented in Gnulib.
10709
10710 * src/editfns.c (Freplace_buffer_contents): New command.
10711 (set_bit, bit_is_set, buffer_chars_equal): New helper functions.
10712 (syms_of_editfns): Define new command.
10713
10714 * test/src/editfns-tests.el (replace-buffer-contents-1)
10715 (replace-buffer-contents-2): New unit tests.
10716
10717 * src/buffer.h (BUF_FETCH_CHAR_AS_MULTIBYTE): New helper macro.
10718
10719 * admin/merge-gnulib (GNULIB_MODULES): Add diffseq.h and minmax.h.
10720
107212017-06-17 Andreas Schwab <schwab@linux-m68k.org>
10722
10723 * international/characters.el: Update list of zero and full width
10724 characters according to Unicode 9.0.0.
10725
107262017-06-17 Simen Heggestøyl <simenheg@gmail.com>
10727
10728 Complete CSS property values less eagerly (Bug#27392)
10729
10730 * lisp/textmodes/css-mode.el (css--complete-property-value): Be less
10731 eager by looking for a colon after the property which values are being
10732 completed for.
10733
10734 * test/lisp/textmodes/css-mode-tests.el (css-test-complete-property):
10735 Add a test case ensuring that properties that are prefixes of other
10736 properties don't hinder further completion.
10737
107382017-06-17 Noam Postavsky <npostavs@gmail.com>
10739
10740 Handle integer indices for eshell variables (Bug#26055)
10741
10742 * lisp/eshell/esh-var.el (eshell-index-value): Convert index to number
10743 if it's been marked as one, just like `eshell-lisp-command' does.
10744
107452017-06-17 Mark Oteiza <mvoteiza@udel.edu>
10746
10747 Don't bind org-agenda key to an anonymous function
10748
10749 * lisp/org/org-agenda.el: Bind "g" to named command.
10750 (org-agenda-redo-all): New command. Extend the previous functionality
10751 through a prefix argument.
10752
107532017-06-17 Dmitry Gutov <dgutov@yandex.ru>
10754
10755 Add test for the fix in the parent commit
10756
10757 * test/src/undo-tests.el (undo-test-skip-invalidated-markers):
10758 New test, for the fix in the parent commit.
10759
107602017-06-17 Nitish Chandra <nitishchandrachinta@gmail.com> (tiny change)
10761
10762 primitive-undo: Update only the currently valid markers
10763
10764 * lisp/simple.el (primitive-undo):
10765 Update only the currently valid markers (bug#25599).
10766
107672017-06-16 Eli Zaretskii <eliz@gnu.org>
10768
10769 Initial version of native display of line numbers
10770
10771 * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: New
10772 buffer-local variable.
10773 Include <math.h>.
10774 (maybe_produce_line_number): New function.
10775 (DISP_INFINITY): Rename from INFINITY, since math.h defines INFINITY.
10776 (try_window_reusing_current_matrix): Don't use this method when
10777 display-line-numbers is in effect.
10778 * src/dispextern.h (struct it): New members 'lnum'.
10779
107802017-06-16 Philipp Stephani <phst@google.com>
10781
10782 Correctly detect URLs surrounded by parentheses in comments
10783
10784 * lisp/thingatpt.el (thing-at-point--bounds-of-well-formed-url):
10785 Make parentheses match work inside comments.
10786
10787 * test/lisp/thingatpt-tests.el (thing-at-point-url-in-comment): Add
10788 unit test.
10789
107902017-06-16 Michael Albinus <michael.albinus@gmx.de>
10791
10792 Fix load-path issue when it contains remote directories
10793
10794 * lisp/net/tramp.el (tramp-file-name-handler): Use `autoloadp'.
10795 (tramp-use-absolute-autoload-file-names): New defun. Call it
10796 after loading tramp.el.
10797
10798 * test/lisp/net/tramp-tests.el (tramp-test38-remote-load-path):
10799 New test.
10800 (tramp-test39-unload): Rename.
10801
108022017-06-16 Alan Mackenzie <acm@muc.de>
10803
10804 Ensure C++ initializer lists don't get fontified.
10805
10806 * lisp/progmodes/cc-cmds.el (c-block-comment-flag): Move declaration to solve
10807 compiler warning.
10808
10809 * lisp/progmodes/cc-fonts.el (c-get-fontification-context): Add an extra
10810 clause to handle C++ member initialization lists.
10811 (c-font-lock-single-decl): New function, extracted from
10812 c-font-lock-declarations.
10813 (c-font-lock-declarations): Call c-font-lock-single-decl in place of inline
10814 code.
10815 (c-font-lock-cut-off-declarators): Make more rigorous by calling
10816 c-get-fontification-context, c-forward-decl-or-cast-1, and
10817 c-font-lock-single-decl in place of rather approximate code.
10818
108192017-06-16 Alan Mackenzie <acm@muc.de>
10820
10821 Fix hang in CC Mode when ":" is typed after identifier at EOB.
10822
10823 * list/progmodes/cc-engine.el (c-forward-declarator): Fix coding error
10824 confusing ":" and EOB.
10825
108262017-06-15 Alan Mackenzie <acm@muc.de>
10827
10828 Create a toggle between block and line comments in CC Mode.
10829
10830 Also (unrelated change) initialize the modes' keymaps at each loading.
10831
10832 * lisp/progmodes/cc-cmds.el (c-update-modeline): amend for the new information
10833 on the modeline.
10834 (c-block-comment-flag): New variable.
10835 (c-toggle-comment-style): New function.
10836
10837 * lisp/progmodes/cc-langs.el (c-block-comment-starter)
10838 (c-line-comment-starter): Make them c-lang-defvars.
10839 (c-block-comment-is-default): New c-lang-defvar.
10840 (comment-start, comment-end): Make the default values dependent on
10841 c-block-comment-is-default.
10842
10843 * lisp/progmodes/cc-mode.el (c-mode-base-map): Define C-c C-k in this map.
10844 (c-basic-common-init): Initialize c-block-comment-flag.
10845 (c-mode-map, c++-mode-map, objc-mode-map, java-mode-map, idl-mode-map)
10846 (pike-mode-map, awk-mode-map): Make entries in these key maps each time the
10847 mode is loaded rather than just once per Emacs session.
10848
10849 * doc/misc/cc-mode.texi (Comment Commands): Introduce the notion of comment
10850 style.
10851 (Minor Modes): Define comment style. Describe how comment style influences
10852 the information displayed on the modeline. Document c-toggle-comment-style.
10853 (FAQ): Add a question about toggling the comment style.
10854
108552017-06-15 Paul Eggert <eggert@cs.ucla.edu>
10856
10857 Pacify clang without munging C source
10858
10859 * configure.ac (WARN_CFLAGS): With Clang, use
10860 -Wno-tautological-compare regardless of --enable-gcc-warnings.
10861 (WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
10862 * lib/strftime.c: Copy from gnulib, reverting Clang-specific
10863 change which I hope is no longer needed.
10864 * src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
10865 some older non-POSIX hosts.
10866
108672017-06-15 Paul Eggert <eggert@cs.ucla.edu>
10868
10869 No need to complicate make-docfile.c for Clang
10870
10871 * lib-src/make-docfile.c (put_filename): Undo recent change.
10872 The Clang false alarm occurs only with CFLAGS=-save-temps and
10873 we needn’t worry about pacifying unusual compiler configurations.
10874
108752017-06-15 Paul Eggert <eggert@cs.ucla.edu>
10876
10877 Port './configure CC=clang' to Fedora 25
10878
10879 * configure.ac (HAVE_IMAGEMAGICK): Disable if even a
10880 standard function like MagickRelinquishMemory does not link.
10881
108822017-06-15 Paul Eggert <eggert@cs.ucla.edu>
10883
10884 Don’t worry about __STDC_VERSION__ in emacs-module
10885
10886 * src/emacs-module.h: Remove __STDC_VERSION__ check. In the past
10887 we’ve found that some compilers do not define this symbol even
10888 when they work well enough. If necessary features like stdbool.h
10889 are missing the compiler will complain eventually anyway.
10890
108912017-06-14 Paul Eggert <eggert@cs.ucla.edu>
10892
10893 Port cleanup check to Oracle Studio 12.5
10894
10895 * src/conf_post.h (__has_attribute_cleanup): Resurrect.
10896 * src/emacs-module.c: Verify __has_attribute (cleanup), but in an
10897 #if this time.
10898
108992017-06-14 Bastien <bzg@gnu.org>
10900
10901 Fix misformatted changelog entry
10902
109032017-06-14 Eli Zaretskii <eliz@gnu.org>
10904
10905 Avoid compiler warning in image.c on MS-Windows
10906
10907 * src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Avoid
10908 compilation warning under -Warray-bounds by temporarily disabling
10909 the -Warray-bounds option.
10910
109112017-06-14 Michael Albinus <michael.albinus@gmx.de>
10912
10913 Fix Bug#27315
10914
10915 * lisp/net/tramp-cache.el (tramp-cache-read-persistent-data):
10916 New defvar.
10917 (top): Use it.
10918
10919 * lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
10920 Check for connected, not for connectable. (Bug#27315)
10921 (tramp-process-actions):
10922 * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
10923 Use `tramp-cache-read-persistent-data'.
10924
10925 * test/lisp/net/tramp-tests.el (top): Set also
10926 `tramp-cache-read-persistent-data'.
10927
109282017-06-14 Noam Postavsky <npostavs@gmail.com>
10929
10930 Give a fixed default value for icomplete-prospects-height (Bug#26939)
10931
10932 * lisp/icomplete.el (icomplete-prospects-height): Default to 2.
10933 (icomplete-prospects-length): Remove.
10934 * etc/NEWS: Announce removal.
10935
109362017-06-14 Philipp Stephani <phst@google.com>
10937
10938 Remove some tautological comparisons involving rlim_t
10939
10940 Clang on macOS warns about these with -Wtautological-compare. POSIX
10941 guarantees that rlim_t is
10942 unsigned (cf.
10943 http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html),
10944 so these resource limits can never be negative.
10945
10946 * src/emacs.c (main): Remove tautological comparisons.
10947
109482017-06-14 Philipp Stephani <phst@google.com>
10949
10950 Use --module-assertions if modules are available
10951
10952 Using --module-assertions helps us find bugs in the test module. But
10953 we can use it only if Emacs was compiled with module support.
10954
10955 * test/Makefile.in (MODULES_EMACSOPT): New variable.
10956 (emacs): Use it.
10957
109582017-06-14 Philipp Stephani <phst@google.com>
10959
10960 Define --module-assertions only of modules are available
10961
10962 Fixes Bug#27352.
10963
10964 * src/emacs.c (usage_message, standard_args): Define
10965 --module-assertions only if Emacs has been compiled with module
10966 support.
10967
109682017-06-14 Katsumi Yamaoka <yamaoka@jpl.org>
10969
10970 gnus-article-read-summary-keys: Don't move point for WDD and WDW commands
10971
10972 * lisp/gnus/gnus-art.el (gnus-article-read-summary-keys):
10973 No need to restore window config for WDD and WDW commands.
10974
109752017-06-14 Thomas Fitzsimmons <fitzsim@fitzsim.org>
10976
10977 lisp/net/soap-client.el: Bump version to 3.1.3
10978
10979 * lisp/net/soap-client.el: Bump version to 3.1.3.
10980 (soap-name-p): Fix checkdoc issue.
10981
109822017-06-14 Alex Harsanyi <AlexHarsanyi@gmail.com>
10983
10984 Fix an HTTP encoding error in soap-client.el
10985
10986 * lisp/net/soap-client.el (soap-invoke-internal): Make
10987 SOAPAction header a UTF-8 encoded string.
10988
109892017-06-14 Paul Eggert <eggert@cs.ucla.edu>
10990
10991 Port cleanup attribute to Oracle Studio 12.5
10992
10993 * INSTALL (--with-modules): List cleanup attribute as prereq.
10994 * src/conf_post.h (__has_attribute_cleanup): Remove; no longer needed.
10995 * src/emacs-module.c (MODULE_SETJMP_1): Don’t attempt to verify
10996 (__has_attribute (cleanup)), as Oracle Studio 12.5 supports
10997 __has_attribute only inside preprocessor expressions. The C
10998 compiler should check the cleanup attribute in the next line anyway.
10999 (module_reset_handlerlist): Remove an unnecessary ‘const’
11000 that causes Oracle Studio 12.5 to refuse to compile.
11001
110022017-06-14 Glenn Morris <rgm@gnu.org>
11003
11004 Fix running tests in without-modules builds
11005
11006 * test/Makefile.in (EMACSOPT): Remove option that is only defined
11007 with-modules. emacs-module-tests.el passes it where needed.
11008
110092017-06-13 Glenn Morris <rgm@gnu.org>
11010
11011 * test/Makefile.in (src/emacs-module-tests.log): Out-of-tree fix.
11012
110132017-06-13 Philipp Stephani <phst@google.com>
11014
11015 Inline test module Makefile into main test Makefile
11016
11017 The test/data/emacs-module/Makefile only built a single target, and
11018 inlining it into test/Makefile simplifies dependency tracking and
11019 reduces code duplication.
11020
11021 * configure.ac: Don't build test/data/emacs-module/Makefile.
11022
11023 * Makefile.in ($(test_module)): Inline compilation.
11024 (clean): Also clean test module outputs.
11025
110262017-06-13 Michael Albinus <michael.albinus@gmx.de>
11027
11028 * lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Do not handle locally on w32.
11029
110302017-06-13 Michael Albinus <michael.albinus@gmx.de>
11031
11032 Minor tweaks in Tramp manual
11033
11034 * doc/misc/trampver.texi: Add prefixwithspace flag.
11035
11036 * doc/misc/tramp.texi (Password handling): Harmonize example.
11037 (File name completion): Use prefixwithspace flag.
11038 (Frequently Asked Questions): Explain `tramp-histfile-override'.
11039
110402017-06-13 Philipp Stephani <phst@google.com>
11041
11042 Silence two Clang warnings by introducing additional local variables
11043
11044 * lib/strftime.c (libc_hidden_def):
11045 * lib-src/make-docfile.c (put_filename): Introduce local variables to
11046 silence Clang warnings.
11047
110482017-06-13 Noam Postavsky <npostavs@gmail.com>
11049
11050 Fix wrong indentation after string literal (Bug#27306)
11051
11052 * lisp/emacs-lisp/lisp-mode.el (lisp-indent-state)
11053 (lisp-indent-calc-next): Remove `depth' field, use (car ppss) instead.
11054 * test/lisp/emacs-lisp/lisp-mode-tests.el
11055 (lisp-indent-region-after-string-literal): New test.
11056
110572017-06-13 Philipp Stephani <phst@google.com>
11058
11059 Fix version checks for emacs-module.h
11060
11061 We don't need C11 or C++11 because stdbool.h is in C99, and for C++ we
11062 don't need it at all.
11063
110642017-06-13 Noam Postavsky <npostavs@gmail.com>
11065
11066 Buttonize #<bytecode> part of printed functions (Bug#25226)
11067
11068 * lisp/emacs-lisp/cl-print.el: Autoload `disassemble-1'.
11069 (cl-print-compiled-button): New variable.
11070 (help-byte-code): New button type, calls `disassemble' in its action.
11071 (cl-print-object): Use it if `cl-print-compiled-button' is
11072 non-nil.
11073
110742017-06-12 Philipp Stephani <phst@google.com>
11075
11076 Print module structure sizes when initializing test module
11077
11078 * test/data/emacs-module/mod-test.c (emacs_module_init): Print
11079 compile-time and runtime sizes of module structures to ease debugging
11080
110812017-06-12 Glenn Morris <rgm@gnu.org>
11082
11083 Small portability fix for emacs-module.h (bug#27346)
11084
11085 * src/emacs-module.h (EMACS_ATTRIBUTE_NONNULL) [!__has_attribute]:
11086 Avoid 'error: missing binary operator before token "("'.
11087
110882017-06-12 Glenn Morris <rgm@gnu.org>
11089
11090 Give a more informative failure in module assertion test
11091
11092 * test/src/emacs-module-tests.el (module--test-assertions):
11093 Rephrase final check to give a more informative failure.
11094
110952017-06-12 Philipp Stephani <phst@google.com>
11096
11097 Fix off-by-one error
11098
11099 * test/data/emacs-module/mod-test.c (emacs_module_init): Fix
11100 off-by-one error.
11101
111022017-06-12 Glenn Morris <rgm@gnu.org>
11103
11104 Clean up after module assertion tests
11105
11106 * test/src/emacs-module-tests.el (module--test-assertions):
11107 Use a temporary directory to contain any core dumps.
11108
111092017-06-12 Glenn Morris <rgm@gnu.org>
11110
11111 Small improvement for module assertion test
11112
11113 * test/src/emacs-module-tests.el (module--test-assertions):
11114 Don't rely on the precise form of an "Abort" message.
11115
111162017-06-12 Glenn Morris <rgm@gnu.org>
11117
11118 Improve previous test/data/emacs-module/Makefile change
11119
11120 * test/data/emacs-module/Makefile.in (clean):
11121 Avoid doing unpleasant things if run in a build without modules.
11122
111232017-06-12 Glenn Morris <rgm@gnu.org>
11124
11125 Small improvements for test/data/emacs-module/Makefile
11126
11127 * test/data/emacs-module/Makefile.in (%.o):
11128 Fix emacs-module dependency.
11129 (SECONDARY): Stop make automatically deleting *.o.
11130 (clean): New rule.
11131
111322017-06-12 Glenn Morris <rgm@gnu.org>
11133
11134 * make-dist: Skip some more generated files in test/.
11135
111362017-06-12 Alan Third <alan@idiocy.org>
11137
11138 Note how fullscreen differs on the NS port
11139
11140 doc/lispref/frames.texi (Size Parameters):
11141 doc/emacs/frames.texi (Tool Bars): Add a description of how macOS
11142 hides the tool-bar and menu-bar in fullscreen.
11143
111442017-06-12 Alan Third <alan@idiocy.org>
11145
11146 Add no-focus-on-map to NS build (bug#25408)
11147
11148 * src/nsfns.m (ns_frame_parm_handlers): Add x_set_no_focus_on_map.
11149 (x-create-frame): Check for no-focus-on-map.
11150 * src/nsterm.h (x_set_no_focus_on_map): New function.
11151 * src/nsterm.m (x_set_no_focus_on_map): New function.
11152 (ns_raise_frame): Add parameter for specifying whether to focus the
11153 frame.
11154 (ns_frame_raise_lower):
11155 (x_make_frame_visible): Handle new parameter for ns_raise_frame.
11156
111572017-06-12 Paul Eggert <eggert@cs.ucla.edu>
11158
11159 _Noreturn not noreturn
11160
11161 _Noreturn is more portable to non-C11 platforms. See:
11162 https://www.gnu.org/software/gnulib/manual/html_node/stdnoreturn_002eh.html
11163 * src/emacs-module.c: Use _Noreturn, not noreturn. No need to
11164 include <stdnoreturn.h>. Reindent to fit in 80 columns.
11165
111662017-06-12 Glenn Morris <rgm@gnu.org>
11167
11168 Update make-dist for recent test/ changes
11169
11170 * make-dist: No longer distribute test/data/emacs-module/Makefile.
11171
111722017-06-12 Michael Albinus <michael.albinus@gmx.de>
11173
11174 Handle port and domain in Tramp's password cache
11175
11176 * doc/misc/tramp.texi (Password handling): Explain port and
11177 domain handling in authinfo.
11178
11179 * lisp/net/tramp.el (tramp-process-actions, tramp-clear-passwd):
11180 * lisp/net/tramp-gvfs.el (tramp-gvfs-handler-askpassword):
11181 * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
11182 (tramp-maybe-open-connection):
11183 * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
11184 (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl)
11185 (tramp-smb-maybe-open-connection): Handle also domain and port.
11186
111872017-06-12 Eli Zaretskii <eliz@gnu.org>
11188
11189 Avoid compilation warnings with pre-C99 libc
11190
11191 * src/emacs-module.c (module_free_global_ref)
11192 (module_assert_runtime, module_assert_env, value_to_lisp): Use 'pD'
11193 instead of C99 't' format descriptor.
11194
111952017-06-12 Philipp Stephani <phst@google.com>
11196
11197 Flush all output streams before aborting
11198
11199 Maybe the stdout buffer still contains something interesting that
11200 should be flushed.
11201
11202 * src/emacs-module.c (module_abort): Flush all output streams before
11203 aborting.
11204
112052017-06-12 Philipp Stephani <phst@google.com>
11206
11207 Remove an assertion that doesn't test Emacs invariants
11208
11209 * src/emacs-module.c (module_copy_string_contents): Remove an
11210 assertion that doesn't test Emacs invariants.
11211
112122017-06-12 Philipp Stephani <phst@google.com>
11213
11214 Test module: add necessary version checks
11215
11216 * test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary
11217 version checks.
11218
112192017-06-12 Philipp Stephani <phst@google.com>
11220
11221 Use additional CFLAGS from configure
11222
112232017-06-12 Philipp Stephani <phst@google.com>
11224
11225 Use Autoconf to generate the test module Makefile
11226
11227 This makes it easier to pass compilation flags around.
11228
11229 * configure.ac: Also build test module Makefile.
11230
11231 * test/data/emacs-module/Makefile.in: New makefile template.
11232
11233 * test/Makefile.in ($(test_module)): No longer necessary to pass
11234 @MODULES_SUFFIX@ around.
11235
11236 * .gitignore: Test module Makefile can now be ignored.
11237
112382017-06-12 Philipp Stephani <phst@google.com>
11239
11240 Also compile test module as C11
11241
11242 * test/data/emacs-module/Makefile (CFLAGS): Compile test module as C11
11243
112442017-06-12 Philipp Stephani <phst@google.com>
11245
11246 Implement module assertions for users
11247
11248 Add a new command-line option '-module-assertions' that users can
11249 enable developing or debugging a module. If this option is present,
11250 Emacs performs additional checks to verify that modules fulfill their
11251 requirements. These checks are expensive and crash Emacs if modules
11252 are invalid, so disable them by default.
11253
11254 This is a command-line option instead of an ordinary variable because
11255 changing it while Emacs is running would cause data structure
11256 imbalances.
11257
11258 * src/emacs.c (main): New command line option '-module-assertions'.
11259
11260 * src/emacs-module.c (module_assert_main_thread)
11261 (module_assert_runtime, module_assert_env, module_assert_value):
11262 New functions to assert module requirements.
11263 (syms_of_module): New uninterned variable 'module-runtimes'.
11264 (init_module_assertions, in_main_thread, module_abort): New helper
11265 functions.
11266 (initialize_environment): Initialize value list. If assertions are
11267 enabled, use a heap-allocated environment object.
11268 (finalize_environment): Add assertion that environment list is never
11269 empty.
11270 (finalize_runtime_unwind): Pop module runtime object stack.
11271 (value_to_lisp): Assert that the value is valid.
11272 (lisp_to_value): Record new value if assertions are enabled.
11273 (mark_modules): Mark allocated object list.
11274 (MODULE_FUNCTION_BEGIN_NO_CATCH)
11275 (module_non_local_exit_check, module_non_local_exit_clear)
11276 (module_non_local_exit_get, module_non_local_exit_signal)
11277 (module_non_local_exit_throw): Assert thread and environment.
11278 (module_get_environment): Assert thread and runtime.
11279 (module_make_function, module_funcall, module_intern)
11280 (module_funcall, module_make_integer, module_make_float)
11281 (module_make_string, module_make_user_ptr, module_vec_get)
11282 (funcall_module, Fmodule_load): Adapt callers.
11283 (module_make_global_ref): If assertions are enabled, use the global
11284 environment to store global values.
11285 (module_free_global_ref): Remove value from global value list.
11286
11287 * test/Makefile.in (EMACSOPT): Enable module assertions when testing
11288 modules.
11289
11290 * test/data/emacs-module/mod-test.c (Fmod_test_invalid_store)
11291 (Fmod_test_invalid_load): New functions to test module assertions.
11292 (emacs_module_init): Bind the new functions.
11293
11294 * test/src/emacs-module-tests.el (mod-test-emacs): New constant for
11295 the Emacs binary file.
11296 (mod-test-file): New constant for the test module file name.
11297 (module--test-assertions): New unit test.
11298
112992017-06-12 Philipp Stephani <phst@google.com>
11300
11301 emacs-module: Use __attribute__((nonnull))
11302
11303 Annotate all parameters with __attribute__((nonnull)) that may not be
11304 NULL.
11305
113062017-06-12 Philipp Stephani <phst@google.com>
11307
11308 Explicitly require C11 or C++11 in emacs-module.h
11309
11310 We already implicitly require them by including stdbool.h. Just make
11311 the error message a bit clearer, and remove an unnecessary version
11312 comparison.
11313
113142017-06-12 Philipp Stephani <phst@google.com>
11315
11316 Add missing 'require' forms to prevent compiler warnings.
11317
11318 * lisp/eshell/esh-ext.el (esh-arg, esh-proc): Add missing
11319 requirements.
11320
113212017-06-12 Paul Eggert <eggert@cs.ucla.edu>
11322
11323 Merge from gnulib
11324
11325 This incorporates:
11326 2017-06-11 getopt-posix: port to glibc 2.25.90
11327 2017-06-04 same-inode: port better to VMS 8.2 and later
11328 * doc/misc/texinfo.tex, lib/getopt-pfx-core.h, lib/getopt-pfx-ext.h:
11329 * m4/sys_types_h.m4: Copy from gnulib.
11330
113312017-06-12 Paul Eggert <eggert@cs.ucla.edu>
11332
11333 Remove Lisp_Misc_Float
11334
11335 * src/data.c (Ftype_of): Do not worry about Lisp_Misc_Float.
11336 * src/lisp.h (Lisp_Misc_Float): Remove. This placeholder has been
11337 unused for two decades; if we ever want to change floats to be a
11338 misc type we can bring it back then.
11339
113402017-06-12 Paul Eggert <eggert@cs.ucla.edu>
11341
11342 Make two symbols private to emacs-module.c
11343
11344 * src/lisp.h (allocate_module_function, XSET_MODULE_FUNCTION):
11345 Move from here ...
11346 * src/emacs-module.c: ... to here.
11347
113482017-06-12 Glenn Morris <rgm@gnu.org>
11349
11350 Merge from origin/emacs-25
11351
11352 da62c1532e4 (origin/emacs-25) Improve the documentation of filesets
11353
113542017-06-12 Glenn Morris <rgm@gnu.org>
11355
11356 Merge from origin/emacs-25
11357
11358 e80f6a210b0 Describe problems with Microsoft Intellipoint
11359 a73ec1edb07 More accurate documentation of the ':box' face attribute
11360
113612017-06-12 Glenn Morris <rgm@gnu.org>
11362
11363 Merge from origin/emacs-25
11364
11365 eaa00584ceb Improve documentation of 'gnutls-verify-error'
11366 908498cc01b ; etc/PROBLEMS: Describe GTK-related crashes on elementar...
11367 741daec617e ; Describe the problem with ksh when resizing shell window
11368
113692017-06-11 Michael Albinus <michael.albinus@gmx.de>
11370
11371 Some further improvements for tramp-gvfs.el
11372
11373 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
11374 (tramp-gvfs-get-file-attributes)
11375 (tramp-gvfs-maybe-open-connection): Handle davs? properly.
11376 (tramp-gvfs-handler-askquestion): Improve `yes-or-no-p' prompt.
11377 Show question also in batch mode. Cache result.
11378
11379 * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
11380 Support completion for host names and ports.
11381
113822017-06-11 Simen Heggestøyl <simenheg@gmail.com>
11383
11384 Fix highlighting of CSS selectors with double hyphens
11385
11386 * lisp/textmodes/css-mode.el (css--font-lock-keywords): Fix
11387 highlighting of selectors that contain double hyphens. They would be
11388 mistaken for a variable.
11389
113902017-06-11 Philipp Stephani <phst@google.com>
11391
11392 Support threads in modules
11393
11394 Rather than checking for the main thread, check for the current
11395 thread.
11396
11397 * emacs-module.c (check_thread): New function.
11398 (MODULE_FUNCTION_BEGIN_NO_CATCH, module_get_environment)
11399 (module_non_local_exit_check, module_non_local_exit_clear)
11400 (module_non_local_exit_get, module_non_local_exit_signal)
11401 (module_non_local_exit_throw, module_is_not_nil, module_eq): Use it.
11402
114032017-06-11 Philipp Stephani <phst@google.com>
11404
11405 Allow non-local exits in module initializers
11406
11407 Previously signals, throws, and quits from module initialization
11408 functions were ignored. These function aren't special, and better
11409 errors can be reported using signals than with the initialization
11410 return code, so allow non-local exits.
11411
11412 * src/emacs-module.c (module_signal_or_throw): New helper function.
11413 (Fmodule_load, funcall_module): Use it.
11414 (Fmodule_load): Also allow quitting.
11415
114162017-06-11 Noam Postavsky <npostavs@gmail.com>
11417
11418 Let eshell/sudo handle absolute command names (Bug#27167)
11419
11420 * lisp/eshell/esh-ext.el (eshell-find-interpreter): Don't change
11421 absolute paths into relative ones.
11422
114232017-06-10 Alan Third <alan@idiocy.org>
11424
11425 Don't wait for toolbar in NS native fullscreen
11426
11427 * src/nsterm.m (EmacsView:updateFrameSize): Don't short-circuit the
11428 function when in fullscreen.
11429
114302017-06-10 Alexander Gramiak <agrambot@gmail.com>
11431
11432 Fix the placement of GTK menus on multi-monitor systems
11433
11434 menu_position_func did not properly use the current monitor's
11435 resolution. Also see commit '2016-02-06 22:12:53 +0100'.
11436
11437 * lisp/frame.el (frame-monitor-attribute, frame-monitor-geometry)
11438 (frame-monitor-workarea): New functions.
11439
11440 * src/xmenu.c (menu_position_func): Take into account the workarea of
11441 the monitor that contains the mouse. (Bug#23568)
11442
114432017-06-10 Eli Zaretskii <eliz@gnu.org>
11444
11445 Clarify documentation of 'face-spec-set'
11446
11447 * lisp/faces.el (face-spec-set): Clarify the description of
11448 SPEC-TYPE in the doc string.
11449
11450 * doc/lispref/display.texi (Defining Faces): Clarify the
11451 description of 'face-spec-set's SPEC-TYPE argument. (Bug#27246)
11452
114532017-06-10 Michael Albinus <michael.albinus@gmx.de>
11454
11455 Fix domain port and handling in tramp-gvfs.el
11456
11457 * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
11458 Return nil if BYTE-ARRAY is nil.
11459 (tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
11460 (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
11461 Fix domain and port handling.
11462
11463 * lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
11464 Ignore errors.
11465
114662017-06-10 Eli Zaretskii <eliz@gnu.org>
11467
11468 Improve documentation of 'face-spec-set-2'
11469
11470 * lisp/faces.el (face-spec-recalc, face-spec-set-2): Rename 'spec'
11471 to 'face-attrs'.
11472 (face-spec-choose, face-spec-set-2): Doc fix. (Bug#27238)
11473
114742017-06-10 Eli Zaretskii <eliz@gnu.org>
11475
11476 Fix handling of Python/Guile commands with arguments in gdb-mi.el
11477
11478 * lisp/progmodes/gdb-mi.el (gdb-python-guile-commands-regexp): New
11479 variable.
11480 (gdb-control-commands-regexp): Use it.
11481 (gdb-send): Don't increment gdb-control-level if the command
11482 matches gdb-python-guile-commands-regexp and has non-empty
11483 arguments. Reported by David Boles <boles@ieee.org> in
11484 http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00009.html.
11485
114862017-06-10 Eli Zaretskii <eliz@gnu.org>
11487
11488 Preserve point in Dired windows under 'dired-auto-revert-buffer'
11489
11490 * lisp/dired.el (dired-find-file): When dired-auto-revert-buffer
11491 is non-nil, bind switch-to-buffer-preserve-window-point to nil
11492 while calling find-file. (Bug#27243)
11493
114942017-06-09 Philipp Stephani <phst@google.com>
11495
11496 Give test files a -tests.el suffix
11497
11498 Rename a couple of test files that have the same name as the library
11499 they test. This harmonizes the naming pattern and makes it possible
11500 to have the tests directories in the load path.
11501
115022017-06-09 Philipp Stephani <phst@google.com>
11503
11504 Fix another compiler warning on macOS
11505
11506 * src/image.c (x_query_frame_background_color): Don't define if we
11507 have NextStep but no image support.
11508
115092017-06-09 Philipp Stephani <phst@google.com>
11510
11511 Add garbage collection support for module environments
11512
11513 * src/emacs-module.c (mark_modules): New function.
11514 (initialize_environment): Properly initialize Lisp objects.
11515 * src/alloc.c (garbage_collect_1): Call it.
11516
115172017-06-08 Glenn Morris <rgm@gnu.org>
11518
11519 Make autogen.sh report relevant environment variables
11520
11521 * autogen.sh (check_version):
11522 Indicate if using an environment variable.
11523
115242017-06-08 Noam Postavsky <npostavs@gmail.com>
11525
11526 Split variable macro env from function env
11527
11528 * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Remove.
11529 (cl-symbol-macrolet): Instead of adding each binding directly into the
11530 main environment with a special key format, put all symbol macro
11531 bindings into a single entry in the main environment under
11532 `:cl-symbol-macros'.
11533 (cl--sm-macroexpand): Look up symbol bindings in the
11534 `:cl-symbol-macros' entry of the environment.
11535
115362017-06-07 Glenn Morris <rgm@gnu.org>
11537
11538 * make-dist: Directory modules/mod-test no longer exists.
11539
115402017-06-07 Glenn Morris <rgm@gnu.org>
11541
11542 More authors.el updates
11543
11544 * admin/authors.el (authors-ignored-files, authors-valid-file-names)
11545 (authors-renamed-files-alist): Additions.
11546
115472017-06-07 Glenn Morris <rgm@gnu.org>
11548
11549 * make-dist: Check a release has a ChangeLog with a release notice.
11550
11551 * make-dist: Use existing ChangeLog if present.
11552
115532017-06-07 Michael Albinus <michael.albinus@gmx.de>
11554
11555 * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Fix port handling.
11556
115572017-06-07 Lars Ingebrigtsen <larsi@gnus.org>
11558
11559 (url-cookie-host-can-set-p): Protect against zero-length domains
11560
11561 * lisp/url/url-cookie.el (url-cookie-host-can-set-p): Protect
11562 against zero-length domains.
11563
11564 Backtrace of a real-world site that triggers a bug:
11565
11566 Debugger entered--Lisp error: (args-out-of-range "" 0)
11567 url-cookie-host-can-set-p("www.washingtonpost.com" "")
11568 url-cookie-handle-set-cookie("utm_term=0;Expires=Thursday,
11569 01-January-1970 00:00:00 GMT; path=/; domain=")
11570 url-http-handle-cookies()
11571
115722017-06-06 Glenn Morris <rgm@gnu.org>
11573
11574 More authors.el updates
11575
11576 * admin/authors.el (authors-obsolete-files-regexps)
11577 (authors-valid-file-names, authors-renamed-files-alist)
11578 (authors-renamed-files-regexps): Additions.
11579
115802017-06-06 Glenn Morris <rgm@gnu.org>
11581
11582 More small authors.el updates
11583
11584 * admin/authors.el (authors-aliases): Fix recent addition.
11585 (authors-obsolete-files-regexps, authors-no-scan-regexps)
11586 (authors-ignored-files, authors-valid-file-names)
11587 (authors-renamed-files-alist): Additions.
11588
115892017-06-06 Glenn Morris <rgm@gnu.org>
11590
11591 Make authors.el report names that were ignored
11592
11593 * admin/authors.el (authors-ignored-names): New.
11594 (authors-canonical-author-name): Add file and position arguments.
11595 Record ignored authors.
11596 (authors-scan-change-log, authors-scan-el):
11597 Pass file and position to authors-canonical-author-name.
11598 (authors): Also print authors that were ignored.
11599
116002017-06-06 Glenn Morris <rgm@gnu.org>
11601
11602 * admin/authors.el (authors-aliases): Additions.
11603
116042017-06-06 Tino Calancha <tino.calancha@gmail.com>
11605
11606 * test/lisp/subr-tests.el (subr-tests-bug22027): Add test.
11607
116082017-06-06 Noam Postavsky <npostavs@gmail.com>
11609
11610 * lisp/subr.el (read-passwd): Don't delete return value (Bug#22027).
11611
116122017-06-06 Dmitry Gutov <dgutov@yandex.ru>
11613
11614 Enable ElDoc messages after the newline command
11615
11616 * lisp/emacs-lisp/eldoc.el:
11617 Add "newline" to the eldoc-add-command-completions call (bug#27228).
11618
116192017-06-06 Dmitry Gutov <dgutov@yandex.ru>
11620
11621 Enable eldoc-mode explicitly inside read--expression
11622
11623 * lisp/simple.el (read--expression): Call eldoc-mode (bug#27202).
11624
116252017-06-06 Andy Moreton <andrewjmoreton@gmail.com>
11626
11627 Fix check for package-unsigned-archives during retrieval
11628
11629 * lisp/emacs-lisp/package.el (package--download-one-archive):
11630 Fix check for package-unsigned-archives.
11631
116322017-06-05 Noah Friedman <friedman@splode.com>
11633
11634 Merge etc/emacs-buffer.gdb from emacs-25 to master.
11635
116362017-06-05 Philipp Stephani <phst@google.com>
11637
11638 Fix undefined behavior in mapbacktrace
11639
11640 * src/eval.c (Fmapbacktrace): Don't assume that PDL is still valid.
11641
116422017-06-05 Eli Zaretskii <eliz@gnu.org>
11643
11644 Fix emacs-module-tests on MS-Windows
11645
11646 * src/print.c (print_vectorlike): Make sure module function's
11647 address prints with a leading "0x". This fixes emacs-module-tests
11648 on MS-Windows. Fix whitespace.
11649 * src/dynlib.c (dynlib_addr): Remove unused variable. Update
11650 commentary.
11651
116522017-06-05 Philipp Stephani <phst@google.com>
11653
11654 Use unwind protection to clean up data structures in modules
11655
11656 Reuse existing functionality and simplify the code a bit.
11657
11658 * src/emacs-module.c (Fmodule_load): Use unwind protection to clean up
11659 runtime object.
11660 (funcall_module): Use unwind protection to clean up environment
11661 object.
11662 (finalize_environment): Simplify signature.
11663 (finalize_environment_unwind, finalize_runtime_unwind): New functions.
11664
116652017-06-05 Michael Albinus <michael.albinus@gmx.de>
11666
11667 Some minor tweaks in tramp-tests.el
11668
11669 * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative):
11670 Let it pass for all gfvs based methods.
11671 (tramp-test24-file-name-completion): Run method and host
11672 completion for all syntaxes only when expensive tests are enabled.
11673 Do not check host completion for gvfs based methods.
11674 (tramp--test-gvfs-p): Add optional METHOD argument.
11675 (tramp--test-afp-or-smb-p): Remove.
11676
116772017-06-05 Michael Albinus <michael.albinus@gmx.de>
11678
11679 Fix error in Tramp rsync method
11680
11681 * lisp/net/tramp-sh.el (tramp-methods) <rsync>: Add "-c" argument.
11682 Otherwise, `tramp-test10-write-region' could fail.
11683
116842017-06-05 Philipp Stephani <phst@google.com>
11685
11686 Inline module_has_cleanup
11687
11688 This constant is only used once, and we fail compilation anyway if
11689 it's false.
11690
11691 * src/emacs-module.c (MODULE_SETJMP_1): Inline __has_attribute.
11692
116932017-06-05 Philipp Stephani <phst@google.com>
11694
11695 Add missing dependency to test module source file
11696
116972017-06-05 Paul Eggert <eggert@cs.ucla.edu>
11698
11699 Omit space that broke ‘make check’
11700
11701 * src/print.c (print_vectorlike): Omit stray space.
11702
117032017-06-05 Paul Eggert <eggert@cs.ucla.edu>
11704
11705 Remove easserts etc. from emacs-module.c
11706
11707 Most of these seem to run afoul of the comment "Do NOT use
11708 'eassert' for checking validity of user code in the module."
11709 * src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH)
11710 (module_non_local_exit_check, module_non_local_exit_clear)
11711 (module_non_local_exit_get, module_non_local_exit_signal)
11712 (module_non_local_exit_throw, module_make_string):
11713 Remove unnecessary easserts that pointers are nonnull.
11714 Hardware checks this for us nowadays, and the checks
11715 just clutter up the code.
11716 (module_extract_integer): Remove unnecessary verify that
11717 a C signed integer is in the range INTMAX_MIN..INTMAX_MAX.
11718 The C standard guarantees this.
11719 (module_copy_string_contents): Remove unnecessary eassert
11720 that Lisp strings are null-terminated.
11721 (module_function_arity): Remove unnecessary easserts that
11722 function arities are in range.
11723
117242017-06-05 Paul Eggert <eggert@cs.ucla.edu>
11725
11726 Remove unnecessary checking in emacs-module.c
11727
11728 * src/emacs-module.c (module_copy_string_contents):
11729 Remove checking, as string lengths are always nonnegative and less
11730 than STRING_BYTES_BOUND, and this is checked elsewhere.
11731 (module_make_string): Check length against STRING_BYTES_BOUND, a
11732 tighter bound than MOST_POSITIVE_FIXNUM. (funcall_module): Don't
11733 assume that an out-of-range integer is nonnegative.
11734
117352017-06-05 Paul Eggert <eggert@cs.ucla.edu>
11736
11737 SCHARS and STRING_BYTES are nonnegative
11738
11739 Tell the compiler that SCHARS and STRING_BYTES are nonnegative, in
11740 the hopes that this will optimize a bit better. Also, check this
11741 at runtime if ENABLE_CHECKING.
11742 * src/lisp.h (SCHARS, STRING_BYTES):
11743 eassume that these functions return nonnegative values.
11744 (STRING_SET_CHARS) [ENABLE_CHECKING]:
11745 eassert that newsize is nonnegative.
11746
117472017-06-05 Noam Postavsky <npostavs@gmail.com>
11748
11749 * lisp/desktop.el (desktop-clear): Skip the daemon's frame (Bug#26912).
11750
117512017-06-04 Philipp Stephani <phst@google.com>
11752
11753 Remove an unused error symbol
11754
11755 * src/emacs-module.c (syms_of_module): Remove unused error symbol
11756 'invalid-module-call'.
11757
117582017-06-04 Philipp Stephani <phst@google.com>
11759
11760 Support quitting in modules
11761
11762 The idea is that modules should call env->should_quit from time to
11763 time and return as quickly as possible if it returns true.
11764
11765 * src/emacs-module.c (module_should_quit): New module function.
11766 (initialize_environment): Use it.
11767 (funcall_module): Process potential pending quit.
11768
11769 * src/eval.c (maybe_quit): Add reference to module_should_quit.
11770
117712017-06-04 Philipp Stephani <phst@google.com>
11772
11773 Use more specific errors for module load failure
11774
11775 * src/emacs-module.c (syms_of_module): Add more specific error
11776 symbols.
11777 (Fmodule_load): Use them.
11778
117792017-06-04 Philipp Stephani <phst@google.com>
11780
11781 Remove an unneeded assertion
11782
11783 * src/emacs-module.c (module_copy_string_contents): Remove unneeded
11784 assertion. If this assertion triggers, we raise an error anyway.
11785
117862017-06-04 Philipp Stephani <phst@google.com>
11787
11788 Guard against signed integer overflows
11789
11790 * src/emacs-module.c (module_extract_integer)
11791 (module_copy_string_contents, module_make_string): Guard against
11792 signed integer overflows.
11793
117942017-06-04 Philipp Stephani <phst@google.com>
11795
11796 Add a couple more assertions to the module code
11797
11798 These can help module authors debug crashes.
11799
11800 * emacs-module.c (module_non_local_exit_check)
11801 (module_non_local_exit_clear, module_non_local_exit_get)
11802 (module_non_local_exit_signal, module_non_local_exit_throw)
11803 (module_copy_string_contents, module_make_string)
11804 (funcall_module, initialize_environment): Add assertions
11805
118062017-06-04 Philipp Stephani <phst@google.com>
11807
11808 Use ATTRIBUTE_MAY_ALIAS where alias violations are likely
11809
11810 In particular, alias violations are likely for the return values of
11811 dlsym(3), which get cast around arbitrarily.
11812
11813 * src/emacs-module.c (Fmodule_load): Use ATTRIBUTE_MAY_ALIAS.
11814
118152017-06-04 Philipp Stephani <phst@google.com>
11816
11817 Simplify interface of dynlib_attr.
11818
11819 Instead of returning bool, set the argument pointers to NULL if the
11820 information is not available.
11821
11822 * src/dynlib.c (dynlib_addr): Don't return bool.
11823
118242017-06-04 Philipp Stephani <phst@google.com>
11825
11826 Rationalize environment lifetime management functions
11827
11828 * src/emacs-module.c (Fmodule_load, funcall_module): Adapt callers.
11829 (finalize_environment): Add parameter for public part of the
11830 environment, like 'initialize_environment'. Add assertions.
11831
118322017-06-04 Philipp Stephani <phst@google.com>
11833
11834 Rework printing of module functions
11835
11836 Fix a FIXME in emacs-module.c. Put the printing into print.c, like
11837 other types.
11838
11839 * src/print.c (print_vectorlike): Add code to print module functions.
11840
11841 * src/emacs-module.c (funcall_module): Stop calling
11842 'module_format_fun_env'. Now that module functions are first-class
11843 objects, they can be added to signal data directly.
11844 (module_handle_signal): Remove now-unused function
11845 'module_format_fun_env'.
11846
11847 * test/src/emacs-module-tests.el (mod-test-sum-test): Adapt unit test.
11848
11849 * src/eval.c (funcall_lambda): Adapt call to changed signature of
11850 'funcall_module'.
11851
118522017-06-04 Philipp Stephani <phst@google.com>
11853
11854 Define helper macro to reduce code duplication
11855
11856 * src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH): New helper
11857 macro.
11858 (MODULE_FUNCTION_BEGIN, module_type_of, module_is_not_nil, module_eq):
11859 Use it.
11860
118612017-06-04 Philipp Stephani <phst@google.com>
11862
11863 Remove two FIXMEs that can't be fixed
11864
118652017-06-04 Eli Zaretskii <eliz@gnu.org>
11866
11867 Avoid slow startup in daemon mode when global-linum-mode is on
11868
11869 * lisp/linum.el (linum-on): Don't turn on linum-mode in a
11870 non-client frame of a daemon session. (Bug#27210)
11871
118722017-06-04 Paul Eggert <eggert@cs.ucla.edu>
11873
11874 Fix eldoc bug with curved quote
11875
11876 * lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string):
11877 Substitute quotes in documentation before returning it (Bug#27159).
11878
118792017-06-04 Paul Eggert <eggert@cs.ucla.edu>
11880
11881 Tune ‘format’ after recent fix
11882
11883 * doc/lispref/strings.texi (Formatting Strings):
11884 * src/editfns.c (Fformat): Format field numbers no longer need
11885 to be unique, reverting the previous doc change since that has
11886 now been fixed. Also, document that %% should not have modifiers.
11887 * src/editfns.c (styled_format): Improve performance. Remove
11888 the need for the new prepass over the format string, by using
11889 a typically-more-generous bound for the info array size.
11890 Initialize the info array lazily. Move string inspection to
11891 the same area to help caching. Avoid the need for a
11892 converted_to_string bitfield by using EQ. Cache arg in a
11893 local and avoid some potential aliasing issues to help the
11894 compiler. Info array is now 0-origin, not 1-origin.
11895
118962017-06-04 Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
11897
11898 Improve of file-local-name use in vc-git-checkin
11899
11900 * lisp/vc/vc-git.el (vc-git-checkin): Use file-local-name only
11901 when calling git commit.
11902
119032017-06-03 Simen Heggestøyl <simenheg@gmail.com>
11904
11905 Support a new CSS indentation style
11906
11907 * lisp/textmodes/css-mode.el (css-smie-rules): Indent after property
11908 immediately followed by a newline.
11909
11910 * test/manual/indent/css-mode.css: Add test for the change above.
11911
11912 * test/manual/indent/scss-mode.scss: Ditto.
11913
119142017-06-03 Philipp Stephani <phst@google.com>
11915
11916 Fix a bug when using format field numbers
11917
11918 Previously styled_format overwrite the argument vector. This is no
11919 longer possible because there might be more than one specification per
11920 argument. Use the existing auxiliary info array instead.
11921
11922 * src/editfns.c (styled_format): Record arguments in the info
11923 structure instead of overwriting them.
11924 * test/src/editfns-tests.el (format-with-field): Add unit test.
11925
119262017-06-03 Paul Eggert <eggert@cs.ucla.edu>
11927
11928 Document uniqueness limitation of ‘format’
11929
11930 * doc/lispref/strings.texi (Formatting Strings):
11931 * src/editfns.c (Fformat):
11932 Document that field numbers should be unique within a format.
11933
119342017-06-03 Glenn Morris <rgm@gnu.org>
11935
11936 Small rmailmm fix (bug#27203)
11937
11938 * lisp/mail/rmailmm.el (rmail-mime-insert-bulk):
11939 Fall back to HOME if no match in rmail-mime-attachment-dirs-alist.
11940
119412017-06-03 Glenn Morris <rgm@gnu.org>
11942
11943 * admin/authors.el (authors-aliases): Addition.
11944
119452017-06-03 Glenn Morris <rgm@gnu.org>
11946
11947 Add watch for password back to inferior python comint filter
11948
11949 It was removed along with other items for speed (bug#16875),
11950 but doesn't seem to have been causing an issue, and it's useful to
11951 have it there (bug#27154).
11952 * lisp/progmodes/python.el (inferior-python-mode):
11953 Add comint-watch-for-password-prompt to comint-output-filter-functions.
11954
119552017-06-03 Ryan <rct@thompsonclan.org> (tiny change)
11956
11957 Use completing-read-default in tmm-prompt
11958
11959 tmm uses completing-read, but customizes its behavior so much
11960 that any alternative completing-read-function will almost
11961 certainly break it. For example, both ido-ubiquitous and ivy have
11962 special code to deactivate themselves for tmm.
11963 * lisp/tmm.el (tmm-prompt): Use completing-read-default instead of
11964 completing-read. (Bug#27193)
11965
119662017-06-02 Mats Lidell <mats.lidell@cag.se>
11967
11968 * etc/tutorials/TUTORIAL.sv: synced with TUTORIAL (Bug#20371)
11969
119702017-06-02 Glenn Morris <rgm@gnu.org>
11971
11972 Fix with-todo-test
11973
11974 * test/lisp/calendar/todo-mode-tests.el (with-todo-test):
11975 HOME should be a directory, not a file. Delete it when finished.
11976
119772017-06-02 Lele Gaifax <lele@metapensiero.it> (tiny change)
11978
11979 Update TUTORIAL.it
11980
11981 * etc/tutorials/TUTORIAL.it: Adjust to recent changes in TUTORIAL.
11982
119832017-06-02 Eli Zaretskii <eliz@gnu.org>
11984
11985 Fix cursor position in Dired buffers after dired-sort-toggle
11986
11987 * src/xdisp.c (display_and_set_cursor): Record cursor coordinates
11988 even if the frame is marked as garbaged. (Bug#27187)
11989
119902017-06-02 Eli Zaretskii <eliz@gnu.org>
11991
11992 Update TUTORIAL.he
11993
11994 * etc/tutorials/TUTORIAL.he: Adjust to recent changes in TUTORIAL.
11995
119962017-06-02 Noam Postavsky <npostavs@gmail.com>
11997
11998 * etc/tutorials/TUTORIAL: Explain how to stop the tutorial (Bug#20371).
11999
120002017-06-02 Paul Eggert <eggert@cs.ucla.edu>
12001
12002 Limit format fields to more POSIX-like spec
12003
12004 * doc/lispref/strings.texi (Formatting Strings):
12005 Don’t allow mixing numbered with unnumbered format specs.
12006 * src/editfns.c (styled_format): Don’t bother checking for field 0,
12007 since it doesn’t crash and the behavior is not specified.
12008 * test/src/editfns-tests.el (format-with-field): Adjust tests to
12009 match current doc. Add more tests for out-of-range fields.
12010
120112017-06-02 Paul Eggert <eggert@cs.ucla.edu>
12012
12013 Improve performance by avoiding strtoumax
12014
12015 This made (string-to-number "10") 20% faster on my old desktop,
12016 an AMD Phenom II X4 910e running Fedora 25 x86-64.
12017 * admin/merge-gnulib (GNULIB_MODULES): Remove strtoumax.
12018 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
12019 * lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c, m4/strtoull.m4:
12020 * m4/strtoumax.m4: Remove.
12021 * src/editfns.c (str2num): New function.
12022 (styled_format): Use it instead of strtoumax. Use ptrdiff_t
12023 instead of uintmax_t. Check for integer overflow.
12024 * src/lread.c (LEAD_INT, DOT_CHAR, TRAIL_INT, E_EXP):
12025 Move to private scope and make them enums.
12026 (string_to_number): Compute integer value directly during
12027 first pass instead of revisiting it with strtoumax later.
12028
120292017-06-02 Paul Eggert <eggert@cs.ucla.edu>
12030
12031 Minor improvements to format field numbers
12032
12033 * src/editfns.c (styled_format): Allow field numbers in a %% spec.
12034 No need for a special diagnostic for field numbers greater than
12035 PTRDIFF_MAX. Reword diagnostic for field 0.
12036 * test/src/editfns-tests.el (format-with-field): Adjust to match.
12037
120382017-06-02 Philipp Stephani <phst@google.com>
12039
12040 Implement field numbers in format strings
12041
12042 A field number explicitly specifies the argument to be formatted.
12043 This is especially important for potential localization work, since
12044 grammars of various languages dictate different word orders.
12045
12046 * src/editfns.c (Fformat): Update documentation.
12047 (styled_format): Implement field numbers.
12048
12049 * doc/lispref/strings.texi (Formatting Strings): Document field numbers.
12050
12051 * lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn): Adapt.
12052
12053 * test/src/editfns-tests.el (format-with-field): New unit test.
12054
120552017-06-01 Alexander Gramiak <agrambot@gmail.com>
12056
12057 Limit scope of local overriding-terminal-local-map
12058
12059 The function `binding' may call isearch-done, which globally sets
12060 overriding-terminal-local-map to nil (Bug#23007).
12061 * lisp/isearch.el (isearch-mouse-2): Don't bind
12062 overriding-terminal-local-map around the call to `binding'.
12063
120642017-06-01 Stephen Berman <stephen.berman@gmx.net>
12065
12066 Correct and isolate the todo-mode test environment
12067
12068 This avoids having to set todo-mode variables globally in the test
12069 file and prevents any exisiting user todo-mode files from influencing
12070 the tests.
12071
12072 * test/lisp/calendar/todo-mode-tests.el:
12073 (with-todo-test): New macro.
12074 (todo-test-todo-quit01, todo-test-todo-quit02)
12075 (todo-test-item-highlighting): Use it.
12076
120772017-06-01 Alan Third <alan@idiocy.org>
12078
12079 Fix build errors on macOS 10.6 (bug#27059)
12080
12081 * src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint.
12082
120832017-06-01 Eli Zaretskii <eliz@gnu.org>
12084
12085 Improve testing of octal and hex display of raw bytes
12086
12087 * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
12088 (test-redisplay-5): Add a test with a large codepoint.
12089
120902017-06-01 Vasilij Schneidermann <mail@vasilij.de>
12091
12092 Add customizable to display raw bytes as hex
12093
12094 * src/xdisp.c (get_next_display_element): Dispatch used format string
12095 for unprintables based on new display-raw-bytes-as-hex variable.
12096 (display-raw-bytes-as-hex): New variable. (Bug#27122)
12097
12098 * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.
12099
12100 * doc/emacs/display.texi: Document the new variable.
12101 * etc/NEWS: Mention display-raw-bytes-as-hex.
12102
12103 * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
12104 (test-redisplay-5): New tests.
12105 (test-redisplay): Call test-redisplay-5.
12106
121072017-06-01 Eli Zaretskii <eliz@gnu.org>
12108
12109 Revert "Add customizable to display raw bytes as hex"
12110
12111 This reverts commit 7c9ac111c5e5d92e620b666893993d5dc562e483.
12112
121132017-06-01 Eli Zaretskii <eliz@gnu.org>
12114
12115 Add customizable to display raw bytes as hex
12116
12117 * src/xdisp.c (get_next_display_element): Dispatch used format string
12118 for unprintables based on new display-raw-bytes-as-hex variable.
12119 (display-raw-bytes-as-hex): New variable. (Bug#27122)
12120
12121 * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.
12122
12123 * doc/emacs/display.texi: Document the new variable.
12124 * etc/NEWS: Mention display-raw-bytes-as-hex.
12125
12126 * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
12127 (test-redisplay-5): New tests.
12128 (test-redisplay): Call test-redisplay-5.
12129
121302017-06-01 Eli Zaretskii <eliz@gnu.org>
12131
12132 Fix linum under text-scaling when leuven-theme is used
12133
12134 * etc/themes/leuven-theme.el (linum): Make the 'linum' face
12135 inherit from 'default' and 'shadow', so that margins are enlarged
12136 as expected under text-scaling.
12137
121382017-06-01 Paul Eggert <eggert@cs.ucla.edu>
12139
12140 Free cwd when no longer needed
12141
12142 * lib-src/emacsclient.c (main): Don’t dally when freeing cwd.
12143
121442017-06-01 Anders Waldenborg <anders@0x63.nu> (tiny change)
12145
12146 Fix memory leak of cwd string in emacsclient (Bug#26628)
12147
12148 * lib-src/emacsclient.c (main): emacsclient retrieves the current
12149 working directory using get_current_dir_name which returns a newly
12150 allocated string. Make sure this string is freed before exiting.
12151
121522017-06-01 Glenn Morris <rgm@gnu.org>
12153
12154 Quieten compilation of some test files
12155
12156 * test/lisp/dired-tests.el (dired-test-bug25609): Mark unused args.
12157 * test/src/data-tests.el (binding-test-set-constant-t)
12158 (binding-test-set-constant-nil, binding-test-set-constant-keyword)
12159 (binding-test-set-constant-nil): Silence compiler.
12160 * test/src/regex-tests.el (regex-tests-BOOST): Escape char literal.
12161
121622017-06-01 Glenn Morris <rgm@gnu.org>
12163
12164 Use true names for invocation- and source-directory
12165
12166 * src/emacs.c (init_cmdargs) <Vinvocation_directory>:
12167 * src/lread.c (init_lread) <Vsource_directory>: Use true names.
12168
121692017-06-01 Glenn Morris <rgm@gnu.org>
12170
12171 Avoid elisp-mode test failures when source dir has multiple names
12172
12173 * test/lisp/progmodes/elisp-mode-tests.el (emacs-test-dir):
12174 Use the true name of the directory.
12175
121762017-06-01 Paul Eggert <eggert@cs.ucla.edu>
12177
12178 Fix bug with "%%" in error format
12179
12180 * src/doprnt.c (doprnt): Format "%%" correctly.
12181 Problem reported by Philipp Stephani in:
12182 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00901.html
12183
121842017-06-01 Paul Eggert <eggert@cs.ucla.edu>
12185
12186 * src/editfns.c (Fmessage): Improve doc string (Bug#23425#130).
12187
121882017-06-01 Katsumi Yamaoka <yamaoka@jpl.org>
12189
12190 Revert mml-generate-mime-1 (bug#27141)
12191
12192 * lisp/gnus/mml.el (mml-generate-mime-1): Reverted to emacs-25 version
12193 with slight modernizations (bug#27141).
12194
121952017-05-31 Michael Albinus <michael.albinus@gmx.de>
12196
12197 Fix Bug#27108
12198
12199 * lisp/recentf.el (recentf-load-list): Bind `non-essential',
12200 in order to avoid Tramp password requests during Emacs
12201 startup. (Bug#27108)
12202
122032017-05-31 Glenn Morris <rgm@gnu.org>
12204
12205 * test/Makefile.in (.SECONDARY): Stop make deleting .elc files.
12206
122072017-05-31 Eli Zaretskii <eliz@gnu.org>
12208
12209 Document current-line hscrolling in ELisp manual
12210
12211 * doc/lispref/windows.texi (Horizontal Scrolling): Document the
12212 new mode of auto-hscrolling only the current line.
12213
122142017-05-31 Eli Zaretskii <eliz@gnu.org>
12215
12216 Support lower bound on hscrolling when only current line scrolls
12217
12218 * doc/emacs/display.texi (Horizontal Scrolling): Document the new
12219 mode of auto-hscrolling only the current line.
12220
12221 * src/xdisp.c (init_iterator): When hscrolling only the
12222 current line, apply the window's min_hscroll here, so that
12223 non-current lines will be hscrolled by that minimum.
12224 Suggested by Stephen Berman <stephen.berman@gmx.net>.
12225 (hscroll_window_tree): Account for window's min_hscroll when
12226 deciding whether to recompute the hscroll.
12227 (display_line): Subtract window's min_hscroll from x_incr, as that
12228 was already accounted for in init_iterator. (Bug#27008)
12229
122302017-05-31 Noam Postavsky <npostavs@gmail.com>
12231
12232 cl-print: handle circular objects when `print-circle' is nil (Bug#27117)
12233
12234 * lisp/emacs-lisp/cl-print.el (cl-print--currently-printing): New variable.
12235 (cl-print-object): When `print-circle' is nil, bind it to a list of
12236 objects that are currently printing to avoid printing the same object
12237 endlessly.
12238 * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle): New test.
12239
122402017-05-31 Noam Postavsky <npostavs@gmail.com>
12241
12242 Further simplify test/Makefile, optionally load elc tests
12243
12244 * test/Makefile.in: Use make's error ignoring feature instead of
12245 suppressing test errors with shell. Compile test files in the main
12246 make invocation instead of a recursive 'make' call. Optionally load
12247 .elc test files if TEST_LOAD_EL is set to something other than 'yes'.
12248 Remove obsolete commentary.
12249
122502017-05-31 Eli Zaretskii <eliz@gnu.org>
12251
12252 Avoid inflooping in redisplay due to Spacemacs and linum-mode
12253
12254 * src/xdisp.c (redisplay_internal): Limit the number of redisplay
12255 retries when a frame becomes garbaged as result of redisplaying
12256 it. (Bug#27115)
12257
122582017-05-31 Tino Calancha <tino.calancha@gmail.com>
12259
12260 * src/editfns.c (decode-time): Fix docstring.
12261
122622017-05-31 Glenn Morris <rgm@gnu.org>
12263
12264 * admin/update_autogen: Remove bzr support.
12265
122662017-05-31 Glenn Morris <rgm@gnu.org>
12267
12268 Avoid subr test failure when source dir has multiple names
12269
12270 * test/lisp/subr-tests.el (subr-tests--this-file):
12271 Use the true name of the file. The following test does a string
12272 comparison of this value with that from method-files, which uses
12273 load-history, which contains true names.
12274
122752017-05-31 Dmitry Gutov <dgutov@yandex.ru>
12276
12277 Extract eldoc--supported-p
12278
12279 * lisp/emacs-lisp/eldoc.el (eldoc--supported-p): New function.
12280 (turn-on-eldoc-mode, eldoc-mode): Use it.
12281 (http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00865.html)
12282
122832017-05-30 Glenn Morris <rgm@gnu.org>
12284
12285 Make "make check" less verbose by default
12286
12287 * test/Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_ELC, am__v_ELC_)
12288 (am__v_ELC_0, am__v_ELC_1, AM_V_GEN, am__v_GEN_, am__v_GEN_0)
12289 (am__v_GEN_1, AM_V_at, am__v_at_, am__v_at_0, am__v_at_1):
12290 New, copied from lisp/Makefile.in.
12291 (%.elc, %.log): Simplify and quieten.
12292
122932017-05-30 Alan Mackenzie <acm@muc.de>
12294
12295 Mode line "%q" construct: Just use one number when both would be the same.
12296
12297 * src/xdisp (decode_mode_spec): recode the "%q" bit appropriately.
12298
122992017-05-30 Alan Mackenzie <acm@muc.de>
12300
12301 Merge branch 'master' of /home/acm/emacs/emacs.git/master
12302
123032017-05-30 Alan Mackenzie <acm@muc.de>
12304
12305 c-defun-name: Return fully qualified method names when wanted in C++, etc.
12306
12307 * lisp/progmodes/cc-cmds.el (c-defun-name): Use
12308 c-back-over-compound-identifier in place of c-backward-token-2 near the end
12309 of the function.
12310
123112017-05-30 Glenn Morris <rgm@gnu.org>
12312
12313 Reduce scope of recent test/Makefile HOME change
12314
12315 * test/Makefile.in (%.log): Move setting of HOME here from top-level.
12316
123172017-05-30 Paul Eggert <eggert@cs.ucla.edu>
12318
12319 Skip .#* temporaries when finding sources
12320
12321 Without this patch, ‘make check’ can fail with the diagnostic
12322 ‘invalid syntax in conditional’ if there is an Emacs temporary
12323 file whose name starts with ‘.#’, because the ‘#’ is treated as
12324 the start of a Make comment.
12325 * lisp/Makefile.in (loaddefs, tagsfiles, check-defun-deps):
12326 * test/Makefile.in (ELFILES):
12327 Skip files starting with ‘.’, so that the .#* files do not cause
12328 trouble. (We cannot easily skip just files starting with ‘.#’,
12329 since ‘#’ starts a Make comment!)
12330
123312017-05-30 Alan Mackenzie <acm@muc.de>
12332
12333 Merge branch 'master' of /home/acm/emacs/emacs.git/master
12334
123352017-05-30 Alan Mackenzie <acm@muc.de>
12336
12337 Fix the mouse help/key map on the "%p" part of the mode line.
12338
12339 * lisp/bindings.el (mode-line-percent-position): give it a
12340 `risky-local-variable' property.
12341 (mode-line-position): correct the quoting on the mode-line-percent-position
12342 part of the variable, allowing the properties to be properly recognized.
12343
123442017-05-30 Alan Mackenzie <acm@muc.de>
12345
12346 Fix the mouse help/key map on the "%p" part of the mode line.
12347
12348 * lisp/bindings.el (mode-line-percent-position): give it a
12349 `risky-local-variable' property.
12350 (mode-line-position): correct the quoting on the mode-line-percent-position
12351 part of the variable, allowing the properties to be properly recognized.
12352
123532017-05-30 Paul Eggert <eggert@cs.ucla.edu>
12354
12355 Merge from gnulib
12356
12357 * build-aux/config.guess: Copy from gnulib.
12358 * lib/gnulib.mk.in: Regenerate.
12359
123602017-05-30 Glenn Morris <rgm@gnu.org>
12361
12362 Stop make check interacting with HOME
12363
12364 * test/Makefile.in (HOME): Export a non-existent value.
12365
123662017-05-30 Paul Eggert <eggert@cs.ucla.edu>
12367
12368 Update .gitattributes to match sources better
12369
12370 * .gitattributes: Remove nt/nmake.defs. Move dostorture.c, c.C,
12371 algrthms.html. Use pattern for todo-mode. Improve patterns for
12372 Ada, C, ObjC, shell. Add Pascal. Remove unused pattern *.ruby.
12373 Add config.guess and config.sub as shell files.
12374
123752017-05-30 Noam Postavsky <npostavs@gmail.com>
12376
12377 Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon'
12378
12379 * doc/emacs/cmdargs.texi (Initial Options):
12380 * doc/lispref/os.texi (Startup Summary):
12381 * etc/NEWS:
12382 * etc/emacs.service:
12383 * src/emacs.c (main):
12384 * src/lisp.h: Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to
12385 '--bg-daemon'.
12386
123872017-05-30 Glenn Morris <rgm@gnu.org>
12388
12389 todo-mode: don't assume an ordering of tests
12390
12391 * test/lisp/calendar/todo-mode-tests.el (todo-test-todo-quit02)
12392 (todo-test-item-highlighting): Avoid prompting for input file.
12393
123942017-05-30 Paul Eggert <eggert@cs.ucla.edu>
12395
12396 Improve .gdbinit Lisp value pretty-printing
12397
12398 * src/.gdbinit (to_string): Use an unsigned representation for
12399 Lisp values, as requested by Eli Zaretskii (Bug#27098).
12400 Also, use "make_number(N)" for Lisp integers.
12401
124022017-05-30 Dmitry Gutov <dgutov@yandex.ru>
12403
12404 Turn global-eldoc-mode into a globalized minor mode
12405
12406 * lisp/emacs-lisp/eldoc.el (global-eldoc-mode):
12407 Turn into globalized mode (bug#19853).
12408 (turn-on-eldoc-mode): Make it into a wrapper instead of alias.
12409 (eldoc-mode): Only show the message when called interactively.
12410
124112017-05-29 Dmitry Gutov <dgutov@yandex.ru>
12412
12413 Use regexp matching instead of checking exit status
12414
12415 * lisp/progmodes/xref.el (xref-collect-matches):
12416 See if the output buffer contents look like Grep output
12417 instead of checking exit status (bug#23451).
12418
124192017-05-29 Stephen Berman <stephen.berman@gmx.net>
12420
12421 Add initial tests for todo-mode.el
12422
12423 *test/lisp/calendar/todo-mode-tests.el:
12424 *test/lisp/calendar/todo-mode-resources/todo-test-1.toda:
12425 *test/lisp/calendar/todo-mode-resources/todo-test-1.todo: New files.
12426
12427 * .gitattributes: Ignore trailing whitespace in todo-mode test
12428 data files, since it is part of the todo-mode file format.
12429
124302017-05-29 Stephen Berman <stephen.berman@gmx.net>
12431
12432 Make `todo-toggle-item-highlighting' work on multiline items (bug#27133)
12433
12434 * lisp/calendar/todo-mode.el (todo-hl-line-range): New named function,
12435 replacing an anonymous function for the sake of `describe-variable'.
12436 (todo-modes-set-2): Use it as buffer-local value of hl-line-range-function
12437 and remove boundp test of this variable, so its value is available on
12438 invoking `todo-toggle-item-highlighting'.
12439
124402017-05-29 Alan Third <alan@idiocy.org>
12441
12442 Fix build error on macOS 10.6
12443
12444 * src/nsfns.m (compute_tip_xy): Cast NSRect to CGRect and NSPoint to
12445 CGPoint.
12446
124472017-05-29 Jules Tamagnan <jtamagnan@gmail.com> (tiny change)
12448
12449 Comply with pep 8 style guide for backslash in assignment (Bug#24809)
12450
12451 * lisp/progmodes/python.el (python-indent--calculate-indentation):
12452 Increase indent by `python-indent-offset' after
12453 `:after-backslash-assignment-continuation'.
12454
124552017-05-29 Wilfred Hughes <me@wilfred.me.uk>
12456
12457 Add suggestion to docstring
12458
12459 * lisp/subr.el (interactive-p): Mention commandp, as this is often
12460 what users are actually looking for.
12461
124622017-05-29 Wilfred Hughes <me@wilfred.me.uk>
12463
12464 Ensure button-get works in any buffer
12465
12466 * lisp/button.el (button-get): Previously we assumed that button-get
12467 was called in the buffer containing the button. In other buffers,
12468 button-get always returned nil. Fix this by passing the relevant
12469 buffer from the marker.
12470
124712017-05-29 Dmitry Gutov <dgutov@yandex.ru>
12472
12473 Signal error if find-grep returns a nonzero status
12474
12475 * lisp/progmodes/xref.el (xref-collect-matches): Signal error
12476 if find-grep returns a nonzero status (bug#23451). Remove the
12477 comment: even if some output is present, a non-zero status
12478 means something went wrong and it can't be relied upon.
12479
124802017-05-29 Stephen Berman <stephen.berman@gmx.net>
12481
12482 Make sure exiting todo-mode buffer buries it (bug#27121)
12483
12484 This failed due to commit ea3ae33b from 2013-05-16, which prevented
12485 quitting todo-mode buffer after visiting todo-archive buffer from
12486 making the archive buffer current again. Avoid this now by simply
12487 killing the archive buffer, since there's no need to keep it a live
12488 buffer. Consequently, quitting a todo-mode buffer can now use
12489 bury-buffer without an argument, which ensures that is will not
12490 becomes current on quitting the buffer that replaced it in the window.
12491
12492 * lisp/calendar/todo-mode.el (todo-quit): Kill todo-archive-mode
12493 buffer instead of burying it. This now allows exiting the
12494 todo-mode buffer by bury-buffer without an argument, so do that.
12495
124962017-05-28 Michael Albinus <michael.albinus@gmx.de>
12497
12498 Some tweaks, almost all for Tramp adb method
12499
12500 * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
12501 Use `make-tramp-file-name'.
12502 (tramp-adb-get-device): Use `tramp-file-name-port-or-default'.
12503 (tramp-adb-maybe-open-connection): Set "prompt" property.
12504 (tramp-adb-wait-for-output): Use it.
12505
12506 * lisp/net/tramp-cache.el (tramp-cache-print): Use `elt'.
12507 (tramp-dump-connection-properties): Check also that there are
12508 properties to be saved. Don't save "started" property of
12509 "ftp" method.
12510
12511 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
12512 Use `make-tramp-file-name'.
12513
12514 * lisp/net/tramp.el (tramp-remote-file-name-spec-regexp):
12515 Host could be empty.
12516 (tramp-file-name-port-or-default): New defun.
12517 (tramp-dissect-file-name): Simplify `make-tramp-file-name' call.
12518 (tramp-handle-file-name-case-insensitive-p): Use a progress reporter.
12519 (tramp-call-process, tramp-call-process-region):
12520 Use `make-tramp-file-name'.
12521
12522 * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
12523 Revert change from 2017-05-24.
12524 (tramp-test05-expand-file-name-relative): Let it also pass for
12525 "adb" method.
12526
125272017-05-28 Jürgen Hötzel <juergen@archlinux.org>
12528
12529 Fix Tramp for Android 7
12530
12531 * tramp-adb.el (tramp-adb-ls-toolbox-regexp):
12532 Username part of prompt is empty on Android 7.
12533 (tramp-adb-ls-toolbox-regexp):
12534 Ignore addition links column on Android 7.
12535 (tramp-adb-get-ls-command):
12536 Dont use --color=none when using toybox (Android 7). It's not
12537 possible to disable coloring explicitly for toybox ls.
12538
125392017-05-27 Svante Carl v. Erichsen <Svante.v.Erichsen@web.de> (tiny change)
12540
12541 Fix cl-indent for `loop' with :keywords (Bug#15543)
12542
12543 * lisp/emacs-lisp/cl-indent.el (lisp-extended-loop-p): Allow for
12544 ":keywords".
12545
125462017-05-27 Paul Eggert <eggert@cs.ucla.edu>
12547
12548 Depromiscuify inotify with IN_MASK_ADD
12549
12550 Use IN_MASK_ADD instead of using a no-longer-promiscuous-enough
12551 mask. This simplifies the code and restores the ability to
12552 use IN_ACCESS, IN_CLOSE_WRITE, IN_CLOSE_NOWRITE, and IN_OPEN
12553 in some cases (Bug#26973).
12554 * src/inotify.c (INOTIFY_DEFAULT_MASK): Remove.
12555 (Finotify_add_watch): Use IN_MASK_ADD instead.
12556
125572017-05-27 Paul Eggert <eggert@cs.ucla.edu>
12558
12559 Restore inotify onlydir support
12560
12561 There was no need to remove it in the 2017-03-26 inotify change,
12562 as it is like IN_DONT_FOLLOW and does not affect other watchers
12563 for the same file.
12564 * src/inotify.c (symbol_to_inotifymask, Finotify_add_watch)
12565 (syms_of_inotify): Bring back onlydir.
12566
125672017-05-27 Paul Eggert <eggert@cs.ucla.edu>
12568
12569 Simplify computation of inotify mask
12570
12571 * src/inotify.c (add_watch): Accept uint32_t imask instead
12572 of Lisp_Object aspect. Caller changed.
12573 (Finotify_add_watch): Use aspect_to_inotifymask earlier, to
12574 simplify the code.
12575
125762017-05-27 Eli Zaretskii <eliz@gnu.org>
12577
12578 Improve the documentation of filesets
12579
12580 * doc/emacs/files.texi (Filesets): Fix the description of
12581 fileset-init's effect on the menu bar. (Bug#27015)
12582
125832017-05-27 Philipp Stephani <phst@google.com>
12584
12585 Don't attempt to recover from undefined behavior in some cases
12586
12587 These functions can only be run in batch mode and exit Emacs on
12588 return, so nothing can be recovered. Disable unsafe recover
12589 mechanisms so that we get real failures and good stack traces on
12590 fatal signals.
12591
12592 * lisp/emacs-lisp/bytecomp.el (batch-byte-compile)
12593 (batch-byte-recompile-directory):
12594 * lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit)
12595 (ert-summarize-tests-batch-and-exit): Don't attempt to recover
12596 from undefined behavior.
12597
125982017-05-27 Philipp Stephani <phst@google.com>
12599
12600 Avoid another compiler warning on macOS
12601
12602 When configured with --without-ns, HAVE_NS is not defined on macOS,
12603 thus 'memory-limit' calls the deprecated sbrk(2) function. Avoid that
12604 by using the pre-defined __APPLE__ preprocessor macro.
12605
12606 * src/alloc.c (Fmemory_limit): Never use sbrk(2) on macOS.
12607
126082017-05-27 Luke Yen-Xun Lee <luke.yx.lee@gmail.com>
12609
12610 Fix ruler-mode text-scaling issues
12611
12612 * lisp/ruler-mode.el (ruler-mode-text-scaled-width): New function
12613 for computing scaled text width.
12614 (ruler-mode-text-scaled-window-hscroll)
12615 (ruler-mode-text-scaled-window-width): Compute text scaled
12616 `window-width' value.
12617 (ruler-mode-mouse-grab-any-column, ruler-mode-mouse-add-tab-stop)
12618 (ruler-mode-ruler): Change `window-hscroll' into
12619 `ruler-mode-text-scaled-window-hscroll', and change `window-width'
12620 into `ruler-mode-text-scaled-window-width'.
12621
126222017-05-27 Martin Rudalics <rudalics@gmx.at>
12623
12624 Minor doc and doc-string fixes (Bug#27091)
12625
12626 * src/window.c (Fset_window_scroll_bars): Fix doc-string.
12627
12628 * doc/lispref/display.texi (Fringe Size/Pos, Scroll Bars)
12629 (Display Margins): Mention that `set-window-buffer' may override
12630 settings made by `set-window-fringes', `set-window-scroll-bars'
12631 and `set-window-margins'.
12632 * doc/lispref/windows.texi (Buffers and Windows): Fix doc of
12633 `set-window-buffer'.
12634
126352017-05-27 Eli Zaretskii <eliz@gnu.org>
12636
12637 Avoid args-out-of-range errors on fringe clicks after "C-h k"
12638
12639 * src/keyboard.c (echo_truncate): Don't call Ftruncate if the echo
12640 message is already shorter than NCHARS. (Bug#27040)
12641
126422017-05-27 Eli Zaretskii <eliz@gnu.org>
12643
12644 Fix GUD "Stop" display when running pdb
12645
12646 * lisp/progmodes/gud.el (gud-menu-map): Don't call gdb-show-stop-p
12647 when GUD mode is 'pdb'. (Bug#27024)
12648
126492017-05-27 Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
12650
12651 Support drag and drop of region by mouse (Bug#26725)
12652
12653 * doc/emacs/frames.texi (Drag and Drop): Document support of drag
12654 and drop region by mouse.
12655 * lisp/mouse.el (mouse-drag-region): Call mouse-drag-and-drop-region
12656 when start-event is on region.
12657 (mouse-drag-and-drop-region): New function, moves the region by
12658 (mouse-drag-and-drop-region): New defcustom.
12659 * etc/NEWS: Mention mouse-drag-and-drop-region.
12660
126612017-05-27 Noam Postavsky <npostavs@gmail.com>
12662
12663 * lisp/emacs-lisp/eieio.el (defclass): Fix quote in warning message.
12664
126652017-05-27 Alan Third <alan@idiocy.org>
12666
12667 Check if instancetype supported in ObjC
12668
12669 * configure.ac: Add check for instancetype.
12670 * src/nsterm.h [!NATIVE_OBJC_INSTANCETYPE]: Define instancetype.
12671
126722017-05-26 Wilfred Hughes <me@wilfred.me.uk>
12673
12674 Mark keywordp as a safe, error-free function
12675
12676 * lisp/emacs-lisp/byte-opt.el: Add keywordp to
12677 side-effect-and-error-free-fns.
12678
126792017-05-26 Paul Eggert <eggert@cs.ucla.edu>
12680
12681 * src/inotify.c: Add FIXME comments.
12682
126832017-05-26 Andreas Politz <politza@hochschule-trier.de>
12684
12685 Fix Bug#26973
12686
12687 * src/inotify.c (INOTIFY_DEFAULT_MASK): Removing ACCESS, OPEN
12688 and CLOSE events on order do let other processes also reading
12689 from their descriptors. (Bug#26973).
12690
126912017-05-26 Michael Albinus <michael.albinus@gmx.de>
12692
12693 Remove Emacs 23 compat code from Tramp
12694
12695 * doc/misc/tramp.texi (Remote processes): Don't mention
12696 Emacs 24 explicitely.
12697 (Frequently Asked Questions): Remove Emacs 23 from
12698 compatibility list.
12699
12700 * lisp/net/tramp.el:
12701 * lisp/net/tramp-adb.el:
12702 * lisp/net/tramp-cache.el:
12703 * lisp/net/tramp-gvfs.el:
12704 * lisp/net/tramp-sh.el:
12705 * lisp/net/tramp-smb.el: Replace compat function calls.
12706
12707 * lisp/net/tramp-compat.el (remote-file-name-inhibit-cache)
12708 (tramp-compat-condition-case-unless-debug)
12709 (tramp-compat-copy-file, tramp-compat-copy-directory)
12710 (tramp-compat-delete-file, tramp-compat-delete-directory)
12711 (tramp-compat-process-live-p): Remove them.
12712
12713 * lisp/net/trampver.el: Make version check fit for Emacs 24.
12714
127152017-05-26 Katsumi Yamaoka <yamaoka@jpl.org>
12716
12717 Work for application/x-tar-gz and image/svg+xml
12718
12719 ;; Try inlining the attachment in the article <87wp94dzj6.fsf@gmail.com>
12720 ;; of bug#27078 in the Emacs bug list using Gnus.
12721
12722 * lisp/gnus/mm-archive.el (mm-archive-decoders):
12723 Add a decoder for application/x-tar-gz.
12724 (mm-dissect-archive): Error out if a decoder is not found.
12725
12726 * lisp/gnus/mm-decode.el (mm-get-image): Allow image/svg+xml.
12727
127282017-05-26 Tino Calancha <tino.calancha@gmail.com>
12729
12730 test-calc-23889: Skip test on 32-bit platforms
12731
12732 This test fails on some 32-bit platforms as mentioned in
12733 https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00737.html
12734 * test/lisp/calc/calc-tests.el (test-calc-23889): Skip when
12735 the Lisp integer is not big enough.
12736
127372017-05-25 Alan Third <alan@idiocy.org>
12738
12739 Fix NS tooltips showing in the wrong place (bug#27053)
12740
12741 * src/nsfns.m (compute_tip_xy): Get current mouse position instead of
12742 last recorded position.
12743
127442017-05-25 Thomas Fitzsimmons <fitzsim@fitzsim.org>
12745
12746 lisp/net/soap-client.el: Bump version to 3.1.2
12747
12748 * lisp/net/soap-client.el: Bump version to 3.1.2.
12749
127502017-05-25 Thomas Fitzsimmons <fitzsim@fitzsim.org>
12751
12752 Fix soap-inspect.el doc strings
12753
12754 * lisp/net/soap-inspect.el (soap-inspect-xs-attribute): Fix doc
12755 string.
12756 (soap-inspect-xs-attribute-group): Likewise.
12757
127582017-05-25 Thomas Fitzsimmons <fitzsim@fitzsim.org>
12759
12760 Fix two soap-client.el byte compilation warnings
12761
12762 * lisp/net/soap-client.el (url-http-response-status): Add defvar.
12763 (soap-fetch-xml-from-url): Remove special declaration of
12764 url-http-response-status.
12765 (soap-invoke-internal): Likewise.
12766
127672017-05-25 Thomas Fitzsimmons <fitzsim@fitzsim.org>
12768
12769 lisp/net/soap-client.el: Require cl-lib version 0.6.1
12770
12771 * lisp/net/soap-client.el: Require cl-lib version 0.6.1.
12772
127732017-05-25 Thomas Fitzsimmons <fitzsim@fitzsim.org>
12774 Stefan Monnier <monnier@iro.umontreal.ca>
12775
12776 lisp/net/soap-client.el: Shorten some long lines
12777
12778 * lisp/net/soap-client.el (soap-encode-xs-element): Remove
12779 unnecessary progn.
12780 (soap-xs-add-union): Wrap long line.
12781
127822017-05-25 Alex Harsanyi <AlexHarsanyi@gmail.com>
12783 Stefan Monnier <monnier@iro.umontreal.ca>
12784
12785 Remove cl dependency in soap-client.el and soap-inspect.el
12786
12787 * lisp/net/soap-inspect.el: Replace cl library with cl-lib, case
12788 with cl-case, destructuring-bind with cl-destructuring-bind and
12789 loop with cl-loop.
12790
12791 * lisp/net/soap-client.el: Replace cl library with cl-lib,
12792 defstruct with cl-defstruct, assert with cl-assert, case with
12793 cl-case, ecase with cl-ecase, loop with cl-loop and
12794 destructuring-bind with cl-destructuring-bind.
12795
127962017-05-25 Michael Albinus <michael.albinus@gmx.de>
12797
12798 Switch Tramp to cl-lib
12799
12800 * lisp/net/tramp-compat.el (cl-lib): Require it rather than cl.
12801
12802 * lisp/net/tramp-ftp.el: Don't require cl.
12803
12804 * lisp/net/tramp-gvfs.el: Don't require cl.
12805 (tramp-gvfs-handler-mounted-unmounted)
12806 (tramp-gvfs-connection-mounted-p): Use `cl-*' macros.
12807
12808 * lisp/net/tramp-sh.el: Don't require cl.
12809 (tramp-set-file-uid-gid): Use `shell-quote-argument'.
12810 (tramp-sh-gvfs-monitor-dir-process-filter)
12811 (tramp-sh-inotifywait-process-filter): Use `cl-*' macros.
12812
12813 * lisp/net/tramp-smb.el: Don't require cl.
12814 (tramp-smb-read-file-entry): Use `cl-*' macros.
12815
12816 * lisp/net/tramp.el (cl-lib): Require it rather than cl.
12817 (tramp-parse-file, tramp-parse-shostkeys-sknownhosts)
12818 (tramp-parse-passwd, tramp-parse-etc-group)
12819 (tramp-parse-putty): Use `cl-*' macros.
12820
128212017-05-25 Paul Eggert <eggert@cs.ucla.edu>
12822
12823 * CONTRIBUTE: Suggest autogen.sh's 'all' operand.
12824
128252017-05-25 Paul Eggert <eggert@cs.ucla.edu>
12826
12827 Port ATTRIBUTE_MAY_ALIAS to recent icc
12828
12829 * src/conf_post.h (ATTRIBUTE_MAY_ALIAS) [__ICC]:
12830 Define to empty. Otherwise, icc (ICC) 17.0.4 20170411 says
12831 “warning #2621: attribute "__may_alias__" does not apply here”
12832 for constructs like ‘struct sockaddr *sa = (whatever);
12833 struct sockaddr_in __attribute__ ((__may_alias__)) *sin
12834 = (struct sockaddr_in *) sa;’.
12835
128362017-05-25 Paul Eggert <eggert@cs.ucla.edu>
12837
12838 Merge from gnulib
12839
12840 This incorporates:
12841 2017-05-25 port to recent icc
12842 * lib/intprops.h: Copy from gnulib.
12843
128442017-05-24 Michael Albinus <michael.albinus@gmx.de>
12845
12846 Fix Tramp for python.el
12847
12848 * lisp/net/tramp.el (tramp-get-connection-process): Check,
12849 that VEC is a `tramp-file-name' structure.
12850
128512017-05-24 Alan Third <alan@idiocy.org>
12852
12853 Raise version of macOS we define instancetype for (bug#27059)
12854
12855 * src/nsterm.m: Increase supported version number.
12856
128572017-05-24 Alan Third <alan@idiocy.org>
12858
12859 Define new types on macOS 10.6 (bug#27041)
12860
12861 * src/nsterm.h: Enable instancetype typedef for older macOS, and use
12862 correct NSUInteger instead of int.
12863
128642017-05-24 Glenn Morris <rgm@gnu.org>
12865
12866 Don't autoload new dns-mode command
12867
12868 * lisp/textmodes/dns-mode.el (dns-mode-ipv6-to-nibbles):
12869 Remove autoload cookie.
12870
128712017-05-24 Stefan Monnier <monnier@iro.umontreal.ca>
12872
12873 * src/fns.c (sxhash): Fix records hashing (bug#27057, bug#26639)
12874
12875 (sxhash_vector): Make it work on pseudo vectors as well.
12876 (sxhash): Treat records like vectors.
12877
128782017-05-24 Michael Albinus <michael.albinus@gmx.de>
12879
12880 Adapt tramp-tests.el according to new defstruct
12881
12882 * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
12883 Fix test according to new defstruct.
12884 (tramp-test29-environment-variables-and-port-numbers):
12885 Expect it now as passed. Cleanup at the end.
12886
128872017-05-24 Michael Albinus <michael.albinus@gmx.de>
12888
12889 Introduce a defstruct `tramp-file-name' as central data structure.
12890
12891 This solves also Bug#27009.
12892
12893 * lisp/net/tramp.el (tramp-current-domain)
12894 (tramp-current-port): New defvars.
12895 (tramp-file-name): New defstruct.
12896 (tramp-file-name-user-domain, tramp-file-name-host-port)
12897 (tramp-file-name-equal-p): New defuns.
12898 (tramp-file-name-p, tramp-file-name-method)
12899 (tramp-file-name-user, tramp-file-name-host)
12900 (tramp-file-name-localname, tramp-file-name-hop)
12901 (tramp-file-name-real-user, tramp-file-name-domain)
12902 (tramp-file-name-real-host, tramp-file-name-port):
12903 Remove defuns. They are provided by the defstruct, or not
12904 needed anymore.
12905 (tramp-dissect-file-name, tramp-buffer-name)
12906 (tramp-make-tramp-file-name, tramp-get-buffer)
12907 (tramp-set-connection-local-variables)
12908 (tramp-debug-buffer-name, tramp-message)
12909 (tramp-error-with-buffer, with-parsed-tramp-file-name)
12910 (tramp-completion-dissect-file-name1)
12911 (tramp-handle-file-name-as-directory)
12912 (tramp-handle-file-name-directory)
12913 (tramp-handle-file-remote-p, tramp-handle-file-symlink-p)
12914 (tramp-handle-find-backup-file-name)
12915 (tramp-handle-insert-file-contents, tramp-process-actions)
12916 (tramp-check-cached-permissions, tramp-local-host-p)
12917 (tramp-get-remote-tmpdir, tramp-call-process)
12918 (tramp-call-process-region, tramp-read-passwd)
12919 (tramp-clear-passwd):
12920 * lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
12921 (tramp-adb-handle-expand-file-name)
12922 (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file)
12923 (tramp-adb-handle-process-file)
12924 (tramp-adb-maybe-open-connection):
12925 * lisp/net/tramp-cache.el (tramp-get-hash-table)
12926 (tramp-get-file-property, tramp-set-file-property)
12927 (tramp-flush-file-property, tramp-flush-directory-property)
12928 (tramp-get-connection-property)
12929 (tramp-set-connection-property, tramp-connection-property-p)
12930 (tramp-flush-connection-property, tramp-cache-print)
12931 (tramp-list-connections, tramp-dump-connection-properties)
12932 (tramp-parse-connection-properties):
12933 * lisp/net/tramp-cmds.el (tramp-cleanup-connection):
12934 * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
12935 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
12936 (tramp-gvfs-url-file-name, tramp-gvfs-handler-askpassword)
12937 (tramp-gvfs-handler-mounted-unmounted)
12938 (tramp-gvfs-mount-spec, tramp-gvfs-get-remote-uid)
12939 (tramp-gvfs-get-remote-gid)
12940 (tramp-gvfs-maybe-open-connection):
12941 * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
12942 (tramp-do-copy-or-rename-file-out-of-band)
12943 (tramp-sh-handle-expand-file-name)
12944 (tramp-sh-handle-start-file-process)
12945 (tramp-sh-handle-process-file, tramp-compute-multi-hops)
12946 (tramp-maybe-open-connection)
12947 (tramp-make-copy-program-file-name, tramp-get-remote-path)
12948 (tramp-get-inline-coding):
12949 * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
12950 (tramp-smb-handle-expand-file-name)
12951 (tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
12952 (tramp-smb-handle-set-file-acl)
12953 (tramp-smb-maybe-open-connection): Adapt according to defstruct.
12954
129552017-05-24 Stephen Berman <steve@rosalinde.fritz.box>
12956
12957 Fix and improve UI of scroll bar menu (bug#27047)
12958
12959 In addition, since the Emacs manual writes "scroll bar", "tool
12960 bar" and "menu bar", use this convention in the Show/Hide menues
12961 and tooltips as well.
12962
12963 * lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu): Make
12964 pressing a radio button in the menu actually show that it was
12965 pressed. Replace the two radio buttons to turn the horizontal
12966 scroll bar on and off with a single check-box toggle and add a
12967 separator between this and the vertical scroll bar radio
12968 buttons. Use conventional spelling.
12969 (menu-bar-horizontal-scroll-bar)
12970 (menu-bar-no-horizontal-scroll-bar): Remove, since now unused.
12971 (menu-bar-showhide-tool-bar-menu, menu-bar-showhide-menu)
12972 (menu-bar-mode): Use conventional spelling.
12973
129742017-05-24 Katsumi Yamaoka <yamaoka@jpl.org>
12975
12976 Remove string-as-unibyte
12977
12978 * lisp/gnus/canlock.el (canlock-sha1): Remove useless variable.
12979 (canlock-make-cancel-key): No need to use string-as-unibyte.
12980
129812017-05-24 Tino Calancha <tino.calancha@gmail.com>
12982
12983 Fix concatenation of "^" with diff-file-junk-re
12984
12985 This regexp contains "\\|", thus a concatenation
12986 of "^" with it just matches the beginning of line for the
12987 first alternative in diff-file-junk-re.
12988 * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer): Concat "^" with
12989 diff-file-junk-re wrapped in a shy group.
12990
129912017-05-24 Glenn Morris <rgm@gnu.org>
12992
12993 Suppress intermittent test failure on hydra
12994
12995 * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
12996 (eieio-test-37-obsolete-name-in-constructor): Skip on hydra.
12997
129982017-05-24 Peder O. Klingenberg <peder@klingenberg.no>
12999
13000 New dns-mode command for IPv6 address conversion
13001
13002 This converts IPv6 addresses to a format suitable for
13003 reverse lookup zone files. (Bug#26820)
13004 * lisp/textmodes/dns-mode.el (dns-mode-map, dns-mode-menu):
13005 Add dns-mode-ipv6-to-nibbles.
13006 (dns-mode-ipv6-to-nibbles, dns-mode-reverse-and-expand-ipv6):
13007 New functions.
13008 * test/lisp/dns-mode-tests.el: New file.
13009
130102017-05-24 Noam Postavsky <npostavs@gmail.com>
13011
13012 Protect *Backtrace* from being killed (Bug#26650)
13013
13014 * lisp/emacs-lisp/debug.el (debugger-mode): Call `top-level' in
13015 `kill-buffer-hook'.
13016
130172017-05-24 Noam Postavsky <npostavs@gmail.com>
13018
13019 Give a name to lisp-mode's adaptive-fill-function (Bug#22730)
13020
13021 * lisp/emacs-lisp/lisp-mode.el (lisp-adaptive-fill): New function.
13022 (lisp-mode-variables): Use it.
13023
130242017-05-23 Philipp Stephani <phst@google.com>
13025
13026 vc-hg.el: Silence byte compiler warning
13027
13028 * lisp/vc/vc-hg.el (compilation-arguments): Forward-declare.
13029
130302017-05-23 Paul Eggert <eggert@cs.ucla.edu>
13031
13032 Don't warn about missing brances on macOS
13033
13034 On macOS, removing -Wmissing-braces is not enough; the warning has to
13035 be disabled explicitly.
13036
130372017-05-23 Wilfred Hughes <me@wilfred.me.uk>
13038
13039 Don't treat ' as a string delimiter in RPM spec files
13040
13041 ' is commonly used as an apostrophe in the prose sections of spec
13042 files, which was erroneously highlighted as strings. See for example
13043 http://kmymoney2.sourceforge.net/phb/rpm-example.html
13044
13045 * lisp/progmodes/sh-script.el (sh-mode-syntax-table): Treat ' as
13046 punctuation in RPM spec files.
13047
130482017-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
13049
13050 * lisp/emacs-lisp/cl-indent.el: Don't require CL. Use lexical-binding.
13051
13052 (common-lisp-indent-function-1): Remove unused var `last-point`.
13053 (lisp-indent-error-function): Move defvar before first use.
13054
130552017-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
13056
13057 * lisp/international/rfc1843.el: Don't require CL. Use lexical-binding.
13058
13059 * lisp/international/utf7.el: Don't require CL. Use lexical-binding.
13060
13061 * lisp/net/shr.el: Use cl-lib instead of cl.
13062
130632017-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
13064
13065 * test/src/fns-tests.el, test/src/data-tests.el: Don't use `cl`
13066
13067 * test/src/data-tests.el (binding-test-manual, binding-test-setq-default)
13068 (binding-test-makunbound, data-tests-varalias-watchers)
13069 (data-tests-local-variable-watchers): Silence compiler warnings.
13070
130712017-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
13072
13073 * lisp/vc/vc-hg.el (compilation-directory): Silence byte-compiler.
13074
130752017-05-23 Alan Third <alan@idiocy.org>
13076
13077 Fix GNUstep build
13078
13079 * src/nsterm.h [NS_IMPL_GNUSTEP]: Add typedefs for Cocoa-only types.
13080 (NSWindowStyleMaskUtilityWindow): #define to NSUtilityWindowMask in
13081 GNUstep and old versions of macOS.
13082 * src/nsfns.m (ns-set-mouse-absolute-pixel-position): Function only
13083 works in cocoa, not GNUstep.
13084
130852017-05-23 Michael Albinus <michael.albinus@gmx.de>
13086
13087 Add test for Bug#27009 in tramp-tests.el
13088
13089 * lisp/net/tramp-sh.el (tramp-compute-multi-hops):
13090 Check `tramp-file-name-real-host' for being a local host.
13091
13092 * lisp/net/tramp.el (tramp-postfix-host-regexp): Fix docstring.
13093
13094 * test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory):
13095 Declare default host for mock method.
13096 (tramp-test29-environment-variables-and-port-numbers): New test.
13097
130982017-05-23 Glenn Morris <rgm@gnu.org>
13099
13100 Don't advertise s_client in tls.el docs
13101
13102 * lisp/net/tls.el (tls-end-of-info, tls-success, tls-untrusted):
13103 Don't mention s_client in docs.
13104
13105 (cherry picked from commit 622c24a2b75a564b9861fc3ca7a7878741e8568d)
13106
131072017-05-23 Rob Browning <rlb@defaultvalue.org>
13108
13109 Remove s_client usage from tls.el
13110
13111 * lisp/net/tls.el (tls-program, tls-checktrust): Remove s_client.
13112 Ref http://bugs.debian.org/766397
13113 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00803.html
13114
13115
13116 (cherry picked from commit 6e45de6bacc508db11b15b2c8ba86aad8c0570df)
13117
131182017-05-22 Stefan Monnier <monnier@iro.umontreal.ca>
13119
13120 * lisp/mail/rfc2047.el (rfc2047-decode-encoded-words): Set `words` to nil.
13121
131222017-05-22 Sam Steingold <sds@gnu.org>
13123
13124 Fix "g" in hg&git push&pull buffers
13125
13126 lisp/vc/vc-git.el (vc-git--pushpull): Set locally
13127 `compilation-directory' and `compilation-arguments'.
13128 lisp/vc/vc-hg.el (vc-hg--pushpull): Likewise.
13129
131302017-05-22 Eli Zaretskii <eliz@gnu.org>
13131
13132 Fix current-line hscrolling in buffers with header-line
13133
13134 * src/xdisp.c (display_line): When testing the glyph row's
13135 vertical position against the cursor position, account for header
13136 line, if any. (Bug#27014)
13137
131382017-05-22 Stefan Monnier <monnier@iro.umontreal.ca>
13139
13140 * lisp/mail/rfc2047.el: Use cl-lib & lexical-binding, silence warning
13141
13142 (rfc2047-decode-encoded-words): Use dolist.
13143 (rfc2047-decode-string): Avoid string-to-multibyte.
13144 (rfc2047-pad-base64): Use pcase.
13145
131462017-05-21 Dima Kogan <dima@secretsauce.net>
13147
13148 Make ff-find-other-file symmetric for C++ (Bug#20192)
13149
13150 `cc-other-file-alist' has a mapping of file extensions to switch
13151 between headers and sources, but the mappings weren't completely
13152 symmetric. In particular .cpp would map to .hh, but .hh would NOT map
13153 to .cpp.
13154
13155 * lisp/find-file.el (cc-other-file-alist): Map ".hh" and ".h" to all
13156 C++ extensions to make them symmetric with the C++ extensions that map
13157 to them. This lets repeated invocations of `ff-find-other-file'
13158 toggle between all pairs of sources/headers.
13159
131602017-05-21 Philipp Stephani <phst@google.com>
13161
13162 Fix definition of whitespace in JSON
13163
13164 See
13165 https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00115.html.
13166
13167 * lisp/json.el (json-skip-whitespace): Fix definition.
13168 * test/lisp/json-tests.el (test-json-skip-whitespace): Adapt unit
13169 test.
13170
131712017-05-21 Philipp Stephani <phst@google.com>
13172
13173 Improve module function terminology
13174
13175 Module functions were previously called "function environments" when
13176 the functions created by module_make_functions were lambdas. Now we
13177 can adapt the terminology and rename "function environments" to
13178 "module functions" everywhere. This also removes the name clash
13179 between "function environments" and "module environments."
13180
13181 * src/emacs-module.c (module_make_function): Adapt comment to reality;
13182 stop using "function environment" terminology.
13183 (funcall_module): Stop using "function environment" terminology.
13184
131852017-05-21 Philipp Stephani <phst@google.com>
13186
13187 Avoid uninitialized read
13188
13189 * src/nsterm.m (ns_read_socket): Don't read uninitialized variable 'nevents'.
13190
131912017-05-21 Philipp Stephani <phst@google.com>
13192
13193 Fix call of registerServicesMenuSendTypes
13194
13195 * src/nsterm.m (initFrameFromEmacs:): nil is not allowed for
13196 returnTypes; pass an empty array instead.
13197
131982017-05-21 Philipp Stephani <phst@google.com>
13199
13200 Clean up code around 'ns-list-services'
13201
13202 * src/nsfns.m (Fns_list_services): Remove unreachable code. In this
13203 branch NS_IMPL_COCOA cannot be defined.
13204 (interpret_services_menu): Define only if called to avoid compiler
13205 warnings about unused static functions.
13206
132072017-05-21 Philipp Stephani <phst@google.com>
13208
13209 Remove unused automatic variables
13210
13211 * nsterm.m (ns_read_socket):
13212 * macfont.m (macfont_open): Remove unused automatic variables.
13213
132142017-05-21 Philipp Stephani <phst@google.com>
13215
13216 Nextstep: Replace deprecated enumerators
13217
13218 * src/nsmenu.m (initWithContentRect:styleMask:backing:defer:): Replace
13219 deprecated enumerator.
13220
132212017-05-21 Philipp Stephani <phst@google.com>
13222
13223 Nextstep: remove some deprecated method calls
13224
13225 * src/nsterm.m (mouseDown:):
13226 * src/nsmenu.m (runMenuAt:forFrame:keymaps:): Remove call to
13227 deprecated method. The return value is always nil.
13228 * src/macfont.m (mac_font_shape_1): Replace call to deprecated method.
13229
132302017-05-21 Philipp Stephani <phst@google.com>
13231
13232 Remove trailing semicolons in method definitions
13233
13234 These semicolons are ignored and cause compiler warnings.
13235
13236 * src/nsimage.m (setPixelAtX:Y:toRed:green:blue:alpha:):
13237 * src/nsterm.m (init, updateFrameSize:):
13238 (setFrame:): Remove trailing semicolon.
13239
132402017-05-21 Philipp Stephani <phst@google.com>
13241
13242 Remove calls to deprecated setUsesScreenFonts
13243
13244 * src/macfont.m (mac_screen_font_get_metrics): Don't call setUsesScreenFonts.
13245 (mac_font_shape_1): Remove screen_font_p parameter.
13246 (mac_screen_font_shape): Remove screen_font_p argument.
13247
132482017-05-21 Philipp Stephani <phst@google.com>
13249
13250 Make a function static that isn't used outside this file
13251
13252 * src/kqueue.c (kqueue_directory_listing): Make static.
13253
132542017-05-21 Philipp Stephani <phst@google.com>
13255
13256 Use NSCharacterCollection instead of CTCharacterCollection
13257
13258 This should not cause behavior changes, but fixes a compiler warning
13259 due to implicit conversions between the enums.
13260
13261 * src/macfont.m (macfont_cache, macfont_lookup_cache)
13262 (macfont_get_glyph_for_cid, macfont_get_uvs_table)
13263 (macfont_variation_glyphs): Use NSCharacterCollection.
13264
132652017-05-21 Philipp Stephani <phst@google.com>
13266
13267 Remove unused function print_regions
13268
132692017-05-21 Philipp Stephani <phst@google.com>
13270
13271 Declare Nextstep unexec functions in lisp.h
13272
13273 This removes compiler warnings about missing prototypes on macOS.
13274
132752017-05-21 Philipp Stephani <phst@google.com>
13276
13277 Nextstep: Use instancetype explicit return type
13278
13279 This removes compiler warnings on macOS and improves type safety.
13280
13281 * nsterm.m (initFrameFromEmacs:):
13282 (menuDown:):
13283 (toolbarClicked:):
13284 (toggleToolbar:):
13285 (setMiniwindowImage:):
13286 (initFrame:window:):
13287 (condemn, reprieve, setPosition:portion:whole:):
13288 (repeatScroll:):
13289 * nsmenu.m (initWithTitle:):
13290 (initWithTitle:frame:):
13291 (initForView:withIdentifier:):
13292 (init, initWithContentRect:styleMask:backing:defer:):
13293 (initFromContents:isQuestion:):
13294 * nsimage.m (allocInitFromFile:):
13295 (initFromXBM:width:height:fg:bg:):
13296 (setXBMColor:):
13297 (initForXPMWithDepth:width:height:): Use instancetype as return
13298 type instead of implicit id.
13299
133002017-05-21 Tino Calancha <tino.calancha@gmail.com>
13301
13302 * lisp/emacs-lisp/package.el (package-delete): Delete readme file as well.
13303
133042017-05-21 Alan Mackenzie <acm@muc.de>
13305
13306 Enhance mode-line percentage offset facility, with "%o" and "%q"
13307
13308 "%o" will display the percentage "travel" of the window through the buffer.
13309 "%q" will display a combination of the percentage offsets of the top and
13310 bottom of the window. The new user option mode-line-percent-position will
13311 facilitate selecting a setting for this part of the mode line.
13312
13313 * lisp/bindings.el (mode-line-percent-position): New customizable user option.
13314 (mode-line-position): Use mode-line-percent-position in place of "%p", etc.
13315
13316 * src/xdisp.c (decode_mode_spec): Add handlers for "%o" and "%q".
13317
13318 * doc/lispref/modes.texi (Mode Line Variables): Document
13319 mode-line-percent-position.
13320 (%-Constructs): Document %o and %q.
13321
13322 * etc/NEWS: Add an entry for these new facilities.
13323
133242017-05-21 Paul Eggert <eggert@cs.ucla.edu>
13325
13326 Work around macOS bug in create_process, too
13327
13328 * src/process.c (create_process) [DARWIN_OS]:
13329 Reset SIGCHLD after vfork here, too.
13330
133312017-05-21 Paul Eggert <eggert@cs.ucla.edu>
13332
13333 Work around macOS bug with vforked child
13334
13335 * src/callproc.c (call_process) [DARWIN_OS]:
13336 Include workaround for apparent macOS bug.
13337
133382017-05-21 Paul Eggert <eggert@cs.ucla.edu>
13339
13340 Pacify --enable-gcc-warnings without modules
13341
13342 * src/print.c (print_vectorlike): New function, taken from
13343 part of print_object. This one is indented properly, and
13344 pacifies --enable-gcc-warnings by using a default case
13345 instead of listing all the enum values, sometimes
13346 incompletely.
13347 (print_object): Use it.
13348
133492017-05-21 Paul Eggert <eggert@cs.ucla.edu>
13350
13351 Remove DARWIN_OS_CASE_SENSITIVE_FIXME code
13352
13353 It does not appear to be needed (Bug#24441).
13354 * etc/PROBLEMS: Remove DARWIN_OS_CASE_SENSITIVE_FIXME stuff.
13355 * src/fileio.c (file_name_case_insensitive_p):
13356 Remove DARWIN_OS_CASE_SENSITIVE_FIXME code.
13357
133582017-05-21 Paul Eggert <eggert@cs.ucla.edu>
13359
13360 Narrow DARWIN_OS_CASE_SENSITIVE_FIXME to 1 choice
13361
13362 * etc/PROBLEMS: Document this (Bug#24441).
13363 * src/fileio.c (file_name_case_insensitive_p): Prefer pathconf
13364 with _PC_CASE_SENSITIVE, if it works, to
13365 DARWIN_OS_CASE_SENSITIVE_FIXME code.
13366 Support just one method for DARWIN_OS_CASE_SENSITIVE_FIXME,
13367 which matches the Apple documentation more precisely.
13368
133692017-05-21 Tom Tromey <tom@tromey.com>
13370
13371 Fix mhtml-mode fontification bug
13372
13373 Bug#26922
13374 * lisp/textmodes/mhtml-mode.el (mhtml-syntax-propertize): Call
13375 sgml-syntax-propertize-inside if not in a submode.
13376 * test/manual/indent/html-multi-4.html: New file.
13377
133782017-05-21 Ryan <rct@thompsonclan.org> (tiny change)
13379
13380 Fix ido-enable-dot-prefix for empty choice (Bug#26997)
13381
13382 * lisp/ido.el (ido-set-matches-1): Only check first character of
13383 item if it's non-empty.
13384
133852017-05-21 Ari Roponen <ari.roponen@gmail.com>
13386
13387 * lisp/svg.el (svg-line): Fix x/y typo. (Bug#26953)
13388
133892017-05-21 Glenn Morris <rgm@gnu.org>
13390
13391 Prevent loading vc-bzr writing to ~/.bzr.log
13392
13393 * lisp/vc/vc-bzr.el (vc-bzr-status-switches): Disable bzr logging.
13394
133952017-05-21 Glenn Morris <rgm@gnu.org>
13396
13397 Prevent running vc-tests writing to ~/.bzr.log
13398
13399 * test/lisp/vc/vc-tests.el (vc-test--create-repo)
13400 (vc-test--register, vc-test--working-revision)
13401 (vc-test--checkout-model): Set temporary BZR_HOME, to disable logging.
13402
134032017-05-21 Noam Postavsky <npostavs@gmail.com>
13404
13405 Don't end non-hook variable with "-hook" (Bug#26623)
13406
13407 * lisp/follow.el (follow-inside-post-command-hook-call): Renamed from
13408 follow-inside-post-command-hook, update uses.
13409
134102017-05-21 Charles A. Roelli <charles@aurox.ch>
13411
13412 Fix macOS mouse movement
13413
13414 * lisp/frame.el (ns-set-mouse-absolute-pixel-position): New
13415 function (Lisp).
13416 (set-mouse-absolute-pixel-position): Change it to call
13417 `ns-set-mouse-absolute-pixel-position' on macOS.
13418 * src/nsfns.m (Fns_set_mouse_absolute_pixel_position): New
13419 function.
13420 * src/nsterm.h (NS_PARENT_WINDOW_TOP_POS): Use the primary
13421 screen's height as a base for calculating global coordinates.
13422 * src/nsterm.m (frame_set_mouse_pixel_position): Fix it in macOS.
13423 * test/lisp/mouse-tests.el (bug26816-mouse-frame-movement): Test
13424 movement of mouse relative to frame.
13425
134262017-05-21 Alan Third <alan@idiocy.org>
13427
13428 Show tooltip on correct screen (bug#26905)
13429
13430 * src/nsfns.m (compute_tip_xy): Find the correct screen for the
13431 tooltip and constrain it to that screen.
13432
134332017-05-21 Andreas Politz <politza@hochschule-trier.de>
13434
13435 Don't save unrelated buffers before recompiling directory (Bug#25964)
13436
13437 * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Only save
13438 buffers visiting lisp files under the directory being compiled.
13439
134402017-05-20 Paul Eggert <eggert@cs.ucla.edu>
13441
13442 Minor fixes for arity ranges in emacs modules
13443
13444 * src/emacs-module.c (module_make_function):
13445 Check that arities fit into fixnums, for func-arity’s benefit.
13446 (funcall_module): Avoid unnecessary conversion to EMACS_INT.
13447 (module_function_arity): Allow arities greater than SHRT_MAX.
13448
134492017-05-20 Philipp Stephani <phst@google.com>
13450
13451 Reimplement module functions
13452
13453 Instead of a lambda, create a new type containing all data required to
13454 call the function, and support it in the evaluator. Because this type
13455 now also needs to store the function documentation, it is too big for
13456 Lisp_Misc; use a pseudovector instead. That also has the nice benefit
13457 that we don't have to add special support to the garbage collector.
13458
13459 Since the new type is user-visible, give it a predicate.
13460
13461 Now we can easily support 'help-function-args' and 'func-arity'; add
13462 unit tests for these.
13463
13464 * src/lisp.h (allocate_module_function, MODULE_FUNCTIONP)
13465 (XMODULE_FUNCTION): New pseudovector type 'module function'.
13466
13467 * src/eval.c (FUNCTIONP): Also treat module functions as functions.
13468 (funcall_lambda, Ffuncall, eval_sub): Add support for calling module
13469 functions.
13470 (Ffunc_arity): Add support for detecting the arity of module
13471 functions.
13472
13473 * src/emacs-module.c (module_make_function): Adapt to new structure.
13474 Return module function object directly instead of wrapping it in a
13475 lambda; remove FIXME.
13476 (funcall_module): New function to call module functions. Replaces
13477 `internal--module-call' and is called directly from eval.c.
13478 (syms_of_module): Remove internal helper function, which is no longer
13479 needed.
13480 (module_function_arity): New helper function.
13481
13482 * src/data.c (Ftype_of): Adapt to new implementation.
13483 (Fmodule_function_p, syms_of_data): New user-visible function. Now
13484 that module functions are first-class objects, they deserve a
13485 predicate. Define it even if not compiled with --enable-modules so
13486 that Lisp code doesn't have to check for the function's existence.
13487
13488 * src/doc.c (Fdocumentation): Support module functions.
13489
13490 * src/print.c (print_object): Adapt to new implementation.
13491
13492 * src/alloc.c (mark_object): Specialized garbage collector support is
13493 no longer needed.
13494
13495 * lisp/help.el (help-function-arglist): Support module functions.
13496 While there, simplify the arity calculation by using `func-arity',
13497 which does the right thing for all kinds of functions.
13498
13499 * test/data/emacs-module/mod-test.c: Amend docstring so we can test
13500 the argument list.
13501
13502 * test/src/emacs-module-tests.el (mod-test-sum-docstring): Adapt to
13503 new docstring.
13504 (mod-test-non-local-exit-signal-test): Because `internal--module-call'
13505 is gone, the backtrace has changed and no longer leaks the
13506 implementation.
13507 (module--func-arity): New test for `func-arity'.
13508 (module--help-function-arglist): New test for `help-function-arglist'.
13509
135102017-05-20 Eli Zaretskii <eliz@gnu.org>
13511
13512 Avoid crashes in GC due to unescaped characters warning
13513
13514 * src/lread.c (load_warn_unescaped_character_literals): Don't cons
13515 Lisp objects from stack-based variables. (Bug#26961)
13516
135172017-05-20 Charles A. Roelli <charles@aurox.ch>
13518
13519 New commands: find-library-other-window, find-library-other-frame
13520
13521 * lisp/emacs-lisp/find-func.el (find-library-other-window)
13522 (find-library-other-frame): New commands to complement the
13523 existing 'find-library' command. (Bug#26712)
13524 (read-library-name): New function to read a library name.
13525 * etc/NEWS: Mention 'find-library-other-window' and
13526 'find-library-other-frame'.
13527
135282017-05-20 Eli Zaretskii <eliz@gnu.org>
13529
13530 Fix automatic hscrolling of only the current line
13531
13532 * src/xdisp.c (display_line): When hscrolling only the current
13533 line, increment iterator's first_visible_x and last_visible_x
13534 values to account for the hscroll. This propagates the hscroll
13535 effect on the iterator geometry all the way down to the
13536 subroutines called by display_line, and avoids scrolling bugs
13537 under large hscroll values. (Bug#26994)
13538
135392017-05-20 Paul Eggert <eggert@cs.ucla.edu>
13540
13541 Add handlerlist assertion to module code
13542
13543 * src/emacs-module.c (module_reset_handlerlist):
13544 Check handlerlist. Suggested by Philipp Stephani in:
13545 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html
13546
135472017-05-20 Paul Eggert <eggert@cs.ucla.edu>
13548
13549 Port --enable-gcc-warnings to clang 3.9.1
13550
13551 * configure.ac (WERROR_CFLAGS): Omit -Wmissing-braces for Clang,
13552 to shut off a false alarm. Problem reportd by Philipp Stephani in:
13553 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html
13554
135552017-05-20 Noam Postavsky <npostavs@gmail.com>
13556
13557 Limit integers printed as characters (Bug#16828)
13558
13559 * lisp/simple.el (eval-expression-print-maximum-character): New
13560 variable.
13561 (eval-expression-print-format): Only display value as character if
13562 it's less than or equal to `eval-expression-print-maximum-character'.
13563 (eval-expression-get-print-arguments): Check
13564 eval-expression-print-maximum-character, allow negative arg to
13565 override it.
13566 (eval-expression):
13567 * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp):
13568 (elisp--eval-last-sexp-print-value): Handle new variable.
13569 * doc/emacs/building.texi (Lisp Eval): Document new variable and
13570 behavior.
13571 * etc/NEWS: Announce it.
13572 * test/lisp/progmodes/elisp-mode-tests.el
13573 (eval-last-sexp-print-format-small-int)
13574 (eval-last-sexp-print-format-small-int-echo)
13575 (eval-last-sexp-print-format-large-int)
13576 (eval-last-sexp-print-format-large-int-echo):
13577 * test/lisp/simple-tests.el (eval-expression-print-format-small-int)
13578 (eval-expression-print-format-small-int-echo)
13579 (eval-expression-print-format-large-int)
13580 (eval-expression-print-format-large-int-echo): New tests.
13581
135822017-05-20 Noam Postavsky <npostavs@gmail.com>
13583
13584 Refactor lisp eval result printing
13585
13586 * lisp/simple.el (eval-expression-print-format): Don't check
13587 `standard-output' or `current-prefix-arg'.
13588 (eval-expression-get-print-arguments): New function, centralizes
13589 decision about how to print results of `eval-expression' and
13590 `eval-last-sexp'.
13591 (eval-expression):
13592 * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp-print-value):
13593 Use it.
13594
135952017-05-19 Paul Eggert <eggert@cs.ucla.edu>
13596
13597 Check that signed right shift is arithmetic
13598
13599 * src/data.c (ash_lsh_impl): Verify that signed right shift is
13600 arithmetic; if we run across a compiler that uses a logical shift
13601 we’ll need to complicate the code before removing this
13602 compile-time check. Help the compiler do common subexpression
13603 elimination better.
13604
136052017-05-19 Paul Eggert <eggert@cs.ucla.edu>
13606
13607 Minor .gitignore fixes
13608
13609 * .gitignore: modules/mod-test/Makefile was renamed to
13610 test/data/emacs-module/Makefile.
13611 Omit [0-9]*.core, subsumed by *.core.
13612 test/indent/*.new was renamed to test/manual/indent/*.new.
13613 Add *.swp, for Vim.
13614
136152017-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
13616
13617 * lisp/emacs-lisp/package.el: Quote `package-desc' in docstrings
13618
136192017-05-19 Eli Zaretskii <eliz@gnu.org>
13620
13621 Describe problems with Microsoft Intellipoint
13622
13623 * etc/PROBLEMS: Describe problems with Microsoft Intellipoint and
13624 mouse-2 events. For the details, see
13625 http://lists.gnu.org/archive/html/help-emacs-windows/2017-05/msg00009.html.
13626
136272017-05-19 Nick Helm <nick@tenpoint.co.nz> (tiny change)
13628
13629 Fix turning off whitespace-mode
13630
13631 * lisp/whitespace.el (whitespace-display-char-on): Correct the way
13632 the original buffer-display-table is saved and restored when
13633 global-whitespace-mode is active. (Bug#26892)
13634
13635 * test/lisp/whitespace-tests.el
13636 (whitespace-tests-whitespace-mode-on): New function.
13637 (whitespace-tests-display-tables): New test.
13638
136392017-05-19 Michael Albinus <michael.albinus@gmx.de>
13640
13641 Minor tweaks in tramp-tests.el
13642
13643 * test/lisp/net/tramp-tests.el (tramp--test-afp-or-smb-p): New defun.
13644 (tramp-test05-expand-file-name-relative): Use it.
13645 (tramp-test38-unload): Run only in batch mode.
13646
136472017-05-19 Michael Albinus <michael.albinus@gmx.de>
13648
13649 Fix a problem with OpenSSH 7 in Tramp
13650
13651 * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Set also
13652 "ConnectTimeout" during test. Otherwise, OpenSSH 7 will hang.
13653
136542017-05-19 Jean-Christophe Helary <jean.christophe.helary@gmail.com>
13655
13656 Improve documentation of 'split-string'
13657
13658 * doc/lispref/strings.texi (Creating Strings): Rearrange text to
13659 make it more readable. (Bug#26925)
13660
136612017-05-19 Ruslan Bekenev <furyinbox@gmail.com>
13662
13663 Fix typos in doc strings
13664
13665 * lisp/mail/rfc2231.el (rfc2231-encode-string):
13666 * lisp/mail/rfc2047.el (rfc2047-encode-parameter):
13667 * lisp/mail/rfc2045.el (rfc2045-encode-string): Fix typos in doc
13668 strings. (Bug#26103)
13669
136702017-05-19 Philipp Stephani <phst@google.com>
13671
13672 Fix module tests on some systems
13673
13674 If dladdr(3) isn't available or didn't work, the printed
13675 representation of a module function will not include the file name,
13676 but only the address. Make the tests pass in that case.
13677
13678 * test/src/emacs-module-tests.el (module-function-object): Fix match for
13679 module function printed representation
13680
136812017-05-19 Jean-Christophe Helary <jean.christophe.helary@gmail.com>
13682
13683 Add an optional arguments to string-trim
13684
13685 * lisp/emacs-lisp/subr-x.el (string-trim-left, string-trim-right)
13686 (string-trim): Add optional args that serve as defaults per the
13687 original behavior. (Bug#26908)
13688
136892017-05-19 Stephen Berman <steve@rosalinde.fritz.box>
13690
13691 Fix typo in last change to auto-hscroll-mode
13692
13693 * lisp/cus-start.el (standard): Fix typo in value of auto-hscroll-mode.
13694
136952017-05-19 Eli Zaretskii <eliz@gnu.org>
13696
13697 Support remote editing in emacsclient via Tramp
13698
13699 * lib-src/emacsclient.c (main, decode_options)
13700 (print_help_and_exit, longopts): New option '--tramp' / '-T' which
13701 specifies how emacs should use tramp to find remote files.
13702
13703 * doc/emacs/misc.texi (TCP Emacs server): New subsection describing
13704 the various knobs to tune server.el for TCP opereation.
13705 (emacsclient Options): Reference "TCP Emacs server" from description of
13706 --server-file. Document the new '--tramp' / '-T' options.
13707 * doc/emacs/emacs.texi (Top): Update the top-level menu.
13708
13709 * etc/NEWS: Mention the new option.
13710
137112017-05-19 Eli Zaretskii <eliz@gnu.org>
13712
13713 * lisp/replace.el (query-replace-regexp-eval): Doc fix.
13714
137152017-05-19 Paul Eggert <eggert@cs.ucla.edu>
13716
13717 Attempt to work around macOS vfork bug
13718
13719 Problem reported by YAMAMOTO Mitsuharu in:
13720 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00342.html
13721 This is related to the fix for Bug#26397.
13722 * src/callproc.c (call_process_cleanup, call_process) [!MSDOS]:
13723 Report internal error if wait_for_termination fails.
13724 * src/sysdep.c (get_child_status): Return -1 if waitpid is
13725 buggy, instead of aborting.
13726 (wait_for_termination): Return bool success value.
13727 All callers changed.
13728
137292017-05-19 Eli Zaretskii <eliz@gnu.org>
13730
13731 Adjust defcustom form for 'auto-hscroll-mode'
13732
13733 * lisp/cus-start.el (standard) <auto-hscroll-mode>: Adjust the
13734 defcustom form. Suggested by Stephen Berman <stephen.berman@gmx.net>.
13735
137362017-05-19 Paul Eggert <eggert@cs.ucla.edu>
13737
13738 Fix DARWIN_OS_CASE_SENSITIVE_FIXME==2 false alarm
13739
13740 * src/fileio.c (file_name_case_insensitive_p):
13741 Don’t compile the (DARWIN_OS_CASE_SENSITIVE_FIXME == 2)
13742 code unless DARWIN_OS_CASE_SENSITIVE_FIXME is 2.
13743 Problem reported by Philipp Stephani in:
13744 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html
13745
137462017-05-19 Paul Eggert <eggert@cs.ucla.edu>
13747
13748 Port --enable-gcc-warnings to clang 3.9.1
13749
13750 * configure.ac (WERROR_CFLAGS): Omit -Wdouble-promotion if clang.
13751 Problem reported by Philipp Stephani in:
13752 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html
13753
137542017-05-19 Paul Eggert <eggert@cs.ucla.edu>
13755
13756 Clean up compiler warning in emacs-module.c
13757
13758 * src/emacs-module.c (MODULE_SETJMP_1): Use the local var
13759 instead of leaving it unused, to pacify picky compilers.
13760 (module_reset_handlerlist): Now takes a dummy pointer to a struct
13761 handler *, instead of a dummy pointer to an int. All uses changed.
13762
137632017-05-19 Philipp Stephani <phst@google.com>
13764
13765 Clean up some compiler warnings
13766
13767 * src/sysdep.c (system_process_attributes) [DARWIN_OS]:
13768 Remove unused locals.
13769
137702017-05-18 Eli Zaretskii <eliz@gnu.org>
13771
13772 Support hscrolling only the current line
13773
13774 * src/xdisp.c (hscrolling_current_line_p): New function.
13775 (init_iterator): If auto-hscrolling just the current line, don't
13776 increment the iterator's first_visible_x and last_visible_x
13777 variables.
13778 (hscroll_window_tree): Recompute window's hscroll when moving
13779 vertically to another screen line.
13780 (redisplay_window): If we are hscrolling only the current line,
13781 disable the optimizations that rely on the current matrix being
13782 up-to-date.
13783 (display_line): Accept an additional argument CURSOR_VPOS, the
13784 vertical position of the current screen line which might need
13785 hscrolling; all callers changed. Compute first_visible_x and
13786 last_visible_x specially when auto-hscrolling current line, by
13787 repeating the calculation that is done in init_iterator in other
13788 modes.
13789 (syms_of_xdisp) <auto-hscroll-mode>: No longer boolean, it can now
13790 accept a 3rd value 'current-line, to turn on the mode where
13791 only the current line is hscrolled.
13792
13793 * etc/NEWS: Mention the new auto-hscroll-mode value.
13794
137952017-05-18 Eli Zaretskii <eliz@gnu.org>
13796
13797 Fix last change in line-move-finish
13798
13799 * lisp/simple.el (line-move-finish): Fix last change. This corrects a
13800 regression in C-n and C-p when lines are truncated, introduced by the
13801 change in 2017-05-10.
13802
138032017-05-18 Simen Heggestøyl <simenheg@gmail.com>
13804
13805 Expand docstring for CSS mode
13806
13807 * lisp/textmodes/css-mode.el (css-completion-at-point, css-mode):
13808 Expand docstrings.
13809
138102017-05-18 Tino Calancha <tino.calancha@gmail.com>
13811
13812 Use the expression angle units while simplifying it
13813
13814 Don't use the angle mode, use the angle units included
13815 in the expression instead (Bug#23889).
13816 * lisp/calc/calc-alg.el (calc-input-angle-units): New defun.
13817 (math-simplify): Use it.
13818 * lisp/calc/calc-forms.el (math-to-hms, math-from-hms):
13819 Don't use calc-angle-mode if math-simplifying-units is non-nil.
13820 * lisp/calc/calc-math.el (calcFunc-nroot, math-from-radians)
13821 (math-to-radians-2, math-from-radians-2): Don't convert angle
13822 to radians if math-simplifying-units is non-nil.
13823 * test/lisp/calc/calc-tests.el (test-calc-23889): Add test.
13824
138252017-05-18 Tino Calancha <tino.calancha@gmail.com>
13826
13827 Revert "Ignore angle mode while simplifying units"
13828
13829 This reverts commit 713e922243fb60d850f7b0ff83f3e2a3682f1832.
13830 This commit causes Bug#25652.
13831
138322017-05-17 Paul Eggert <eggert@cs.ucla.edu>
13833
13834 Avoid undefined behavior in struct sockaddr
13835
13836 Problem noted by Philipp Stephani in:
13837 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00391.html
13838 * src/conf_post.h (ATTRIBUTE_MAY_ALIAS, DECLARE_POINTER_ALIAS):
13839 New macros.
13840 * src/process.c (conv_sockaddr_to_lisp, conv_lisp_to_sockaddr)
13841 (connect_network_socket, network_interface_info)
13842 (server_accept_connection): Use it when aliasing non-char objects.
13843
138442017-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
13845
13846 * lisp/vc/smerge-mode.el (smerge-refine-regions): Work in multi-bufs
13847
13848 Rename from smerge-refine-subst. Allow the `beg's to be markers.
13849 Add autoload cookie.
13850 (smerge--refine-forward): Rename from smerge-refine-forward.
13851 (smerge--refine-chopup-region): Rename from smerge-refine-chopup-region.
13852 Assume that its `beg` arg is a marker.
13853 (smerge--refine-highlight-change): Rename from
13854 smerge-refine-highlight-change. Remove `buf` arg.
13855 (smerge-refine-subst): Redefine as an obsolete alias.
13856
138572017-05-17 Paul Eggert <eggert@cs.ucla.edu>
13858
13859 Work around AddressSanitizer bug with vfork
13860
13861 Problem reported by Jim Meyering in:
13862 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00246.html
13863 * src/conf_post.h (vfork) [ADDRESS_SANITIZER]: Define to fork.
13864 Unfortunately with the AddressSanitizer in Fedora 25 x86-64, the
13865 vforked child messes up the parent’s shadow memory. This is too
13866 bad, as we’d rather have AddressSanitizer catch memory-access bugs
13867 related to vfork.
13868
138692017-05-17 Paul Eggert <eggert@cs.ucla.edu>
13870
13871 Catch IPv4/IPv6 issues at compile time
13872
13873 * src/process.c (connect_network_socket): Use verify,
13874 not eassert, so that any problems are caught at compile-time.
13875 Avoid dodgy cast by using a local var of the correct type.
13876
138772017-05-17 Paul Eggert <eggert@cs.ucla.edu>
13878
13879 Pacify --enable-gcc-warnings --with-x-toolkit=no
13880
13881 * src/composite.c (autocmp_chars) [!HAVE_WINDOW_SYSTEM]:
13882 Avoid unused local.
13883
138842017-05-17 Glenn Morris <rgm@gnu.org>
13885
13886 * admin/update_autogen (commit): Pull before push.
13887
138882017-05-17 Glenn Morris <rgm@gnu.org>
13889
13890 autoload-rubric no longer provides a feature by default
13891
13892 * lisp/emacs-lisp/autoload.el (autoload-rubric):
13893 Stop providing a feature unless explicitly requested.
13894 (autoload-find-generated-file): Update autoload-rubric call.
13895
138962017-05-17 Eli Zaretskii <eliz@gnu.org>
13897
13898 Remove redundant code in connect_network_socket
13899
13900 * src/process.c (connect_network_socket) [HAVE_GETSOCKNAME]:
13901 Remove redundant type-casting and variables. Don't call
13902 'getsockname' to find the port for AF_LOCAL sockets.
13903 [AF_INET6]: Add an assertion to verify that the ports in the IPv4
13904 and IPv6 structures are at the same offset and have the same size.
13905
139062017-05-16 Paul Eggert <eggert@cs.ucla.edu>
13907
13908 Fix minor timezone memory leak
13909
13910 * src/editfns.c (wall_clock_tz): Remove; unused.
13911
139122017-05-16 Paul Eggert <eggert@cs.ucla.edu>
13913
13914 Do not discard AddressSanitizer stderr
13915
13916 * src/emacs.c (close_output_streams) [ADDRESS_SANITIZER]:
13917 Do not close stderr.
13918
139192017-05-16 Paul Eggert <eggert@cs.ucla.edu>
13920
13921 Simplify procname code to avoid GCC bug
13922
13923 * src/process.c (server_accept_connection): Simplify and avoid
13924 multiple calls and struct literals in the last case of a switch.
13925 The old code ran afoul of GCC bug 80659, which caused an internal
13926 compiler error. Problem reported by Jim Meyering in:
13927 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00182.html
13928 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80659
13929
139302017-05-16 Paul Eggert <eggert@cs.ucla.edu>
13931
13932 Pacify GCC 7 with --enable-gcc-warnings
13933
13934 * src/regex.c (regex_compile): Swap labels, so that the
13935 FALLTHROUGH immediately precedes the case label.
13936
139372017-05-16 Paul Eggert <eggert@cs.ucla.edu>
13938
13939 Merge with gnulib, pacifying GCC 7
13940
13941 This incorporates:
13942 2017-05-16 manywarnings: update for GCC 7
13943 2017-05-15 sys_select: Avoid "was expanded before it was required"
13944 * configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and
13945 -Wformat-overflow=2 options, due to too many false alarms.
13946 * doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4:
13947 Copy from gnulib.
13948 * m4/gnulib-comp.m4: Regenerate.
13949 * src/coding.c (decode_coding_iso_2022):
13950 Fix bug uncovered by -Wimplicit-fallthrough.
13951 * src/conf_post.h (FALLTHROUGH): New macro.
13952 Use it to mark all switch cases that fall through.
13953 * src/editfns.c (styled_format): Use !, not ~, on bool.
13954 * src/gtkutil.c (xg_check_special_colors):
13955 When using sprintf, don’t trust Gtk to output colors in [0, 1] range.
13956 (xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool;
13957 this bug was actually caught by Clang.
13958 * src/search.c (boyer_moore):
13959 Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character.
13960 * src/xterm.c (x_draw_glyphless_glyph_string_foreground):
13961 Tell GCC that glyph->u.glyphless.ch must be a character.
13962
139632017-05-16 Michael Albinus <michael.albinus@gmx.de>
13964
13965 Make autoloading Tramp more robust
13966
13967 * lisp/net/tramp.el (tramp-file-name-for-operation):
13968 Use `default-directory' where appropriate.
13969 (tramp-file-name-handler): Do not autoload.
13970 (tramp-autoload-file-name-handler): Reintroduce function.
13971 (tramp-register-autoload-file-name-handlers): Use it.
13972
139732017-05-16 Michael Albinus <michael.albinus@gmx.de>
13974
13975 Extend tramp-tests.el
13976
13977 * test/lisp/net/tramp-tests.el (tramp-change-syntax):
13978 Remove declaration, not needed anymore.
13979 (tramp-test05-expand-file-name-relative): New test.
13980 (tramp-test10-write-region): Extend test.
13981
139822017-05-16 Michael Albinus <michael.albinus@gmx.de>
13983
13984 * lisp/net/tramp.el: Avoid recursive load of Tramp. (Bug#26943)
13985
139862017-05-16 Noam Postavsky <npostavs@gmail.com>
13987
13988 Make `indent-line-to' respect field boundaries (Bug#26891)
13989
13990 * lisp/indent.el (indent-line-to): Use `back-to-indentation' instead
13991 of `backward-to-indentation'.
13992
139932017-05-16 Noam Postavsky <npostavs@gmail.com>
13994
13995 Make sure indent-sexp stops at end of sexp (Bug#26878)
13996
13997 * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Check endpos before
13998 indenting.
13999 * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-stop): New
14000 test.
14001
140022017-05-16 Glenn Morris <rgm@gnu.org>
14003
14004 Stop some epg tests failing on rhel7 with gpg 2.0.22 (bug#23619)
14005
14006 * test/lisp/epg-tests.el (with-epg-tests):
14007 Also set GNUPGHOME in the environment of child processes.
14008 This avoids problems if gpg does not pass --homedir to spawned agent.
14009
140102017-05-16 Glenn Morris <rgm@gnu.org>
14011
14012 Add oldxmenu to system-configuration-features
14013
14014 * configure.ac (HAVE_OLDXMENU): New.
14015 (emacs_config_features): Add oldxmenu.
14016
140172017-05-15 Ted Zlatanov <tzz@lifelogs.com>
14018
14019 * .gitlab-ci.yml: Adjust disclaimer as per RMS.
14020
140212017-05-15 Eli Zaretskii <eliz@gnu.org>
14022
14023 Remove unneeded stuff from nt/inc/sys/time.h
14024
14025 * nt/inc/sys/time.h (_TIMEVAL_DEFINED, struct timevat, timerisset)
14026 (timercmp, timerclear): Don't define. Instead, include the system
14027 header sys/time.h, and add only the interval timers stuff. This
14028 avoids compiler warnings about 'gettimeofday's prototype, and also
14029 avoids redefinition of macros from system headers.
14030
140312017-05-15 Paul Eggert <eggert@cs.ucla.edu>
14032
14033 Fix address violation found by AddressSanitizer
14034
14035 * src/process.c (connect_network_socket):
14036 Use struct sockaddr_storage, not struct sockaddr_in, to store info
14037 about a socket address. Problem reported by Philipp Stephani in:
14038 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00314.html
14039 This fix is based on a patch by Philipp in:
14040 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00357.html
14041
140422017-05-14 Gemini Lasswell <gazally@runbox.com>
14043
14044 Make edebug-step-in work on generic methods (Bug#22294)
14045
14046 * lisp/emacs-lisp/edebug.el (edebug-match-cl-generic-method-args):
14047 New function to implement the edebug-form-spec property of
14048 the symbol cl-generic-method-args.
14049 (edebug-instrument-function): If the function is a generic
14050 function, find and instrument all of its methods. Return a list
14051 instead of a single symbol.
14052 (edebug-instrument-callee): Now returns a list. Update docstring.
14053 (edebug-step-in): Handle the list returned by edebug-instrument-callee.
14054 * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Use name and
14055 cl-generic-method-args in its Edebug spec.
14056 * lisp/emacs-lisp/eieio-compat.el (defmethod): Use name and
14057 cl-generic-method-args in its Edebug spec.
14058 * lisp/subr.el (method-files): New function.
14059 * test/lisp/subr-tests.el (subr-tests--method-files--finds-methods)
14060 (subr-tests--method-files--nonexistent-methods): New tests.
14061
140622017-05-14 Paul Eggert <eggert@cs.ucla.edu>
14063
14064 Merge from gnulib
14065
14066 This incorporates:
14067 2017-05-14 same-inode: Adapt for windows-stat-inodes
14068 2017-05-14 windows-stat-inodes: New module
14069 2017-05-14 stat-time: Adapt for windows-stat-timespec
14070 * lib/gnulib.mk.in: Regenerate.
14071 * lib/stat-time.h, lib/sys_types.in.h, m4/sys_types_h.m4:
14072 Copy from gnulib.
14073
140742017-05-14 Eli Zaretskii <eliz@gnu.org>
14075
14076 Remove gettimeofday from w32 sources
14077
14078 * lib-src/ntlib.c (gettimeofday):
14079 * nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused
14080 function 'gettimeofday' and all of its supporting code.
14081
140822017-05-14 Eli Zaretskii <eliz@gnu.org>
14083
14084 Fix the MS-Windows build
14085
14086 * nt/inc/sys/time.h (gettimeofday):
14087 * src/w32.c (gettimeofday): Adjust signature to match Gnulib.
14088
140892017-05-14 Eli Zaretskii <eliz@gnu.org>
14090
14091 More accurate documentation of the ':box' face attribute
14092
14093 * doc/lispref/display.texi (Face Attributes): Fix the description
14094 of negative width of the ':box' attribute. (Bug#26920)
14095
140962017-05-14 Paul Eggert <eggert@cs.ucla.edu>
14097
14098 Merge from gnulib
14099
14100 This incorporates:
14101 2017-05-13 largefile: Simplify
14102 2017-05-13 largefile: Improve and document
14103 2017-05-13 truncate: New module
14104 2017-05-13 windows-stat-timespec: New module
14105 2017-05-13 windows-stat-override: New module
14106 2017-05-11 getopt-posix: port to mingw
14107 2017-05-11 gettimeofday: Increase precision on mingw
14108 2017-05-10 time: Fix missing initialization of HAVE_TIMEZONE_T
14109 2017-05-10 Implement a way to opt out from MSVC support
14110 2017-05-09 tzset: Expand comment about TZ problem on native Windows
14111 * build-aux/config.guess, lib/dup2.c, lib/fcntl.c, lib/fsync.c:
14112 * lib/getdtablesize.c, lib/getopt.c, lib/gettimeofday.c:
14113 * lib/mktime.c, lib/stat-time.h, lib/sys_stat.in.h, lib/unistd.in.h:
14114 * lib/utimens.c, m4/gettimeofday.m4, m4/largefile.m4:
14115 * m4/sys_stat_h.m4, m4/sys_time_h.m4, m4/time_h.m4, m4/time_rz.m4:
14116 * m4/unistd_h.m4: Copy from gnulib.
14117 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
14118
141192017-05-14 Marcin Borkowski <mbork@mbork.pl>
14120
14121 Merge branch 'fix/bug-21072'
14122
141232017-05-14 Ted Zlatanov <tzz@lifelogs.com>
14124
14125 * .gitlab-ci.yml: Add setup for GitLab CI builds.
14126
141272017-05-13 Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
14128
14129 New minor mode 'pixel-scroll-mode'
14130
14131 * lisp/pixel-scroll.el: New file.
14132
14133 * etc/NEWS: Mention pixel-scroll-mode.
14134
141352017-05-13 Philipp <phst@google.com>
14136
14137 Make `old-style-backquotes' variable internal
14138
14139 * src/lread.c (load_warn_old_style_backquotes, Fload, read1)
14140 (syms_of_lread): Rename `old-style-backquotes' to
14141 `lread--old-style-backquotes', and clarify that it's for internal
14142 use only.
14143 * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Rename
14144 variable.
14145 * test/src/lread-tests.el (lread-tests--old-style-backquotes): Add
14146 unit test.
14147 * emacs-lisp/bytecomp-tests.el
14148 (bytecomp-tests--old-style-backquotes): Add unit test.
14149
141502017-05-13 Philipp Stephani <phst@google.com>
14151
14152 Improve unescaped character literal warnings
14153
14154 * src/lread.c (load_warn_unescaped_character_literals)
14155 (syms_of_lread):
14156 lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Improve
14157 formatting of unescaped character literal warnings.
14158
14159 * test/src/lread-tests.el (lread-tests--unescaped-char-literals):
14160 test/lisp/emacs-lisp/bytecomp-tests.el
14161 (bytecomp-tests--unescaped-char-literals): Adapt unit tests.
14162
141632017-05-12 Alan Mackenzie <acm@muc.de>
14164
14165 Fontify C++ for loop variable as variable, even when followed by parentheses
14166
14167 In the following: "for (auto *Friend : Class->friends()) {", "Friend" was
14168 getting fontified as a function, due to insufficient checking of the tokens
14169 between it and "()".
14170
14171 * lisp/progmodes/cc-langs.el (c-:-op-cont-tokens, c-:-op-cont-regexp): New
14172 lang-consts/vars.
14173
14174 * lisp/progmodes/cc-engine.el (c-forward-declarator): After finding a putative
14175 declarator's identifier, check for a ":" token inside a for's parentheses, and
14176 abort the search for "(" if this is found.
14177
141782017-05-12 Michael Albinus <michael.albinus@gmx.de>
14179
14180 Make Tramp backward compatible
14181
14182 * lisp/net/tramp-cmds.el (tramp-change-syntax):
14183 Set tramp-autoload cookie.
14184
14185 * lisp/net/tramp-compat.el: Run `tramp-change-syntax' at
14186 startup, if necessary.
14187
14188 * lisp/net/tramp.el (tramp-syntax): Use `tramp-compat-user-error'.
14189 (tramp-register-autoload-file-name-handlers): Do not mark
14190 `operations' for `tramp-file-name-handler'.
14191 (tramp-register-file-name-handlers): Remove also
14192 `tramp-autoload-file-name-handler' for backward compatibility.
14193 (tramp-register-foreign-file-name-handler): Use `delete-dups'.
14194
14195 * test/lisp/net/tramp-tests.el (tramp-change-syntax): Declare.
14196
141972017-05-12 Noam Postavsky <npostavs@gmail.com>
14198
14199 Modify `beginning-of-defun-comments'
14200
14201 * lisp/emacs-lisp/lisp.el (beginning-of-defun-comments): Try not to stop
14202 in the middle of a multiline comment.
14203
142042017-05-12 Noam Postavsky <npostavs@gmail.com>
14205
14206 Fix elisp-tests-with-temp-buffer compilation
14207
14208 * test/lisp/emacs-lisp/lisp-tests.el (elisp-tests-with-temp-buffer):
14209 Don't refer to the =!NAME= as "markers" since they produce variables
14210 with just plain positions, not marker objects. Explicitly specify
14211 that CONTENTS is evaluated at compile time. Don't re-evaluate
14212 CONTENTS at runtime. Fix debug specification. Suppress warnings due
14213 to BODY not using =!NAME= variables.
14214 (elisp-test-point-position-regex): Rename from
14215 `elisp-test-point-marker-regex'.
14216 (mark-defun-test-buffer): Wrap in `eval-and-compile'.
14217
142182017-05-12 Noam Postavsky <npostavs@gmail.com>
14219
14220 * lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point.
14221
142222017-05-12 Marcin Borkowski <mbork@mbork.pl>
14223
14224 Fix Bug#21072 and rework `mark-defun'
14225
14226 * test/lisp/progmodes/elisp-mode-tests.el (mark-defun-test-buffer):
14227 New variable
14228 (mark-defun-no-arg-region-inactive)
14229 (mark-defun-no-arg-region-active)
14230 (mark-defun-arg-region-active)
14231 (mark-defun-pos-arg-region-inactive)
14232 (mark-defun-neg-arg-region-inactive, mark-defun-bob): Add tests for
14233 the new `mark-defun'.
14234
14235 * lisp/emacs-lisp/lisp.el (beginning-of-defun--in-emptyish-line-p):
14236 New function.
14237 (beginning-of-defun-comments): New function.
14238 (mark-defun): Fix bug#21072, also rewrite large parts of `mark-defun'
14239 to accept a numerical prefix argument.
14240
142412017-05-12 Alfred M. Szmidt <ams@gnu.org>
14242
14243 * lisp/mail/rmail.el (rmail-ignored-headers): Add 3 headers to ignore.
14244
142452017-05-12 Eli Zaretskii <eliz@gnu.org>
14246
14247 Improve doc strings in net-utils.el
14248
14249 * lisp/net/net-utils.el (ifconfig, iwconfig, netstat, arp)
14250 (route, traceroute, nslookup, ftp, smbclient)
14251 (smbclient-list-shares, finger, whois)
14252 (network-connection-to-service, network-service-connection)
14253 (network-connection-reconnect): Improve doc strings.
14254
142552017-05-12 Andrew Robbins <contact@andrewrobbins.info>
14256
14257 Extend DNS lookup commands to allow specifying the name server
14258
14259 * lisp/net/net-utils.el (ffap-string-at-point): Removed due to
14260 'net-utils-machine-at-point' obviating this autoloaded
14261 function (Bug#25426).
14262 (dig-program-options): New customization variable.
14263 (nslookup-host, dns-lookup-host, run-dig): Can now specify
14264 optional name server argument interactively (by prefix arg) and
14265 non-interactively.
14266
14267 * etc/NEWS: Mention the extension of DNS lookup commands.
14268
142692017-05-12 Glenn Morris <rgm@gnu.org>
14270
14271 Don't hard-code loaddefs files in lisp/Makefile
14272
14273 * lisp/Makefile.in (loaddefs): New variable.
14274 (AUTOGENEL): Use $loaddefs, and include directory.
14275 (bootstrap-clean): Update for AUTOGENEL change.
14276
142772017-05-11 Katsumi Yamaoka <yamaoka@jpl.org>
14278
14279 Kill modified buffers silently when quitting (bug#26862)
14280
14281 * lisp/gnus/gnus-start.el (gnus-clear-system): Run do-auto-save to make
14282 sure that latest drafts are saved, and kill modified buffers silently.
14283
142842017-05-10 Perry E. Metzger <perry@piermont.com>
14285
14286 Implement 1-based column numbering in mode line
14287
14288 * src/xdisp.c (decode_mode_spec): Implement the %C construct.
14289
14290 * lisp/bindings.el (column-number-indicator-zero-based): New
14291 defcustom.
14292 (mode-line-position): Use %C when
14293 column-number-indicator-zero-based is nil.
14294
14295 * src/xdisp.c (syms_of_xdisp) <frame-title-format>:
14296 * src/buffer.c (syms_of_buffer) <mode-line-format>:
14297 * doc/lispref/modes.texi (%-Constructs):
14298 * doc/lispref/frames.texi (Frame Titles): Document the %C
14299 construct.
14300
14301 * doc/emacs/display.texi (Optional Mode Line): Document
14302 'column-number-indicator-zero-based'.
14303
14304 * etc/NEWS: Mention 'column-number-indicator-zero-based' and the
14305 %C construct.
14306
143072017-05-10 Eli Zaretskii <eliz@gnu.org>
14308
14309 Ensure cursor's foreground color is in sync with 'default' face
14310
14311 * src/w32term.c (x_set_cursor_gc): Don't reuse cursor GC if its
14312 foreground color is different from the background of the glyph
14313 string's face. (Bug#26851)
14314
143152017-05-10 Eli Zaretskii <eliz@gnu.org>
14316
14317 Fix vertical cursor motion when columns are of unequal size
14318
14319 * lisp/simple.el (line-move-finish): In line-move-visual mode, use
14320 vertical-motion to move to the goal column, as the goal column
14321 should in that case be interpreted in units of frame's canonical
14322 character width. (Bug#26852)
14323
143242017-05-10 Glenn Morris <rgm@gnu.org>
14325
14326 Fix finding test .el files
14327
14328 * test/Makefile.in (ELFILES): Exclude the data/ directory.
14329 * test/src/lread-tests.el (lread-test-bug26837): Revert previous.
14330
143312017-05-10 Tino Calancha <tino.calancha@gmail.com>
14332
14333 Tweak a recent test
14334
14335 This test fails in my local machine because the data files
14336 are compiled, and the test doesn't expect that.
14337 * test/src/lread-tests.el (lread-test-bug26837): Match a suffix
14338 ending with '.elc' when the data files are compiled.
14339
143402017-05-10 Glenn Morris <rgm@gnu.org>
14341
14342 Put license information in each generated uni-*.el
14343
14344 * admin/unidata/unidata-gen.el (unidata-gen-file):
14345 Get Copyright line from copyright.html.
14346 Put information in file header, not separate README.
14347 (unidata-gen-charprop): Mention the source location.
14348 * lisp/international/README: Remove file.
14349
143502017-05-10 Noam Postavsky <npostavs@gmail.com>
14351
14352 Fix lisp-indent-region and indent-sexp (Bug#26619)
14353
14354 The new lisp-indent-region introduced in 2017-04-22 "Add new
14355 `lisp-indent-region' that doesn't reparse the code." is broken because
14356 it doesn't save the calculated indent amounts for already seen sexp
14357 depths. Fix this by unifying the indent-sexp and lisp-indent-region
14358 code. Furthermore, only preserve position 2 of the running parse
14359 when the depth doesn't change.
14360 * lisp/emacs-lisp/lisp-mode.el (lisp-ppss): Use an OLDSTATE that
14361 corresponds with the start point when calling parse-partial-sexp.
14362 (lisp-indent-state): New struct.
14363 (lisp-indent-calc-next): New function, extracted from indent-sexp.
14364 (indent-sexp, lisp-indent-region): Use it.
14365 (lisp-indent-line): Take indentation, instead of parse state.
14366 * test/lisp/emacs-lisp/lisp-mode-tests.el
14367 (lisp-mode-tests--correctly-indented-sexp): New constant.
14368 (lisp-indent-region, lisp-indent-region-defun-with-docstring):
14369 (lisp-indent-region-open-paren, lisp-indent-region-in-sexp): New
14370 tests.
14371
143722017-05-10 Dmitry Gutov <dgutov@yandex.ru>
14373
14374 Simplify url-encode-url and add a test
14375
14376 * lisp/url/url-util.el (url-encode-url): Simplify.
14377 url-generic-parse-url copes with multibyte strings just fine
14378 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24117#185).
14379
14380 * test/lisp/url/url-parse-tests.el
14381 (url-generic-parse-url/multibyte-host-and-path): New test.
14382
143832017-05-10 Glenn Morris <rgm@gnu.org>
14384
14385 More informative error when required feature missing
14386
14387 * src/fns.c (Frequire): Include file name in missing feature error.
14388 * doc/lispref/loading.texi (Named Features): Don't quote actual error.
14389
143902017-05-10 Glenn Morris <rgm@gnu.org>
14391
14392 Put re-loaded file back at start of load-history (bug#26837)
14393
14394 * src/lread.c (readevalloop): Fix the "whole buffer" check to
14395 operate in the correct buffer.
14396 (Feval_buffer): Move point back to the start after checking
14397 for lexical binding.
14398 * test/src/lread-tests.el (lread-test-bug26837): New test.
14399 * test/data/somelib.el, test/data/somelib2.el: New test data files.
14400
144012017-05-09 Eli Zaretskii <eliz@gnu.org>
14402
14403 Improve documentation of 'gnutls-verify-error'
14404
14405 * lisp/net/gnutls.el (gnutls-verify-error): Improve and expand
14406 doc string. (Bug#26845)
14407
144082017-05-09 Glenn Morris <rgm@gnu.org>
14409
14410 Don't duplicate autoload code in package.el
14411
14412 * lisp/emacs-lisp/autoload.el (autoload-rubric): Add a package option.
14413 * lisp/emacs-lisp/package.el (autoload-rubric): Declare.
14414 (package-autoload-ensure-default-file): Use autoload-rubric.
14415
144162017-05-09 Michael Albinus <michael.albinus@gmx.de>
14417
14418 * test/lisp/net/tramp-tests.el: Keep additional test.
14419
144202017-05-09 Marcin Borkowski <mbork@mbork.pl>
14421
14422 Add elisp-tests-with-temp-buffer, a new testing macro
14423
14424 * test/lisp/emacs-lisp/lisp-tests.el
14425 (elisp-test-point-marker-regex) New variable.
14426 (elisp-tests-with-temp-buffer): New macro to help test functions
14427 moving the point and/or mark.
14428
144292017-05-09 Noam Postavsky <npostavs@gmail.com>
14430
14431 Revert "Output number of characters added to file (Bug#354)"
14432
14433 The extra message text turned out to be quite annoying in practice,
14434 and is generally more trouble than it's worth. Also revert several
14435 related changes.
14436
14437 Partially revert "Handle `write-region' messages in Tramp properly"
14438 Revert "New var write-region-verbose, default nil"
14439 Revert "* src/fileio.c (write_region): Don't say "1 characters". (Bug#26796)"
14440 Revert "Minor tuneup of write-region change"
14441 Revert "Adjust write-region so file name is at the beginning again"
14442 Revert "Fix handling of non-integer START param to write-region"
14443 Revert "Output number of characters added to file (Bug#354)"
14444
14445 * doc/emacs/files.texi (Misc File Ops):
14446 * etc/NEWS:
14447 * lisp/epa-file.el (epa-file-write-region):
14448 * lisp/gnus/mm-util.el (mm-append-to-file):
14449 * lisp/jka-compr.el (jka-compr-write-region):
14450 * lisp/net/ange-ftp.el (ange-ftp-write-region):
14451 * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
14452 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
14453 * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
14454 * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
14455 * lisp/net/tramp.el (tramp-handle-write-region-message):
14456 * src/fileio.c (write_region, syms_of_fileio):
14457 * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Remove
14458 extra characters from file writing messages.
14459
144602017-05-09 Noah Friedman <friedman@splode.com>
14461
14462 (ybuffer-list): $alist must be ptr-unmasked at the end of the loop,
14463 because $ptr is modified by ygetptr and we use $ptr immediately at the
14464 beginning.
14465
144662017-05-08 Ken Brown <kbrown@cornell.edu>
14467
14468 Skip a test from filenotify-tests.el on Cygwin
14469
14470 * test/lisp/filenotify-tests.el (file-notify-test02-rm-watch):
14471 Skip the last part of the test on Cygwin; it fails due to timing
14472 issues.
14473 (file-notify--test-read-event): Remove `sit-for' that was added
14474 for Cygwin.
14475
144762017-05-08 Paul Eggert <eggert@cs.ucla.edu>
14477
14478 Merge from gnulib
14479
14480 This incorporates:
14481 2017-05-08 intprops: don’t depend on ‘verify’
14482 2017-05-07 utimens: on native Windows, improve resolution if fd < 0
14483 2017-05-07 utimens: Improve error code on native Windows
14484 * lib/intprops.h, lib/utimens.c: Copy from gnulib.
14485
144862017-05-08 Wilson Snyder <wsnyder@wsnyder.org>
14487
14488 Fix various verilog-mode.el issues.
14489
14490 * lisp/progmodes/verilog-mode.el (verilog-read-decls): Fix SystemVerilog
14491 2012 import breaking AUTOINST. Reported by Johannes Schaefer.
14492 (verilog-auto-wire-type, verilog-insert-definition): Fix AUTOWIRE using
14493 logic in top-level non-SystemVerilog module, bug1142. Reported by Marcin K.
14494 (verilog-define-abbrev-table) (verilog-mode-abbrev-table): Don't expand
14495 abbrev inside comment/strings, bug1102. Reported by Slava Yuzhaninov.
14496 (verilog-auto): Fix AUTORESET widths pulling from AUTOREGINPUT,
14497 msg2143. Reported by Galen Seitz.
14498 (verilog-modify-compile-command): Fix expansion of __FLAGS__ when
14499 compile-command is globally set, bug1119. Reported by Galen Seitz.
14500
145012017-05-08 Michael Albinus <michael.albinus@gmx.de>
14502
14503 Handle `write-region' messages in Tramp properly
14504
14505 * lisp/net/tramp.el (tramp-handle-write-region-message): New defsubst.
14506 * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
14507 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
14508 * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
14509 * lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Use it.
14510
14511 * lisp/net/tramp.el (tramp-password-prompt-regexp)
14512 (tramp-completion-mode-p):
14513 * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable)
14514 (tramp-append-tramp-buffers):
14515 * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
14516 Use `bound-and-true-p'.
14517
14518 * lisp/net/tramp-compat.el (tramp-compat-delete-file):
14519 Don't check for `boundp' anymore.
14520
14521 * test/lisp/net/tramp-tests.el (ert-x): Require it.
14522 (tramp--test-messages): New defvar.
14523 (tramp-test10-write-region): Extend test.
14524
145252017-05-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14526
14527 Fix glyph string generation for multi-font compositions (Bug#26742)
14528
14529 * src/xdisp.c (glyph_string_containing_background_width): New function.
14530 (draw_glyphs): Use it to get correct background width.
14531 (compute_overhangs_and_x): Don't change x in the middle of composite
14532 characters.
14533
145342017-05-07 Philipp Stephani <phst@google.com>
14535
14536 Fix all unescaped character literals
14537
145382017-05-07 Alan Mackenzie <acm@muc.de>
14539
14540 CC Mode internal cache: Handle a cache pos being inside a two-char construct.
14541
14542 Cache c-state-semi-nonlit-pos-cache was failing when a cache position was,
14543 e.g., between the two characters of an opening comment "/*", and additionally
14544 there were an odd number of quote marks (apostrophes) in the comment. This
14545 happened in .../src/xdisp.c in the Emacs master branch around 2017-05-02 at
14546 buffer position 615001.
14547
14548 * lisp/progmodes/cc-defs.el (c-emacs-features): Repurpose symbol
14549 pps-extended-state to mean that there are at least 11 elements in the parser
14550 state.
14551
14552 * lisp/progmodes/cc-engine.el (c-cache-to-parse-ps-state)
14553 (c-parse-ps-state-to-cache): Rewrite these to use enhanced cache element list
14554 types which indicate potentially being inside two-char constructs.
14555 (c-parse-ps-state-below): Rewrite to use the new versions of the above two
14556 functions.
14557
145582017-05-07 Glenn Morris <rgm@gnu.org>
14559
14560 Silence an mh-compat compiler warning
14561
14562 * lisp/mh-e/mh-compat.el (mh-url-unreserved-chars): Always define.
14563
145642017-05-07 Glenn Morris <rgm@gnu.org>
14565
14566 Evaluate mh-require when compiling
14567
14568 * lisp/mh-e/mh-alias.el, lisp/mh-e/mh-folder.el:
14569 * lisp/mh-e/mh-gnus.el, lisp/mh-e/mh-search.el:
14570 Evaluate mh-require when compiling, as require is automatically.
14571 * lisp/mh-e/mh-gnus.el: No longer disable byte-compilation.
14572
145732017-05-07 Glenn Morris <rgm@gnu.org>
14574
14575 Remove obsolete method of changing byte-compile-dest-file
14576
14577 * lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file):
14578 Define unconditionally.
14579
145802017-05-07 Paul Eggert <eggert@cs.ucla.edu>
14581
14582 New var write-region-verbose, default nil
14583
14584 By popular demand, write-region char counts are now off by default
14585 (Bug#26796).
14586 * src/fileio.c (write-region-verbose): New Lisp var.
14587 (write_region): Output char count only if the var is non-nil.
14588 * doc/emacs/files.texi (Misc File Ops), etc/NEWS: Document this.
14589
145902017-05-07 Glenn Morris <rgm@gnu.org>
14591
14592 Write autoloads file atomically
14593
14594 * lisp/emacs-lisp/autoload.el (autoload--save-buffer):
14595 New function, to save buffer atomically.
14596 (autoload-save-buffers, update-directory-autoloads):
14597 Use autoload--save-buffer.
14598 * lisp/Makefile.in ($(lisp)/loaddefs.el):
14599 No longer write to a temp file by hand.
14600
146012017-05-07 Glenn Morris <rgm@gnu.org>
14602
14603 Write autoloads file once only
14604
14605 * lisp/emacs-lisp/autoload.el (autoload-find-generated-file):
14606 Simplify. Don't bother about ensuring the output file exists.
14607 (autoload-generated-file): Add doc.
14608 (autoload-ensure-writable): Update doc.
14609 (autoload-ensure-file-writeable): Handle non-existing file.
14610 (autoload-ensure-default-file): Remove function.
14611
146122017-05-07 Paul Eggert <eggert@cs.ucla.edu>
14613
14614 Port .gdbinit to GDB 7.11.1 + Python 2.7.12
14615
14616 * src/.gdbinit (Lisp_Object_Printer.to_string):
14617 Explicitly convert integer val to 'int', so that
14618 older GDBs do not complain about the conversion.
14619 * src/lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]:
14620 Give the struct a tag, so that older GDB pretty-printers have a
14621 tag to hang their hat on.
14622
146232017-05-06 Paul Eggert <eggert@cs.ucla.edu>
14624
14625 Pretty-print const Lisp_Objects in .gdbinit
14626
14627 * src/.gdbinit (Emacs_Pretty_Printers.__call__):
14628 Compare unqualified type to Lisp_Object, to do the right thing
14629 when the expression has type ‘Lisp_Object const’.
14630 Problem reported by Eli Zaretskii in:
14631 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00138.html
14632
146332017-05-06 Paul Eggert <eggert@cs.ucla.edu>
14634
14635 Pacify GCC setjmp/longjmp warning
14636
14637 * src/eval.c (internal_lisp_condition_case): Do not modify local
14638 var VAR, to pacify GCC’s setjmp/longjmp warning which in some
14639 cases mistakenly diagnoses VAR possibly being modified between a
14640 setjmp and a longjmp.
14641
146422017-05-06 Philipp <phst@google.com>
14643
14644 Fix bootstrap build of files.el
14645
14646 * lisp/files.el (file-name-non-special): Don't use cl-letf.
14647
146482017-05-06 Eli Zaretskii <eliz@gnu.org>
14649
14650 Fix last change for MS-Windows
14651
14652 * test/src/emacs-module-tests.el (module-function-object): Port to
14653 MS-Windows.
14654
146552017-05-06 Philipp Stephani <phst@google.com>
14656
14657 Introduce new misc type for module function
14658
14659 This resolves a couple of FIXMEs in emacs-module.c.
14660
14661 * src/lisp.h (MODULE_FUNCTIONP, XMODULE_FUNCTION): New functions.
14662
14663 * src/alloc.c (make_module_function): New function.
14664 (mark_object): GC support.
14665
14666 * src/data.c (Ftype_of, syms_of_data): Handle module function type.
14667
14668 * src/print.c (print_object): Print support for new type.
14669
14670 * src/emacs-module.c (module_make_function, Finternal_module_call):
14671 Use new module function type, remove FIXMEs.
14672 (module_format_fun_env): Adapt and give it external linkage.
14673
14674 * test/src/emacs-module-tests.el (module-function-object): Add unit
14675 test.
14676
146772017-05-06 Philipp Stephani <phst@google.com>
14678
14679 Fix quoted files for 'verify-visited-file-modtime'
14680
14681 Fixes Bug#25951.
14682
14683 * lisp/files.el (file-name-non-special): Set the file name for the
14684 correct buffer.
14685
14686 * test/lisp/files-tests.el (files-tests--file-name-non-special--buffers):
14687 Add unit test.
14688 (files-tests--with-advice, files-tests--with-temp-file): New helper
14689 macros.
14690
146912017-05-06 Eli Zaretskii <eliz@gnu.org>
14692
14693 * src/fileio.c (write_region): Don't say "1 characters". (Bug#26796)
14694
146952017-05-06 Eli Zaretskii <eliz@gnu.org>
14696
14697 Turn on GC_CHECK_MARKED_OBJECTS by default under ENABLE_CHECKING
14698
14699 * src/alloc.c (GC_CHECK_MARKED_OBJECTS): Define to 1 by default of
14700 ENABLE_CHECKING is defined.
14701 (mark_object): Test for GC_CHECK_MARKED_OBJECTS being non-zero,
14702 instead of being defined.
14703
147042017-05-06 Tom Tromey <tom@tromey.com>
14705
14706 Fix erc-join with channel password
14707
14708 Bug#25349
14709 * lisp/erc/erc-join.el (erc-autojoin-after-ident): Switch order of
14710 server names.
14711 (erc-autojoin-channels, erc-autojoin-add, erc-autojoin-remove):
14712 Likewise.
14713 (erc-server-join-channel): Move to erc.el.
14714 * lisp/erc/erc.el (erc-server-join-channel): Move from erc-join.el.
14715 (erc-cmd-JOIN): Use erc-server-join-channel.
14716
147172017-05-06 Tino Calancha <tino.calancha@gmail.com>
14718
14719 Ensure the created temp file in a test is new
14720
14721 * test/lisp/buff-menu-tests.el (buff-menu-24962): Use `make-temp-file'
14722 to create the temp file.
14723
147242017-05-06 Glenn Morris <rgm@gnu.org>
14725
14726 Decruftify dns-mode.el a little bit
14727
14728 * lisp/textmodes/dns-mode.el (dns-mode-control-entities):
14729 New constant.
14730 (dns-mode-control-entity, dns-mode-bad-control-entity)
14731 (dns-mode-type, dns-mode-class): New faces.
14732 (dns-mode-control-entity-face, dns-mode-bad-control-entity-face)
14733 (dns-mode-type-face, dns-mode-class): Make these variables use the
14734 new faces, and mark as obsolete.
14735 (dns-mode-font-lock-keywords): Use dns-mode-control-entities.
14736
147372017-05-06 Paul Eggert <eggert@cs.ucla.edu>
14738
14739 Pretty-print Lisp_Object values in GDB
14740
14741 * src/.gdbinit: Add a pretty-printer for Lisp_Object values. Now,
14742 GDB displays them as "XIL(0xXXX)" rather than displaying them
14743 as "..." when CHECK_LISP_OBJECT_TYPE is in effect and as "DDDDD"
14744 otherwise.
14745
147462017-05-05 Peder O. Klingenberg <peder@klingenberg.no>
14747
14748 Tweak dns-mode font-lock
14749
14750 * lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords):
14751 Highlight $TTL as a control entity. (Bug#26780)
14752
147532017-05-05 Glenn Morris <rgm@gnu.org>
14754
14755 Fontify the doc-string in some CL forms as such
14756
14757 * lisp/emacs-lisp/lisp-mode.el (defconstant, defparameter):
14758 Add the doc-string-elt property. (Bug#26778)
14759
147602017-05-05 Glenn Morris <rgm@gnu.org>
14761
14762 * lisp/emacs-lisp/cl-lib.el (cl-mapcar): Remove recent autoload cookie.
14763
147642017-05-05 Dmitry Gutov <dgutov@yandex.ru>
14765
14766 cl-defmethod: Make the edebug spec more technically correct
14767
14768 * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Denote the
14769 edebug spec part for qualifiers as [&rest atom], per
14770 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00053.html.
14771
147722017-05-05 Mike Kupfer <mkupfer@alum.berkeley.edu>
14773
14774 Fix MH-E not to load cl at runtime (Bug#25552)
14775
14776 * lisp/mh-e/mh-acros.el (defun-mh): Check at runtime, not
14777 compile time, whether the target is bound.
14778 * lisp/mh-e/mh-compat.el: Enable compilation. Pull in
14779 mh-acros at compile time.
14780 Authored-by: Glenn Morris <rgm@gnu.org>, Noam Postavsky
14781 <npostavs@users.sourceforge.net>
14782
147832017-05-04 Jean-Christophe Helary <jean.christophe.helary@gmail.com>
14784
14785 Multiline support in NS "Open Selected File" service.
14786
14787 * lisp/term/ns-win.el (ns-open-file-service): new function. Wraps the
14788 original call in a (split-string) to create as many calls as there
14789 are lines.
14790 (ns-spi-service-call): Call `ns-open-file-service' instead of
14791 `dnd-open-file'.
14792
147932017-05-04 Göktuğ Kayaalp <self@gkayaalp.com>
14794
14795 Require cl-lib at runtime in vc-hg
14796
14797 * lisp/vc/vc-hg.el: Require cl-lib at runtime as well (bug#26609).
14798
147992017-05-04 Tino Calancha <tino.calancha@gmail.com>
14800
14801 Inherit incompatible/obsolete package faces from error
14802
14803 Don't use the same face for installed packages as for incompatible
14804 or obsolete ones.
14805 * lisp/emacs-lisp/package.el (package-status-incompat): Inherit from error.
14806
148072017-05-04 Michael Albinus <michael.albinus@gmx.de>
14808
14809 Set process property `adjust-window-size-function' to `ignore' in Tramp
14810
14811 * lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
14812 (tramp-adb-maybe-open-connection):
14813 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
14814 * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
14815 (tramp-maybe-open-connection):
14816 * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
14817 (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl)
14818 (tramp-smb-maybe-open-connection): Set process property
14819 `adjust-window-size-function' to `ignore'.
14820
148212017-05-04 Nicolas Petton <nicolas@petton.fr>
14822
14823 * lisp/emacs-lisp/seq.el: Bump seq version.
14824
148252017-05-04 Damien Cassou <damien@cassou.me>
14826
14827 Add seq-set-equal-p to test for set equality
14828
14829 * lisp/emacs-lisp/seq.el (seq-set-equal-p): Add function to compare
14830 two lists as if they were sets.
14831
14832 * test/lisp/emacs-lisp/seq-tests.el (test-seq-set-equal-p): Add test
14833 for seq-set-equal-p.
14834
148352017-05-04 Paul Eggert <eggert@cs.ucla.edu>
14836
14837 Spelling fixes
14838
14839 * lisp/gnus/nndiary.el (nndiary-last-occurrence):
14840 Rename from nndiary-last-occurence.
14841 (nndiary-next-occurrence):
14842 Rename from nndiary-next-occurence. All uses changed.
14843
148442017-05-04 Paul Eggert <eggert@cs.ucla.edu>
14845
14846 Merge from pkg-config
14847
14848 * m4/pkg.m4: Copy from pkg-config 0.29.1.
14849
148502017-05-04 Tom Tromey <tom@tromey.com>
14851
14852 Add color highlighting to css-mode
14853
14854 Bug#25525
14855 * lisp/textmodes/css-mode.el (css--color-map): New constant.
14856 (css-value-class-alist): Use css--color-map.
14857 (css--number-regexp, css--percent-regexp)
14858 (css--number-or-percent-regexp, css--angle-regexp): New constants.
14859 (css--color-skip-blanks, css--rgb-color, css--hsl-color): New
14860 functions.
14861 (css--colors-regexp): New constant.
14862 (css--hex-color, css--named-color, css--compute-color)
14863 (css--contrasty-color, css--fontify-colors)
14864 (css--fontify-region): New functions.
14865 (css-mode): Set font-lock-fontify-region-function.
14866 (css-mode-syntax-table): Set syntax on more characters.
14867 (css-fontify-colors): New defcustom.
14868 (scss-mode-syntax-table): Define syntax for ?$ and ?%.
14869 * test/lisp/textmodes/css-mode-tests.el (css-test-property-values):
14870 Update.
14871 (css-test-rgb-parser, css-test-hsl-parser)
14872 (css-test-named-color): New tests.
14873 * etc/NEWS: Add entry.
14874
148752017-05-03 Michael Albinus <michael.albinus@gmx.de>
14876
14877 Fix Bug#26763
14878
14879 * lisp/files.el (delete-directory): Call file name handler
14880 with `trash' argument.
14881
14882 * lisp/net/ange-ftp.el (ange-ftp-delete-directory):
14883 * lisp/net/tramp-sh.el (tramp-sh-handle-delete-directory):
14884 Add TRASH arg. Implement it. (Bug#26763)
14885 (tramp-get-remote-trash): Check for `delete-by-moving-to-trash'.
14886
14887 * lisp/net/tramp-adb.el (tramp-adb-handle-delete-directory):
14888 * lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
14889 Add _TRASH arg.
14890
148912017-05-03 Paul Eggert <eggert@cs.ucla.edu>
14892
14893 Use ptrdiff_t, not int, for stack sizes
14894
14895 * src/thread.c (invoke_thread_function):
14896 * src/xterm.c (x_cr_export_frames):
14897 Don’t assume SPECPDL_INDEX fits in ‘int’.
14898
148992017-05-03 Paul Eggert <eggert@cs.ucla.edu>
14900
14901 Check list object type if --enable-gcc-warnings
14902
14903 * configure.ac (--enable-check-lisp-object-type):
14904 Default to "yes" if --enable-gcc-warnings is not "no".
14905 * etc/NEWS: Mention this.
14906 * src/eval.c (internal_lisp_condition_case): Fix some glitches
14907 with 'volatile' uncovered by the above: in particular, 'clauses'
14908 should be a pointer to volatile storage on the stack, and need not
14909 be volatile itself. Use an int, not ptrdiff_t, to count clauses.
14910 Don’t bother gathering binding count if VAR is nil. Use
14911 more-specific local names to try to clarify what’s going on.
14912
149132017-05-02 Glenn Morris <rgm@gnu.org>
14914
14915 Tweak auth-source-pass.el to avoid run-time subr-x
14916
14917 * lisp/auth-source-pass.el (auth-source-pass--parse-data):
14918 Avoid needing subr-x at run-time.
14919
149202017-05-02 Charles A. Roelli <charles@aurox.ch>
14921
14922 Constrain non-child frames to screen area in OS X
14923
14924 * src/nsterm.m (constrainFrameRect:toScreen:): Constrain non-child
14925 frames in OS X, if they would otherwise go offscreen.
14926
14927 (Bug#25818)
14928
149292017-05-02 Michael Albinus <michael.albinus@gmx.de>
14930
14931 Fix error in completion for separate Tramp syntax
14932
14933 * lisp/net/tramp.el (tramp-completion-file-name-regexp-separate):
14934 Tweak regexp.
14935
14936 * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
14937 Run method and host name completion for all syntaxes.
14938
149392017-05-02 Eli Zaretskii <eliz@gnu.org>
14940
14941 Avoid compilation warnings
14942
14943 * src/w32fns.c (Fx_file_dialog, w32_parse_and_hook_hot_key):
14944 * src/w32term.c (x_draw_glyph_string):
14945 * src/w32fns.c (compute_tip_xy):
14946 * src/w32font.c (w32font_text_extents):
14947 * src/w32menu.c (set_frame_menubar):
14948 * src/search.c (Freplace_match): Avoid compiler warnings in
14949 optimized builds.
14950
149512017-05-02 Paul Eggert <eggert@cs.ucla.edu>
14952
14953 Merge from gnulib
14954
14955 This incorporates:
14956 2017-05-02 utimens: port to Emacs + MS-Windows
14957 * lib/utimens.c: Copy from gnulib.
14958
149592017-05-02 Gemini Lasswell <gazally@runbox.com>
14960
14961 Fix Edebug specs for 'cl-defmethod' and 'defmethod'
14962
14963 * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Change Edebug spec
14964 to make Edebug generate a new symbol for each method (Bug#24753) and
14965 to support a string following :extra (Bug#23995).
14966 * lisp/emacs-lisp/eieio-compat.el (defmethod): Change Edebug spec to
14967 make Edebug generate a new symbol for each method (Bug#24753).
14968
149692017-05-02 Eli Zaretskii <eliz@gnu.org>
14970
14971 Temporary fix for the MS_Windows build
14972
14973 * nt/inc/ms-w32.h (WIN32_LEAN_AND_MEAN): Define to an empty value,
14974 to be consistent with Gnulib's utimens.c. This is because utimens.c
14975 unconditionally defines WIN32_LEAN_AND_MEAN to an empty value, so the
14976 previous definition here conflicted with that.
14977
149782017-05-02 Paul Eggert <eggert@cs.ucla.edu>
14979
14980 Port format-time-string to MS-Windows better
14981
14982 * test/src/editfns-tests.el (format-time-string-with-zone):
14983 Port test cases to MS-Windows.
14984
149852017-05-02 Paul Eggert <eggert@cs.ucla.edu>
14986
14987 Merge from gnulib
14988
14989 This incorporates:
14990 2017-05-01 New module 'localtime-buffer'
14991 2017-04-30 utimens: Add support for native Windows
14992 * admin/merge-gnulib (AVOIDED_MODULES): Add tzset.
14993 * configure.ac (tzset): No need for Emacs itself to check now.
14994 * lib/gettimeofday.c, lib/time.in.h, lib/time_rz.c, lib/utimens.c:
14995 * m4/gettimeofday.m4, m4/time_h.m4, m4/time_rz.m4: Copy from gnulib.
14996 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
14997 * lib/localtime-buffer.c, lib/localtime-buffer.h:
14998 * m4/localtime-buffer.m4: New files, copied from gnulib.
14999 * src/editfns.c (init_editfns): Assume tzset is callable.
15000
150012017-05-01 Dmitry Gutov <dgutov@yandex.ru>
15002
15003 Speed up project-find-regexp for simple regexps
15004
15005 * lisp/progmodes/xref.el (xref--regexp-syntax-dependent-p):
15006 New function.
15007 (xref--collect-matches): Use it. Don't try to enable the
15008 appropriate major mode and file-local variables if the regexp
15009 does not depend on the buffer's syntax (bug#26710).
15010 (xref--collect-matches-1): Don't syntax-propertize in that
15011 case either.
15012
150132017-05-01 Philipp Stephani <phst@google.com>
15014
15015 Warn about missing backslashes during load
15016
15017 * src/lread.c (load_warn_unescaped_character_literals, Fload, read1)
15018 (syms_of_lread): Warn if unescaped character literals are
15019 found (Bug#20152).
15020 * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Check for
15021 unescaped character literals during byte compilation.
15022 * test/src/lread-tests.el (lread-tests--unescaped-char-literals): New
15023 unit test.
15024 (lread-tests--with-temp-file, lread-tests--last-message): Helper
15025 functions for unit test.
15026 * test/lisp/emacs-lisp/bytecomp-tests.el
15027 (bytecomp-tests--unescaped-char-literals): New unit test.
15028 * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file):
15029 Helper macro for unit test.
15030
150312017-05-01 Ken Brown <kbrown@cornell.edu>
15032
15033 * configure.ac: Suggest Mailutils on Cygwin.
15034
150352017-05-01 Paul Eggert <eggert@cs.ucla.edu>
15036
15037 Don’t stress-test time zones near the Epoch
15038
15039 * test/src/editfns-tests.el (format-time-string-with-zone)
15040 (format-time-string-with-outlandish-zone): Don’t format
15041 timestamps near the Epoch, as this runs into bugs on MS-Windows,
15042 and we don’t want to worry about those bugs.
15043
150442017-05-01 Glenn Morris <rgm@gnu.org>
15045
15046 Tweak vc-tests.el for bzr
15047
15048 * test/lisp/vc/vc-tests.el (vc-test--working-revision):
15049 Handle test environments where HOME does not exist.
15050
150512017-05-01 Dmitry Gutov <dgutov@yandex.ru>
15052
15053 vc-git-state: Return `ignored' as appropriate with newer Git
15054
15055 * lisp/vc/vc-git.el
15056 (vc-git--program-version): New variable.
15057 (vc-git--program-version): New function.
15058 (vc-git-state): Use it to choose whether to add '--ignored' (bug#19343).
15059
150602017-05-01 Dmitry Gutov <dgutov@yandex.ru>
15061
15062 vc-git-state: Bring back CentOS 6 compatibility
15063
15064 * lisp/vc/vc-git.el (vc-git-state):
15065 Bring back CentOS 6 compatibility (bug#19343).
15066
150672017-05-01 Martin Rudalics <rudalics@gmx.at>
15068
15069 Rewrite w32fns.c's `x_set_menu_bar_lines'
15070
15071 * src/w32fns.c (x_set_menu_bar_lines): Redraw frame immediately
15072 regardless of whether menu bar is added or removed. Clear
15073 under internal border iff a W32 window exists. Store either 0
15074 or 1 as new parameter value.
15075 (x_change_tool_bar_height): Use FRAME_W32_WINDOW instead of
15076 FRAME_X_WINDOW.
15077
150782017-05-01 Michael Albinus <michael.albinus@gmx.de>
15079
15080 Fix filenotify-tests.el for cygwin
15081
15082 * test/lisp/filenotify-tests.el (file-notify--test-read-event):
15083 Add an additional `sit-for'.
15084 (file-notify-test02-rm-watch): Add an additional
15085 `file-notify--test-read-event' call.
15086
150872017-05-01 Jonathan Ganc <jonganc@gmail.com>
15088
15089 Speed up vc-git-status and make it more precise
15090
15091 * lisp/vc/vc-git.el (vc-git-state)
15092 (vc-git--git-status-to-vc-state): Update 'vc-git-state' to use
15093 'git status', so that 'vc-git-state' can now return 'ignored',
15094 'conflict', or 'unregistered' when appropriate. Discussed in
15095 bug#26066. Fixes bug#19343.
15096
150972017-05-01 Dmitry Gutov <dgutov@yandex.ru>
15098
15099 Fix Git revision navigation in currently removed directories
15100
15101 * lisp/vc/vc-git.el (vc-git-next-revision): Use the repo root as
15102 default-directory because FILE's parent directory might not exist
15103 anymore (bug#26345).
15104
151052017-04-30 Paul Eggert <eggert@cs.ucla.edu>
15106
15107 Merge from gnulib
15108
15109 This incorporates:
15110 2017-04-30 strftime-fixes: New module
15111 2017-04-30 mktime: Work around TZ problem on native Windows
15112 2017-04-30 ctime, localtime: New modules
15113 2017-04-30 gettimeofday: Provide higher resolution on native Windows
15114 2017-04-29 utime-h: Modernize handling of 'struct utimbuf'
15115 2017-04-29 Make use of module 'utime-h'
15116 2017-04-30 Fix a few typos
15117 * admin/merge-gnulib (AVOIDED_MODULES): Avoid utime-h, too.
15118 * lib/gettimeofday.c, lib/mktime.c, lib/time.in.h, lib/utimens.c:
15119 * m4/gettimeofday.m4, m4/include_next.m4, m4/mktime.m4:
15120 * m4/strftime.m4, m4/time_h.m4, m4/timegm.m4, m4/utimens.m4:
15121 Copy from gnulib.
15122 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
15123
151242017-04-30 Eli Zaretskii <eliz@gnu.org>
15125
15126 Don't lose key bindings on mis-spelled text in flyspell-mode
15127
15128 * lisp/textmodes/flyspell.el (flyspell-mouse-map): Bind mouse-2
15129 explicitly.
15130 (make-flyspell-overlay): If the mis-spelled text already has a
15131 'keymap' property, make that keymap the parent of
15132 flyspell-mouse-map, so as not to lose the parent's bindings.
15133 (Bug#26672)
15134
151352017-04-30 Martin Rudalics <rudalics@gmx.at>
15136
15137 Fix `delete-frame' behavior including Bug#26682
15138
15139 * src/frame.c (other_frames): Accept two arguments now. Don't
15140 care about minibuffer window. Don't care about visibility when
15141 called from delete_frame with FORCE true (Bug#26682).
15142 (delete_frame, Fmake_frame_invisible): Adjust other_frames
15143 calls.
15144 * src/w32term.c (w32_read_socket): Don't add a move frame event
15145 for an invisible frame.
15146 * lisp/frame.el (handle-delete-frame): Don't kill Emacs when
15147 attempting to delete a surrogate minibuffer frame.
15148
151492017-04-30 Paul Eggert <eggert@cs.ucla.edu>
15150
15151 Merge from gnulib
15152
15153 This avoids incorporating the following, which I suspect are
15154 more trouble for Emacs than they’re worth:
15155 2017-04-29 stat, fstat: fix time_t etc. on native Windows platforms
15156 * admin/merge-gnulib (AVOIDED_MODULES): Avoid stat, too.
15157 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
15158 * lib/pathmax.h, lib/stat.c, m4/pathmax.m4, m4/stat.m4: Remove.
15159
151602017-04-30 Paul Eggert <eggert@cs.ucla.edu>
15161
15162 Fix buffer overflow in make-docfile
15163
15164 * lib-src/make-docfile.c (scan_c_stream): Check for buffer
15165 overflow when reading an identifier. Use a static buffer for NAME
15166 rather than a small dynamically-allocated buffer.
15167
151682017-04-30 Paul Eggert <eggert@cs.ucla.edu>
15169
15170 Merge from gnulib
15171
15172 This incorporates:
15173 2017-04-29 getopt: port to Solaris 10 with circa-1997 glibc getopt.h
15174 * lib/getopt-pfx-ext.h: Copy from gnulib.
15175 * lib/gnulib.mk.in: Regenerate.
15176
151772017-04-30 Tino Calancha <tino.calancha@gmail.com>
15178
15179 Fix dependency error during bootstrap
15180
15181 * lisp/files.el: Require pcase and easy-mmode at compile time.
15182
151832017-04-30 Mats Lidell <mats.lidell@cag.se>
15184
15185 * etc/tutorials/TUTORIAL.sv: synced with TUTORIAL
15186
151872017-04-29 Philipp Stephani <phst@google.com>
15188
15189 Reimplement auto-saving to visited files
15190
15191 This reacts to confusing behavior of 'auto-save-visited-file-name',
15192 cf. Bug#25478.
15193
15194 * lisp/files.el (auto-save-visited-interval): New customization option.
15195 (auto-save-visited-mode): New global minor mode.
15196 (auto-save-visited-file-name): Make obsolete.
15197 (auto-save--timer): New internal helper variable.
15198
15199 * doc/emacs/files.texi (Auto Save Files): Document
15200 'auto-save-visited-mode' instead of obsolete
15201 'auto-save-visited-file-name'.
15202 (Auto Save Control): Document customization option
15203 'auto-save-visited-interval'.
15204
152052017-04-29 Paul Eggert <eggert@cs.ucla.edu>
15206
15207 Allow bypassing of some checks when merging
15208
15209 * build-aux/git-hooks/pre-commit: Don't check merged-in changes.
15210
152112017-04-29 Philipp Stephani <phst@google.com>
15212
15213 Integrate module test with normal test suite
15214
15215 * test/Makefile.in (ELFILES): Exclude module test if modules aren't
15216 configured.
15217 (EMACS_TEST_DIRECTORY): Expand test directory so that it's set
15218 correctly even if Emacs changes the current directory.
15219 ($(srcdir)/src/emacs-module-tests.log)
15220 ($(test_module)): Proper dependency tracking for test module.
15221
15222 * test/data/emacs-module/Makefile (ROOT): Adapt to new location.
15223 Remove 'check' target and EMACS variable, which are no longer
15224 necessary.
15225 (SO): Change to include period.
15226
15227 * test/src/emacs-module-tests.el (mod-test): Use EMACS_TEST_DIRECTORY
15228 environment variable to reliably find test data.
15229
15230 * configure.ac (HAVE_MODULES, MODULES_SUFFIX): Add necessary
15231 substitutions.
15232
152332017-04-28 Glenn Morris <rgm@gnu.org>
15234
15235 Broaden comint-password-prompt-regexp
15236
15237 * lisp/comint.el (comint-password-prompt-regexp):
15238 Broaden the regexp, for non-English locales. (Bug#26698)
15239
152402017-04-28 Stefan Monnier <monnier@iro.umontreal.ca>
15241
15242 * lisp/auth-source.el (auth-source-backend-parse): `return' -> cl-return.
15243
152442017-04-28 Bartosz Duszel <bartosz.duszel@gmail.com>
15245
15246 Don't pass the value of point to 'push-mark', as that's the default.
15247
15248 * lisp/textmodes/bib-mode.el (mark-bib):
15249 * lisp/simple.el (mark-whole-buffer, yank):
15250 * lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
15251 * lisp/progmodes/xscheme.el (xscheme-yank):
15252 * lisp/progmodes/verilog-mode.el (verilog-mark-defun):
15253 * lisp/progmodes/perl-mode.el (perl-mark-function):
15254 * lisp/progmodes/pascal.el (pascal-mark-defun):
15255 * lisp/progmodes/meta-mode.el (meta-mark-defun):
15256 * lisp/progmodes/icon.el (mark-icon-function):
15257 * lisp/progmodes/cc-cmds.el (c-mark-function):
15258 * lisp/obsolete/vip.el (ex-goto):
15259 * lisp/obsolete/vi.el (vi-put-before):
15260 * lisp/mouse.el (mouse-yank-primary):
15261 * lisp/menu-bar.el (menu-bar-select-yank):
15262 * lisp/mail/sendmail.el (mail-yank-original):
15263 * lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
15264 * lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer)
15265 (viper-mark-end-of-buffer):
15266 * lisp/cedet/semantic/senator.el (senator-mark-defun):
15267 * lisp/allout.el (allout-mark-topic): Remove unnecessary argument
15268 `(point)' from calls to `push-mark'. (Bug#25565)
15269
152702017-04-28 Glenn Morris <rgm@gnu.org>
15271
15272 Merge from origin/emacs-25
15273
15274 784602b1050 (origin/emacs-25) ; Add release notice
15275 3a34412caae (tag: emacs-25.2) Set Emacs version to 25.2 and update AU...
15276 56a4461a48d ; Move stray item from admin/notes/repo to CONTRIBUTE
15277 2b0d1118199 ; CONTRIBUTE: Remove stray header.
15278 f2ab09ec60d Fix a typo in indexing the user manual
15279 bc55a574235 * lisp/menu-bar.el (kill-this-buffer): Doc fix. (Bug#26466)
15280 a6d50401b4b Document 'line-pixel-height'
15281 0c55cf43e61 * search.c (Fre_search_forward, Fre_search_backward): Imp...
15282 c7ed57eaef4 Mention that processes start in default-directory (Bug#18...
15283 856ec9ffa1f * src/xdisp.c (vmessage, message): Clarify commentary.
15284 849a0aaa1c9 Belated fixes for admin.el's M-x make-manuals-dist
15285 84938d79698 default-directory: Remark that it must be a directory name
15286 3f0d047d2eb Delete confuse statement in manual
15287 ee1bd94dd0c Improve packaging documentation
15288 fb18bff91f0 Expand manual section on quitting windows
15289 9a737079645 Fix docstring of dabbrev-abbrev-char-regexp
15290 afe8849bac1 * doc/misc/cl.texi (Iteration Clauses): Clarify example (...
15291 ada79442c07 ;* doc/misc/info.texi (Choose menu subtopic): Improve ind...
15292 d38fd9229c0 Narrow scope of modification hook renabling in org-src fo...
15293 e0e9db4c84a ; Spelling fix
15294
15295 # Conflicts:
15296 # README
15297 # etc/AUTHORS
15298 # etc/HISTORY
15299 # lisp/ldefs-boot.el
15300
153012017-04-28 Glenn Morris <rgm@gnu.org>
15302
15303 * doc/misc/auth.texi: Commas don't work in node names.
15304
15305 * test/lisp/auth-source-pass-tests.el: Fix loading of cl-lib.
15306
153072017-04-28 Paul Eggert <eggert@cs.ucla.edu>
15308
15309 Test format-time-string with zone arg
15310
15311 * test/src/editfns-tests.el (format-time-string-with-zone)
15312 (format-time-string-with-outlandish-zone): New tests.
15313
153142017-04-28 Paul Eggert <eggert@cs.ucla.edu>
15315
15316 Merge from gnulib
15317
15318 This incorporates:
15319 2017-04-24 time_rz: fix heap buffer overflow vulnerability
15320 2017-04-23 stat-time: Update comments.
15321 2017-04-22 ftoastr: cite a newer paper
15322 2017-04-21 gettext-h: Avoid -Wundef warning.
15323 * lib/ftoastr.c, lib/gettext.h, lib/stat-time.h, lib/time_rz.c:
15324 * m4/getopt.m4: Copy from gnulib.
15325 * m4/gnulib-comp.m4: Regenerate.
15326
153272017-04-27 Damien Cassou <damien@cassou.me>
15328
15329 auth-source-pass: Add documentation; fix tests and indentation.
15330
15331 * doc/misc/auth.texi: Document new integration with Pass. Use @itemize
15332 instead of @enumerate.
15333 * lisp/auth-source-pass.el: Fix indentation.
15334 (auth-source-pass--remove-directory-name): Remove.
15335 * test/lisp/auth-source-pass-tests.el: Adjust test macros.
15336
153372017-04-27 foudfou <foudil.newbie+git@gmail.com>
15338
15339 auth-source-pass: Enable finding entries by "host/username"
15340
15341 * lisp/auth-source-pass.el: Enable finding entries by "host/username".
15342 * test/lisp/auth-source-pass-tests.el: Adjust tests to check it.
15343
153442017-04-27 Damien Cassou <damien@cassou.me>
15345
15346 Integrate auth-source with password-store
15347
15348 * lisp/auth-source-pass.el: auth-source backend for password-store.
15349 * test/lisp/auth-source-pass-tests.el: Tests for auth-source-pass
15350 behavior.
15351
153522017-04-27 Damien Cassou <damien@cassou.me>
15353
15354 * lisp/auth-source.el: Document parser functions.
15355
153562017-04-27 Ted Zlatanov <tzz@lifelogs.com>
15357
15358 auth-source: factor out parsers and add tests
15359
15360 * lisp/auth-source.el: Factor out the source parsers. Clean up comments.
15361 * test/lisp/auth-source-tests.el: Add tests.
15362
153632017-04-27 Martin Rudalics <rudalics@gmx.at>
15364
15365 Fix doc and customization type of `window-combination-limit' (Bug#26673)
15366
15367 * src/window.c (Vwindow_combination_limit): Fix doc-string.
15368 * lisp/cus-start.el (window-combination-limit): Fix
15369 customization type.
15370 * doc/lispref/windows.texi (Recombining Windows): Fix
15371 documentation of `window-combination-limit'.
15372
153732017-04-27 Tino Calancha <tino.calancha@gmail.com>
15374
15375 Drop face from hi-lock--unused-faces only when used
15376
15377 * lisp/hi-lock.el (hi-lock-set-pattern): If REGEXP is already
15378 highlighted, then push FACE into hi-lock--unused-faces (Bug#26666).
15379 * test/lisp/hi-lock-tests.el (hi-lock-bug26666): Add test.
15380
153812017-04-26 Alan Third <alan@idiocy.org>
15382
15383 Fix macOS version check (bug#26664)
15384
15385 * src/nsterm.m (initFrameFromEmacs): Prevent window tabbing mode on
15386 macOS versions 10.12+.
15387
153882017-04-26 Glenn Morris <rgm@gnu.org>
15389
15390 Make charprop.el provide a feature
15391
15392 * admin/unidata/unidata-gen.el (unidata-gen-charprop):
15393 Provide a feature.
15394 * lisp/loadup.el: Use the charprop feature.
15395
153962017-04-26 Glenn Morris <rgm@gnu.org>
15397
15398 * lisp/loadup.el: Get charprop.el into etc/DOC again.
15399
154002017-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
15401
15402 * lisp/ido.el (ido-everywhere): Use add-function.
15403
154042017-04-26 Martin Rudalics <rudalics@gmx.at>
15405
15406 Try to fix latest fix of w32_mouse_position
15407
15408 * src/w32term.c (w32_mouse_position): Fix a bug introduced by
15409 latest fix and try to make the affected code more rigorous.
15410
154112017-04-26 Eli Zaretskii <eliz@gnu.org>
15412
15413 Avoid segfaults when 'find-font' is invoked for a TTY frame
15414
15415 * src/font.c (font_pixel_size): Don't call GUI functions if F is a
15416 text-mode frame. (Bug#26646)
15417
154182017-04-26 Michael Albinus <michael.albinus@gmx.de>
15419
15420 * lisp/net/tramp.el (tramp-set-connection-local-variables-for-buffer):
15421
15422 New defun.
15423
154242017-04-26 Glenn Morris <rgm@gnu.org>
15425
15426 * src/Makefile.in (leimdir): Remove variable, no longer used.
15427
154282017-04-26 Glenn Morris <rgm@gnu.org>
15429
15430 Generate leim-list via lisp/Makefile, not src/Makefile
15431
15432 * src/Makefile.in ($(leimdir)/leim-list.el): Remove rule.
15433 (emacs$(EXEEXT)): Don't depend on leim-list.
15434 * lisp/Makefile.in ($(lisp)/loaddefs.el): Depend on gen-lisp again.
15435
154362017-04-25 Alan Third <alan@idiocy.org>
15437
15438 Fix define for GNUstep builds
15439
15440 * src/nsterm.m (initFrameFromEmacs): Fix the ifdef so that GNUstep
15441 doesn't see the code.
15442
154432017-04-25 Glenn Morris <rgm@gnu.org>
15444
15445 Suppress intermittent test failure on hydra
15446
15447 * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
15448 (eieio-test-method-order-list-6): Skip on hydra.
15449
154502017-04-25 Alan Third <alan@idiocy.org>
15451
15452 Fix some NS frame handling issues
15453
15454 * src/nsterm.m (FRAME_DECORATED_FLAGS, FRAME_UNDECORATED_FLAGS): New
15455 defines intended to make things tidier.
15456 (x_set_undecorated): Use the new defines.
15457 (windowWillResize): Don't use new macOS 12+ only feature.
15458 (initFrameFromEmacs): Use the new defines, and disable automatic
15459 window tabbing feature in macOS 12.
15460 (x_set_undecorated, x_set_parent_frame, x_set_no_accept_focus,
15461 x_set_z_group): Add NSTRACE notices.
15462
154632017-04-25 Glenn Morris <rgm@gnu.org>
15464
15465 Avoid parallel race condition
15466
15467 * lisp/Makefile.in ($(lisp)/loaddefs.el): Remove gen-lisp for now.
15468
154692017-04-25 Glenn Morris <rgm@gnu.org>
15470
15471 Generate each unicode lisp file independently
15472
15473 This is better for parallel builds, eg it eliminates race
15474 conditions from having one process write multiple files.
15475 * admin/unidata/Makefile.in (lparen, unifiles): New variables.
15476 Parse unidata-gen.el, not charprop.el, to get the list of uni- files.
15477 (all): Explicitly list the output lisp files.
15478 (PHONY_EXTRAS): Remove.
15479 (${unidir}/charprop.el): Change rule to just be for this file.
15480 (${unifiles}): New rule to write each unicode lisp file.
15481 (extraclean): Simplify.
15482 * admin/unidata/unidata-gen.el (unidata-gen-charprop):
15483 Quieten in batch mode.
15484 (unidata-gen-files): Remove, no longer used.
15485 * lisp/loadup.el: Update command-line parser.
15486
154872017-04-25 Glenn Morris <rgm@gnu.org>
15488
15489 Further refactoring in unidata-gen.el
15490
15491 * admin/unidata/unidata-gen.el (unidata-gen-charprop):
15492 New function, split from unidata-gen-files.
15493 (unidata-gen-files): Use unidata-gen-charprop.
15494
154952017-04-25 Glenn Morris <rgm@gnu.org>
15496
15497 Allow unidata-gen-file to work independently
15498
15499 * admin/unidata/unidata-gen.el (unidata-gen-file):
15500 Make it work as a stand-alone function in batch mode.
15501 (unidata-gen-files): Pass extra arguments to unidata-gen-file.
15502
155032017-04-25 Glenn Morris <rgm@gnu.org>
15504
15505 Preparatory refactoring in unidata-gen.el
15506
15507 * admin/unidata/unidata-gen.el (unidata-gen-file):
15508 New function, split from unidata-gen-files.
15509 (unidata-gen-files): Use unidata-gen-file.
15510
155112017-04-25 Glenn Morris <rgm@gnu.org>
15512
15513 Write each generated character property lisp file only once
15514
15515 * admin/unidata/unidata-gen.el (unidata-file-alist):
15516 Rename from unidata-prop-alist. All users changed.
15517 Use file name rather than property name as the key.
15518 (unidata-prop-prop): New function.
15519 (unidata-prop-index, unidata-prop-generator, unidata-prop-docstring)
15520 (unidata-prop-describer, unidata-prop-default, unidata-prop-val-list):
15521 Change to parse the argument rather than unidata-prop-alist.
15522 (unidata-gen-table-character, unidata-gen-table)
15523 (unidata-gen-table-symbol, unidata-gen-table-integer)
15524 (unidata-gen-table-numeric, unidata-gen-table-word-list)
15525 (unidata-gen-table-name, unidata-gen-table-decomposition)
15526 (unidata-gen-table-special-casing): Pass index as an argument.
15527 (unidata-check): Adapt to unidata-file-alist.
15528 Pass index to generator functions.
15529 (unidata-gen-files): Adapt to unidata-file-alist.
15530 Write each output file once only. Overwrite rather than delete.
15531
155322017-04-25 Andrew G Cohen <cohen@andy.bu.edu>
15533
15534 Fix requesting sparse articles in gnus
15535
15536 * lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Delete the
15537 sparse article number from the list, not its id.
15538
155392017-04-25 Glenn Morris <rgm@gnu.org>
15540
15541 Don't advertise s_client in tls.el docs
15542
15543 * lisp/net/tls.el (tls-end-of-info, tls-success, tls-untrusted):
15544 Don't mention s_client in docs.
15545
155462017-04-25 Rob Browning <rlb@defaultvalue.org>
15547
15548 Remove s_client usage from tls.el
15549
15550 * lisp/net/tls.el (tls-program, tls-checktrust): Remove s_client.
15551 Ref http://bugs.debian.org/766397
15552 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00803.html
15553
155542017-04-25 Glenn Morris <rgm@gnu.org>
15555
15556 Further robustify cedet bootstrap to loaddefs not yet built
15557
15558 * lisp/cedet/semantic/util.el (semantic-something-to-tag-table):
15559 Avoid void-function error when bootstrapping and semantic/loaddefs.el
15560 does not yet exist.
15561
155622017-04-24 Alan Third <alan@idiocy.org>
15563
15564 Fix XBM colour rendering in NS port (bug#22060)
15565
15566 src/nsimage.m (setXBMColor): Fix calculation of xbm_fg.
15567
155682017-04-24 Vibhav Pant <vibhavp@gmail.com>
15569
15570 Add support for IRCv3 message tags.
15571
15572 * erc-backend.el:
15573 erc-response: Add `tags' element.
15574 Add (erc-parse-tags).
15575 (erc-parse-server-response): Use (erc-parse-tags) to parse message
15576 tags (if any), and store them in `erc-resopnse' struct.
15577
15578 * erc.el: (erc-display-message): Expose message tags with text
15579 properties of the corresponding message line.
15580
155812017-04-24 Lars Ingebrigtsen <larsi@gnus.org>
15582
15583 Add image sizing tests for an image that's narrow
15584
15585 Needlessly refactor tests for clarity
15586
155872017-04-23 Philipp Stephani <phst@google.com>
15588
15589 Add missing remappings for Ido mode
15590
15591 Among others, add a remapping for C-x 4 d, cf. Bug#26360.
15592
15593 * lisp/ido.el (ido-mode): Remap missing commands.
15594 (ido-file-internal, ido-visit-buffer): Add support for new
15595 methods.
15596 (ido-display-buffer-other-frame)
15597 (ido-find-alternate-file-other-window, ido-dired-other-window)
15598 (ido-dired-other-frame): New commands.
15599
15600 * test/lisp/ido-tests.el (ido-tests--other-window-frame): Add unit
15601 test for the bindings.
15602
156032017-04-23 Martin Rudalics <rudalics@gmx.at>
15604
15605 Let w32_mouse_position pick a child window only if it has a child frame
15606
15607 * src/w32term.c (w32_mouse_position): When using a frame found
15608 by ChildWindowFromPoint make sure it's a child frame (Bug#26615,
15609 maybe).
15610
156112017-04-23 Noam Postavsky <npostavs@gmail.com>
15612
15613 Don't require bytecomp for running ert tests
15614
15615 "Fix ert-tests when running compiled" 2016-12-06 accidentally
15616 introduced a dependency on `bytecomp' into `ert'. As mentioned in
15617 "Avoid ert test failures" 2017-04-18, the accidental dependency of ert
15618 on bytecomp was masked by loading other libraries until recently.
15619
15620 * lisp/emacs-lisp/ert.el (ert--expand-should-1): Only use
15621 `byte-compile-macro-environment' if it's bound.
15622 * test/src/eval-tests.el: Add defvar for dynamic variable
15623 `byte-compile-debug'.
15624
156252017-04-23 Andrew G Cohen <cohen@andy.bu.edu>
15626
15627 Eliminate unneeded warp-to-article in gnus article referral
15628
15629 * lisp/gnus/gnus-sum.el (gnus-summary-refer-thread):
15630 (gnus-summary-refer-article): Remove gnus-warp-to article call.
15631
156322017-04-23 Andrew G Cohen <cohen@andy.bu.edu>
15633
15634 Allow limiting gnus summary buffers to a thread
15635
15636 * lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Include
15637 an optional argument to allow limiting the summary buffer to just the
15638 thread-related articles.
15639 (gnus-refer-thread-limit-to-thread): Introduce customizable variable
15640 to control whether thread-referral adds the thread to the summary
15641 buffer or limits to just the thread.
15642 (gnus-summary-refer-thread): Use the new variable.
15643
156442017-04-23 Andrew G Cohen <cohen@andy.bu.edu>
15645
15646 Correct gnus-newsgroup-limits in gnus when including thread
15647
15648 * lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Should
15649 only add one list of thread-related articles to gnus-newsgroup-limits
15650 rather than two.
15651
156522017-04-23 Andrew G Cohen <cohen@andy.bu.edu>
15653
15654 Improve gnus thread matching of similar subjects
15655
15656 * lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread):
15657 Use the more liberal gnus-general-simplify-subject regexp to
15658 find thread articles with similar subjects.
15659
156602017-04-22 Noam Postavsky <npostavs@gmail.com>
15661
15662 Add new `lisp-indent-region' that doesn't reparse the code.
15663
15664 Both `lisp-indent-region' and `lisp-indent-line' now use `syntax-ppss'
15665 to get initial state, so they will no longer indent string literal
15666 contents.
15667
15668 * lisp/emacs-lisp/lisp-mode.el (lisp-ppss): New function, like
15669 `syntax-ppss', but with a more dependable item 2.
15670 (lisp-indent-region): New function, like `indent-region-line-by-line'
15671 but additionally keep a running parse state to avoid reparsing the
15672 code repeatedly. Use `lisp-ppss' to get initial state.
15673 (lisp-indent-line): Take optional PARSE-STATE argument, pass it to
15674 `calculate-lisp-indent', use `lisp-ppss' if not given.
15675 (lisp-mode-variables): Set `indent-region-function' to
15676 `lisp-indent-region'.
15677
156782017-04-22 Noam Postavsky <npostavs@gmail.com>
15679
15680 Remove ignored argument from lisp-indent-line
15681
15682 * lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Remove WHOLE-EXP
15683 argument, the behavior has long since been handled in
15684 `indent-for-tab-command'. Also remove redundant `beg' and `shift-amt'
15685 variables and use `indent-line-to'.
15686
156872017-04-22 Noam Postavsky <npostavs@gmail.com>
15688
15689 * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.
15690
156912017-04-22 Noam Postavsky <npostavs@gmail.com>
15692
15693 Don't reparse the sexp in indent-sexp (Bug#25122)
15694
15695 * lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Let
15696 PARSE-START be a parse state that can be reused.
15697 (indent-sexp): Pass the running parse state to calculate-lisp-indent
15698 instead of the sexp beginning position. Saving the
15699 CONTAINING-SEXP-START returned by `calculate-lisp-indent' is no longer
15700 needed. Don't bother stopping if we don't descend below init-depth,
15701 since we now alway scan the whole buffer (via syntax-ppss) anyway.
15702 * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp): Add blank
15703 line to test case.
15704
157052017-04-22 Vibhav Pant <vibhavp@gmail.com>
15706
15707 Add cond test cases for singleton clauses.
15708
15709 * test/lisp/emacs-lisp/bytecomp-tests.el: Add test cond forms where
15710 the default clause is a single non-nil expression.
15711
157122017-04-22 Vibhav Pant <vibhavp@gmail.com>
15713
15714 b-c--cond-jump-table-info: Use correct body for singleton clauses
15715
15716 * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info):
15717 When a clause's body consists of a single constant expression, use
15718 that expression as the body to be compiled. This fixes switch bytecode
15719 evaluating to nil to such clauses.
15720
157212017-04-22 Philipp Stephani <phst@google.com>
15722
15723 ffap: Don't switch window unless needed
15724
15725 When using ffap-other-window, don't change the window configuration
15726 unless a new buffer has actually been created (Bug#25352).
15727
15728 * lisp/ffap.el (ffap-other-frame): Don't change the window
15729 configuration if no new buffer has been created.
15730 * test/lisp/ffap-tests.el (ffap-other-window--bug-25352): Add unit
15731 test.
15732
157332017-04-22 Alan Mackenzie <acm@muc.de>
15734
15735 Fix fontification of C++ declaration with type FOO::FOO.
15736
15737 * lisp/progmodes/cc-engine.el (c-find-decl-spots): Initialize
15738 cfd-top-level properly.
15739 (c-forward-decl-or-cast-1): On finding FOO::FOO, check it is followed by "("
15740 before deciding it is a constructor.
15741
15742 * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Negate the
15743 result of the c-bs-at-toplevel-p call passed to c-font-lock-declarators
15744 (simple bug fix).
15745
157462017-04-22 Philipp Stephani <phst@google.com>
15747
15748 Fix usage of FRAME_Z_GROUP
15749
15750 * src/nsterm.m (initFrameFromEmacs:): FRAME_Z_GROUP does not return a
15751 Lisp object, cf. Bug#26597.
15752
157532017-04-22 Alan Third <alan@idiocy.org>
15754
15755 Fix GNUstep build
15756
15757 * src/nsfns.m (Fns_frame_z_list_order): Rewrite for GNUstep
15758 compatibility.
15759 * src/nsmenu.m (update_frame_tool_bar): Remove unused variable.
15760
157612017-04-21 Alan Third <alan@idiocy.org>
15762
15763 Add no-accept-focus and frame-list-z-order to NS port
15764
15765 * lisp/frame.el (frame-list-z-order): Add NS.
15766 * src/nsfns.m: Add x_set_no_accept_focus to handler struct.
15767 (Fx_create_frame): Handle no-accept-focus parameter.
15768 (ns_window_is_ancestor):
15769 (Fns_frame_list_z_order): New functions.
15770 * src/nsterm.m (x_set_no_accept_focus): New function.
15771 (initFrameFromEmacs): Use EmacsWindow instead of EmacsFSWindow for
15772 non-fullscreen windows.
15773 (EmacsWindow:canBecomeKeyWindow): New function.
15774
157752017-04-21 Stefan Monnier <monnier@iro.umontreal.ca>
15776
15777 Improve prefix handling for dash.el
15778
15779 * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload):
15780 Don't drop dash's "-<letter>" prefixes.
15781
157822017-04-21 Stefan Monnier <monnier@iro.umontreal.ca>
15783
15784 * lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet
15785
15786 Revert 0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1 (to fix bug#26325)
15787 and use a different fix for bug#26068.
15788 (cl--symbol-macro-key): New function.
15789 (cl--sm-macroexpand, cl-symbol-macrolet): Use it instead of `symbol-name`.
15790 * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet):
15791 Failure is not expected any more.
15792
157932017-04-21 Eli Zaretskii <eliz@gnu.org>
15794
15795 Avoid infinite loop in redisplay when header-line-format is invalid
15796
15797 * src/xdisp.c (handle_invisible_prop): Avoid inflooping when the
15798 string has an invalid %-construct in it and is displayed as part
15799 of mode-line or header-line. (Bug#26586)
15800
158012017-04-21 Lars Ingebrigtsen <larsi@gnus.org>
15802
15803 Add tests to check image scaling functionality
15804
15805 This is in preparation to doing further work in this area to avoid
15806 regressions.
15807
15808 * test/data/image/blank-200x100.png: New file for testing
15809 image scaling.
15810
15811 * test/manual/image-size-tests.el: New file.
15812
158132017-04-21 Lars Ingebrigtsen <larsi@gnus.org>
15814
15815 Allow svg-image to take all create-image PROPS
15816
15817 * lisp/svg.el (svg-image): Allow passing in PROPS when
15818 creating an image for convenience.
15819
158202017-04-21 George D. Plymale II <georgedp@orbitalimpact.com> (tiny change)
15821
15822 Treat non-erroring lisp call as successful eshell command (Bug#26161)
15823
15824 This lets a compound command like 'cd .. && echo ok' print 'ok',
15825 similar to how most other shells behave.
15826
15827 * lisp/eshell/esh-cmd.el (eshell-exit-success-p): Only check if the
15828 last exit code was zero, rather than first checking whether the last
15829 command returned nil.
15830 (eshell-exec-lisp): Set `eshell-last-command-status' to 1 on error.
15831
158322017-04-21 Reuben Thomas <rrt@sc3d.org>
15833
15834 Fix reading of tab settings in whitespace-mode
15835
15836 lisp/whitespace.el (whitespace-indent-tabs-mode)
15837 whitespace-tab-width): Remove these variables. The underlying
15838 variables `indent-tabs-mode' and `tab-width' are already buffer-local
15839 when needed, and whitespace-mode never changes them.
15840 (whitespace-ensure-local-variables): Remove this function, which only
15841 existed to set the above variables.
15842 (whitespace-cleanup-region, whitespace-regexp)
15843 (whitespace-indentation-regexp, whitespace-report-region)
15844 (whitespace-turn-on, whitespace-color-on): Adjust these functions to
15845 use `indent-tabs-mode' and `tab-width' directly, and not call
15846 `whitespace-ensure-local-variables'.
15847
158482017-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
15849
15850 * lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning
15851
15852 by simplifying ascii-test.
15853
158542017-04-20 Vibhav Pant <vibhavp@gmail.com>
15855
15856 bytecomp: Don't inline functions that use byte-switch (Bug#26518)
15857
15858 * lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf): Don't inline
15859 FORM if the bytecode uses the byte-switch instruction. It is
15860 impossible to guess the correct stack depth while inlining such
15861 bytecode, resulting in faulty code.
15862
158632017-04-20 Nicolas Petton <nicolas@petton.fr>
15864
15865 Set Emacs version to 25.2 and update AUTHORS file
15866
15867 * README: Set Emacs version to 25.2.
15868 * etc/HISTORY: Add release log.
15869 * lisp/ldefs-boot.el:
15870 * etc/AUTHORS:
15871 * ChangeLog.2: Update.
15872
158732017-04-20 Noam Postavsky <npostavs@gmail.com>
15874
15875 Don't register "def" as an autoload prefix (Bug#26412)
15876
15877 * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Don't
15878 accept "def" as a prefix.
15879
158802017-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
15881
15882 Use substring completion for Info menus and index
15883
15884 * lisp/info.el (Info-complete-menu-item): Add `category' metadata.
15885 (Info-menu): Simplify now that we use the `default' arg of completing-read.
15886 * lisp/minibuffer.el (completion-category-defaults): Use substring
15887 completion for `info-menu`.
15888
158892017-04-19 Glenn Morris <rgm@gnu.org>
15890
15891 Remove some explicit runtime loads of pcase
15892
15893 Pcase is macros, so these should have used eval-when-compile.
15894 Anyway, pcase entry points are autoloaded, so the compiler handles it.
15895 * lisp/profiler.el, lisp/emacs-lisp/eieio-core.el:
15896 * lisp/emacs-lisp/generator.el, lisp/emacs-lisp/subr-x.el:
15897 * lisp/progmodes/xref.el: No need to require pcase.
15898
158992017-04-19 Glenn Morris <rgm@gnu.org>
15900
15901 Stop cl-lib loading pcase at runtime
15902
15903 The cause was an unexpanded pcase-defmacro in cl-loaddefs.
15904 * lisp/emacs-lisp/autoload.el (make-autoload):
15905 Treat pcase-defmacro like defmacro.
15906
159072017-04-19 Alan Third <alan@idiocy.org>
15908
15909 Note frame documentation exceptions for NS builds
15910
15911 * doc/lispref/frames.texi (Management Parameters, Child Frames): Note
15912 NS differences.
15913
159142017-04-19 Alan Third <alan@idiocy.org>
15915
15916 Fix bug introduced by my last commit
15917
15918 * src/nsterm.m (ns_draw_fringe_bitmap): Revert key-mashing accident.
15919
159202017-04-19 Alan Third <alan@idiocy.org>
15921
15922 Add new frame functionality to NS port
15923
15924 * lisp/frame.el (frame-restack): Call ns-frame-restack.
15925 * src/keyboard.c (kbd_buffer_get_event) [HAVE_NS]: Enable
15926 MOVE_FRAME_EVENT handling.
15927 * src/frame.h:
15928 * src/frame.c: Enable 'z-group', 'undecorated' and 'parent' frame
15929 definitions.
15930 * src/nsfns.m: Add x_set_z_group, x_set_parent_frame and
15931 x_set_undecorated (Cocoa only) to handler struct.
15932 (Fx_create_frame): Handle 'z-group', 'parent-frame' and 'undecorated'
15933 frame parameter.
15934 (Fns_frame_restack): New function.
15935 * src/nsmenu.m (free_frame_tool_bar, update_frame_tool_bar):
15936 FRAME_TOOLBAR_HEIGHT is no longer a variable.
15937 * src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS, NS_PARENT_WINDOW_TOP_POS):
15938 Add #defines to find the screen position of the parent frame.
15939 (NS_TOP_POS): Remove defun.
15940 (EmacsView): Remove redundant toolbar variables and add createToolbar
15941 method.
15942 (FRAME_NS_TITLEBAR_HEIGHT, FRAME_TOOLBAR_HEIGHT): Always calculate the
15943 values instead of storing them in a variable.
15944 * src/nsterm.m (x_set_offset, windowDidMove): Take parent frame
15945 position into account when positioning frames.
15946 (initFrameFromEmacs): Remove toolbar creation code and handle new
15947 frame parameters.
15948 (x_set_window_size): Remove toolbar height calculation.
15949 (x_set_z_group):
15950 (x_set_parent_frame):
15951 (x_set_undecorated) [NS_IMPL_COCOA]: New function.
15952 (x_destroy_window): Detach parent if child closes.
15953 (updateFrameSize): Change NSTRACE message to reflect new reality and
15954 no longer reset frame size.
15955 (windowWillResize): Don’t change NS window name when the titlebar
15956 is invisible.
15957 (createToolbar): Move toolbar creation code into it’s own method.
15958 (toggleFullScreen): FRAME_TOOLBAR_HEIGHT and FRAME_NS_TITLEBAR_HEIGHT
15959 are no longer variables.
15960 (windowDidMove): Fire MOVE_FRAME_EVENT Emacs event.
15961
159622017-04-19 Glenn Morris <rgm@gnu.org>
15963
15964 Tweak bytecomp's loading of cl-extra
15965
15966 * lisp/emacs-lisp/bytecomp.el: Don't force load of cl-extra in a
15967 post-bootstrap emacs where cl-loaddefs does exist.
15968
159692017-04-19 Glenn Morris <rgm@gnu.org>
15970
15971 Avoid unnecessary loading of subr-x at run-time
15972
15973 * lisp/doc-view.el, lisp/filenotify.el, lisp/info-look.el:
15974 * lisp/svg.el, lisp/emacs-lisp/byte-opt.el, lisp/net/shr.el:
15975 * lisp/textmodes/sgml-mode.el, test/lisp/dom-tests.el:
15976 No need to load subr-x at run-time.
15977 * lisp/gnus/nnheader.el: No need to load subr-x.
15978
159792017-04-18 michael schuldt <mbschuldt@gmail.com> (tiny change)
15980
15981 Use iteration in math-factorial-iter
15982
15983 * lisp/calc/calc-comb.el (math-factorial-iter):
15984 Use iteration instead of recursion to avoid max-specpdl-size problem.
15985
159862017-04-18 Glenn Morris <rgm@gnu.org>
15987
15988 * test/lisp/kmacro-tests.el: Require seq, for seq-concatenate.
15989
159902017-04-18 Glenn Morris <rgm@gnu.org>
15991
15992 Avoid ert test failures
15993
15994 * lisp/emacs-lisp/ert.el (ert--expand-should-1):
15995 Avoid errors related to undefined byte-compile-macro-environment.
15996 Somehow masked until very recently because loading seq (eg)
15997 loads bytecomp. http://hydra.nixos.org/build/51730765
15998
159992017-04-18 Eli Zaretskii <eliz@gnu.org>
16000
16001 Fix a typo in indexing the user manual
16002
16003 * doc/emacs/cmdargs.texi (General Variables): Fix a horrible typo.
16004
160052017-04-18 Noam Postavsky <npostavs@gmail.com>
16006
16007 Fix find-library-name for load-history entries with nil FILE-NAME (Bug#26355)
16008
16009 * lisp/emacs-lisp/find-func.el (find-library--from-load-history):
16010 Rename from find-library--from-load-path. Check for `load-history'
16011 entries with nil FILE-NAMEs. Simplify by not double
16012 checking for suffixes and making use of `locate-file'.
16013
160142017-04-18 Alan Third <alan@idiocy.org>
16015 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16016
16017 Use vfork if possible on Darwin (bug#26397)
16018
16019
16020 * src/conf_post.h (HAVE_WORKING_VFORK): Don't undef.
16021 (vfork): Don't define.
16022 * src/process.c (create_process) [DARWIN_OS]: Use fork if pty_flag is
16023 set, otherwise vfork.
16024 * src/callproc.c (call_process) [DARWIN_OS]: Use TIOCNOTTY to detach
16025 the controlling terminal instead of setsid.
16026
160272017-04-18 Fran Litterio <flitterio@gmail.com>
16028
16029 Small erc-kill-channel fix (bug#23700)
16030
16031 * lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target.
16032
160332017-04-18 Glenn Morris <rgm@gnu.org>
16034
16035 ediff: use user-error rather than debug-ignored-errors
16036
16037 * lisp/vc/ediff-diff.el (ediff-prepare-error-list):
16038 * lisp/vc/ediff-help.el (ediff-help-for-quick-help):
16039 * lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
16040 (ediff-check-version):
16041 * lisp/vc/ediff-merg.el (ediff-shrink-window-C):
16042 * lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
16043 (ediff-append-custom-diff, ediff-meta-show-patch)
16044 (ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
16045 (ediff-get-meta-info, ediff-patch-file-form-meta):
16046 * lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
16047 * lisp/vc/ediff-util.el (ediff-toggle-autorefine)
16048 (ediff--check-ancestor-exists, ediff-toggle-read-only)
16049 (ediff-toggle-wide-display, ediff-toggle-multiframe)
16050 (ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
16051 (ediff-next-difference, ediff-previous-difference)
16052 (ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
16053 (ediff-save-buffer):
16054 * lisp/vc/ediff-wind.el (ediff-make-wide-display):
16055 * lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
16056 (ediff-directories-internal, ediff-directory-revisions-internal)
16057 (ediff-regions-wordwise, ediff-regions-linewise)
16058 (ediff-load-version-control): Use user-error.
16059 (debug-ignored-errors): No longer modify.
16060
160612017-04-18 Glenn Morris <rgm@gnu.org>
16062
16063 mh-e: use user-error rather than debug-ignored-errors
16064
16065 * lisp/mh-e/mh-alias.el (mh-alias-grab-from-field):
16066 * lisp/mh-e/mh-utils.el (mh-get-msg-num): Use user-error.
16067 (debug-ignored-errors): No longer modify.
16068
160692017-04-18 Glenn Morris <rgm@gnu.org>
16070
16071 ispell.el: use user-error rather than debug-ignored-errors
16072
16073 * lisp/textmodes/ispell.el (ispell-get-word): Use user-error.
16074 (debug-ignored-errors): No longer modify.
16075
160762017-04-17 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
16077
16078 * src/xterm.c (x_fill_rectangle): Now static.
16079
160802017-04-17 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
16081
16082 Tighten recently-added UTF-8 check
16083
16084 * src/coding.c (encode_coding_utf_8): Now extern.
16085 * src/terminal.c (terminal_glyph_code) [HAVE_STRUCT_UNIPAIR_UNICODE]:
16086 Check for UTF-8, not just for multibyte.
16087
160882017-04-17 David Engster <deng@randomsample.de>
16089
16090 xml: Properly handle symbol-qnames for attribute parsing
16091
16092 * lisp/xml.el (xml-parse-attlist): Do not strip 'symbol-qnames from
16093 xml-ns argument (reverts aea67018) (Bug#26533).
16094 (xml-maybe-do-ns): Properly handle default namespace by not
16095 interning new symbol when 'special' flag is set.
16096
16097 * tests/lisp/xml-tests.el (xml-parse-test--namespace-attribute-qnames)
16098 (xml-parse-namespace-attribute-qnames): Add test for Bug#26533.
16099
161002017-04-17 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
16101
16102 * src/lisp.h (STRING_SET_CHARS): Simplify assertion.
16103
161042017-04-17 Eli Zaretskii <eliz@gnu.org>
16105
16106 Fix assertion violations when displaying thread-related error
16107
16108 * src/process.c (Faccept_process_output): Don't assume a thread's
16109 name is always a string.
16110
161112017-04-17 Paul Eggert <eggert@cs.ucla.edu>
16112
16113 dired ‘M’ should not complain about ‘.’ and ‘..’
16114
16115 * lisp/dired-aux.el (dired-do-redisplay):
16116 Allow redisplay of ‘.’ and ‘..’ (Bug#26528).
16117
161182017-04-17 Paul Eggert <eggert@cs.ucla.edu>
16119
16120 Remove unused coding enums
16121
16122 * src/coding.h (enum coding_system_type, enum end_of_line_type):
16123 Remove; unused.
16124
161252017-04-17 Paul Eggert <eggert@cs.ucla.edu>
16126
16127 Work around bug with unibyte Linux consoles
16128
16129 * src/terminal.c (terminal_glyph_code): Skip the UTF-8 stuff if
16130 the terminal's coding system is unibyte (Bug#26396).
16131
161322017-04-16 Teemu Likonen <tlikonen@iki.fi>
16133
16134 Fix org-agenda's command for calendar-lunar-phases
16135
16136 Function org-agenda-phases-of-moon tries to call a non-existing
16137 function calendar-phases-of-moon. The correct function is
16138 calendar-lunar-phases.
16139
161402017-04-16 Michael Albinus <michael.albinus@gmx.de>
16141
16142 Tuning for `separate' Tramp syntax
16143
16144 * lisp/net/tramp.el (tramp-method-regexp): Fix it for `separate' syntax.
16145 (tramp-completion-file-name-regexp-separate): Simplify.
16146
16147 * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect-separate):
16148 Extend test.
16149
161502017-04-16 Alan Mackenzie <acm@muc.de>
16151
16152 Fix bug #26529: C-h k errors with a lambda function bound to a key.
16153
16154 * lisp/help-fns.el (help-fns--signature, describe-function-1): Check
16155 `function' is a symbol before trying to get property `reader-construct' from
16156 it.
16157
161582017-04-16 Simen Heggestøyl <simenheg@gmail.com>
16159
16160 Fix highlighting of short selectors in CSS mode
16161
16162 * lisp/textmodes/css-mode.el (css--font-lock-keywords): Highlight
16163 selectors where the part before a colon is only one character long,
16164 such as `a:hover'.
16165
161662017-04-16 Eli Zaretskii <eliz@gnu.org>
16167
16168 Fix redisplay performance problems with some fonts
16169
16170 * src/font.c (font_list_entities): Revert part of the changes
16171 introduced on Apr 2, 2014 to fix bug#17125. It turns out having
16172 zero_vector in the font-cache is an important indication that
16173 cannot be removed. (Bug#21028)
16174
161752017-04-16 Eli Zaretskii <eliz@gnu.org>
16176
16177 Add assertion to STRING_SET_CHARS
16178
16179 * src/lisp.h (STRING_SET_CHARS): Add an assertion and commentary
16180 to prevent incorrect usage. For details, see this discussion:
16181 http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00412.html.
16182
161832017-04-16 Eli Zaretskii <eliz@gnu.org>
16184
16185 Avoid compilation warnings on MS-Windows
16186
16187 * src/w32term.c (w32_read_socket): Avoid compiler warnings about
16188 parentheses around assignment.
16189 * src/w32fns.c (w32_createwindow): Remove unused variable
16190 dwStyle. Use "|=" where appropriate.
16191
161922017-04-16 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
16193
16194 Merge from gnulib
16195
16196 This incorporates:
16197 2017-04-14 intprops: try to avoid tickling similar bugs
16198 2017-04-14 intprops: port to Oracle Studio 12.3 x86
16199 * doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib.
16200
162012017-04-15 Martin Rudalics <rudalics@gmx.at>
16202
16203 Fix bugs in `with-displayed-buffer-window' and `fit-window-to-buffer'
16204
16205 * lisp/window.el (with-displayed-buffer-window): When a
16206 'window-height' action alist entry specifies a function, call
16207 `temp-buffer-window-show' with a '(window-height . t)' dummy
16208 entry so `window--try-to-split-window' will bind
16209 `window-combination-limit' to t and that function does not
16210 resize any other window but the one we split this one off
16211 (Bug#25055, Bug#25179).
16212 (fit-window-to-buffer): Call `window-max-delta' with NOUP t so
16213 we steal space only from windows in the same combination.
16214 Stealing space from other windows would not allow us to return
16215 that space later when this window is deleted (Bug#25055,
16216 Bug#25179).
16217
162182017-04-15 Glenn Morris <rgm@gnu.org>
16219
16220 Avoid userlock queries hanging forever in batch mode
16221
16222 * lisp/userlock.el (ask-user-about-lock)
16223 (ask-user-about-supersession-threat): Abort in batch mode.
16224
162252017-04-14 Martin Rudalics <rudalics@gmx.at>
16226
16227 Fix segfault when calling frame_ancestor_p (Bug#26493)
16228
16229 * src/xterm.c (handle_one_xevent): Check that hf was not reset
16230 before calling frame_ancestor_p (Bug#26493).
16231
162322017-04-14 Martin Rudalics <rudalics@gmx.at>
16233
16234 A few additional copy-edits in documentation of frames
16235
16236 * doc/lispref/frames.texi (Frame Layout)
16237 (Implied Frame Resizing): Windows -> MS-Windows.
16238 (Deleting Frames): Fix typo.
16239
162402017-04-14 Glenn Morris <rgm@gnu.org>
16241
16242 Use user-error for some ert.el errors
16243
16244 * lisp/emacs-lisp/ert.el (ert-read-test-name, ert-delete-all-tests)
16245 (ert-results-find-test-at-point-other-window, ert-describe-test):
16246 Use user-error.
16247
162482017-04-14 Glenn Morris <rgm@gnu.org>
16249
16250 Use user-error for customize's "invalid face" error
16251
16252 * lisp/cus-edit.el (customize-face): Use user-error.
16253 (debug-ignored-errors): No more need to add "Invalid face".
16254
162552017-04-14 Glenn Morris <rgm@gnu.org>
16256
16257 Remove duplicate lisp-eval-defun definition
16258
16259 * lisp/emacs-lisp/lisp-mode.el (lisp-eval-defun):
16260 Autoload rather than defining a stub.
16261
162622017-04-14 Glenn Morris <rgm@gnu.org>
16263
16264 * lisp/Makefile.in (check-defun-dups): Ignore obsolete files.
16265
162662017-04-14 Glenn Morris <rgm@gnu.org>
16267
16268 Create generated lisp files before main loaddefs.el
16269
16270 This should improve reproducibility of lisp/loaddefs.el.
16271 * lisp/Makefile.in (gen-lisp): New phony target.
16272 ($(lisp)/loaddefs.el, compile-main): Depend on gen-lisp.
16273 * src/Makefile.in ($(leimdir)/leim-list.el): Depend on all of ../leim.
16274 * lisp/cedet/semantic.el (semantic-mode):
16275 * lisp/cedet/semantic/fw.el (top-level):
16276 * lisp/emacs-lisp/eieio-core.el (top-level):
16277 Robustify to generated input files maybe not yet existing.
16278
162792017-04-14 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
16280
16281 Fix minor quoting issues in Makefile.in
16282
16283 * Makefile.in (install-arch-dep, uninstall):
16284 Quote EMACS and EMACS_NAME more consistently.
16285
162862017-04-13 Glenn Morris <rgm@gnu.org>
16287
16288 * Makefile.in (install-etc): Use existing Makefile variables.
16289
162902017-04-13 Eli Zaretskii <eliz@gnu.org>
16291
16292 Minor copyedits of recent changes in documentation
16293
16294 * doc/lispref/frames.texi (Frame Layout, Frame Position)
16295 (Frame Size, Frame Interaction Parameters, Input Focus)
16296 (Raising and Lowering, Child Frames): Improve wording and indexing.
16297 * doc/emacs/cmdargs.texi (Borders X): Improve indexing.
16298
162992017-04-13 Glenn Morris <rgm@gnu.org>
16300
16301 Small src/Makefile simplification
16302
16303 * src/Makefile.in ($(lispsource)/international/ucs-normalize.elc)
16304 ($(lispsource)/term/ns-win.elc): Combine rules.
16305
163062017-04-13 Simen Heggestøyl <simenheg@gmail.com>
16307
16308 Add grid layout module to CSS property list
16309
16310 * lisp/textmodes/css-mode.el (css-property-alist)
16311 (css-value-class-alist): Add new properties and value classes from CSS
16312 Grid Layout Module.
16313
163142017-04-13 Martin Rudalics <rudalics@gmx.at>
16315
16316 Describe recent frame and window changes in manuals
16317
16318 * doc/emacs/emacs.texi (Top):
16319 * doc/emacs/cmdargs.texi (Borders X): Clearly separate the terms
16320 "outer border" (for the X border which can be set from within
16321 Emacs) and "external border" (for the border which is added by
16322 the window manager).
16323 * doc/lispref/display.texi (Tooltips): Clarify slightly.
16324 * doc/lispref/elisp.texi (Top): Update node and section names.
16325 * doc/lispref/frames.texi (Frames): Describe difference between
16326 top-level and child frames.
16327 (Frame Layout): Describe outer border. Add more details about
16328 how Emacs obtains the outer size and position of a frame and
16329 about menu bar/tool bar wrapping. Add references to new frame
16330 parameters.
16331 (Size and Position): Remove subsection.
16332 (Frame Position): New subsection excerpted from the earlier Size
16333 and Position subsection. Clarify positioning concepts and
16334 some of their shortcomings. Describe `move-frame-functions'.
16335 (Frame Size): New subsection excerpted from the earlier Size
16336 and Position subsection. Describe how to track frame size
16337 changes and the new function `frame-size-changed-p'.
16338 (Position Parameters): Describe child frame positioning. Warn
16339 about negative offsets. Describe 'z-group' parameter.
16340 (Size Parameters): Describe 'text-pixels' specification
16341 facility and new 'min-width' and 'min-height' parameters.
16342 (Layout Parameters): Clarify description of 'tool-bar-lines' and
16343 'menu-bar-lines' parameters.
16344 (Frame Interaction Parameters): New subsubsection describing
16345 'parent-frame', 'delete-before', 'mouse-wheel-frame' and
16346 'no-other-frame' parameters.
16347 (Management Parameters): Describe 'skip-taskbar',
16348 'no-focus-on-map', 'no-accept-focus', 'undecorated' and
16349 'override-redirect' parameters.
16350 (Deleting Frames): Describe handling of 'delete-before'
16351 parameter and child frames for `delete-frame' and
16352 `delete-other-frames'.
16353 (Finding All Frames): Describe `frame-list-z-order' and handling
16354 of 'no-other-frame' parameter by `next-frame'.
16355 (Minibuffers and Frames): Minor clarifications.
16356 (Input Focus): Document `x-focus-frame'. Clarify descriptions
16357 of `focus-in-hook', `focus-out-hook' and `focus-follows-mouse'.
16358 (Visibility of Frames): Describe mapping and how the visibility
16359 of a parent frame affects that of its child frames.
16360 (Raising and Lowering): Describe restacking of frames and
16361 z-groups.
16362 (Child Frames): New section.
16363 * doc/lispref/windows.texi (Selecting Windows): Describe
16364 additional semantics of NORECORD argument of `select-window' and
16365 how `buffer-list-update-hook' can emulate a "select window
16366 hook".
16367 (Mouse Window Auto-selection): New section.
16368
163692017-04-13 Damien Cassou <damien@cassou.me>
16370
16371 Fix imenu--sort-by-position for non-pairs parameters (bug#26457)
16372
16373 * lisp/imenu.el (imenu--sort-by-position): Fix to accept lists beyond
16374 pairs.
16375 * test/lisp/imenu-tests.el: Add 2 tests for `imenu--sort-by-position`.
16376
163772017-04-13 Eli Zaretskii <eliz@gnu.org>
16378
16379 Avoid unnecessary regeneration of the entire loaddefs.el
16380
16381 * lisp/Makefile.in (autoloads .PHONY): Add commentary explaining
16382 why $(lisp)/loaddefs.el is a dependency of '.PHONY'.
16383 ($(lisp)/loaddefs.el): Copy an existing loaddefs.el to
16384 loaddefs.tmp before running 'batch-update-autoloads' on it, to
16385 avoid slow regeneration of the full contents. (Bug#26459)
16386 Use 'move-if-change' instead of 'mv', to avoid producing a new
16387 Emacs binary when not necessary.
16388
163892017-04-13 Dmitry Gutov <dgutov@yandex.ru>
16390
16391 Handle indentation of nested ternary operators in JS
16392
16393 * lisp/progmodes/js.el (js--looking-at-operator-p):
16394 Handle nested ternary operators.
16395
163962017-04-12 Eli Zaretskii <eliz@gnu.org>
16397
16398 Don't call 'kill-this-buffer' outside of menus
16399
16400 * lisp/simple.el (kill-current-buffer): New function.
16401 (completion-list-mode-map): Use it instead of kill-this-buffer.
16402 * lisp/type-break.el (type-break-mode):
16403 * lisp/term/ns-win.el (global-map):
16404 * lisp/progmodes/gdb-mi.el (gdb-memory-mode-map)
16405 (gdb-disassembly-mode-map, gdb-frames-mode-map)
16406 (gdb-locals-mode-map, gdb-registers-mode-map):
16407 * lisp/org/org-mhe.el (org-mhe-follow-link):
16408 * lisp/net/secrets.el (secrets-mode-map):
16409 * lisp/net/eudc.el (eudc-mode-map):
16410 * lisp/net/eudc-hotlist.el (eudc-hotlist-mode-map): Use
16411 kill-current-buffer instead of kill-this-buffer. (Bug#26466)
16412
164132017-04-12 Eli Zaretskii <eliz@gnu.org>
16414
16415 * lisp/menu-bar.el (kill-this-buffer): Doc fix. (Bug#26466)
16416
164172017-04-12 Martin Rudalics <rudalics@gmx.at>
16418
16419 New internal-border face and args for select-window and x-focus-frame
16420
16421 Add `internal-border' face and handle it whenever clearing the
16422 internal border. If NORECORD equals the symbol
16423 'mark-for-redisplay', `select-window' will not record the window
16424 but still mark it for redisplay. The new argument NOACTIVATE
16425 for `x-focus-frame' tries to not activate FRAME when set.
16426
16427 * lisp/faces.el (internal-border): New face.
16428 * lisp/mwheel.el (mwheel-scroll): Select window to scroll with
16429 `mark-for-redisplay'.
16430 * lisp/scroll-bar.el (scroll-bar-drag)
16431 (scroll-bar-horizontal-drag, scroll-bar-scroll-down)
16432 (scroll-bar-scroll-up, scroll-bar-toolkit-scroll)
16433 (scroll-bar-toolkit-horizontal-scroll): Select window to scroll
16434 with `mark-for-redisplay'.
16435 * lisp/window.el (handle-select-window): When
16436 `focus-follows-mouse' is not 'auto-raise' try to not activate
16437 FRAME.
16438 * src/dispextern.h (face_id): Add INTERNAL_BORDER_FACE_ID.
16439 * src/frame.c (Fx_focus_frame): New argument NOACTIVATE.
16440 * src/frame.h (x_focus_frame): Update extern declaration.
16441 * src/gtkutil.c (xg_clear_under_internal_border): Remove
16442 function.
16443 (xg_frame_resized, xg_frame_set_char_size): Call
16444 x_clear_under_internal_border.
16445 (xg_tool_bar_callback): Adapt x_focus_frame call.
16446 * src/gtkutil.h (xg_clear_under_internal_border): Remove
16447 declaration.
16448 * src/nsfns.m (x_focus_frame): Add argument NOACTIVATE.
16449 * src/w32fns.c (x_clear_under_internal_border): Fill border
16450 with internal-border background if specified.
16451 * src/w32term.h (x_clear_under_internal_border): Add extern
16452 declaration.
16453 * src/w32term.c (x_after_update_window_line): Fill border
16454 with internal-border background if specified.
16455 (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
16456 (x_scroll_bar_clear, w32_read_socket): Call
16457 x_clear_under_internal_border.
16458 (x_focus_frame): New argument NOACTIVATE.
16459 * src/window.c (select_window): Mark WINDOW for redisplay when
16460 NORECORD equals 'mark-for-redisplay'.
16461 (Fselect_window): Update doc-string.
16462 (syms_of_window): Define Qmark_for_redisplay.
16463 * src/xdisp.c (clear_garbaged_frames, echo_area_display)
16464 (redisplay_internal): Call x_clear_under_internal_border.
16465 * src/xfaces.c (lookup_basic_face): Handle `window-divider'
16466 and `internal-border' faces.
16467 (realize_basic_faces): Realize `internal-border' face.
16468 (syms_of_xfaces): Define Qinternal_border.
16469 * src/xfns.c (x_set_internal_border_width): Remove call for
16470 xg_clear_under_internal_border.
16471 (x_focus_frame): New argument NOACTIVATE. When non-nil try to not
16472 activate frame.
16473 * src/xterm.c (x_fill_rectangle): No more static.
16474 (x_clear_under_internal_border, x_after_update_window_line):
16475 Fill border with internal-border background if specified.
16476 (xt_horizontal_action_hook): Rewrite.
16477 (handle_one_xevent): Call x_clear_under_internal_border.
16478 * src/xterm.h (x_fill_rectangle): Add extern declaration.
16479
164802017-04-12 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
16481
16482 Port recent frame changes to --enable-gcc-warnings
16483
16484 * src/frame.c (next_frame, prev_frame):
16485 Remove now-redundant assertions.
16486 * src/frame.h (FOR_EACH_FRAME): Assume Vframe_list is nonempty.
16487
164882017-04-12 Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
16489
16490 Scroll right and left using wheel-right and wheel-left.
16491
16492 These changes also make use of touchpad and trackpad (Bug#26347).
16493
16494 * doc/emacs/frames.texi (Mouse Commands): Document horizontal
16495 scrolling using the mouse wheel.
16496
16497 * lisp/mwheel.el (mwheel-scroll): Respond to wheel-right and wheel-left.
16498 (mwheel-tilt-scroll-p, mwheel-flip-direction)
16499 (mwheel-scroll-left-function, mwheel-scroll-right-function): New
16500 defcustoms.
16501 (mouse-wheel-left-event, mouse-wheel-right-event): New variables,
16502 events that calls wheel-left/right.
16503
16504 * etc/NEWS: Mention horizontal scrolling using the mouse wheel.
16505
165062017-04-12 Eli Zaretskii <eliz@gnu.org>
16507
16508 * lisp/Makefile.in (autoloads-force): Fix usage of ".PHONY".
16509
165102017-04-12 Martin Rudalics <rudalics@gmx.at>
16511
16512 Add new frame parameters and associated functions
16513
16514 Add new frame parameters `undecorated', `override-redirect',
16515 `parent-frame', `skip-taskbar', `no-focus-on-map',
16516 `no-accept-focus', `z-group', `delete-before', `no-other-frame',
16517 `mouse-wheel-frame', `min-width', `min-height'. Add new
16518 functions `frame-restack' and `frame-list-z-order'.
16519
16520 * lisp/cus-start.el (focus-follows-mouse): Adapt customization
16521 type.
16522 * lisp/frame.el (handle-delete-frame): Handle child and
16523 `delete-before' frames.
16524 (other-frame): Stop looking for other frame after one round.
16525 (frame-list-z-order, frame-restack): New functions.
16526 (delete-other-frames): Handle child frames.
16527 * lisp/frameset.el (frameset-persistent-filter-alist)
16528 (frameset--record-relationships): Handle `delete-before',
16529 `parent-frame' and `mouse-wheel-frame' parameters. Rename
16530 latter from `frameset--record-minibuffer-relationships'.
16531 (frameset--restore-frame): Handle ‘parent-frame’ parameter
16532 specially.
16533 (frameset-restore): Handle `delete-before', `parent-frame' and
16534 `mouse-wheel-frame' parameters.
16535 * lisp/mwheel.el (mwheel-scroll): Handle `mouse-wheel-frame'
16536 parameter.
16537 * lisp/window.el (window--min-size-ignore-p): Fix doc-string.
16538 (mouse-autoselect-window-select, handle-select-window): Major
16539 rewrite. Try to not ignore errors. Handle auto-selection of
16540 child frames and different values of `focus-follows-mouse'.
16541 * src/frame.c (frame_windows_min_size): Handle new `min-width'
16542 and `min-height' frame parameters.
16543 (make_frame): Initialize new frame structure members.
16544 (do_switch_frame): Don't reset internal_last_event_frame for
16545 descendant frames.
16546 (Fframe_parent, frame_ancestor_p, Fframe_ancestor_p): New
16547 functions.
16548 (candidate_frame): Don't return `no-other-frame' frame.
16549 (other_frames): New function replacing other_visible_frames.
16550 (delete_frame): Rewrite. Handle child and `delete-before' frames.
16551 (Fmake_frame_invisible): Call other_frames.
16552 (store_frame_param): Check `delete-before' and `parent-frame'
16553 parameters for circular dependencies.
16554 (frame_parms, syms_of_frame): Add entries for and define new
16555 frame parameters.
16556 (focus_follows_mouse): New meaningful value `auto-raise'.
16557 * src/frame.h (z_group): New enumeration type.
16558 (frame): New slots parent_frame, undecorated, override_redirect,
16559 skip_taskbar, no_focus_on_map, no_accept_focus, z_group.
16560 (fset_parent_frame): New inlined function.
16561 (FRAME_UNDECORATED, FRAME_OVERRIDE_REDIRECT)
16562 (FRAME_PARENT_FRAME, FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP)
16563 (FRAME_NO_ACCEPT_FOCUS, FRAME_Z_GROUP, FRAME_Z_GROUP_NONE)
16564 (FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_ABOVE_SUSPENDED)
16565 (FRAME_Z_GROUP_BELOW): New macros.
16566 (frame_ancestor_p): Add declaration.
16567 * src/gtkutil.c (xg_create_frame_widgets): Handle
16568 `undecorated' and `override-redirect' frame parameters.
16569 (x_wm_set_size_hint): None for child frames.
16570 (xg_set_undecorated, xg_frame_restack, xg_set_skip_taskbar)
16571 (xg_set_no_focus_on_map, xg_set_no_accept_focus)
16572 (xg_set_override_redirect): New functions.
16573 (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
16574 Don't let scrollbars obscure child frames.
16575 * src/gtkutil.h: (xg_set_undecorated, xg_frame_restack)
16576 (xg_set_skip_taskbar, xg_set_no_focus_on_map)
16577 (xg_set_no_accept_focus, xg_set_override_redirect): Add extern
16578 declarations.
16579 * src/nsfns.m (ns_frame_parm_handlers): Add entries for new
16580 frame parameters.
16581 (Fx_create_frame): Install `min-width' and `min-height' frame
16582 parameters.
16583 * src/nsterm.m (mouseMoved:): Handle focus_follows_mouse change.
16584 * src/w32fns.c (WS_EX_NOACTIVATE): Define if necessary.
16585 (x_real_positions): Handle child frames.
16586 (x_set_menu_bar_lines): Don't for child frames.
16587 (x_set_undecorated, x_set_parent_frame, x_set_skip_taskbar)
16588 (x_set_no_focus_on_map, x_set_no_accept_focus)
16589 (x_set_z_group): New functions.
16590 (w32_createvscrollbar, w32_createhscrollbar): Don't draw
16591 scroll bars over child frames.
16592 (w32_createwindow): Handle new frame parameters and child frames.
16593 (w32_wnd_proc): Let mouse clicks into a child frame activate
16594 the frame. Try to handle the `no-accept-focus' parameter. Do
16595 SetFocus when our window is brought to top or becomes the
16596 foreground window.
16597 (w32_window): Don't initialize menu bar for child frames.
16598 (Fx_create_frame): Handle new frame parameters.
16599 (x_create_tip_frame): Set explicit_parent slot.
16600 (w32_dialog_in_progress): New function.
16601 (Fx_file_dialog): Handle `z-group-above' frames.
16602 (w32_frame_list_z_order, Fw32_frame_list_z_order)
16603 (w32_frame_restack, Fw32_frame_restack): New functions.
16604 (w32_frame_parm_handlers): Add entries for new frame
16605 parameters.
16606 * src/w32font.c (Fx_select_font): Handle `z-group-above'
16607 frames during font selection dialogue.
16608 * src/w32term.c (construct_mouse_wheel): Construct mouse wheel
16609 event from F's w32 window.
16610 (w32_mouse_position): Handle child frames.
16611 (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar):
16612 Don't draw scroll bars over child frames.
16613 (w32_read_socket): Always erase background of child frames.
16614 When generating SELECT_WINDOW_EVENTs handle new value of
16615 `focus-follows-mouse' and handle `no-accept-focus' parameter.
16616 Handle `mouse-wheel-frame' parameter.
16617 (x_calc_absolute_position, x_set_offset, x_set_window_size):
16618 Handle child frames.
16619 (x_make_frame_visible): Handle child frames specially. Handle
16620 `no-focus-on-map' parameter.
16621 * src/w32term.h (w32_dialog_in_progress): Add external
16622 declaration.
16623 * src/xdisp.c (x_consider_frame_title, prepare_menu_bars): Not
16624 for child frames.
16625 * src/xfns.c (Xm/MwmUtil.h): Include for WM hints.
16626 (PropMotifWmHints, PROP_MOTIF_WM_HINTS_ELEMENTS): Define for
16627 non-Motif, non-GTK case.
16628 (x_real_pos_and_offsets): Handle child frames.
16629 (x_set_undecorated, x_set_parent_frame)
16630 (x_set_no_focus_on_map, x_set_no_accept_focus)
16631 (x_set_override_redirect): New functions.
16632 (x_set_menu_bar_lines): Not for child frames.
16633 (x_window): Handle `undecorated' and `override_redirect' cases.
16634 (Fx_create_frame): Handle new frame parameters.
16635 (frame_geometry): Handle child frames and outer border.
16636 (x_frame_list_z_order, Fx_frame_list_z_order)
16637 (x_frame_restack, Fx_frame_restack): New functions.
16638 (Fx_file_dialog, Fx_select_font): Set x_menu_set_in_use.
16639 (x_frame_parm_handlers): Add entries for new frame parameters.
16640 * src/xmenu.c (x_menu_set_in_use): Handle `z-group-above'
16641 frames.
16642 * src/xterm.c (x_set_frame_alpha): Don't set alpha of parent
16643 for child frames.
16644 (XTmouse_position): Handle child frames.
16645 (x_scroll_bar_create, x_scroll_bar_expose): Don't let scroll
16646 bars obscure child frames.
16647 (handle_one_xevent): Handle child frame positions. If necessary
16648 set `skip-taskbar' and reassign proper `z-group' when we are
16649 mapped. When generating SELECT_WINDOW_EVENTs handle new value
16650 of `focus-follows-mouse'. Handle `mouse-wheel-frame' parameter.
16651 Let mouse clicks into a child frame activate the frame.
16652 (x_calc_absolute_position, x_set_offset): Handle child frames
16653 specially.
16654 (x_set_skip_taskbar, x_set_z_group): New functions.
16655 (x_make_frame_visible): Handle child frames.
16656 (ATOM_REFS_INIT): Add entries for
16657 Xatom_net_wm_state_skip_taskbar, Xatom_net_wm_state_above,
16658 Xatom_net_wm_state_below.
16659 * src/xterm.h (top-level): Declare Xatom_net_wm_state_above,
16660 Xatom_net_wm_state_below and Xatom_net_wm_state_skip_taskbar.
16661 (x_set_skip_taskbar, x_set_z_group): Add extern declarations.
16662
166632017-04-11 Glenn Morris <rgm@gnu.org>
16664
16665 Update a package test for hydra
16666
16667 * test/lisp/emacs-lisp/package-tests.el (with-package-test):
16668 Also bind package-gnupghome-dir, see eg
16669 http://hydra.nixos.org/build/51462182 .
16670
166712017-04-11 Martin Rudalics <rudalics@gmx.at>
16672
16673 Frame movement, focus and hook related changes
16674
16675 New hook `move-frame-functions'. Run `focus-in-hook'
16676 after switching to frame that gets focus. Don't run
16677 XMoveWindow for GTK.
16678
16679 * lisp/frame.el (handle-move-frame, frame-size-changed-p): New
16680 functions.
16681
16682 * src/frame.c (do_switch_frame): Simplify code.
16683 (Fhandle_switch_frame): Switch frame before running
16684 `handle-focus-in'.
16685 (Vfocus_in_hook, Vfocus_out_hook): Clarify doc-strings.
16686 (Vmove_frame_functions): New hook variable.
16687 * src/keyboard.c (kbd_buffer_get_event): Handle
16688 MOVE_FRAME_EVENT. Handle SELECT_WINDOW_EVENT separately.
16689 (head_table): Add Qmove_frame entry.
16690 (syms_of_keyboard): Add Qmove_frame.
16691 (keys_of_keyboard): Define key for `move-frame'.
16692 * src/termhooks.h (event_kind): Add MOVE_FRAME_EVENT.
16693 * src/w32term.c (w32_read_socket): Create MOVE_FRAME_EVENT.
16694 * src/window.c (run_window_size_change_functions): Record size of
16695 FRAME's minibuffer window too.
16696 * src/xterm.c (handle_one_xevent): Create MOVE_FRAME_EVENT.
16697 (x_set_offset): For GTK call gtk_widget_move instead of
16698 XMoveWindow.
16699
167002017-04-11 Werner LEMBERG <wl@gnu.org>
16701
16702 Avoid abort in ftfont.c due to faulty fonts
16703
16704 * src/ftfont.c (ftfont_get_metrics): Try loading the font without
16705 hinting, before aborting. (Bug#25945)
16706
167072017-04-11 Eli Zaretskii <eliz@gnu.org>
16708
16709 Document 'line-pixel-height'
16710
16711 * doc/lispref/display.texi (Size of Displayed Text): Document
16712 line-pixel-height. Suggested by Tak Kunihiro
16713 <tkk@misasa.okayama-u.ac.jp>. (Bug#26379)
16714
167152017-04-11 Jens Lechtenboerger <jens.lechtenboerger@fsfe.org>
16716
16717 Introduce customizable variable 'package-gnupghome-dir'
16718
16719 * lisp/emacs-lisp/package.el (package-import-keyring)
16720 (package--check-signature-content, package-check-signature):
16721 Use new variable package-gnupghome-dir to control which GnuPG
16722 homedir to use.
16723 * doc/emacs/package.texi: Mention package-gnupghome-dir.
16724 * etc/NEWS: Mention package-gnupghome-dir.
16725
167262017-04-11 Martin Rudalics <rudalics@gmx.at>
16727
16728 Set x_gtk_use_window_move by default for fixing bug#25851 and bug#25943
16729
16730 This activates a change that was installed a few weeks ago but whose
16731 ChangeLog was inadvertently dropped during its commit. The proper
16732 ChangeLog is included below as part of the present commit.
16733
16734 * src/gtkutil.c (xg_set_geometry): When x_gtk_use_window_move
16735 is set avoid calling x_gtk_parse_geometry (Bug#25851).
16736 (x_wm_set_size_hint): When x_gtk_use_window_move is set, set
16737 PPosition, USPosition and USSize flags if requested.
16738 * src/xterm.c (x_set_offset): With GTK when
16739 x_gtk_use_window_move is set, leave it entirely to
16740 gtk_window_move to position the window and skip any
16741 post-adjustments (Bug#25851 and Bug#25943).
16742 (x_gtk_use_window_move): New variable.
16743
167442017-04-10 Alan Mackenzie <acm@muc.de>
16745
16746 Fix a loop in C Mode caused by inadequate analysis of comments.
16747
16748 After M-;, and the insertion of the opening "/*", the CC Mode after-change
16749 function got confused, since the new comment opener matched the end of a
16750 subsequent comment, but moving back over that comment did not come back to the
16751 starting point. Fix this.
16752
16753 * lisp/progmodes/cc-engine.el (c-end-of-macro): Add a limit parameter, wherer
16754 point is left if no end-of-macro is found before it.
16755 (c-forward-sws): Change the `safe-start' mechanism. Now `safe-start' is
16756 non-nil except where we have an unclosed block comment at the end of a macro.
16757 This enables us to populate the cache more fully, at the cost of some run
16758 time.
16759
167602017-04-10 Lars Brinkhoff <lars@nocrew.org>
16761
16762 Add PVSIZE function to return the size of a pseudovector.
16763
16764 * src/lisp.h (PVSIZE): New function.
16765
16766 * src/chartab.c (copy_char_table):
16767 * src/data.c (Ftype_of, Finteractive_form, Faref, Faset):
16768 * src/doc.c (Fdocumentation, store_function_docstring):
16769 * src/eval.c (Fcommandp, funcall_lambda, lambda_arity, Ffetch_bytecode):
16770 * src/fns.c (Flength, Fcopy_sequence):
16771 * src/font.h (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P):
16772 * src/lread.c (substitute_object_recurse):
16773 * src/src/print.c (print_object):
16774 Use it.
16775
167762017-04-10 Michael Albinus <michael.albinus@gmx.de>
16777
16778 Add Tramp tests
16779
16780 * lisp/net/tramp.el (tramp-syntax): Adapt docstring.
16781
16782 * test/lisp/net/tramp-tests.el
16783 (tramp-test01-file-name-syntax-simplified)
16784 (tramp-test01-file-name-syntax-separate)
16785 (tramp-test02-file-name-dissect-simplified)
16786 (tramp-test02-file-name-dissect-separate): New tests.
16787
167882017-04-10 Martin Rudalics <rudalics@gmx.at>
16789
16790 Make sure that `shell' makes BUFFER current
16791
16792 * lisp/shell.el (shell): Restrict scope of recently added
16793 `with-current-buffer' to make sure that BUFFER is current when
16794 `shell' returns.
16795
167962017-04-10 Jim Blandy <jimb@red-bean.com>
16797
16798 Default to PCRE syntax when reading .hgignore
16799
16800 * lisp/vc/vc-hg.el (vc-hg--slurp-hgignore-1):
16801 Default to the PCRE syntax (bug#26249).
16802
168032017-04-09 Michael Albinus <michael.albinus@gmx.de>
16804
16805 Document Tramp changes
16806
16807 * doc/misc/tramp.texi (Change file name syntax): New node.
16808
16809 * etc/NEWS: Mention `tramp-change-syntax'.
16810
16811 * lisp/net/tramp.el (tramp-file-name-regexp): Reinsert it.
16812 External packages uses it.
16813 (tramp-syntax): Set also `tramp-file-name-regexp'.
16814
168152017-04-09 Paul Eggert <eggert@cs.ucla.edu>
16816
16817 Merge from gnulib (Bug#26398)
16818
16819 This incorporates:
16820 2017-04-08 getopt: prefer - to _ in new file names
16821 2017-04-08 getopt: port recent getopt changes to macOS
16822 * .gitignore: Add lib/getopt-cdefs.h.
16823 * lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
16824 * lib/getopt-core.h: Rename from lib/getopt_core.h.
16825 * lib/getopt-ext.h: Rename from lib/getopt_ext.h.
16826 * lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
16827 * lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
16828 * lib/getopt.in.h, lib/unistd.in.h, m4/getopt.m4:
16829 Copy from Gnulib.
16830 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
16831
168322017-04-09 Ken Raeburn <raeburn@raeburn.org>
16833
16834 Write updated loaddefs to a temporary file and rename into place.
16835
16836 In a parallel build, byte compilation can be running at the same times
16837 as loaddefs.el is being regenerated. However, in a CANNOT_DUMP build,
16838 loaddefs.el is read at startup and must always be in a usable state.
16839
16840 * lisp/Makefile.in ($(lisp)/loaddefs.el): Write generated output to
16841 loaddefs.el.new and then rename it to loaddefs.el.
16842
168432017-04-09 Glenn Morris <rgm@gnu.org>
16844
16845 In the manual, mention pops and imaps
16846
16847 * doc/emacs/rmail.texi (Movemail, Remote Mailboxes):
16848 Mention pops and imaps protocols.
16849
168502017-04-09 Glenn Morris <rgm@gnu.org>
16851
16852 * doc/emacs/rmail.texi: Prefer @command to @code for movemail.
16853
168542017-04-09 Sergey Poznyakoff <gray@gnu.org>
16855
16856 Fix rmail handling of movemail protocols (bug#18278)
16857
16858 * lisp/mail/rmail.el (rmail-remote-proto-p): New function.
16859 (rmail-parse-url): Return protocol in second list element.
16860 Only use passwords with remote mailboxes.
16861 (rmail-insert-inbox-text): Handle non-simple local
16862 mailboxes (maildir, MH, etc.).
16863
168642017-04-09 Glenn Morris <rgm@gnu.org>
16865
16866 Fix typos in manual re movemail local mailboxes
16867
16868 * doc/emacs/rmail.texi (Movemail, Other Mailbox Formats):
16869 Fix examples of local mailbox urls.
16870
168712017-04-08 Glenn Morris <rgm@gnu.org>
16872
16873 * lisp/gnus/nnmail.el (nnmail-crosspost-link-function): Simplify.
16874
168752017-04-08 Glenn Morris <rgm@gnu.org>
16876
16877 Remove references to OS/2 in code, doc, and comments
16878
16879 * lisp/gnus/nnheader.el (nnheader-read-timeout)
16880 (nnheader-file-name-translation-alist): Remove OS/2 case, and simplify.
16881 * lisp/emulation/viper-util.el (viper-color-defined-p):
16882 * lisp/net/pop3.el (pop3-read-timeout):
16883 * lisp/net/imap.el (imap-read-timeout):
16884 * lisp/url/url-privacy.el (url-setup-privacy-info): Remove OS/2 case.
16885 * lisp/emulation/viper-ex.el (viper-glob-function):
16886 * lisp/vc/ediff-util.el (ediff-submit-report): Doc fix.
16887 * lisp/cus-edit.el (custom-display): Remove "pm" (OS/2).
16888 * doc/emacs/msdos-xtra.texi (MS-DOS):
16889 * doc/misc/gnus.texi (Various Various):
16890 * doc/misc/viper.texi (Rudimentary Changes): Remove mentions of OS/2.
16891
168922017-04-08 Michael Albinus <michael.albinus@gmx.de>
16893
16894 Tune Tramp syntax
16895
16896 * lisp/net/tramp-cmds.el (tramp-change-syntax):
16897 Use `tramp-syntax-values'.
16898
16899 * lisp/net/tramp-compat.el (tramp-compat-tramp-syntax): New defsubst.
16900
16901 * lisp/net/tramp.el (tramp-syntax): Rename possible values.
16902 (tramp-syntax-values): New defun.
16903 (tramp-prefix-format, tramp-method-regexp)
16904 (tramp-postfix-method-format, tramp-prefix-ipv6-format)
16905 (tramp-postfix-ipv6-format, tramp-postfix-host-format)
16906 (tramp-completion-file-name-regexp): Use `tramp-compat-tramp-syntax'
16907 and changed values.
16908 (tramp-completion-file-name-regexp-default): Rename from
16909 `tramp-completion-file-name-regexp-unified'. Adapt docstring.
16910 (tramp-completion-file-name-regexp-simplified): Rename from
16911 `tramp-completion-file-name-regexp-old-style'. Adapt docstring.
16912 (tramp-initial-completion-file-name-regexp):
16913 Use `tramp-completion-file-name-regexp-default'.
16914 (tramp-run-real-handler): Do not autoload any longer.
16915
169162017-04-08 Mark Oteiza <mvoteiza@udel.edu>
16917
16918 Replace more nested ifs with cond
16919
16920 This is a continuation of d526047 "Replace more nested ifs with cond".
16921 * lisp/play/dunnet.el (dun-firstword, dun-firstwordl, dun-cat): Use
16922 when and cond where appropriate.
16923
169242017-04-08 Mark Oteiza <mvoteiza@udel.edu>
16925
16926 Adjust the edebug spec of if-let*
16927
16928 This was fixed in Bug#24748, but now looking more closely, using gate in
16929 the spec seems correct. See (info "(elisp) Backtracking").
16930 * lisp/emacs-lisp/subr-x.el (if-let*): Use gate in edebug spec.
16931
169322017-04-08 Mark Oteiza <mvoteiza@udel.edu>
16933
16934 Replace some uses of cl-member-if with apply
16935
16936 From the mhtml-mode series. Some of the uses of cl-lib are not
16937 necessary.
16938 * lisp/align.el: Don't require cl-lib.
16939 (align-region): Use apply instead of cl-member-if.
16940 * lisp/emulation/viper.el: Don't require cl-lib.
16941 (viper-mode, this-major-mode-requires-vi-state): Use apply instead of
16942 cl-member-if.
16943
169442017-04-08 Philipp Stephani <phst@google.com>
16945
16946 Validate SPEC of `dolist', cf. Bug#25477.
16947
16948 * lisp/subr.el (dolist): Test type and length of SPEC.
16949 * test/lisp/subr-tests.el (subr-tests--dolist--wrong-number-of-args):
16950 Add unit test.
16951
169522017-04-08 Philipp Stephani <phst@google.com>
16953
16954 Add unit test for Bug#26378
16955
16956 * test/lisp/vc/ediff-diff-tests.el
16957 (ediff-diff-tests--ediff-exec-process--nil): New unit test.
16958
169592017-04-08 Lars Brinkhoff <lars@nocrew.org>
16960
16961 Fix circular read syntax for records.
16962
16963 * lread.c (substitute_object_recurse): Work with records.
16964
16965 * lread-tests.el (lread-record-1): New test.
16966
169672017-04-08 Paul Eggert <eggert@cs.ucla.edu>
16968
16969 Deprecate copy-record in favor of copy-sequence
16970
16971 Since copy-sequence seems to be needed anyway for records, have it
16972 work on records, and remove copy-record as being superfluous.
16973 * doc/lispref/records.texi (Records, Record Functions):
16974 * lisp/emacs-lisp/cl-macs.el (cl-defstruct):
16975 * lisp/emacs-lisp/eieio.el (make-instance, clone):
16976 * test/src/alloc-tests.el (record-3):
16977 Use copy-sequence, not copy-record, to copy records.
16978 * doc/lispref/sequences.texi (Sequence Functions)
16979 (Array Functions): Document that aref and copy-sequence
16980 work on records.
16981 * etc/NEWS: Omit copy-record.
16982 * src/alloc.c (Fcopy_record): Remove.
16983 * src/data.c (Faref): Document that arg can be a record.
16984 * src/fns.c (Fcopy_sequence): Copy records, too.
16985
169862017-04-08 Paul Eggert <eggert@cs.ucla.edu>
16987
16988 Fix dependency checking in src/Makefile.in
16989
16990 * src/Makefile.in (AUTO_DEPEND, DEPDIR, DEPFLAGS): Move includes of
16991 dependency files until after ALLOBJS is defined, since it uses ALLOBJS.
16992 Otherwise, some dependencies will be missed.
16993
169942017-04-08 Paul Eggert <eggert@cs.ucla.edu>
16995
16996 Minor tuneup of write-region change
16997
16998 * src/fileio.c (write_region): Use SCHARS, not Flength,
16999 on a value known to be a string.
17000
170012017-04-08 Noam Postavsky <npostavs@gmail.com>
17002
17003 Adjust write-region so file name is at the beginning again
17004
17005 * lisp/epa-file.el (epa-file-write-region):
17006 * lisp/gnus/mm-util.el (mm-append-to-file):
17007 * lisp/jka-compr.el (jka-compr-write-region):
17008 * lisp/net/ange-ftp.el (ange-ftp-write-region):
17009 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
17010 * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
17011 * src/fileio.c (write_region): Put file name at the beginning and move
17012 number of characters to the end of the message.
17013
170142017-04-08 Kaushal Modi <kaushal.modi@gmail.com>
17015
17016 Check that file argument is a string
17017
17018 * lisp/vc/ediff-diff.el (ediff-exec-process): Check that the argument
17019 passed to `file-local-copy' is a string (Bug#26378). Also fix
17020 the existing comment for this function, and convert it to its
17021 doc-string.
17022
170232017-04-08 Noam Postavsky <npostavs@gmail.com>
17024
17025 Fix handling of non-integer START param to write-region
17026
17027 The previous patch for Bug#354 incorrectly assumed that START would
17028 always be an integer.
17029
17030 * lisp/epa-file.el (epa-file-write-region):
17031 * lisp/jka-compr.el (jka-compr-write-region):
17032 * lisp/net/ange-ftp.el (ange-ftp-write-region):
17033 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
17034 * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
17035 * src/fileio.c (write_region): Handle nil and string values of START.
17036
170372017-04-07 Glenn Morris <rgm@gnu.org>
17038
17039 * lisp/textmodes/rst.el (rst-package-emacs-version-alist): Fixes.
17040
170412017-04-07 Michael Albinus <michael.albinus@gmx.de>
17042
17043 Add Tramp versions to `customize-package-emacs-version-alist'
17044
17045 * lisp/net/trampver.el (customize-package-emacs-version-alist):
17046 Add Tramp versions to `customize-package-emacs-version-alist'.
17047
170482017-04-07 Tom Tromey <tom@tromey.com>
17049
17050 * lisp/textmodes/rst.el (rst-toc-link-keymap): Move before first use.
17051
170522017-04-07 Lars Brinkhoff <lars@nocrew.org>
17053
17054 * records.texi (Record Functions): fix typo.
17055
170562017-04-07 Paul Eggert <eggert@cs.ucla.edu>
17057
17058 More casefiddle minor fixes
17059
17060 * src/casefiddle.c (case_character_impl): Omit unnecessary casts.
17061 (case_character_impl): Avoid reevaluation of CHAR_TABLE_REF.
17062 (GREEK_CAPITAL_LETTER_SIGMA): Fix typo in my previous change.
17063
170642017-04-07 Jeff Clough <kb1vqh@gmail.com>
17065
17066 Output number of characters added to file (Bug#354)
17067
17068 * fileio.c (write_region):
17069 * epa-file.el (epa-file-write-region):
17070 * jka-compr.el (jka-compr-write-region):
17071 * ange-ftp.el (ange-ftp-write-region):
17072 * tramp-gvfs.el (tramp-gvfs-handle-write-region):
17073 * tramp-sh.el (tramp-sh-handle-write-region):
17074 * mm-util.el (mm-append-to-file): Functions now output
17075 characters written in addition to file name.
17076 * files.texi: Added documentation to write-region and
17077 append-to-file describing their output.
17078
170792017-04-07 Noam Postavsky <npostavs@users.sourceforge.net>
17080
17081 Fix ‘!NILP (Vpurify_flag)’ assertion failure during temacs bootstrap
17082
17083 The recent changes to src/casefiddle.c cause build failure as seen
17084 below:
17085
17086 Starting program: /home/npostavs/src/emacs/emacs-bootstrapping/src/temacs
17087 --batch --load loadup bootstrap
17088 [Thread debugging using libthread_db enabled]
17089 Using host libthread_db library "/usr/lib/libthread_db.so.1".
17090 Loading loadup.el (source)...
17091 Using load-path (/home/npostavs/src/emacs/emacs-bootstrapping/lisp
17092 /home/npostavs/src/emacs/emacs-bootstrapping/lisp/emacs-lisp
17093 /home/npostavs/src/emacs/emacs-bootstrapping/lisp/language
17094 /home/npostavs/src/emacs/emacs-bootstrapping/lisp/international
17095 /home/npostavs/src/emacs/emacs-bootstrapping/lisp/textmodes
17096 /home/npostavs/src/emacs/emacs-bootstrapping/lisp/vc)
17097 Loading emacs-lisp/byte-run (source)...
17098 Loading emacs-lisp/backquote (source)...
17099 Loading subr (source)...
17100 Loading version (source)...
17101 Loading widget (source)...
17102 Loading custom (source)...
17103 Loading emacs-lisp/map-ynp (source)...
17104 Loading international/mule (source)...
17105 Loading international/mule-conf (source)...
17106
17107 lread.c:3914: Emacs fatal error: assertion failed: !NILP (Vpurify_flag)
17108
17109 Breakpoint 1, terminate_due_to_signal at emacs.c:363
17110 363 signal (sig, SIG_DFL);
17111 (gdb) bt
17112 #0 0x0000000000579826 in terminate_due_to_signal at emacs.c:363
17113 #1 0x000000000060ec33 in die at alloc.c:7352
17114 #2 0x000000000066db40 in intern_c_string_1 at lread.c:3914
17115 #3 0x0000000000576884 in intern_c_string at lisp.h:3790
17116 #4 0x00000000005dc84f in prepare_casing_context at casefiddle.c:69
17117 #5 0x00000000005dd37f in casify_object at casefiddle.c:311
17118 #6 0x00000000005dd47f in Fcapitalize at casefiddle.c:356
17119 #7 0x00000000006325ac in eval_sub at eval.c:2219
17120 #8 0x0000000000632368 in eval_sub at eval.c:2184
17121 #9 0x000000000063446c in apply_lambda at eval.c:2875
17122 #10 0x00000000006329af in eval_sub at eval.c:2294
17123 #11 0x000000000062d462 in Fprogn at eval.c:449
17124 #12 0x000000000062d4cf in prog_ignore at eval.c:461
17125 #13 0x000000000062f19c in Fwhile at eval.c:982
17126 #14 0x00000000006321f4 in eval_sub at eval.c:2172
17127 #15 0x000000000062d462 in Fprogn at eval.c:449
17128 #16 0x000000000062f0c4 in Flet at eval.c:963
17129 #17 0x00000000006321f4 in eval_sub at eval.c:2172
17130 #18 0x0000000000632963 in eval_sub at eval.c:2290
17131 #19 0x000000000062d462 in Fprogn at eval.c:449
17132 #20 0x000000000062f0c4 in Flet at eval.c:963
17133 #21 0x00000000006321f4 in eval_sub at eval.c:2172
17134 #22 0x0000000000668caa in readevalloop at lread.c:1927
17135 #23 0x0000000000667253 in Fload at lread.c:1332
17136 #24 0x0000000000632683 in eval_sub at eval.c:2233
17137 #25 0x0000000000668caa in readevalloop at lread.c:1927
17138 #26 0x0000000000667253 in Fload at lread.c:1332
17139 #27 0x0000000000632683 in eval_sub at eval.c:2233
17140 #28 0x0000000000631be5 in Feval at eval.c:2041
17141 #29 0x000000000057e1af in top_level_2 at keyboard.c:1121
17142 #30 0x000000000062ffc7 in internal_condition_case at eval.c:1324
17143 #31 0x000000000057e1f0 in top_level_1 at keyboard.c:1129
17144 #32 0x000000000062f51e in internal_catch at eval.c:1091
17145 #33 0x000000000057e0ea in command_loop at keyboard.c:1090
17146 #34 0x000000000057d6d5 in recursive_edit_1 at keyboard.c:697
17147 #35 0x000000000057d8b4 in Frecursive_edit at keyboard.c:768
17148 #36 0x000000000057b55b in main at emacs.c:1687
17149
17150 Lisp Backtrace:
17151 "capitalize" (0xffffcf70)
17152 "format" (0xffffd130)
17153 "define-charset" (0xffffd370)
17154 "while" (0xffffd560)
17155 "let" (0xffffd7c0)
17156 "dolist" (0xffffd910)
17157 "let" (0xffffdb70)
17158 "load" (0xffffdfe0)
17159 "load" (0xffffe4a0)
17160
17161 * src/casefiddle.c (syms_of_casefiddle): Declare four new symbols:
17162 Qtitlecase, Qspecial_uppercase, Qspecial_lowercase and
17163 Qspecial_titlecase.
17164 (prepare_casing_context): Use aforementioned symbols.
17165
171662017-04-07 Paul Eggert <eggert@cs.ucla.edu>
17167
17168 Merge from gnulib
17169
17170 This merges some getopt fixes from Zack Weinberg, and affects only
17171 non-GNUish platforms. It incorporates:
17172 2017-04-06 getopt-gnu: omit some duplicate code
17173 2017-04-06 getopt-posix: use angle-bracket include
17174 2017-04-06 getopt: annotate files with relationship to glibc
17175 2017-04-06 getopt: split up getopt.in.h and eliminate __need_getopt
17176 2017-04-06 getopt: better handling of ambiguous options
17177 2017-04-06 getopt: refactor long-option handling
17178 2017-04-06 getopt: tidy up _getopt_initialize a bit
17179 2017-04-06 getopt: merge from glibc: repetition reduction
17180 2017-04-06 getopt: clean up error reporting
17181 2017-04-06 getopt: fix fencepost error in ambiguous-W-option handling
17182 2017-04-06 getopt: clean up getopt.c and getopt1.c file headers
17183 2017-04-06 getopt: harmonize comments with glibc
17184 2017-04-06 getopt: remove USE_NONOPTION_FLAGS
17185 2017-04-06 getopt: tabify, in preparation for merge with glibc
17186 2017-04-06 md5, sha1, sha256, sha512: Add comments re correctness
17187 * build-aux/config.sub, doc/misc/texinfo.tex, lib/getopt.c:
17188 * lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h, lib/md5.c:
17189 * lib/md5.h, lib/sha1.c, lib/sha1.h, lib/sha256.c, lib/sha256.h:
17190 * lib/sha512.c, lib/sha512.h, lib/unistd.in.h, m4/getopt.m4:
17191 Copy from gnulib.
17192 * lib/getopt_cdefs.in.h, lib/getopt_core.h, lib/getopt_ext.h:
17193 * lib/getopt_pfx_core.h, lib/getopt_pfx_ext.h:
17194 New files, taken from gnulib.
17195 * lib/gnulib.mk.in, m4/gnulib-comp.m4:
17196 Regenerate.
17197
171982017-04-07 Hong Xu <hong@topbug.net>
17199
17200 * search.c (Fre_search_forward, Fre_search_backward): Improve doc (Bug#25193).
17201
172022017-04-07 Noam Postavsky <npostavs@gmail.com>
17203
17204 Mention that processes start in default-directory (Bug#18515)
17205
17206 * doc/lispref/processes.texi (Synchronous Processes):
17207 (Asynchronous Processes):
17208 * lisp/subr.el (start-process):
17209 * src/callproc.c (call-process): Mention that the subprocess starts in
17210 `default-directory' when local, suggest `start-file-process' and
17211 `process-file' otherwise.
17212
172132017-04-07 Noam Postavsky <npostavs@gmail.com>
17214
17215 * src/xdisp.c (vmessage, message): Clarify commentary.
17216
172172017-04-07 Paul Eggert <eggert@cs.ucla.edu>
17218
17219 Minor casefiddle.c cleanups
17220
17221 * src/casefiddle.c: Redo recent changes to match GNU style,
17222 and prefer C99-style decls within blocks.
17223 (GREEK_CAPITAL_LETTER_SIGMA): Rename from CAPITAL_SIGMA, so that
17224 we are merely using the Unicode name, and make it a constant
17225 rather than a macro. All uses changed.
17226 (SMALL_SIGMA): Remove; unused.
17227 (GREEK_SMALL_LETTER_FINAL_SIGMA): Rename from SMALL_FINAL_SIGMA,
17228 and make it a constant rather than a macro. All uses changed.
17229 (do_casify_multibyte_string): Use ‘verify’ rather than an
17230 unportable static_assertion local.
17231
172322017-04-07 Paul Eggert <eggert@cs.ucla.edu>
17233
17234 * lisp/international/README: Update to match current list.
17235
172362017-04-06 Paul Eggert <eggert@cs.ucla.edu>
17237
17238 Fix 'make clean' in lib subdirectory
17239
17240 * lib/Makefile.in (clean): Remove *-t files.
17241 (mostlyclean): Remove MOSTLYCLEANFILES that are not *-t files.
17242 This removes files like lib/getopt.h that should be removed
17243 even if this configuration did not need to build them.
17244 (maintainer-clean): Remove TAGS here, not in distclean,
17245 to be consistent with ../src/Makefile.in.
17246
172472017-04-06 Michael Albinus <michael.albinus@gmx.de>
17248
17249 Add new Tramp syntax
17250
17251 * lisp/net/tramp-cmds.el (tramp-change-syntax): New defun.
17252
17253 * lisp/net/tramp.el (tramp-syntax): Change default to `def'.
17254 Add :set function.
17255 (tramp-prefix-port-format): Simplify.
17256 (tramp-file-name-regexp-separate): Remove.
17257 (tramp-initial-file-name-regexp)
17258 (tramp-completion-file-name-regexp-old-style)
17259 (tramp-initial-completion-file-name-regexp): New defconst.
17260 (tramp-prefix-format, tramp-prefix-regexp)
17261 (tramp-method-regexp, tramp-postfix-method-format)
17262 (tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
17263 (tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
17264 (tramp-postfix-ipv6-regexp)
17265 (tramp-postfix-host-format, tramp-postfix-host-regexp)
17266 (tramp-remote-file-name-spec-regexp)
17267 (tramp-file-name-structure, tramp-file-name-regexp)
17268 (tramp-completion-file-name-regexp)
17269 (tramp-rfn-eshadow-update-overlay-regexp): Change them to be defuns.
17270 (tramp-tramp-file-p, tramp-find-method)
17271 (tramp-dissect-file-name, tramp-make-tramp-file-name)
17272 (tramp-completion-make-tramp-file-name)
17273 (tramp-rfn-eshadow-update-overlay)
17274 (tramp-register-autoload-file-name-handlers)
17275 (tramp-register-file-name-handlers)
17276 (tramp-unload-file-name-handlers)
17277 (tramp-completion-handle-file-name-all-completions)
17278 (tramp-completion-dissect-file-name, tramp-clear-passwd):
17279 * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
17280 * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
17281 (tramp-compute-multi-hops): Use them.
17282
172832017-04-06 Michal Nazarewicz <mina86@mina86.com>
17284
17285 Implement special sigma casing rule (bug#24603)
17286
17287 In Greek, a sigma character has two lower case forms which depend on
17288 their position in the word. Implement logic determining it.
17289
17290 * src/casefiddle.c (struct casing_context, case_character_impl): Don’t
17291 assume inword is true when flag is CASE_UP and false when flag is
17292 CASE_DOWN. For final sigma detection we need this information tracked
17293 reliably;.
17294 (CAPITAL_SIGMA, SMALL_SIGMA, SMALL_FINAL_SIGMA): New macros defining
17295 Unicode code point of different forms of sigma letter.
17296 (case_character): Implement support for final sigma casing.
17297 (do_casify_multibyte_string, do_casify_multibyte_region): Update after
17298 changes to case_character.
17299
17300 * test/src/casefiddle-tests.el (casefiddle-tests-casing): Add test
17301 cases for final sigma.
17302
173032017-04-06 Michal Nazarewicz <mina86@mina86.com>
17304
17305 Support casing characters which map into multiple code points (bug#24603)
17306
17307 Implement unconditional special casing rules defined in Unicode standard.
17308
17309 Among other things, they deal with cases when a single code point is
17310 replaced by multiple ones because single character does not exist (e.g.
17311 ‘fi’ ligature turning into ‘FL’) or is not commonly used (e.g. ß turning
17312 into SS).
17313
17314 * admin/unidata/SpecialCasing.txt: New data file pulled from Unicode
17315 standard distribution.
17316 * admin/unidata/README: Mention SpecialCasing.txt.
17317
17318 * admin/unidata/unidata-get.el (unidata-gen-table-special-casing,
17319 unidata-gen-table-special-casing--do-load): New functions generating
17320 ‘special-uppercase’, ‘special-lowercase’ and ‘special-titlecase’
17321 character Unicode properties built from the SpecialCasing.txt Unicode
17322 data file.
17323
17324 * src/casefiddle.c (struct casing_str_buf): New structure for
17325 representing short strings used to handle one-to-many character
17326 mappings.
17327
17328 (case_character_imlp): New function which can handle one-to-many
17329 character mappings.
17330 (case_character, case_single_character): Wrappers for the above
17331 functions. The former may map one character to multiple (or no)
17332 code points while the latter does what the former used to do (i.e.
17333 handles one-to-one mappings only).
17334
17335 (do_casify_natnum, do_casify_unibyte_string,
17336 do_casify_unibyte_region): Use case_single_character.
17337 (do_casify_multibyte_string, do_casify_multibyte_region): Support new
17338 features of case_character.
17339 * (do_casify_region): Updated to reflact do_casify_multibyte_string
17340 changes.
17341
17342 (casify_word): Handle situation when one character-length of a word
17343 can change affecting where end of the word is.
17344
17345 (upcase, capitalize, upcase-initials): Update documentation to mention
17346 limitations when working on characters.
17347
17348 * test/src/casefiddle-tests.el (casefiddle-tests-char-properties):
17349 Add test cases for the newly introduced character properties.
17350 (casefiddle-tests-casing): Update test cases which are now passing.
17351
17352 * test/lisp/char-fold-tests.el (char-fold--ascii-upcase,
17353 char-fold--ascii-downcase): New functions which behave like old ‘upcase’
17354 and ‘downcase’.
17355 (char-fold--test-match-exactly): Use the new functions. This is needed
17356 because otherwise fi and similar characters are turned into their multi-
17357 -character representation.
17358
17359 * doc/lispref/strings.texi: Describe issue with casing characters versus
17360 strings.
17361 * doc/lispref/nonascii.texi: Describe the new character properties.
17362
173632017-04-06 Michal Nazarewicz <mina86@mina86.com>
17364
17365 Split up casify_region function (bug#24603)
17366
17367 No functional changes at this time but splitting casify_region into
17368 a function dealing with multibyte and another dealing with unibyte
17369 buffers will make future code changes slightly easier.
17370
17371 * src/casefiddle.c (casify_region): Move most of the code into two
17372 new functions:
17373 (do_casify_multibyte_region, do_casify_unibyte_region): new functions.
17374
173752017-04-06 Michal Nazarewicz <mina86@mina86.com>
17376
17377 Add support for title-casing letters (bug#24603)
17378
17379 * src/casefiddle.c (struct casing_context, prepare_casing_context): Add
17380 titlecase_char_table member. It’s set to the ‘titlecase’ Unicode
17381 property table if capitalisation has been requested.
17382 (case_character): Make use of the titlecase_char_table to title-case
17383 initial characters when capitalising.
17384
17385 * test/src/casefiddle-tests.el (casefiddle-tests--characters,
17386 casefiddle-tests-casing): Update test cases which are now passing.
17387
173882017-04-06 Michal Nazarewicz <mina86@mina86.com>
17389
17390 Introduce case_character function
17391
17392 Move single-character casing logic into a separate function so that
17393 it is collected in a single place. This will make future changes to
17394 the logic easier. This commit introduces no functionality changes.
17395
17396 * src/casefiddle.c (struct casing_context, prepare_casing_context): New
17397 sturcture for saving casing context and function to initialise it.
17398 (case_character): New function which cases character base on provided
17399 context.
17400 (do_casify_integer, do_casify_multibyte_string,
17401 do_casify_unibyte_string, casify_object, casify_region): Convert to
17402 use casing_context and case_character.
17403
174042017-04-06 Michal Nazarewicz <mina86@mina86.com>
17405
17406 Split casify_object into multiple functions
17407
17408 casify_object had three major cases to cover and those were mostly
17409 independent of each other. Move those branches to separate function
17410 so it’s easier to comprehend each individual case.
17411
17412 While at it, use somewhat more descriptive ch and cased variable names
17413 rather than c and c1.
17414
17415 This commit introduces no functional changes.
17416
17417 * src/casefiddle.c (casify_object): Split into…
17418 (do_casify_integer, do_casify_multibyte_string,
17419 do_casify_unibyte_string): …new functions.
17420
174212017-04-06 Lars Brinkhoff <lars@nocrew.org>
17422
17423 Update documentation for type semantics of records.
17424
17425 * objects.texi (Record Type): improve description of what
17426 `type-of' returns for records.
17427 (Type Descriptors): new section.
17428 * elisp.texi: reference it.
17429 * records.texi (Records): reference it. Document behaviour when type
17430 slot is a record.
17431
17432 * alloc.c (Fmake_record, Frecord): mention type desciptors.
17433
174342017-04-06 Stefan Monnier <monnier@iro.umontreal.ca>
17435
17436 * lisp/help-fns.el (describe-symbol): `nil' is not an interesting default.
17437
174382017-04-06 Tom Tromey <tom@tromey.com>
17439
17440 require cl-lib to fix fallout from mhtml series
17441
17442 * lisp/align.el, lisp/calc/calc-embed.el, lisp/cedet/semantic.el,
17443 lisp/emulation/viper.el: Require cl-lib.
17444
174452017-04-06 Ken Raeburn <raeburn@raeburn.org>
17446
17447 In CANNOT_DUMP builds, allow editing of files named "dump".
17448
17449 * lisp/loadup.el: Perform the "dump" or "bootstrap" actions like
17450 calling dump-emacs only if dump-emacs is defined; otherwise, don't
17451 treat those command-line argument specially.
17452
174532017-04-06 Ken Raeburn <raeburn@raeburn.org>
17454
17455 In CANNOT_DUMP builds, don't prepare for unexec.
17456
17457 Having a command-line argument of "dump" or "bootstrap" would trigger
17458 behavior like not installing signal handlers. In CANNOT_DUMP modes,
17459 we should get signal handlers installed regardless of whatever funny
17460 file names we decide to edit.
17461
17462 src/emacs.c (main) [CANNOT_DUMP]: Don't enable the "dumping"
17463 alterations to initialization that prepares the process for unexec.
17464
174652017-04-06 Ken Raeburn <raeburn@raeburn.org>
17466
17467 Allow a CANNOT_DUMP build to use exec-path during bootstrap.
17468
17469 During a bootstrap, loading rmail.el invokes movemail to determine its
17470 flavor, but call-process doesn't work if exec-path is nil.
17471
17472 * lisp/loadup.el: Only clear exec-path if dumping.
17473
174742017-04-06 Ken Raeburn <raeburn@raeburn.org>
17475
17476 Fix CANNOT_DUMP build on Darwin/macOS.
17477
17478 * src/conf_post.h (malloc, realloc, free) [DARWIN_OS && emacs &&
17479 CANNOT_DUMP]: Don't define as unexec_malloc, etc.
17480 * src/emacs.c (main): Don't call unexec_init_emacs_zone.
17481
174822017-04-05 Tom Tromey <tom@tromey.com>
17483
17484 add two more mhtml tests
17485
17486 * test/manual/indent/html-multi-2.html: New file.
17487 * test/manual/indent/html-multi-3.html: New file.
17488
174892017-04-05 Tom Tromey <tom@tromey.com>
17490
17491 enable mhtml-mode by default
17492
17493 * lisp/files.el (auto-mode-alist): Reference mhtml-mode, not
17494 html-mode.
17495 (magic-fallback-mode-alist): Likewise.
17496 * lisp/net/eww.el (eww-view-source): Use mthml-mode.
17497
174982017-04-05 Tom Tromey <tom@tromey.com>
17499
17500 add mhtml-mode.el
17501
17502 * etc/NEWS: Update.
17503 * lisp/textmodes/mhtml-mode.el: New file.
17504 * test/manual/indent/html-multi.html: New file.
17505 * test/lisp/textmodes/mhtml-mode-tests.el: New file.
17506 * doc/emacs/text.texi (HTML Mode): Mention mhtml-mode.
17507
175082017-04-05 Tom Tromey <tom@tromey.com>
17509
17510 change sgml-mode to help multi-html mode
17511
17512 * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): New
17513 defconst.
17514 (sgml-syntax-propertize): Use it.
17515 (sgml--find-<>-backward): New function.
17516 (sgml-parse-tag-backward): Use it.
17517
175182017-04-05 Tom Tromey <tom@tromey.com>
17519
17520 make js.el respect prog-first-column
17521
17522 * lisp/progmodes/js.el (js--proper-indentation): Call prog-first-column.
17523
175242017-04-05 Tom Tromey <tom@tromey.com>
17525
17526 make smie.el respect prog-first-column
17527
17528 * lisp/emacs-lisp/smie.el (smie-indent-bob): Call prog-first-column.
17529
175302017-04-05 Tom Tromey <tom@tromey.com>
17531
17532 change viper to use derived-mode-p
17533
17534 * lisp/subr.el (provided-mode-derived-p): New function.
17535 (derived-mode-p): Use it.
17536 * lisp/emulation/viper.el (viper-mode): Use derived-mode-p.
17537 (this-major-mode-requires-vi-state): Use provided-mode-derived-p.
17538 (set-viper-state-in-major-mode): Use derived-mode-p.
17539
175402017-04-05 Tom Tromey <tom@tromey.com>
17541
17542 change align to use derived-mode-p
17543
17544 * lisp/align.el (align-region): Use derived-mode-p.
17545
175462017-04-05 Tom Tromey <tom@tromey.com>
17547
17548 change org to use derived-mode-p
17549
17550 * lisp/org/org-list.el (org-list-insert-radio-list): Use
17551 derived-mode-p.
17552 * lisp/org/org-table.el (orgtbl-setup, orgtbl-toggle-comment): Use
17553 derived-mode-p.
17554
175552017-04-05 Tom Tromey <tom@tromey.com>
17556
17557 change semantic to use derived-mode-p
17558
17559 * lisp/cedet/semantic.el (semantic-new-buffer-fcn): Use derived-mode-p.
17560
175612017-04-05 Tom Tromey <tom@tromey.com>
17562
17563 change calc to use derived-mode-p
17564
17565 * lisp/calc/calc-embed.el (calc-embedded-find-modes)
17566 (calc-embedded-make-info): Use derived-mode-p.
17567
175682017-04-05 Tom Tromey <tom@tromey.com>
17569
17570 change auto-insert to use derived-mode-p
17571
17572 * lisp/autoinsert.el (auto-insert): Use derived-mode-p.
17573
175742017-04-05 Paul Eggert <eggert@cs.ucla.edu>
17575
17576 * lisp/info.el (Info-search): Fix typo in April 1 change.
17577
175782017-04-05 Paul Eggert <eggert@cs.ucla.edu>
17579
17580 Minor cleanups related to type-of
17581
17582 * src/data.c (Frecordp): Rename from Frecordp_p, for consistency.
17583 * src/data.c (syms_of_data):
17584 * src/frame.c (syms_of_frame): Put all the primitive type names
17585 together, under the "Types that type-of returns" comment.
17586
175872017-04-05 Glenn Morris <rgm@gnu.org>
17588
17589 * doc/lispref/package.texi (Package Archives): Mention https.
17590
175912017-04-05 Glenn Morris <rgm@gnu.org>
17592
17593 Advertise https for homepage of gnu.org packages
17594
17595 * lisp/emacs-lisp/package.el (describe-package-1):
17596 Use https, if supported, for the homepage of packages on gnu.org.
17597
175982017-04-05 Glenn Morris <rgm@gnu.org>
17599
17600 Default to https for elpa.gnu.org if gnutls available
17601
17602 * lisp/emacs-lisp/package.el (package-archives):
17603 Default to https for elpa.gnu.org if gnutls is available. Ref:
17604 http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00130.html
17605
176062017-04-04 Paul Eggert <eggert@cs.ucla.edu>
17607
17608 Minor simplifications and doc for records
17609
17610 * doc/lispref/records.texi (Records): Mention size limit.
17611 * etc/NEWS: Mention records.
17612 * src/alloc.c (allocate_pseudovector, allocate_record):
17613 Prefer 'PSEUDOVECTOR_SIZE_MASK' to its definiens.
17614 (allocate_record): Check arg range here, not in callers, as this
17615 simplifies the code. Use allocate_vectorlike instead of
17616 allocate_vector, to avoid duplicate runtime tests.
17617 (Fmake_record, record): Don't mention PSEUDOVECTOR_SIZE_BITS in
17618 the doc string, as it is not visible to the user.
17619 (Fmake_record, record, Fcopy_record):
17620 Prefer make_lisp_ptr to XSETVECTOR.
17621 (record): Broaden memcpy to copy the type, too.
17622
176232017-04-04 Eli Zaretskii <eliz@gnu.org>
17624
17625 Fix recent changes in record data type
17626
17627 * src/alloc.c (Fmake_record, Frecord, Fcopy_record): Avoid
17628 compiler warnings when 'ptrdiff_t' is narrower than 'long int'.
17629
176302017-04-04 Philipp Stephani <phst@google.com>
17631
17632 Make subprocess functions resolve the default directory
17633
17634 `call-process' doesn't respect file name handlers in
17635 `default-directory', so `file-name-non-special' has to resolve them
17636 for `process-file', `start-file-process', and
17637 `shell-command' (Bug#25949).
17638
17639 * lisp/files.el (file-name-non-special): Also resolve default
17640 directory for 'process-file', 'start-file-process', and
17641 'shell-command'.
17642 * test/lisp/files-tests.el
17643 (files-tests--file-name-non-special--subprocess): Add unit test.
17644
176452017-04-04 Philipp Stephani <phst@google.com>
17646
17647 Make ediff handle remote and quoted file names
17648
17649 Quoted file names need to be unquoted before passed to
17650 subprocesses (Bug#25950).
17651
17652 * lisp/vc/ediff-diff.el (ediff-exec-process): Handle remote and quoted
17653 file names.
17654 * test/lisp/vc/ediff-diff-tests.el
17655 (ediff-diff-tests--ediff-exec-process--quoted-file): Add unit test.
17656
176572017-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
17658
17659 Backward compatibility with pre-existing struct instances.
17660
17661 * lisp/emacs-lisp/cl-lib.el (cl--old-struct-type-of): New function.
17662 (cl-old-struct-compat-mode): New minor mode.
17663
17664 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Pass `record' to
17665 cl-struct-define to signal use of record objects.
17666
17667 * lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class,
17668 cl-struct-define): Enable legacy defstruct compatibility.
17669
17670 * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-old-struct,
17671 old-struct): New tests.
17672
17673 * doc/lispref/elisp.texi, doc/lispref/records.texi: Document
17674 `old-struct-compat'.
17675
176762017-04-04 Lars Brinkhoff <lars@nocrew.org>
17677
17678 Make the URL library use records.
17679
17680 * lisp/url/url.el, lisp/url/url-cache.el, lisp/url/url-dav.el,
17681 lisp/url/url-expand.el, lisp/url/url-file.el, lisp/url/url-imap.el,
17682 lisp/url/url-ldap.el: Use `url-p' instead of `vectorp'.
17683
17684 * lisp/url/url-http.el (url-http): Check for type `url' instead of
17685 `vector'.
17686
176872017-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
17688
17689 Make EIEIO use records.
17690
17691 * lisp/emacs-lisp/eieio-compat.el
17692 (eieio--generic-static-object-generalizer): Adjust to new tags.
17693
17694 * lisp/emacs-lisp/eieio-core.el: Use records, and place the class object
17695 directly as tag.
17696 (eieio--object-class): Adjust to new tag representation.
17697 (eieio-object-p): Rewrite, and adapt to new `type-of' behavior.
17698 (eieio-defclass-internal): Use `make-record'.
17699 (eieio--generic-generalizer): Adjust generalizer code accordingly.
17700
17701 * lisp/emacs-lisp/eieio.el (make-instance, clone): Use copy-record.
17702
17703 * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
17704 Add `recordp'.
17705
17706 * doc/lispref/records.texi, doc/misc/eieio.texi: Update for records.
17707
177082017-04-04 Lars Brinkhoff <lars@nocrew.org>
17709
17710 Make cl-defstruct use records.
17711
17712 * lisp/emacs-lisp/cl-extra.el (cl--describe-class)
17713 (cl--describe-class-slots): Use the new `type-of'.
17714
17715 * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Use type-of.
17716 (cl--generic-struct-specializers): Adjust to new tag.
17717
17718 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): When type is nil, use records.
17719 Use the type symbol as the tag. Use copy-record to copy structs.
17720 (cl--defstruct-predicate): New function.
17721 (cl--pcase-mutually-exclusive-p): Use it.
17722 (cl-struct-sequence-type): Can now return `record'.
17723
17724 * lisp/emacs-lisp/cl-preloaded.el (cl--make-slot-desc): Adjust ad-hoc
17725 code to new format.
17726 (cl--struct-register-child): Work with records.
17727 (cl-struct-define): Don't touch the tag's symbol-value and
17728 symbol-function slots when we use the type as tag.
17729
17730 * lisp/emacs-lisp/cl-print.el (cl-print-object): Adjust to new tag.
17731
17732 * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record):
17733 New test.
17734
17735 * doc/lispref/records.texi, doc/misc/cl.texi: Update for records.
17736
177372017-04-04 Lars Brinkhoff <lars@nocrew.org>
17738
17739 Add record objects with user-defined types.
17740
17741 * src/alloc.c (allocate_record): New function.
17742 (Fmake_record, Frecord, Fcopy_record): New functions.
17743 (syms_of_alloc): defsubr them.
17744 (purecopy): Work with records.
17745
17746 * src/data.c (Ftype_of): Return slot 0 for record objects, or type
17747 name if record's type holds class.
17748 (Frecordp): New function.
17749 (syms_of_data): defsubr it. Define `Qrecordp'.
17750 (Faref, Faset): Work with records.
17751
17752 * src/fns.c (Flength): Work with records.
17753
17754 * src/lisp.h (prec_type): Add PVEC_RECORD.
17755 (RECORDP, CHECK_RECORD, CHECK_RECORD_TYPE): New functions.
17756
17757 * src/lread.c (read1): Add syntax for records.
17758
17759 * src/print.c (PRINT_CIRCLE_CANDIDATE_P): Add RECORDP.
17760 (print_object): Add syntax for records.
17761
17762 * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-2):
17763 New test.
17764
17765 * test/src/alloc-tests.el (record-1, record-2, record-3):
17766 New tests.
17767
17768 * doc/lispref/elisp.texi, doc/lispref/objects.texi,
17769 doc/lispref/records.texi: Add documentation for records.
17770
177712017-04-04 Tino Calancha <tino.calancha@gmail.com>
17772
17773 Fix a test in python-test.el
17774
17775 Fix a test that breaks the test suite when it is run within a
17776 virtual environment.
17777 See following link for details:
17778 https://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00857.html
17779 * test/lisp/progmodes/python-tests.el
17780 (python-shell-calculate-process-environment-7): Bind
17781 python-shell-virtualenv-root to VIRTUAL_ENV when this var is set; otherwise
17782 bind it to '/env'.
17783
177842017-04-04 Noam Postavsky <npostavs@gmail.com>
17785
17786 Throw a `search-failed' derived error in Info search
17787
17788 The original fix for Bug#6106 switched from signalling `search-failed'
17789 to `user-error'. However, this breaks incremental searching over
17790 multiple nodes because the isearch code doesn't expect a `user-error'.
17791
17792 * src/search.c (syms_of_search): New error, `user-search-failed',
17793 with `user-error' and `search-failed' as parents.
17794 * doc/lispref/errors.texi (Standard Errors): Document it.
17795 * etc/NEWS: Announce it.
17796 * lisp/info.el (Info-search): Use it instead of `user-error' so that
17797 isearch will handle failed searches correctly.
17798
177992017-04-03 Michael Albinus <michael.albinus@gmx.de>
17800
17801 Add Tramp test
17802
17803 * doc/misc/tramp.texi (Remote processes): Fix typo.
17804
17805 * lisp/shell.el (shell): Fix typo.
17806
17807 * lisp/net/tramp.el (tramp-set-connection-local-variables): Simplify.
17808
17809 * test/lisp/net/tramp-tests.el (tramp-test30-explicit-shell-file-name):
17810 New test.
17811 (tramp--test-special-characters, tramp--test-utf8): Adapt docstring.
17812 (tramp-test31-vc-registered)
17813 (tramp-test32-make-auto-save-file-name)
17814 (tramp-test33-make-nearby-temp-file)
17815 (tramp-test34-special-characters)
17816 (tramp-test34-special-characters-with-stat)
17817 (tramp-test34-special-characters-with-perl)
17818 (tramp-test34-special-characters-with-ls, tramp-test35-utf8)
17819 (tramp-test35-utf8-with-stat, tramp-test35-utf8-with-perl)
17820 (tramp-test35-utf8-with-ls)
17821 (tramp-test36-asynchronous-requests)
17822 (tramp-test37-recursive-load, tramp-test38-unload): Rename.
17823
178242017-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
17825
17826 * lisp/ses.el: Silence byte-compiler warnings.
17827
17828 (ses-jump, ses-recalculate-cell, ses-define-local-printer): Silence
17829 byte-compiler warnings.
17830
178312017-04-02 Glenn Morris <rgm@gnu.org>
17832
17833 Belated fixes for admin.el's M-x make-manuals-dist
17834
17835 * admin/admin.el (make-manuals-dist-output-variables): Additions.
17836 (make-manuals-dist--1): Also copy docstyle.texi.
17837
178382017-04-02 Paul Eggert <eggert@cs.ucla.edu>
17839
17840 Fix bugs in simplified test dependencies
17841
17842 Problem reported by Glenn Morris in:
17843 http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00017.html
17844 * test/Makefile.in (LOGFILES, TESTS): Omit leading "./".
17845 (TESTS): Omit unnecessary patsubst.
17846 (test_template): Redo dependency heuristic, hopefully
17847 correctly this time. It's the .log file that depends,
17848 not the phony test target. Declare the phonies to be PHONY.
17849 Resurrect the exception for the *-tests subdirectory.
17850 Adjust to the fact that leading "./" is omitted now.
17851
178522017-04-02 Wilfred Hughes <me@wilfred.me.uk>
17853
17854 Fix typo in docstring
17855
17856 * lisp/help.el: Fix typo.
17857
178582017-04-02 Michael Albinus <michael.albinus@gmx.de>
17859
17860 Apply connecion-local variables for shells
17861
17862 * doc/misc/tramp.texi (Remote processes): Show use of connection-local
17863 variables. Don't mention Emacs 23 anymore.
17864 (Frequently Asked Questions): Precise Emacs and MS Windows version.
17865
17866 * lisp/files-x.el (connection-local-normalize-criteria):
17867 Suppress nil properties.
17868 (connection-local-set-profiles, with-connection-local-profiles):
17869 Adapt docstring.
17870
17871 * lisp/shell.el (shell): Apply connecion-local variables.
17872
178732017-04-01 Evgeni Kolev <evgenysw@gmail.com> (tiny change)
17874
17875 Propertize only perl prototype chars `][$%&*;+@\' as punctuation
17876
17877 This prevents variables in signatures such as `sub add ($a, $b)' from
17878 being treated as punctuation.
17879 * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
17880 Strictly match only prototype characters as punctuation. (Bug#26037)
17881
178822017-04-01 Tom Tromey <tom@tromey.com>
17883
17884 fix two js-mode syntax propertization bugs
17885
17886 Bug#26070:
17887 * lisp/progmodes/js.el (js--syntax-propertize-regexp-regexp): Add
17888 zero-or-one to regular expression.
17889 (js-syntax-propertize-regexp): Update. Propertize body of regexp
17890 literal up to END.
17891 * test/lisp/progmodes/js-tests.el (js-mode-propertize-bug-1)
17892 (js-mode-propertize-bug-2): New tests.
17893
178942017-04-01 Paul Eggert <eggert@cs.ucla.edu>
17895
17896 Simplify test dependency generation
17897
17898 Generate default dependencies by using GNU extensions to ‘make’
17899 rather than via a hacky auxiliary program and script.
17900 * .gitignore: Remove test/make-test-deps.mk.
17901 * test/Makefile.in (ELFILES, LOGFILES, TESTS):
17902 Use :=, not =, to avoid multiple redundant invocations of ‘find’.
17903 (test_template): Infer dependency directly instead of via
17904 make-test-deps.mk.
17905 (check-doit): Prepend ‘@’ to avoid excessively long ‘make’ output.
17906 (clean): No need to clean make-test-deps.mk.
17907 (make-test-deps.mk): Remove rule.
17908 * test/make-test-deps.emacs-lisp: Remove.
17909
179102017-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
17911
17912 * test/lisp/emacs-lisp/cl-lib-tests.el: Improve symbol-macrolet tests
17913
17914 (cl-lib-symbol-macrolet): Fix last test so it doesn't break the whole
17915 test suite.
17916 (cl-lib-symbol-macrolet-2): New test.
17917
179182017-04-01 Tino Calancha <tino.calancha@gmail.com>
17919
17920 Use only posix options in a ediff-ptch test
17921
17922 * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
17923 Use just "-b" patch option. Don't assume a particular suffix for
17924 the backup files.
17925
179262017-04-01 Jarno Malmari <jarno@malmari.fi>
17927
17928 Initial implementation of HTTP Digest qop for url
17929
17930 This also refactors digest authentication functions in url-auth.el.
17931
17932 * lisp/url/url-auth.el (url-digest-auth, url-digest-auth-create-key):
17933 (url-digest-auth-build-response, url-digest-auth-directory-id-assoc):
17934 (url-digest-auth-name-value-string, url-digest-auth-source-creds):
17935 (url-digest-cached-key, url-digest-cache-key, url-digest-find-creds):
17936 (url-digest-find-new-key, url-digest-prompt-creds): Add new functions
17937 to simplify code and aid in unit testing.
17938 (url-digest-auth-build-response): Hook up new functionality, or fall
17939 back to previous.
17940 (url-digest-auth-make-request-digest-qop):
17941 (url-digest-auth-make-cnonce, url-digest-auth-nonce-count):
17942 (url-digest-auth-name-value-string): Add new helper functions.
17943 * test/lisp/url/url-auth-tests.el (url-auth-test-colonjoin):
17944 (url-auth-test-digest-ha1, url-auth-test-digest-ha2):
17945 (url-auth-test-digest-request-digest): Add a few tests as now more
17946 features are testable via intermediate functions.
17947 (url-auth-test-challenges, url-auth-test-digest-request-digest): Test
17948 the new implementation. Parts of these were accidentally already
17949 merged in the past.
17950
179512017-04-01 Tino Calancha <tino.calancha@gmail.com>
17952
17953 Tweak ediff-ptch test in previous commit a bit more
17954
17955 * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
17956 Apply patches without requiring a shell. Add some comments.
17957
179582017-03-31 Glenn Morris <rgm@gnu.org>
17959
17960 Tweak an ediff-ptch test
17961
17962 * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
17963 Add skip conditions. Avoid going through shell where not needed.
17964
179652017-03-31 Michael Albinus <michael.albinus@gmx.de>
17966
17967 * lisp/net/tramp-smb.el (tramp-smb-errors):
17968
17969 Add "NT_STATUS_PASSWORD_MUST_CHANGE".
17970
179712017-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
17972
17973 * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet): New test.
17974
179752017-03-31 Tino Calancha <tino.calancha@gmail.com>
17976
17977 dired-mark-suffix: New command
17978
17979 Now dired-mark-extension prepends '.' to extension when not present.
17980 Add command dired-mark-suffix to preserve the previous
17981 behaviour (Bug#25942).
17982 * lisp/dired-x.el (dired-mark-suffix): New command;
17983 mark files ending in a given suffix.
17984 (dired--mark-suffix-interactive-spec): New defun.
17985 (dired-mark-extension, dired-mark-suffix): Use it.
17986 * doc/misc/dired-x.texi (Advanced Mark Commands): Update manual.
17987 * test/lisp/dired-x-tests.el: New test suite; add test for these features.
17988
179892017-03-31 Tino Calancha <tino.calancha@gmail.com>
17990
17991 default-directory: Remark that it must be a directory name
17992
17993 * src/buffer.c (default-directory): Update docstring (Bug#26272).
17994
179952017-03-31 Tino Calancha <tino.calancha@gmail.com>
17996
17997 Delete confuse statement in manual
17998
17999 * doc/misc/cl.texi (For Clauses): Delete confuse statement
18000 and its example (Bug#23550).
18001
180022017-03-31 Paul Eggert <eggert@cs.ucla.edu>
18003
18004 Use find -delete if available
18005
18006 This shortens the ‘make’ output and should avoid some
18007 repetitive scanning of directories during a build.
18008 * configure.ac (FIND_DELETE): New var.
18009 * lisp/Makefile.in (compile-always, bootstrap-clean):
18010 * test/Makefile.in (clean, bootstrap-clean): Use it.
18011 * test/Makefile.in (ELCFILES, LOGSAVEFILES): Remove; no longer needed.
18012
180132017-03-31 Mark Oteiza <mvoteiza@udel.edu>
18014
18015 Remove gnus-boundp
18016
18017 * lisp/gnus/gnus-start.el (gnus-display-time-event-handler): Use
18018 bound-and-true-p.
18019 * lisp/gnus/gnus-util (gnus-boundp): Remove.
18020
180212017-03-31 Niels Möller <nisse@lysator.liu.se> (tiny change)
18022
18023 Stop `fixup-whitespace' adding trailing whitespace (Bug#18783)
18024
18025 * lisp/simple.el (fixup-whitespace): Insert no spaces if point is at
18026 end of line after deleting horizontal whitespace.
18027
180282017-03-31 Paul Eggert <eggert@cs.ucla.edu>
18029
18030 * src/inotify.c (add_watch): Add comment.
18031
180322017-03-31 Andreas Politz <politza@hochschule-trier.de>
18033
18034 Minor filenotify.el fixes
18035
18036 * lisp/filenotify.el: Require subr-x.
18037 (file-notify-callback): Use equal, not eq.
18038
180392017-03-31 Noam Postavsky <npostavs@gmail.com>
18040
18041 Improve packaging documentation
18042
18043 * doc/lispref/package.texi (Packaging Basics):
18044 * doc/lispref/tips.texi (Library Headers): Clarify some header
18045 formats, relation between file headers and package
18046 attributes (Bug#13281).
18047
180482017-03-31 John Mastro <john.b.mastro@gmail.com>
18049
18050 Fix a small incompatibility in ibuffer
18051
18052 Translate nil values from column functions to the empty string, so that
18053 subsequent calls to string-width don't signal an error (Bug#26317).
18054 * lisp/ibuffer.el (ibuffer-compile-format): If a column function returns
18055 nil, treat it like the empty string.
18056
180572017-03-30 Alan Mackenzie <acm@muc.de>
18058
18059 Fix C++ fontification problems 500 bytes after typing a space, and other bugs
18060
18061 Also implement the "asymmetric space" rule for fontifying otherwise
18062 ambiguous
18063 declarations/expressions.
18064
18065 * lisp/progmodes/cc-engine.el (c-before-change-check-<>-operators): Don't set
18066 c-new-BEG or c-new-END when there is no need.
18067 (c-forward-decl-or-cast-1): Add "CASE 17.5" to implement the "asymmetric
18068 space" rule.
18069
18070 * lisp/progmodes/cc-fonts.el (c-get-fontification-context): New function,
18071 extracted from c-font-lock-declarations. Add to this function processing to
18072 make `context' 'decl for lines contained within parens when these are also
18073 declarations.
18074 (c-font-lock-declarations): Call the newly extracted function above in place
18075 of inline code.
18076
18077 * lisp/progmodes/cc-mode.el (c-fl-decl-start): Set point before calling
18078 c-literal-start.
18079
18080 * lisp/progmodes/cc-vars.el (c-asymmetry-fontification-flag): New user option.
18081
18082 * doc/misc/cc-mode.texi (Misc Font Locking): New node documenting the new
18083 "asymmetric fontification" rule, including the variable
18084 c-asymmetric-fontification-flag.
18085
180862017-03-30 Paul Eggert <eggert@cs.ucla.edu>
18087
18088 Some inotify cleanup
18089
18090 This catches some problems with integer overflow and races
18091 that I noticed in inotify.c after reviewing the changes
18092 installed to fix Bug#26126.
18093 * src/fns.c, src/lisp.h (equal_no_quit): Now extern.
18094 * src/inotify.c (aspect_to_inotifymask):
18095 Check for cycles and for improper lists.
18096 (make_lispy_mask, lispy_mask_match_p): Remove.
18097 All callers changed to use INTEGER_TO_CONS and CONS_TO_INTEGER.
18098 (inotifyevent_to_event, add_watch):
18099 Don’t assume watch descriptors and cookies fit in fixnums.
18100 (add_watch): Use assoc_no_quit, not Fassoc.
18101 Avoid integer overflow in (very!) long-running processes where
18102 the Emacs watch ID could overflow. Avoid some duplicate code.
18103 (find_descriptor): New function.
18104 (remove_descriptor): First arg is now the returned value from
18105 find_descriptor, rather than the descriptor. This way, the
18106 value can be removed without calling Fdelete, which might quit.
18107 Wait until the end (when watch_list is consistent) before signaling
18108 any errors.
18109 (remove_watch, inotify_callback):
18110 Use find_descriptor to avoid the need for Fdelete.
18111 (inotify_callback): Use simpler tests for ioctl failure.
18112 Free temporary buffer if signaled, and put it on the stack if small.
18113 Use ssize_t to index through read results, to avoid a cast.
18114 (valid_watch_descriptor): New function, with a tighter check.
18115 (Finotify_rm_watch, Finotify_valid_p): Use it.
18116 (Finotify_valid_p): Use assoc_no_quit and ass_no_quit instead
18117 of Fassoc. Do not assume the first assoc succeeds.
18118 * test/src/inotify-tests.el (inotify-valid-p-simple):
18119 Add inotify-valid-p tests, some of which dump core without
18120 the fixes noted above.
18121
181222017-03-30 Michael Albinus <michael.albinus@gmx.de>
18123
18124 * lisp/net/tramp-sh.el (tramp-get-remote-locale): Add "C.UTF-8" as candidate.
18125
181262017-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
18127
18128 * lisp/cedet/semantic/wisent/wisent.el (wisent-automaton-p): Use obarrayp.
18129
181302017-03-30 Paul Eggert <eggert@cs.ucla.edu>
18131
18132 Fix assoc_no_quit so that it does not quit
18133
18134 The problem was that it called Fequal, which can quit.
18135 * src/fns.c (enum equal_kind):
18136 New enum, to be used in place of a boolean.
18137 (equal_no_quit): New function.
18138 (Fmemql, Feql): Use it to compare floats, as a minor tuneup.
18139 (assoc_no_quit): Use it to avoid quitting, the main point here.
18140 (internal_equal): Generalize bool to enum equal_kind arg, so that
18141 there are now 3 possibilities instead of 2. Do not signal an
18142 error if EQUAL_NO_QUIT. Put the arg before the depth, since depth
18143 should be irrelevant if the arg is EQUAL_NO_QUIT. All callers
18144 changed.
18145
181462017-03-29 Alan Mackenzie <acm@muc.de>
18147
18148 Amend gitmerge to recognize the injunction "don't merge".
18149
18150 * admin/gitmerge.el (gitmerge-skip-regexp): amend regexp to match "don't" as
18151 well as "do not".
18152
181532017-03-29 Simen Heggestøyl <simenheg@gmail.com>
18154
18155 Add one more CSS pseudo-class
18156
18157 * lisp/textmodes/css-mode.el (css-pseudo-class-ids): Add
18158 `focus-within'.
18159
181602017-03-29 Simen Heggestøyl <simenheg@gmail.com>
18161
18162 Update list of CSS pseudo-classes
18163
18164 * lisp/textmodes/css-mode.el (css-pseudo-class-ids): Update list of
18165 pseudo-classes.
18166
181672017-03-29 Noam Postavsky <npostavs@gmail.com>
18168
18169 Adjust some search failure errors in info.el
18170
18171 * lisp/info.el (Info-select-node): The search for beginning of node is
18172 an internal detail, and is not normally expected to fail, so it should
18173 not be a user error.
18174 (Info-complete-menu-item): Failing to find a menu indicates the user
18175 searched for a menu when there isn't one, so change to `use-error'.
18176
181772017-03-28 Alan Mackenzie <acm@muc.de>
18178
18179 * lisp/progmodes/cc-defs.el (c-version): Restore c-version to 5.33
18180
181812017-03-28 Paul Eggert <eggert@cs.ucla.edu>
18182
18183 Don’t mishandle (format "%i" -1.0)
18184
18185 * src/editfns.c (styled_format): Treat %i like %d when converting arg.
18186
181872017-03-28 Noam Postavsky <npostavs@gmail.com>
18188
18189 * lisp/emacs-lisp/ert.el (ert-run-tests): Make INTERACTIVE arg optional.
18190
181912017-03-28 Michael Albinus <michael.albinus@gmx.de>
18192
18193 * src/inotify.c (Finotify_add_watch): aspect can also be a symbol.
18194
181952017-03-28 Noam Postavsky <npostavs@gmail.com>
18196
18197 Don't add `search-failed' to ignored errors in info.el (Bug#6106)
18198
18199 * lisp/info.el: Stop adding `search-failed' to `debug-ignored-errors'.
18200 (Info-select-node, Info-search): Replace (signal 'search-failed ...)
18201 with (user-error "Search failed: "...).
18202
182032017-03-27 Paul Eggert <eggert@cs.ucla.edu>
18204
18205 Fix obsolete ‘test/automated’ references
18206
18207 * Makefile.in (mostlyclean, clean, maybeclean_dirs, distclean)
18208 (bootstrap-clean, maintainer-clean):
18209 Clean ‘test’, not ‘test/automated’. Test for existence of
18210 subdirectory only for ‘test’, not for directories that should
18211 always exist.
18212 * admin/MAINTAINERS, etc/TODO, lisp/emacs-lisp/bytecomp.el:
18213 * lisp/emacs-lisp/seq.el, lisp/emacs-lisp/thunk.el:
18214 * lisp/man.el (Man-parse-man-k):
18215 * lisp/url/url-domsuf.el, make-dist:
18216 * test/file-organization.org:
18217 Fix obsolete references to test/automated.
18218
182192017-03-27 Katsumi Yamaoka <yamaoka@jpl.org>
18220
18221 shr-image-fetched: Work for narrowed Gnus article
18222
18223 See <8737e3msun.fsf@gmail.com> of bug#26231 in the bug-gnu-emacs list.
18224
18225 * lisp/net/shr.el (shr-image-fetched): Work for narrowed article.
18226
182272017-03-27 Michael Albinus <michael.albinus@gmx.de>
18228
18229 * lisp/net/tramp.el (tramp-file-name-handler): Autoload it.
18230
182312017-03-27 Eric Abrahamsen <eric@ericabrahamsen.net>
18232
18233 Expand manual section on quitting windows
18234
18235 * doc/lispref/windows.texi (Quitting Windows): Provide more
18236 information about the elements of the quit-restore window parameter,
18237 and how they affect the behavior of quit-restore-window.
18238
182392017-03-26 Philipp Stephani <phst@google.com>
18240
18241 Add check for expected backtrace in module calls.
18242
18243 * test.el (mod-test-non-local-exit-signal-test): Compare actual
18244 backtrace to expected backtrace.
18245
182462017-03-26 Eli Zaretskii <eliz@gnu.org>
18247
18248 Fix redisplay glitches due to recent change in redisplay_internal
18249
18250 * src/xdisp.c (redisplay_internal): A better fix for bug#26097.
18251 See http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00695.html
18252 for the problems caused by the original fix.
18253
182542017-03-26 Michael Albinus <michael.albinus@gmx.de>
18255
18256 Fix Bug#26258
18257
18258 * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
18259 * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
18260 * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
18261 * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
18262 Autoload. Call `tramp-register-foreign-file-name-handler'. (Bug#26258)
18263
18264 * lisp/net/tramp.el (tramp-autoload-file-name-handler): Remove.
18265 (tramp-register-autoload-file-name-handlers)
18266 (tramp-register-file-name-handlers): Do not handle
18267 `tramp-autoload-file-name-handler' anymore. Mark `operations'
18268 the handlers are responsible for.
18269 (tramp-register-foreign-file-name-handler): New defun.
18270
182712017-03-26 Noam Postavsky <npostavs@gmail.com>
18272
18273 Fix docstring of dabbrev-abbrev-char-regexp
18274
18275 * lisp/dabbrev.el (dabbrev-abbrev-char-regexp): Using a value of nil
18276 is equivalent to "\\sw\\|\\s_", and has no special behavior. If the
18277 previous character doesn't match, we search backwards for one that
18278 does, not throw an error. Replace Lisp example with C based one to
18279 make it clear that "symbol" means a sequence of word and symbol
18280 constituent characters, not a Lisp symbol (Bug#358).
18281
182822017-03-26 Johan Claesson <johanclaesson@bredband.net> (tiny change)
18283
18284 * doc/misc/cl.texi (Iteration Clauses): Clarify example (Bug#19515).
18285
182862017-03-26 Andreas Politz <politza@hochschule-trier.de>
18287
18288 Minor fixes for inotify.c and filenotify.el
18289
18290 * lisp/filenotify.el (file-notify--watch-absolute-filename):
18291 Add docstring.
18292 (file-notify-callback): Simplify.
18293
18294 * src/inotify.c (Finotify_add_watch): Adapt docstring.
18295
182962017-03-26 Andreas Politz <politza@hochschule-trier.de>
18297
18298 Fix issues regarding inotify file-notification
18299
18300 Remove special code handling the inotify back-end.
18301 * lisp/filenotify.el (file-notify--watch): New struct
18302 representing a file-watch.
18303 (file-notify-descriptors): Use the new struct as hash-value.
18304 (file-notify-handle-event): Check that event is a cons.
18305 (file-notify--rm-descriptor, file-notify--event-watched-file)
18306 (file-notify--event-file-name, file-notify--event-file1-name)
18307 (file-notify-callback, file-notify-add-watch)
18308 (file-notify-rm-watch, file-notify-valid-p): Use new struct.
18309 Remove special code handling inotify descriptors. Remove code
18310 handling multiple clients per descriptor.
18311 (file-notify--descriptor): Remove unused function.
18312
18313 Let inotify-add-watch return a unique descriptor on every
18314 call, like every other back-end does (Bug#26126). Prevent
18315 multiple clients from interfering with each other, when
18316 watching a shared descriptor.
18317 * src/inotify.c (watch_list): Extend the format by including a
18318 id and the provided mask.
18319 (INOTIFY_DEFAULT_MASK): Default mask used for all clients.
18320 (make_watch_descriptor): Removed.
18321 (make_lispy_mask, lispy_mask_match_p): New functions.
18322 (inotifyevent_to_event): Match event against the mask provided
18323 by the client.
18324 (add_watch, remove_descriptor, remove_watch): New functions
18325 for managing the watch_list.
18326 (inotify_callback): Use the new functions.
18327 (Finotify_add_watch, Finotify_rm_watch): Remove deprecated
18328 flags from documentation. Add check for validity of provided
18329 descriptor. Use the new functions. Use the default mask.
18330 (INOTIFY_DEBUG): Add new debug conditional.
18331 (inotify-watch-list, inotify-allocated-p): New debug functions.
18332 (symbol_to_inotifymask, syms_of_inotify): Remove deprecated symbols.
18333
18334 * test/lisp/filenotify-tests.el:
18335 (file-notify-test02-rm-watch): Remove expected failure for inotify.
18336
183372017-03-26 Paul Pogonyshev <pogonyshev@gmail.com>
18338
18339 * lisp/emacs-lisp/pcase.el (pcase): Comment debug message (Bug#26177).
18340
183412017-03-25 Jens Uwe Schmidt <ju.schmidt@gmx.de> (tiny change)
18342
18343 Stop edebug getting stuck on backquote (Bug#23651)
18344
18345 * lisp/emacs-lisp/edebug.el (edebug-read-sexp): Move forward after
18346 reading backquote or comma.
18347
183482017-03-25 Eric Abrahamsen <eric@ericabrahamsen.net>
18349
18350 Expand manual section on quitting windows
18351
18352 * doc/lispref/windows.texi (Quitting Windows): Provide more
18353 information about the elements of the quit-restore window parameter,
18354 and how they affect the behavior of quit-restore-window.
18355
183562017-03-25 Eli Zaretskii <eliz@gnu.org>
18357
18358 Support in ispell.el multiple dictionaries loaded by Hunspell
18359
18360 * lisp/textmodes/ispell.el (ispell-find-hunspell-dictionaries):
18361 Support Hunspell configurations that load more than one dictionary
18362 by default. Doc fix. (Bug#25830)
18363
183642017-03-25 Michael Albinus <michael.albinus@gmx.de>
18365
18366 Simplify Tramp autoloading.
18367
18368 * lisp/net/tramp.el (tramp-completion-file-name-handler):
18369 Simplify autoloading. Give it the `operations' property.
18370 (tramp-completion-handle-expand-file-name): Remove.
18371
183722017-03-25 Eli Zaretskii <eliz@gnu.org>
18373
18374 Fix a segfault due to failure to realize some faces
18375
18376 * src/xdisp.c (redisplay_internal): If the frame becomes garbaged
18377 while redisplaying its windows, redisplay all of its windows
18378 again. (Bug#26097)
18379 (init_iterator): When freeing all realized faces on all frames,
18380 reset the 'face_change' flag of the frame whose window we are
18381 about to iterate.
18382
183832017-03-25 Philipp Stephani <phst@google.com>
18384
18385 Use a named function for 'safe-local-variable
18386
18387 This improves the help screen for `version-control' (Bug#25431).
18388
18389 * lisp/files.el (version-control-safe-local-p): New function.
18390 (version-control): Use it.
18391
183922017-03-25 Eli Zaretskii <eliz@gnu.org>
18393
18394 ;* doc/misc/info.texi (Choose menu subtopic): Improve indexing. (Bug#26236)
18395
183962017-03-25 Helmut Eller <eller.helmut@gmail.com>
18397
18398 Make it easier to abort a series of tests with C-g
18399
18400 * emacs-lisp/ert.el (ert-run-tests): Add "interactively" arg. If
18401 interactively is true and a test was aborted then ask if the remaining
18402 tests should be aborted too.
18403 (ert-run-tests-batch, ert-run-tests-interactively): Pass in
18404 interactively arg.
18405
184062017-03-24 Paul Eggert <eggert@cs.ucla.edu>
18407
18408 Don’t require chown/chgrp for game installation
18409
18410 Problem reported by Joseph Mingrone in:
18411 http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00622.html
18412 * lib-src/Makefile.in (exp_archlibdir): Don’t fail if chown or
18413 chgrp fails with update-game-score and the game directory.
18414 Instead, expect the installer to fix this up afterwards.
18415
184162017-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
18417
18418 * lisp/emacs-lisp/lisp-mode.el: Don't highlight \( at BOL
18419
18420 (elisp--font-lock-backslash): Extract from lisp-el-font-lock-keywords-2.
18421 Don't highlight \ at BOL. Don't assume syntax-ppss preserves match-data.
18422
184232017-03-23 Philipp Stephani <phst@google.com>
18424
18425 Protect against an infloop in python-mode
18426
18427 There appears to be an edge case caused by using `syntax-ppss' in a
18428 narrowed buffer during JIT lock inside of Python triple-quote strings.
18429 Unfortunately it is impossible to reproduce without manually
18430 destroying the syntactic information in the Python buffer, but it has
18431 been observed in practice. In that case it can happen that the syntax
18432 caches get sufficiently out of whack so that there appear to be
18433 overlapping strings in the buffer. As Python has no nested strings,
18434 this situation is impossible and leads to an infloop in
18435 `python-nav-end-of-statement'. Protect against this by checking
18436 whether the search for the end of the current string makes progress.
18437
18438 * python.el (python-nav-end-of-statement): Protect against infloop.
18439 * progmodes/python-tests.el
18440 (python-tests--python-nav-end-of-statement--infloop): Add unit test.
18441
184422017-03-23 Michael Albinus <michael.albinus@gmx.de>
18443
18444 * doc/lispref/os.texi (File Notifications):
18445
18446 Strengthen the recommendation to use filenotify.el.
18447
184482017-03-23 Paul Eggert <eggert@cs.ucla.edu>
18449
18450 Merge from gnulib
18451
18452 This incorporates:
18453 2017-03-22 getopt: merge from glibc
18454 * build-aux/config.sub, lib/getopt.c, lib/getopt.in.h:
18455 * lib/getopt1.c, lib/getopt_int.h: Copy from gnulib.
18456 * lib/gnulib.mk.in: Regenerate.
18457
184582017-03-23 Michael Albinus <michael.albinus@gmx.de>
18459
18460 Use lexical-bind in Tramp
18461
18462 * lisp/net/tramp*.el: Add lexical-binding cookie. Move declarations up.
18463
18464 * lisp/net/tramp-adb.el (tramp-adb-parse-device-names): Use `push'
18465 rather than `add-to-list'.
18466 (tramp-adb-get-device): Remove unused variable.
18467
18468 * lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names): Remove unused
18469 variable.
18470
18471 * lisp/net/tramp.el (auto-save-file-name-transforms): Declare.
18472 (tramp-find-file-name-coding-system-alist): Use `push' rather
18473 than `add-to-list'.
18474
18475 * test/lisp/net/tramp-tests.el: Add lexical-binding cookie.
18476 Require 'dired. Move declarations up.
18477 (tramp-test32-make-nearby-temp-file): Wrap `make-nearby-temp-file'
18478 and `temporary-file-directory' calls with `with-no-warnings'.
18479 (tramp-test35-asynchronous-requests): Mark unused variable.
18480
184812017-03-23 Kaushal Modi <kaushal.modi@gmail.com>
18482 Noam Postavsky <npostavs@gmail.com>
18483
18484 Do not include comment start chars in ffap string
18485
18486 * lisp/ffap.el (ffap-string-at-point): If the point is in a comment,
18487 ensure that the returned string does not contain the comment start
18488 characters (especially for major modes that have '//' as comment start
18489 characters). Otherwise, in a major mode like c-mode, with `ido-mode'
18490 enabled and `ido-use-filename-at-point' set to `guess', doing "C-x
18491 C-f" on a "//foo" comment will initiate an attempt to access a path
18492 "//foo" (Bug#24057).
18493
184942017-03-23 Martin Rudalics <rudalics@gmx.at>
18495
18496 c:/Temp/gtk-window-move/ChangeLog.txt
18497
184982017-03-22 Michael Albinus <michael.albinus@gmx.de>
18499
18500 Fix filenotify.el issue for kqueue
18501
18502 * lisp/filenotify.el (file-notify-add-watch): Use directory
18503 for remote file name handlers.
18504
18505 * test/lisp/filenotify-tests.el (file-notify-test01-add-watch):
18506 Create/delete temporary file only for "kqueue".
18507 (file-notify-test02-rm-watch): Create/delete temporary files.
18508
185092017-03-22 Michael Albinus <michael.albinus@gmx.de>
18510
18511 Extend `file-notify-test02-rm-watch'
18512
18513 * test/lisp/filenotify-tests.el (file-notify-test02-rm-watch):
18514 Expect it failed for inotify. Divide tests into different
18515 `unwind-protect' clauses. Check, that removing watch
18516 descriptors out of order do not harm. (Bug#26126)
18517
185182017-03-22 Noam Postavsky <npostavs@gmail.com>
18519
18520 * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-subsexp): Test for Bug#26187
18521
185222017-03-22 Graham Dobbins <gdobbins@protonmail.com> (tiny change)
18523
18524 * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Fix null endpos case
18525
185262017-03-21 Paul Eggert <eggert@cs.ucla.edu>
18527
18528 Improve configure --with-pop etc. diagnostics
18529
18530 * configure.ac: Improve diagnostics re --with-pop and
18531 --with-mailutils (Bug#26102).
18532
185332017-03-21 Eli Zaretskii <eliz@gnu.org>
18534
18535 Revert "Make --without-pop the default."
18536
18537 This reverts commit 9319de675e395517f9a7b50cae1a3aad9cd0abc2.
18538
185392017-03-21 Paul Eggert <eggert@cs.ucla.edu>
18540
18541 Don’t remove dependency files when configuring
18542
18543 Problem reported by Tom Tromey in:
18544 http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00533.html
18545 * configure.ac: Don’t remove */*.o and */deps/* when
18546 --enable-autodepend is in effect.
18547
185482017-03-21 Paul Eggert <eggert@cs.ucla.edu>
18549
18550 Make --without-pop the default.
18551
18552 Suggested by Angelo Graziosi in:
18553 http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00431.html
18554 * configure.ac: Change the default from --with-pop to
18555 --without-pop. Adjust diagnostics to match.
18556
185572017-03-21 Paul Eggert <eggert@cs.ucla.edu>
18558
18559 Streamline dependency-file generation
18560
18561 * configure.ac (AUTODEPEND_PARENTS): New var.
18562 mkdir the dependency directories here, to simplify ‘make’.
18563 Remove dependency files just before outputting Makefiles, so that
18564 they are preserved if ‘configure’ exits early due to some other problem.
18565 * lib/Makefile.in, lwlib/Makefile.in, oldXMenu/Makefile.in:
18566 * src/Makefile.in: Adjust deps strategies to be similar, as follows:
18567 (MKDEPDIR): Remove. All uses removed. This cuts down on the
18568 number of processes spun off by ‘make’.
18569 (clean mostlyclean): Remove $(DEPDIR) contents, not $(DEPDIR) itself.
18570 (distclean): Remove $(DEPDIR) itself.
18571 * lwlib/Makefile.in (all): Move to front, so that depdir includes
18572 do not alter default action.
18573
185742017-03-21 Paul Eggert <eggert@cs.ucla.edu>
18575
18576 Port and simplify example sh script
18577
18578 * doc/misc/org.texi (noweb-ref): Simplify shell script example and
18579 don’t use ‘tail -1’, which is not portable.
18580
185812017-03-21 Noam Postavsky <npostavs@gmail.com>
18582
18583 Narrow scope of modification hook renabling in org-src fontification
18584
18585 Modification hooks should be enabled while modifying text in the
18586 org-src temp buffer, but in 2017-01-29 "Call modification hooks in
18587 org-src fontify buffers" the hooks were enabled also for modifications
18588 to the original org buffer. This causes fontification errors when
18589 combined with certain packages, as reported in
18590 http://lists.gnu.org/archive/html/emacs-orgmode/2017-03/msg00420.html.
18591
18592 * lisp/org/org-src.el (org-src-font-lock-fontify-block): Reduce scope
18593 of inhibit-modification-hooks let-binding.
18594
185952017-03-21 Tino Calancha <tino.calancha@gmail.com>
18596
18597 epatch: Save right backups in Git multipatches
18598
18599 Multipatches on N Git files save wrong backups for
18600 N-1 files; only the last one has a correct backup (Bug#26084).
18601 * lisp/vc/diff-mode.el (diff-file-junk-re): Add 'Prereq: '
18602 * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer): Use 'diff-file-junk-re'.
18603 * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug25010):
18604 Rename from ibuffer-test-bug25010.
18605 (ediff-ptch-test-bug26084): New test.
18606
186072017-03-21 Michael R. Mauger <michael@mauger.com>
18608
18609 * lisp/progmodes/sql.el: Version 3.6
18610
18611 (sql-login-params): Added :must-match for completition of
18612 `server' and `database' login parameters.
18613 (sql-sqlite-login-params, sql-postgres-login-params): Set
18614 :must-match to `confirm'.
18615 (sql-get-login-ext): Use :must-match value to control
18616 `read-file-name' or `completing-read'.
18617 (sql-connect): Added optional BUF-NAME parameter; Reworked
18618 connection variable processing; Pass buffer name to
18619 `sql-product-interactive'.
18620 (sql-product-interactive): Pass buffer name along.
18621 (sql-comint): Add optional BUF-NAME and calculate reasonable default.
18622 (sql-comint-oracle, sql-sybase-comint, sql-comint-informix)
18623 (sql-comint-sqlite, sql-comint-mysql, sql-comint-solid)
18624 (sql-comint-ingres, sql-comint-ms, sql-comint-postgres)
18625 (sql-comint-interbase, sql-comint-db2, sql-comint-linter)
18626 (sql-comint-vertica): Add optional BUF-NAME, pass to
18627 `sql-comint'.
18628 (sql-oracle--list-oracle-name): New function.
18629 (sql-oracle-list-all): Use it.
18630 (sql-oracle-completion-object): Enhanced.
18631
186322017-03-20 Vincent Belaïche <vincentb1@users.sourceforge.net>
18633
18634 Solve ses-recalculate-cell updating only current line bug.
18635
18636 * lisp/ses.el (ses-recalculate-cell): Add optional argument
18637 ses--curcell to avoid overwriting ses--curcell when function is
18638 called from ses-recalculate-all. Update docstring accordingly.
18639 (ses-recalculate-all): Call ses-recalculate-cell with argument
18640 ses--curcell to avoid its overwriting.
18641
186422017-03-20 Paul Eggert <eggert@cs.ucla.edu>
18643
18644 Fix problem with out-of-date dependencies
18645
18646 Problem reported by Robert Marshall in:
18647 http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00501.html
18648 Although this problem has been with us for a while, the recent
18649 change from Automake to GNU Make exposed it again.
18650 * configure.ac (AUTO_DEPEND): When autodepending, clean out any
18651 leftover dependency and object files, since the previous sources'
18652 dependencies may disagree with the current ones. Reconfiguring
18653 typically needs to force a rebuild anyway.
18654
186552017-03-20 Mark Oteiza <mvoteiza@udel.edu>
18656
18657 Simpler filter implementation
18658
18659 * lisp/play/dunnet.el (dun-endgame-question): Get or set
18660 dun-endgame-questions one time only. Use dolist and an index to
18661 prune the list.
18662
186632017-03-20 Mark Oteiza <mvoteiza@udel.edu>
18664
18665 * lisp/button.el (forward-button): Use user-error instead.
18666
186672017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18668
18669 Merge from gnulib
18670
18671 This gets Emacs working again with HP-UX Itanium cc.
18672 It incorporates:
18673 2017-03-19 stdalign: tweak version# and test for HP-UX IA64
18674 2017-03-18 stdalign: restore previous behavior for HP-UX IA64
18675 2017-03-17 stat-time, timespec: Support header files in C++ mode
18676 2017-03-17 stdalign: Make it work with HP-UX cc
18677 2017-03-17 flexmember: try to detect HP-UX 11.31 cc bug
18678 2017-03-16 stdint: Fix test compilation failure with HP-UX 11 cc.
18679 2017-03-14 gnulib-tool: don't produce tests with only snippets
18680 2017-03-14 limits-h: Make it work with HP-UX cc.
18681 * etc/PROBLEMS: Remove now-obsolete entry for HP-UX 11.31.
18682 * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
18683 * lib/limits.in.h, lib/stat-time.h, lib/stdalign.in.h:
18684 * lib/stdint.in.h, lib/timespec.h, m4/flexmember.m4, m4/stdalign.m4:
18685 Copy from gnulib.
18686
186872017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18688
18689 * ChangeLog.2: Merge from emacs-25.
18690
186912017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18692
18693 Fixups after merge from emacs-25
18694
18695 * etc/NEWS: Remove stray entry.
18696 * etc/NEWS.25: Copy from Emacs emacs-25 etc/NEWS.
18697 * lisp/textmodes/rst.el (rst-package-emacs-version-alist):
18698 Make it nondecreasing.
18699
187002017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18701
18702 Merge from origin/emacs-25
18703
18704 d71e071 Improve documentation of interactive "r".
18705
187062017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18707
18708 Merge from origin/emacs-25
18709
18710 a094732 * etc/PROBLEMS: Say that HP-UX cc doesn't work.
18711 1925dd9 Fix duplicate wording in Emacs manual
18712 6de8429 * lisp/paren.el (show-paren--default, show-paren-function): A...
18713 2d671fd Fix wording in Emacs manual
18714 a8766a2 Document how to customize input methods
18715 6eb8995 * lisp/net/eww.el (eww-reload): Doc fix. (Bug#25981)
18716 aceac95 Fix warning message about native completion (Bug#25984)
18717 a314c1f Clarify documentation of 'raise' and 'height' display specs
18718 f366f6e Mention problems with GPaste in PROBLEMS
18719 6e788ef ; etc/PROBLEMS: Explain about the python+libedit problem (Bug...
18720 6406618 Fix doc strings in info.el
18721 c1ed152 ; * src/keyboard.c (Fposn_at_point): Fix last change.
18722 eed9677 Fix doc string of 'posn-at-point'
18723 0d5957e Documentation fix in elisp reference manual
18724
187252017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18726
18727 Merge from origin/emacs-25
18728
18729 ec4226d * lisp/woman.el (woman): Fix docstring prefix arg description.
18730 2b774fa Mention "editor" in Emacs man page header
18731 ae60d0c Document problems with nerd-fonts
18732 2fdb5a9 ; Details about pinning Emacs to w32 task bar
18733 5c3105e * doc/lispref/modes.texi (Derived Modes): Make example more i...
18734 4c51ef4 Clarify what is the "cursor"
18735 8303c32 ; * etc/NEWS: Copyedits.
18736 3f7493e ; Fix a typo in comment
18737 c54cf8d Improve commentary in lisp.h
18738 8b92f86 ; * admin/make-tarball.txt: Cross-reference admin/release-pro...
18739 0ba9932 Disable native completion for ipython (Bug#25067)
18740 38fc456 Fix a typo in ada-mode manual
18741 00e75ba ; * src/coding.c (Fencode_coding_region): Fix a typo in the d...
18742 a541c21 Clarify documentation of 'bufferpos-to-filepos' and 'filepos-...
18743
18744 # Conflicts:
18745 # etc/NEWS
18746 # etc/PROBLEMS
18747
187482017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18749
18750 Merge from origin/emacs-25
18751
18752 02d9ad8 * admin/make-tarball.txt: Add documentation regarding the rel...
18753
187542017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18755
18756 Merge from origin/emacs-25
18757
18758 e1171de * CONTRIBUTE (Documenting your changes): Index new vars/comma...
18759
187602017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18761
18762 Merge from origin/emacs-25
18763
18764 ab0a60a ; * CONTRIBUTE (Generating ChangeLog entries): Drop duplicate...
18765 7e02a47 Index byte-compile-debug
18766 7c1e598 Document `byte-compile-debug' in the ELisp manual
18767 4d81eb4 Document variable `byte-compile-debug'
18768 72ef710 Fix call to debugger on assertion failure
18769 ae8264c Call modification hooks in org-src fontify buffers
18770 b3139da ; Fix last change in doc/lispref/strings.texi
18771 c331f39 Improve documentation of 'format' conversions
18772 9f52f67 Remove stale functions from ert manual
18773 c416b14 Fix a typo in Eshell manual
18774 06695a0 ; Fix a typo in ediff-merg.el
18775 954e9e9 Improve documentation of hooks related to saving buffers
18776 9fcab85 Improve documentation of auto-save-visited-file-name
18777 2236c53 fix typo in mailcap-mime-extensions
18778 85a3e4e Fix typos in flymake.el
18779 a1ef10e More NEWS checking for admin.el's set-version
18780
18781 # Conflicts:
18782 # lisp/emacs-lisp/bytecomp.el
18783
187842017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18785
18786 Merge from origin/emacs-25
18787
18788 5569e64 ; Spelling fixes
18789 24a5f57 * lisp/net/eww.el (eww-tag-meta): Handle single quoted URLs (...
18790 9b89896 * lisp/progmodes/sql.el (sql-product-alist): Doc tweak
18791 69b50f5 * lisp/progmodes/sql.el (sql-product-alist): Doc fix. (Bug#2...
18792 42eae54 Improve documentation of dabbrevs
18793 b0ade0d Clarify that easy-menu-add is a nop (Bug#25382)
18794 3c69f2c * lisp/textmodes/rst.el (rst-package-emacs-version-alist): Fi...
18795
18796 # Conflicts:
18797 # lisp/textmodes/rst.el
18798
187992017-03-19 Paul Eggert <eggert@cs.ucla.edu>
18800
18801 Merge from origin/emacs-25
18802
18803 0e35405 Improve documentation of coding-systems
18804 c2fd04c Improve definition of 'variable-pitch' face on MS-Windows
18805 16fb50d Fix an error message in python.el
18806 a2a2073 Clarify major mode switching
18807 fc38671 Add helpful comment to compile-command's docstring
18808 ee65d85 Fix ':version' of 'select-enable-primary'
18809
188102017-03-19 Paul Pogonyshev <pogonyshev@gmail.com>
18811
18812 Fix bug in generator function with pcase (Bug#26068)
18813
18814 * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Remove some calls
18815 to symbol-name.
18816
188172017-03-19 Alan Mackenzie <acm@muc.de>
18818
18819 Fix chaotic indentation of C++ lambda. Enhance documentation thereof
18820
18821 * lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): qualify an
18822 invocation of c-on-identifier with a check we're not at the _end_ of an
18823 identifier.
18824
18825 * doc/misc/cc-mode.texi: (Tex title page): Remove @subtitlefont because the
18826 perl versions of texi2dvi haven't implemented it.
18827 (Syntactic Symbols): Note that `inlambda' is also used in C++ Mode, not just
18828 in Pike Mode.
18829 (Statement Block Symbols): Add a section illustrating a C++ lambda function.
18830 (FAQ): Add a question about "excessive" indentation of the contents of a C++
18831 lambda function, and how to get rid of it.
18832
188332017-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
18834
18835 Remove unused vars in cl-extra.el and tramp.el.
18836
18837 * lisp/emacs-lisp/cl-extra.el (cl--print-table): Remove unused vars.
18838
18839 * lisp/net/tramp.el (tramp-dissect-file-name): Remove unused `match'.
18840 (outline-regexp, ls-lisp-use-insert-directory-program): Declare.
18841 (tramp-find-foreign-file-name-handler): Mark unused arg, remove unused `v`.
18842
188432017-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
18844
18845 Improve describe-symbol's layout of slots when describing types
18846
18847 * lisp/emacs-lisp/cl-extra.el (cl--print-table): New function.
18848 (cl--describe-class-slots): Use it.
18849
188502017-03-18 Michael Albinus <michael.albinus@gmx.de>
18851
18852 Fix Bug#26156
18853
18854 * lisp/net/tramp.el (tramp-completion-file-name-handler-alist):
18855 <expand-file-name>: Remove handler. (Bug#26156)
18856
188572017-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
18858
18859 * lisp/obarray.el (obarray-size): Avoid compiler warning.
18860
188612017-03-18 Eli Zaretskii <eliz@gnu.org>
18862
18863 Fix last change in lib/Makefile.in
18864
18865 * lib/Makefile.in (srcdir): Define, as including
18866 $(srcdir)/../nt/gnulib-cfg.mk needs that.
18867
188682017-03-18 Paul Eggert <eggert@cs.ucla.edu>
18869
18870 * configure.ac: Fix typo in diagnostic.
18871
188722017-03-18 Paul Eggert <eggert@cs.ucla.edu>
18873
18874 Port out-of-source builds to windows-nt
18875
18876 Problem reported by Angelo Graziosi in:
18877 http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00431.html
18878 * lib/Makefile.in: Prepend $(srcdir) to ../nt/gnulib-cfg.mk,
18879 to handle out-of-source builds if windows-nt.
18880
188812017-03-17 Eli Zaretskii <eliz@gnu.org>
18882
18883 MS-Windows followup for switch from Automake
18884
18885 * nt/INSTALL:
18886 * nt/INSTALL.W64: Remove references to Automake. (Bug#26100)
18887
188882017-03-17 Eli Zaretskii <eliz@gnu.org>
18889
18890 Improve documentation of interactive "r".
18891
18892 * doc/lispref/commands.texi (Interactive Codes): Mention that mark
18893 must be set for "r" to work.
18894
188952017-03-17 Paul Eggert <eggert@cs.ucla.edu>
18896
18897 Fixups for GNU Make switchover
18898
18899 This fixes some minor problems introduced in the recent switch to GNU
18900 Make, discovered by further testing. Without some of these changes
18901 'make -j' would sometimes have race conditions caused by missing
18902 dependencies. (Bug#26100)
18903 * .gitignore: Remove src/stamp-h.in, src/stamp-h1.
18904 * Makefile.in ($(MAKEFILE_NAME)): Depend on configure, not
18905 src/config.in, since the former's timestamp now represents
18906 the latter's.
18907 ($(srcdir)/configure): Use plain ./autogen.sh, for consistency
18908 with other autogen.sh invocations.
18909 ($(srcdir)/src/stamp-h.in):
18910 Remove rule, as this file is no longer created.
18911 * Makefile.in (top_distclean):
18912 * src/Makefile.in (bootstrap-clean):
18913 No need to remove stamp-h1, as that was an Automake byproduct
18914 and Automake is no longer in use.
18915 * lib/Makefile.in, src/Makefile.in:
18916 (AUTOCONF_INPUTS, $(top_srcdir)/configure): Remove.
18917 (../config.status, Makefile): Simplify by limiting dependencies
18918 to files we care about and files in the repository, and by
18919 using just one file to represent the timestamps on multiple
18920 targets updated by the same rule.
18921 * autogen.sh: Do not create or use src/stamp-h.in.
18922 Instead, have 'find' test the two output files directly.
18923
189242017-03-17 Paul Eggert <eggert@cs.ucla.edu>
18925
18926 Switch from Automake to GNU Make
18927
18928 Emacs assumes GNU Make, and GNU Make has much of the functionality of
18929 Automake built-in. The Emacs build process uses Automake primarily
18930 because Emacs uses some Gnulib code and Gnulib formerly required
18931 Automake. Now that Gnulib no longer requires Automake, Emacs can
18932 stop using Automake and this should simplify Emacs maintenance
18933 in the future (Bug#26100). Although this patch may look long, most of
18934 it is generated automatically: the changes to build-aux/config.guess,
18935 build-aux/config.sub, build-aux/install-sh, and lib/gnulib.mk.in are
18936 all done by admin/merge-gnulib.
18937 * .gitignore: Remove build-aux/ar-lib, build-aux/compile,
18938 build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
18939 build-aux/install-sh, build-aux/missing, and lib/Makefile.in,
18940 as they are no longer built by autogen.sh.
18941 Add lib/gnulib.mk, as it is now built by 'configure'.
18942 Remove nt/gnulib.mk, as it is no longer built by 'make'.
18943 * INSTALL.REPO, README, admin/make-tarball.txt:
18944 Remove mention of Automake.
18945 * Makefile.in (AUTOCONF, AUTOMAKE, AUTOHEADER, ACLOCAL, lib)
18946 (AUTOCONF_INPUTS, ACLOCAL_PATH, ACLOCAL_INPUTS)
18947 ($(srcdir)/aclocal.m4, AUTOMAKE_INPUTS)
18948 ($(srcdir)/lib/Makefile.in, $(srcdir)/nt/gnulib.mk, am--refresh):
18949 Remove.
18950 ($(MAKEFILE_NAME)): Depend on lib/gnulib.mk.in.
18951 ($(srcdir)/configure, $(srcdir)/src/stamp-h.in)
18952 ($(srcdir)/src/config.in):
18953 Use autogen.sh instead of doing it by hand.
18954 * admin/merge-gnulib (AVOIDED_MODULES, avoided_flags)):
18955 New vars, to simplify processing of avoided modules.
18956 (GNULIB_TOOL_FLAGS): Move --avoid flags into AVOIDED_MODULES.
18957 Add --gnu-make, and change makefile name to gnulib.mk.in.
18958 Copy config.guess, config.sub, and install-sh too, since
18959 Automake no longer does that for us.
18960 * admin/notes/copyright:
18961 * admin/update_autogen (genfiles):
18962 Update list of files.
18963 Remove hack for nt/gnulib.mk, a file that is no longer needed.
18964 * autogen.sh (progs): Remove Automake.
18965 (automake_min): Remove.
18966 Build aclocal.m4 so that autoreconf need not use aclocal.
18967 * build-aux/config.guess, build-aux/config.sub:
18968 * build-aux/install-sh:
18969 New files, copied from Gnulib. These are now updated by
18970 admin/merge-gnulib instead by autogen.sh.
18971 * configure.ac (AC_PROG_MAKE_SET, ACLOCAL_PATH, AM_CONDITIONAL):
18972 Remove.
18973 (AM_INIT_AUTOMAKE, AM_SILENT_RULES): Remove call.
18974 (AC_PROG_CC_C_O): Call this instead of AM_PROG_CC_C_O.
18975 (BUILDING_FOR_WINDOWSNT, HYBRID_MALLOC_LIB): Remove; no longer needed.
18976 (--disable-silent-rules): New option, since Automake no longer
18977 does this for us.
18978 (AM_V, AM_DEFAULT_V): Set unconditionally, and do not bother
18979 with AM_SUBST_NOTMAKE.
18980 (AC_PROG_INSTALL): Add call.
18981 (MAKEINFO): Do not bother with the 'missing' program.
18982 (MAKEINFO, SYSTEM_TYPE): AC_SUBST.
18983 (AC_CONFIG_FILES): Add Makefile, lib/gnulib.mk.
18984 (SUBDIR_MAKEFILES): Remove duplication.
18985 * lib/Makefile.am: Remove, replacing with:
18986 * lib/Makefile.in: New file, with the old Makefile.am contents
18987 and with the following changes:
18988 (AUTOMAKE_OPTIONS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST)
18989 (MOSTLYCLEANDIRS, MOSTLYCLEANFILES, noinst_LIBRARIES, SUFFIXES)
18990 (AM_CFLAGS, DEFAULT_INCLUDES, libegnu_a_SOURCES, libegnu_a_LIBADD)
18991 (EXTRA_libegnu_a_SOURCES, libegnu_a_SHORTNAME, libegnu_a_CPPFLAGS):
18992 Remove.
18993 (VPATH, abs_top_builddir, top_builddir, top_srcdir, all, AM_V_AR)
18994 (AM_V_CC, AM_V_GEN, AM_V_at, DEPDIR, DEPFLAGS, MKDEPDIR, SYSTEM_TYPE)
18995 (libgnu.a, libegnu.a, ETAGS, $(ETAGS), tags, TAGS, clean)
18996 (mostlyclean, distclean, bootstrap-clean, maintainer-clean):
18997 New macros and rules, since Automake no longer does them.
18998 Include ../nt/gnulib-cfg.mk if SYSTEM_TYPE is windows-nt,
18999 instead of including ../nt/gnulib.mk if BUILDING_FOR_WINDOWS_NT.
19000 Include dependency files if AUTO_DEPEND.
19001 (ALL_CFLAGS, AUTOCONF_INPUTS, libgnu_a_OBJECTS, libegnu_a_OBJECTS):
19002 New macros.
19003 (bootstrap-clean): Depend on distclean, not maintainer-clean,
19004 and remove gnulib.mk.
19005 (AUTOCONF_INPUTS, $(top_srcdir)/configure, ../config.status, Makefile):
19006 New macros and rules, copied from ../Makefile.in.
19007 ($(libegnu_a_OBJECTS), $(libgnu_a_OBJECTS)): Depend on BUILT_SOURCES.
19008 (.c.o, e-%.o): New generic rules.
19009 * lib/gnulib.mk: Remove.
19010 * lib/gnulib.mk.in: New file, which is built by autogen.sh
19011 and contains much of what used to be in lib/gnulib.mk.
19012 * m4/gnulib-common.m4: Copy from gnulib.
19013 * make-dist: Do not distribute build-aux/compile, build-aux/depcomp,
19014 build-aux/missing, build-aux/ar-lib, lib/Makefile.am, nt/gnulib.mk,
19015 nt/gnulib-modules-to-delete.cfg. Distribute lib/Makefile.in,
19016 lib/gnulib.mk.in, and nt/gnulib-cfg.mk instead.
19017 * nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0)
19018 (am__v_GEN_1, ${srcdir}/gnulib.mk): Remove.
19019 * nt/gnulib-cfg.mk: New file, which supersedes ...
19020 * nt/gnulib-modules-to-delete.cfg: ... this file, which is removed.
19021 * src/Makefile.in (ACLOCAL_INPUTS): Remove.
19022 (AUTOCONF_INPUTS): Merge ACLOCAL_INPUTS into it.
19023 ($(top_srcdir)/configure, ../config.status, config.in Makefile):
19024 Defer to parent Makefile.
19025
190262017-03-17 Paul Eggert <eggert@cs.ucla.edu>
19027
19028 Don't suggest Mailutils on MS-Windows
19029
19030 * configure.ac: Don't suggest GNU Mailutils on MS-Windows, as it
19031 hasn't been ported.
19032
190332017-03-17 Thien-Thi Nguyen <ttn@gnu.org>
19034
19035 Fix bug: Range-check integer ‘alpha’ frame parm value
19036
19037 Typo introduced 2013-04-01, "Prefer < to >
19038 in range checks such as 0 <= i && i < N".
19039
19040 * src/frame.c (x_set_alpha): Use ‘ialpha’, not ‘alpha’.
19041
190422017-03-17 Thien-Thi Nguyen <ttn@gnu.org>
19043
19044 Fix bug: Range-check integer ‘alpha’ frame parm value
19045
19046 Typo introduced 2013-04-01, "Prefer < to >
19047 in range checks such as 0 <= i && i < N".
19048
19049 * src/frame.c (x_set_alpha): Use ‘ialpha’, not ‘alpha’.
19050
190512017-03-17 Michael Albinus <michael.albinus@gmx.de>
19052
19053 Fix Bug#26127
19054
19055 * lisp/filenotify.el (file-notify--rm-descriptor): Check, that
19056 there is a function which could be called. (Bug#26127)
19057
19058 * test/lisp/filenotify-tests.el (file-notify--test-cleanup):
19059 Clear also `file-notify-descriptors'.
19060 (file-notify--test-make-temp-name): Move up.
19061 (file-notify-test02-rm-watch): New test.
19062 (file-notify-test03-events, file-notify-test04-autorevert)
19063 (file-notify-test05-file-validity)
19064 (file-notify-test06-dir-validity)
19065 (file-notify-test07-many-events, file-notify-test08-backup)
19066 (file-notify-test09-watched-file-in-watched-dir)
19067 (file-notify-test10-sufficient-resources): Rename.
19068
190692017-03-17 Paul Eggert <eggert@cs.ucla.edu>
19070
19071 * etc/PROBLEMS: Say that HP-UX cc doesn't work.
19072
190732017-03-17 Paul Eggert <eggert@cs.ucla.edu>
19074
19075 Emacs 'movemail' is now a configure-time option
19076
19077 The new configure option --with-mailutils lets the builder say
19078 that Emacs should assume that GNU Mailutils is installed, instead
19079 of continuing to build and install its own limited and insecure
19080 substitute for 'movemail'.
19081 * INSTALL, etc/NEWS, etc/PROBLEMS: Mention --with-mailutils.
19082 * configure.ac: Add --with-mailutils option.
19083 (with_mailutils): New variable.
19084 Do not bother configuring 'movemail' when not building it.
19085 Warn about issues relating to --with-mailutils.
19086 * doc/emacs/rmail.texi (Movemail): Mention --with-mailutils.
19087 (Movemail, Remote Mailboxes): Document port numbers in
19088 POP and IMAP URLs.
19089 * lib-src/Makefile.in (with_mailutils): New macro.
19090 (UTILITIES): Use it.
19091
190922017-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
19093
19094 Add obarray-size and fix tests accordingly. Use obarrayp in cedet.
19095
19096 * lisp/obarray.el (obarray-size): New function.
19097
19098 * lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-symbol)
19099 (semantic-lex-spp-save-table, semantic-lex-spp-macros):
19100 * lisp/cedet/semantic/bovine/c.el (semantic-c-describe-environment):
19101 Use obarrayp.
19102
19103 * test/lisp/obarray-tests.el (obarray-make-default-test)
19104 (obarray-make-with-size-test): Use it.
19105
191062017-03-16 Michael Albinus <michael.albinus@gmx.de>
19107
19108 Document remote file name syntax change
19109
19110 * doc/emacs/files.texi (Remote Files, Quoted File Names):
19111 * doc/misc/org.texi (dir): Change examples to use a method.
19112
19113 * doc/misc/tramp.texi (Top) [trampf]: Remove macro. Add
19114 `Testing' menu entry.
19115 (History): Fix typos. Mention syntax change.
19116 (Configuration, Default Host, File name Syntax)
19117 (File name completion, Frequently Asked Questions):
19118 Change examples to use a method.
19119 (External methods, Default Host, Multi-hops, Remote processes):
19120 Fix typos.
19121 (Default Method): Mention pseudo method "-".
19122 (External packages): Rewrite intention of `non-essential'.
19123
19124 * etc/NEWS: Mark recent Tramp entries as documented.
19125
191262017-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
19127
19128 (semantic-lex-type-invalid): Fix nested backquote.
19129
19130 * lisp/cedet/semantic/lex.el: Use lexical-binding.
19131 (semantic-lex-type-invalid): Fix nested backquote.
19132 (semantic-lex-map-symbols, semantic-lex-type-symbol)
19133 (semantic-lex-keyword-symbol): Use obarrayp.
19134
191352017-03-15 Michael Albinus <michael.albinus@gmx.de>
19136
19137 * lisp/ido.el (ido-read-internal, ido-complete): Do not bind `non-essential'.
19138
191392017-03-15 Mark Oteiza <mvoteiza@udel.edu>
19140
19141 Write a named function
19142
19143 * lisp/comint.el (comint-nonblank-p): New function.
19144 (comint-input-filter): Use it.
19145
191462017-03-15 Mark Oteiza <mvoteiza@udel.edu>
19147
19148 Replace more nested ifs with cond
19149
19150 This is a continuation of 0db5ba4 "Replace nested ifs with cond".
19151 * lisp/play/dunnet.el (dun-special-object, dun-inven, dun-drop):
19152 (dun-drop-check, dun-swim, dun-break): Use when and cond where
19153 appropriate.
19154 (dun-examine): Fix indentation.
19155 (dun-doverb): Use when.
19156 (dun-read-line): Refactor.
19157
191582017-03-15 Noam Postavsky <npostavs@gmail.com>
19159
19160 Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again
19161
19162 Mostly reverts "Simplify ‘delete-trailing-whitespace’ by not treating
19163 \n as whitespace" from 2016-07-04. Setting \n to non-whitespace
19164 causes the regex engine to backtrack a lot when searching for
19165 "\\s-+$" (Bug#26079).
19166
19167 * lisp/simple.el (delete-trailing-whitespace): Don't change newline
19168 syntax, search for "\\s-$" and then skip backward over trailing
19169 whitespace.
19170
191712017-03-14 Paul Eggert <eggert@cs.ucla.edu>
19172
19173 Merge from gnulib
19174
19175 This incorporates:
19176 2017-03-14 snippets: move unadjusted snippet sources to lib
19177 2017-03-14 gnulib-tool: fix typo in comment output
19178 2017-03-14 snippets: work around GNU Make 3.82 VPATH
19179 2017-03-13 gnulib-tool: minor --gnu-make fixups
19180 2017-03-12 gnulib-tool: new option --gnu-make
19181 * .gitignore: Remove lib/arg-nonnull.h, lib/c++defs.h,
19182 lib/warn-on-use.h. Change exception from
19183 build-aux/snippet/_Noreturn.h to lib/_Noreturn.h.
19184 * admin/authors.el (authors-renamed-files-regexps):
19185 * admin/notes/copyright, make-dist:
19186 The snippet files moved from build-aux/snippet to lib.
19187 * lib/_Noreturn.h: Rename from build-aux/snippet/_Noreturn.h.
19188 * lib/arg-nonnull.h: Rename from build-aux/snippet/arg-nonnull.h.
19189 * lib/c++defs.h: Rename from build-aux/snippet/c++defs.h.
19190 * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
19191 * lib/warn-on-use.h: Rename from build-aux/snippet/warn-on-use.h.
19192
191932017-03-14 Eli Zaretskii <eliz@gnu.org>
19194
19195 Fix duplicate wording in Emacs manual
19196
19197 * doc/emacs/programs.texi (Which Function): Delete duplicate
19198 wording. (Bug#26098)
19199
192002017-03-14 Michael Albinus <michael.albinus@gmx.de>
19201
19202 Reenable lost Tramp test case
19203
19204 * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
19205 Reenable lost test case.
19206
192072017-03-14 Alan Third <alan@idiocy.org>
19208
19209 Revert "Remove NSEvent loop from ns_select (bug#25265)"
19210
19211 This reverts commit 3bd2e9e975ed29daaf03ca7559e4664aade0674f.
19212
192132017-03-14 Alan Third <alan@idiocy.org>
19214
19215 Revert "Add missing timeout value in ns_select"
19216
19217 This reverts commit a65236214d9202fb69a6ba5169d4ac1a4bcb0b0d.
19218
192192017-03-14 Alan Third <alan@idiocy.org>
19220
19221 Remove old macOS compatibility code
19222
19223 * src/nsimage.m, src/nsmenu.m, src/nsterm.m: Remove code only for
19224 macOS versions below 10.6 as they are not supported in Emacs 25+.
19225
192262017-03-14 Michael Albinus <michael.albinus@gmx.de>
19227
19228 Tune `tramp-completion-file-name-regexp-unified'
19229
19230 * lisp/net/tramp.el (tramp-completion-file-name-regexp-unified):
19231 Extend this regexp to match also "/".
19232
192332017-03-14 Tino Calancha <tino.calancha@gmail.com>
19234
19235 Show ancestor buffer in 3way merges
19236
19237 Add an option ediff-show-ancestor', to control if the ancestor buffer
19238 must be shown in 3way merges (Bug#25493); set it non-nil by default.
19239 Add a toggle to change this option interactively; the original
19240 value of the option is restored on exit.
19241
19242 Update the window setup so that the ancestor buffer is
19243 shown in 3way merges when ediff-show-ancestor is non-nil.
19244
19245 Any operation on ediff windows must take in account the
19246 ancestor window as well, when this is shown.
19247
19248 * lisp/vc/ediff-init.el (ediff-show-ancestor): New option.
19249 (ediff--show-ancestor-orig): New defvar.
19250 * lisp/vc/ediff-wind.el (ediff-window-Ancestor): New defvar.
19251 (ediff-setup-windows-plain-merge, ediff-setup-windows-multiframe-merge):
19252 Display ancestor buffer if ediff-show-ancestor is non-nil.
19253 (ediff-keep-window-config): Expect ancestor window in
19254 ediff-window-config-saved.
19255 (ediff-window-alist): Add entry for the ancestor window.
19256 * lisp/vc/ediff-util.el (ediff-setup-control-buffer):
19257 ediff-window-config-saved contains ancestor window.
19258 (ediff-show-ancestor): Delete this command.
19259 (ediff-setup-keymap): Bind ediff-toggle-show-ancestor to '/' for merge jobs.
19260 (ediff-update-diffs): Compute new diffs using ancestor buffer in 3way merges;
19261 don't cheat it to think that is performing a comparison, that trick is not
19262 necessary anymore: simply call 'ediff-setup-diff-regions-function'
19263 with file-A, file-B and the file ancestor.
19264 (ediff-recenter): Update doc string. Consider the ancestor buffer.
19265 (ediff--check-ancestor-exists): New defun.
19266 (ediff-toggle-show-ancestor): New command; toggle ediff-show-ancestor.
19267 (ediff--restore-options-on-exit): Restore ediff-show-ancestor on exit.
19268 (ediff-scroll-vertically, ediff-scroll-horizontally)
19269 (ediff-operate-on-windows): Consider the ancestor as well.
19270 * lisp/vc/ediff-help.el (ediff-long-help-message-merge):
19271 List ediff-toggle-show-ancestor.
19272 * doc/misc/ediff.texi (Introduction, Quick Help Commands): Update manual.
19273
192742017-03-14 Tino Calancha <tino.calancha@gmail.com>
19275
19276 diff-mode: Improve default faces for buffer ancestor
19277
19278 * lisp/vc/ediff-init.el (ediff-current-diff-Ancestor)
19279 (ediff-fine-diff-Ancestor): Use defaults consistent with
19280 faces for 'ediff-buffer-A' and 'ediff-buffer-B'.
19281
192822017-03-14 Hong Xu <hong@topbug.net>
19283
19284 * lisp/paren.el (show-paren--default, show-paren-function): Add docstring.
19285
192862017-03-13 Paul Eggert <eggert@cs.ucla.edu>
19287
19288 Fix make-dist typo
19289
19290 * make-dist: Fix typo introduced in the Bug#25895 fix.
19291
192922017-03-13 Eli Zaretskii <eliz@gnu.org>
19293
19294 Fix wording in Emacs manual
19295
19296 * doc/emacs/text.texi (Paragraphs): Fix a garbled sentence.
19297 (Bug#26086)
19298
192992017-03-13 Michael Albinus <michael.albinus@gmx.de>
19300
19301 etc/NEWS: Remote file names require a method.
19302
193032017-03-13 Michael Albinus <michael.albinus@gmx.de>
19304
19305 Require method in remote file name syntax
19306
19307 * lisp/minibuffer.el (completion--nth-completion):
19308 Do not bind `non-essential'.
19309
19310 * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
19311 * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
19312 * lisp/net/tramp-sh.el (tramp-maybe-open-connection):
19313 * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call
19314 `tramp-check-proper-method-and-host'.
19315
19316 * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces.
19317 (tramp-maybe-open-connection): Do not use argument for
19318 ´tramp-completion-mode-p'.
19319
19320 * lisp/net/tramp.el (tramp-default-method-marker): New defconst.
19321 (tramp-prefix-format, tramp-postfix-method-format)
19322 (tramp-prefix-ipv6-format, tramp-postfix-ipv6-format)
19323 (tramp-prefix-port-format, tramp-postfix-host-format)
19324 (tramp-file-name-regexp, tramp-completion-file-name-regexp):
19325 Use `eq' instead of `eqal'.
19326 (tramp-method-regexp, tramp-domain-regexp)
19327 (tramp-remote-file-name-spec-regexp)
19328 (tramp-file-name-regexp-unified)
19329 (tramp-completion-file-name-regexp-unified)
19330 (tramp-completion-file-name-regexp-separate): Adapt regexp.
19331 (tramp-completion-file-name-handler-alist)
19332 (tramp-run-real-handler): Autoload them.
19333 (tramp-find-method): Handle `tramp-default-method-marker'.
19334 (tramp-check-proper-method-and-host)
19335 (tramp-completion-run-real-handler): Remove them.
19336 (tramp-error-with-buffer, tramp-connectable-p): Do not use
19337 argument for ´tramp-completion-mode-p'.
19338 (tramp-find-foreign-file-name-handler): Remove COMPLETION
19339 argument. Do not apply heuristic for completion.
19340 (tramp-file-name-handler): Do not modify `non-essential'.
19341 (tramp-completion-file-name-handler): Change implementation.
19342 (tramp-autoload-file-name-handler)
19343 (tramp-completion-handle-file-name-all-completions):
19344 Call `tramp-run-real-handler'.
19345 (tramp-completion-mode-p): Do not autoload. Remove argument.
19346 Do not apply heuristic for completion.
19347 (tramp-completion-dissect-file-name): Simplify implementation.
19348 (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'.
19349
19350 * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
19351 (tramp-test02-file-name-dissect)
19352 (tramp-test03-file-name-defaults)
19353 (tramp-test06-directory-file-name): Adapt to the new syntax.
19354 (tramp-test11-copy-file, tramp-test12-rename-file)
19355 (tramp--test-check-files): Deactivate temporarily tests with
19356 quoted file names.
19357 (tramp-test16-directory-files, tramp-test17-insert-directory):
19358 Adapt tests.
19359 (tramp-test24-file-name-completion): Do not check for
19360 completion mode.
19361 (tramp-test31-make-auto-save-file-name): Deactivate temporarily
19362 two tests.
19363
193642017-03-13 Eli Zaretskii <eliz@gnu.org>
19365
19366 Fix bidi paragraph direction when inserting text at newline
19367
19368 * src/insdel.c (invalidate_buffer_caches): Invalidate the bidi
19369 paragraph cache when inserting immediately after a newline.
19370 (Bug#26083)
19371
193722017-03-13 Tino Calancha <tino.calancha@gmail.com>
19373
19374 * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Fix regexp.
19375
193762017-03-13 Stefan Monnier <monnier@iro.umontreal.ca>
19377
19378 * lisp/emacs-lisp/cl-print.el (cl-print-compiled): New variable
19379
19380 (cl-print-object) <compiled-function>: Print the docstring and
19381 interactive form. Obey cl-print-compiled.
19382
193832017-03-13 Noam Postavsky <npostavs@gmail.com>
19384
19385 Fix indent-sexp when called from inside a string (Bug#21343)
19386
19387 * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Get initial syntax parse
19388 state from `syntax-ppss'.
19389
193902017-03-13 Noam Postavsky <npostavs@gmail.com>
19391
19392 * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Simplify.
19393
19394 * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp):
19395 (indent-subsexp, indent-sexp-in-string): New tests.
19396
193972017-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
19398
19399 Use switch on pseudovector types; plus cleanups along the way
19400
19401 * src/lisp.h (PSEUDOVECTOR_TYPE): New function, extracted from mark_object.
19402 (PSEUDOVECTOR_TYPEP): Change type of `code'.
19403
19404 * src/alloc.c (sweep_vectors): Remove out-of-date assertion.
19405 (mark_object): Use PSEUDOVECTOR_TYPE.
19406
19407 * src/data.c (Ftype_of): Use switch on pvec type.
19408
19409 * src/print.c (print_object): Use switch on pvec type.
19410
19411 * lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-types):
19412 Add recently added types.
19413
194142017-03-12 Paul Eggert <eggert@cs.ucla.edu>
19415
19416 Install update-game-score only on request
19417
19418 Most distributions do not install update-game-score properly
19419 due to setuid/setgid complications, so install it only when
19420 the installer specifies a user or group (Bug#25895).
19421 * .gitattributes: Remove lib-src/update-game-score.exe.manifest.
19422 * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME):
19423 New vars.
19424 (epaths-force): Use PATH_GAME.
19425 (uninstall): Remove snake-scores and tetris-scores only if shared.
19426 * configure.ac: Default --with-gameuser to 'no'.
19427 (UPDATE_MANIFEST): Remove.
19428 * etc/NEWS: Mention this.
19429 * lib-src/Makefile.in (UPDATE_MANIFEST): Remove.
19430 (use_gamedir): New macro.
19431 (UTILITIES): Remove update-game-score unless use_gamedir.
19432 (SCRIPTS): Remove $(UPDATE_MANIFEST).
19433 ($(DESTDIR)${archlibdir}): Install game directory program and data
19434 only if use_gamedir.
19435 * lib-src/update-game-score.exe.manifest: Remove, as
19436 update-game-score is no longer installed on MS-Windows.
19437 * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
19438 Use auxiliary program only if setuid or setgid.
19439 * make-dist: Do not distribute update-game-score.exe.manifest.
19440 * src/callproc.c (init_callproc):
19441 Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT.
19442 (syms_of_callproc): Remove unnecessary initialization of
19443 Vshared_game_score_directory.
19444
194452017-03-12 Simen Heggestøyl <simenheg@gmail.com>
19446
19447 Add `touch-action' to list of CSS properties
19448
19449 * lisp/textmodes/css-mode.el (css-property-alist): Add `touch-action'
19450 property.
19451
194522017-03-12 Eli Zaretskii <eliz@gnu.org>
19453
19454 Teach etags to process ENUM_BF correctly
19455
19456 * lib-src/etags.c (sym_type): New enumeration value st_C_enum_bf.
19457 (hash): Regenerated values for asso_values[] array.
19458 (in_word_set): Update values of TOTAL_KEYWORDS and
19459 MAX_HASH_VALUE. Add "ENUM_BF" to the wordlist[] array.
19460 (in_enum_bf): New file-global variable.
19461 (consider_token): Skip ENUM_BF if not in a macro definition.
19462 (C_entries): Reset the in_enum_bf flag when past its closing
19463 parenthesis.
19464
19465 * test/manual/etags/ETAGS.good_1:
19466 * test/manual/etags/ETAGS.good_2:
19467 * test/manual/etags/ETAGS.good_3:
19468 * test/manual/etags/ETAGS.good_4:
19469 * test/manual/etags/ETAGS.good_5:
19470 * test/manual/etags/ETAGS.good_6:
19471 * test/manual/etags/CTAGS.good: Adapt to changes in etags.
19472
194732017-03-12 Michael Albinus <michael.albinus@gmx.de>
19474
19475 Use path/to/file instead of path/to.file in tramp.texi
19476
19477 * doc/misc/tramp.texi (Configuration, File name Syntax):
19478 Use path/to/file instead of path/to.file.
19479
194802017-03-12 Paul Eggert <eggert@cs.ucla.edu>
19481
19482 Remove some stray gnulib files
19483
19484 * admin/merge-gnulib: rm m4/gnulib-tool.m4 too.
19485 (GNULIB_MODULES): Remove unsetenv, as it is not needed and
19486 the --avoid=unsetenv option avoided most of it anyway.
19487 * lib/unsetenv.c, m4/gnulib-tool.m4, m4/setenv.m4: Remove.
19488 * lib/gnulib.mk: Regenerate.
19489
194902017-03-12 Paul Eggert <eggert@cs.ucla.edu>
19491
19492 Merge from gnulib
19493
19494 This incorporates:
19495 2017-03-11 gnulib-common.m4: avoid aclocal.m4 bloat
19496 * doc/misc/texinfo.tex, m4/gnulib-common.m4: Copy from gnulib.
19497
194982017-03-12 Glenn Morris <rgm@gnu.org>
19499
19500 Remove trivial duplication in epg-config
19501
19502 * lisp/epg-config.el (epg-config--program-alist):
19503 Use epg-gpg-minimum-version.
19504
195052017-03-12 Glenn Morris <rgm@gnu.org>
19506
19507 Small epg-find-configuration improvement
19508
19509 * lisp/epg-config.el (epg-find-configuration):
19510 Handle epg-gpg-program customized but not saved. (Bug#25947)
19511
195122017-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
19513
19514 Improve last change
19515
19516 * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
19517 Use ppss to check escaping and add help-echo.
19518
195192017-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
19520
19521 Highlight useless backslashes in Elisp strings
19522
19523 * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
19524 Put warning face on backslashes that have no effect.
19525
195262017-03-11 Eli Zaretskii <eliz@gnu.org>
19527
19528 Document how to customize input methods
19529
19530 * doc/emacs/mule.texi (Input Methods): Document how to customize
19531 input methods.
19532
195332017-03-11 Eli Zaretskii <eliz@gnu.org>
19534
19535 * lisp/net/eww.el (eww-reload): Doc fix. (Bug#25981)
19536
195372017-03-11 Eli Zaretskii <eliz@gnu.org>
19538
19539 Fix generation of nt/gnulib.mk on macOS
19540
19541 * nt/Makefile.in (${srcdir}/gnulib.mk): Don't use the -f- option
19542 to Sed, as that is not portable with non-GNU Sed variants.
19543 (Bug#26043)
19544
195452017-03-11 Eli Zaretskii <eliz@gnu.org>
19546
19547 Avoid aborts/assertion violations due to 'vim-empty-lines-mode'
19548
19549 * src/xdisp.c (handle_single_display_spec): If position to be
19550 restored after processing the display property comes from an
19551 overlay, protect against that overlay's end point being outside of
19552 the narrowed region.
19553 Reported by Filipe Silva <filipe.silva@gmail.com> in
19554 http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00176.html.
19555
195562017-03-10 Glenn Morris <rgm@gnu.org>
19557
19558 Small improvement for epa-display-error (bug#24553)
19559
19560 * lisp/epa.el (epa-display-error): Report the actual program in use.
19561
195622017-03-10 Paul Eggert <eggert@cs.ucla.edu>
19563
19564 Tweak X toolkit code to pacify modern GCC
19565
19566 * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c:
19567 Don’t include <stdlib.h>, since this code now calls emacs_abort
19568 rather than abort.
19569 * lwlib/lwlib-Xaw.c (make_dialog, xaw_generic_callback)
19570 (wm_delete_window):
19571 * lwlib/lwlib-Xm.c (make_menu_in_widget, do_call):
19572 * lwlib/lwlib.c (instantiate_widget_instance, lw_make_widget):
19573 * lwlib/xlwmenu.c (abort_gracefully, draw_separator)
19574 (separator_height, XlwMenuInitialize):
19575 Use emacs_abort, not abort. Without this change, some calls
19576 to ‘abort’ were invalid, as stdlib.h was not always included.
19577 * src/widget.c (resources, emacsFrameClassRec):
19578 * src/xfns.c (x_window) [USE_X_TOOLKIT]:
19579 * src/xmenu.c (create_and_show_popup_menu) [USE_X_TOOLKIT]:
19580 * src/xterm.c (emacs_options) [USE_X_TOOLKIT}:
19581 (x_term_init) [USE_X_TOOLKIT]:
19582 Cast string constants to char * to pacify --enable-gcc-warnings.
19583
195842017-03-10 Michael Albinus <michael.albinus@gmx.de>
19585
19586 * doc/misc/tramp.texi (Android shell setup): Require adb program
19587
195882017-03-10 Michael Albinus <michael.albinus@gmx.de>
19589
19590 Adapt tramp-tests.el
19591
19592 * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name)
19593 (tramp-test24-file-name-completion): Call
19594 `tramp-completion-mode-p' with argument.
19595
195962017-03-10 Thien-Thi Nguyen <ttn@gnu.org>
19597
19598 [doc] Replace bindat example: s/fortune cookie/rfc868 payload/
19599
19600 * doc/lispref/processes.texi (Bindat Examples):
19601 Mention two examples in intro blurb; rewrite first example.
19602
196032017-03-10 Paul Eggert <eggert@cs.ucla.edu>
19604
19605 Simplify checks for xdg-open and xdg-email
19606
19607 browse-url's xdg-open detection was too picky on some GNU/Linux
19608 desktops; see Bug#25778. Simplify the code by assuming xdg-open works
19609 if it is executable, as nowadays this is more likely to be correct than
19610 trying to use heuristics from a few years ago. Don't test for nohup: it
19611 is ineffective nowadays, as xdg-open's child uses the default action for
19612 SIGHUP even if xdg-open's invoker ignores SIGHUP. While we're at it,
19613 allow for Wayland here, as "emacs -nw" might be running in a non-X
19614 Wayland terminal.
19615 * lisp/mail/emacsbug.el (report-emacs-bug-can-use-xdg-email):
19616 * lisp/net/browse-url.el (browse-url-can-use-xdg-open):
19617 Simplify to a test for DISPLAY and whether the helper program is
19618 executable. Allow WAYLAND_DISPLAY as an option.
19619
196202017-03-09 Vibhav Pant <vibhavp@gmail.com>
19621
19622 Byte compile cond clauses without any bodies correctly.
19623
19624 * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table): When a
19625 cond clause has no body, push t on to the stack.
19626
196272017-03-09 Michael Albinus <michael.albinus@gmx.de>
19628
19629 Fix bug#23006
19630
19631 * lisp/minibuffer.el (completion--nth-completion):
19632 Let-bind `non-essential'.
19633
19634 * lisp/net/tramp.el (tramp-completion-mode): Fix docstring.
19635 (tramp-completion-mode-p): Optional parameter VEC. Replace
19636 check for `last-input-event' by analysing VEC argument.
19637 (tramp-error-with-buffer, tramp-file-name-handler)
19638 (tramp-connectable-p, tramp-handle-file-name-as-directory):
19639 * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it.
19640
196412017-03-09 Vibhav Pant <vibhavp@gmail.com>
19642
19643 etc/NEWS: Add entry for new `switch' bytecode.
19644
196452017-03-08 Paul Eggert <eggert@cs.ucla.edu>
19646
19647 * src/data.c (arithcompare): Add comments.
19648
196492017-03-08 Glenn Morris <rgm@gnu.org>
19650
19651 Update a cl-print test
19652
19653 * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1):
19654 Update for recent change in cl-print-object function output.
19655
196562017-03-08 Sam Steingold <sds@gnu.org>
19657
19658 Replace change-log-date-face -> change-log-date
19659
19660 This fixes c430f7e23fc2c22f251ace4254e37dea1452dfc3.
19661
196622017-03-08 Michael Albinus <michael.albinus@gmx.de>
19663
19664 Fix bug#26011
19665
19666 * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer):
19667 Check, whether file is too large. (Bug#26011)
19668
196692017-03-08 Andreas Schwab <schwab@linux-m68k.org>
19670
19671 * data.c (minmax_driver): Use CHECK_NUMBER_OR_FLOAT_COERCE_MARKER.
19672 (Fmax, Fmin): Restore documentation.
19673
19674 * data.c (cons_to_unsigned, cons_to_signed, Fstring_to_number): Reorder
19675 comparisons that are written backward.
19676
196772017-03-08 Thien-Thi Nguyen <ttn@gnu.org>
19678
19679 [doc elisp] Add some index entries for "old" advice mechanism
19680
19681 * doc/lispref/functions.texi (Porting old advice):
19682 Add one @cindex and two @findex entries.
19683
196842017-03-08 Paul Eggert <eggert@cs.ucla.edu>
19685
19686 * etc/NEWS: Adjust to match previous patch.
19687
196882017-03-08 Paul Eggert <eggert@cs.ucla.edu>
19689
19690 min and max should not return markers
19691
19692 Problem reported by Glenn Morris in:
19693 http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00147.html
19694 * src/data.c (minmax_driver): Convert any marker result to an
19695 integer, since some callers assume this.
19696 * test/src/data-tests.el (data-tests-max, data-tests-min):
19697 Test for this.
19698
196992017-03-08 Stefan Monnier <monnier@iro.umontreal.ca>
19700
19701 * lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.
19702
197032017-03-08 Alan Third <alan@idiocy.org>
19704
19705 Add missing timeout value in ns_select
19706
19707 * src/nsterm.m (ns_select): Set timeout to distant future when relying
19708 on fd_handler's timeout.
19709
197102017-03-07 Glenn Morris <rgm@gnu.org>
19711
19712 * admin/update_autogen: Ensure nt/gnulib.mk exists, for autoreconf.
19713
197142017-03-07 Paul Eggert <eggert@cs.ucla.edu>
19715
19716 Remove isnan hack for Solaris 10 gcc 3.4.3
19717
19718 This seems to have been a false alarm (Bug#26018).
19719 * src/data.c (isnan):
19720 * src/floatfns.c (isfinite, isnan):
19721 Use standard implementation if available.
19722
197232017-03-07 Eli Zaretskii <eliz@gnu.org>
19724
19725 Support browsing URLs with embedded spaces on MS-Windows
19726
19727 * lisp/net/browse-url.el (browse-url-default-windows-browser):
19728 Unhex %XX hex-encoded characters, as w32-shell-execute doesn't
19729 support that in file:// URLs. (Bug#26014)
19730
197312017-03-07 Paul Eggert <eggert@cs.ucla.edu>
19732
19733 Define copysign on all platforms
19734
19735 * configure.ac (copysign): Remove test.
19736 * src/floatfns.c (signbit): New macro, if not already defined.
19737 (Fcopysign): Use it instead of copysign.
19738 (Fcopysign, syms_of_floatfns): Define the function on all platforms.
19739
197402017-03-07 Phillip Lord <phillip.lord@russet.org.uk>
19741
19742 Revert "Replace ldefs-boot with a much smaller file"
19743
19744 This reverts commit c27b645956a11fab1dd8fa189254d525390958f5.
19745
19746 This commit has been reverted because the new mechanism was too
19747 sensitive to changes in the lisp source, generation of new ldefs-boot
19748 files was platform specific and resulted in warnings about undefined
19749 variables.
19750
19751 See also 11436e2890d.
19752
197532017-03-07 Phillip Lord <phillip.lord@russet.org.uk>
19754
19755 Revert "Record autoloads till emacs dump"
19756
19757 This reverts commit 72c668a9042ac6475eadedfee5c87fb1e6b2d753.
19758
19759 This commit has been reverted because the new mechanism was too
19760 sensitive to changes in the lisp source, generation of new ldefs-boot
19761 files was platform specific and resulted in warnings about undefined
19762 variables.
19763
19764 See also 11436e2890d.
19765
197662017-03-07 Phillip Lord <phillip.lord@russet.org.uk>
19767
19768 Revert "Remove unused ldefs-boot.el"
19769
19770 This reverts commit ef8c9f8fc922b615aca91b47820d1f1900fddc96.
19771
19772 This commit has been reverted because the new mechanism was too
19773 sensitive to changes in the lisp source, generation of new ldefs-boot
19774 files was platform specific and resulted in warnings about undefined
19775 variables.
19776
19777 See also 11436e2890d.
19778
197792017-03-07 Phillip Lord <phillip.lord@russet.org.uk>
19780
19781 Revert "Remove conditional includes from bootstrap"
19782
19783 This reverts commit 1b946305182312faa7fcd838caf55dcb07b2ab04.
19784
19785 This commit has been reverted because the new mechanism was too
19786 sensitive to changes in the lisp source, generation of new ldefs-boot
19787 files was platform specific and resulted in warnings about undefined
19788 variables.
19789
19790 See also 11436e2890d.
19791
197922017-03-07 Phillip Lord <phillip.lord@russet.org.uk>
19793
19794 Revert "Speed generation of ldefs-boot-auto"
19795
19796 This reverts commit 7b5e1c8238ef961fd3305b1dce053b9bced684ba.
19797
19798 This commit has been reverted because the new mechanism was too
19799 sensitive to changes in the lisp source, generation of new ldefs-boot
19800 files was platform specific and resulted in warnings about undefined
19801 variables.
19802
19803 See also 11436e2890d.
19804
198052017-03-07 Phillip Lord <phillip.lord@russet.org.uk>
19806
19807 Revert "Fix minor problems with loaddefs autogeneration"
19808
19809 This reverts commit f2bd2c1e6476acc71e71f6cb2a1c56c5edd900ba.
19810
19811 This commit has been reverted because the new mechanism was too
19812 sensitive to changes in the lisp source, generation of new ldefs-boot
19813 files was platform specific and resulted in warnings about undefined
19814 variables.
19815
198162017-03-07 Noam Postavsky <npostavs@gmail.com>
19817
19818 Set default when asking for send-mail-function (Bug#25874).
19819
19820 * lisp/mail/sendmail.el (sendmail-query-user-about-smtp): Pass first
19821 option as default for `completing-read'.
19822
198232017-03-07 Paul Eggert <eggert@cs.ucla.edu>
19824
19825 min and max now return one of their arguments
19826
19827 * doc/lispref/numbers.texi (Comparison of Numbers):
19828 * etc/NEWS: Document this.
19829 * src/data.c (Amax, Amin): Remove constants. All uses removed.
19830 (minmax_driver): New function.
19831 (Fmax, Fmin): Use it instead of arith_driver.
19832 * test/src/data-tests.el (data-tests-max, data-tests-min): New tests.
19833
198342017-03-06 Alan Third <alan@idiocy.org>
19835
19836 Remove NSEvent loop from ns_select (bug#25265)
19837
19838 * src/nsterm.m (ns_select): Remove event processing loop and replace
19839 with simple test for a new event.
19840
198412017-03-06 Eli Zaretskii <eliz@gnu.org>
19842
19843 A better fix for bug#25845
19844
19845 * src/xdisp.c (font_for_underline_metrics): New function.
19846 * src/dispextern.h: Add its prototype.
19847 * src/xterm.c (x_draw_glyph_string):
19848 * src/w32term.c (x_draw_glyph_string):
19849 * src/nsterm.m (ns_draw_text_decoration): Call it. This avoids
19850 having identical code 3 times in 3 different files.
19851
198522017-03-06 Noam Postavsky <npostavs@gmail.com>
19853
19854 Fix warning message about native completion (Bug#25984)
19855
19856 * lisp/progmodes/python.el (python-shell-completion-native-turn-on-maybe):
19857 The relevant variable is `python-shell-completion-native-enable'.
19858
198592017-03-06 Tom Tromey <tom@tromey.com>
19860
19861 Fix typos in EIEIO manual
19862
19863 * doc/misc/eieio.texi (Slot Options, Class Options): Fix typos.
19864
198652017-03-05 Paul Eggert <eggert@cs.ucla.edu>
19866
19867 Merge from gnulib
19868
19869 This incorporates:
19870 2017-03-04 dtotimespec: simplify
19871 * lib/dtotimespec.c: Copy from gnulib.
19872
198732017-03-05 Paul Eggert <eggert@cs.ucla.edu>
19874
19875 ffloor etc. now accept only floats
19876
19877 * etc/NEWS: Say why.
19878 * src/floatfns.c (Ffceiling, Fffloor, Ffround, Fftruncate):
19879 Require arg to be float.
19880 * test/src/floatfns-tests.el (fround-fixnum): Check this.
19881
198822017-03-05 Eli Zaretskii <eliz@gnu.org>
19883
19884 Fix display of cursor on underlined text
19885
19886 * src/nsterm.m (ns_draw_text_decoration):
19887 * src/xterm.c (x_draw_glyph_string):
19888 * src/w32term.c (x_draw_glyph_string): Compute the position and
19889 thickness of the underline by looking for the first glyph of the
19890 run of underlined glyphs that includes the glyph string we are
19891 drawing. (Bug#25845)
19892
198932017-03-05 Mark Oteiza <mvoteiza@udel.edu>
19894
19895 Add more CL concept index items, print Concept Index
19896
19897 * doc/misc/cl.texi: Print concept index.
19898 (Generalized Variables, Variable Bindings):
19899 (Dynamic Bindings, Function Bindings, Macro Bindings, Conditionals):
19900 (Blocks and Exits, Iteration, Multiple Values): Add concept index
19901 items.
19902
199032017-03-05 Mark Oteiza <mvoteiza@udel.edu>
19904
19905 Add 'loop facility' to the CL concept index
19906
19907 * doc/misc/cl.texi (Loop Facility): Add "loop facility" as a concept
19908 index item.
19909
199102017-03-05 martin rudalics <rudalics@gmx.at>
19911
19912 In `window--display-buffer' fix behavior reported in Bug#25946
19913
19914 * lisp/window.el (window--display-buffer): Set the dedicated
19915 status of the window used and clear its history of previous
19916 buffers also for the case that the window already shows the
19917 buffer to be displayed. (Bug#25946)
19918
199192017-03-05 Paul Eggert <eggert@cs.ucla.edu>
19920
19921 Compare and round more carefully
19922
19923 * etc/NEWS: Document this.
19924 * src/data.c (store_symval_forwarding):
19925 * src/sound.c (parse_sound):
19926 Do not botch NaN comparison.
19927 * src/data.c (cons_to_unsigned, cons_to_signed):
19928 Signal an error if a floating-point arg is not integral.
19929 * src/data.c (cons_to_unsigned, cons_to_signed):
19930 * src/fileio.c (file_offset):
19931 Use simpler overflow check.
19932 * src/dbusbind.c (xd_extract_signed, xd_extract_unsigned):
19933 Avoid rounding error in overflow check.
19934 (Fcar_less_than_car): Use arithcompare directly.
19935 * test/src/charset-tests.el: New file.
19936
199372017-03-05 Paul Eggert <eggert@cs.ucla.edu>
19938
19939 Fewer rounding errors with (format "%f" fixnum)
19940
19941 * etc/NEWS: Document this.
19942 * src/editfns.c (styled_format): When formatting integers via a
19943 floating-point format, use long double instead of double
19944 conversion, if long double’s extra precision might help.
19945
199462017-03-05 Paul Eggert <eggert@cs.ucla.edu>
19947
19948 * src/floatfns.c (Fftruncate): Simplify via emacs_trunc.
19949
19950 * src/editfns.c (styled_format): Omit unnecessary code for "%0d" etc.
19951
199522017-03-04 Eli Zaretskii <eliz@gnu.org>
19953
19954 Clarify documentation of 'raise' and 'height' display specs
19955
19956 * doc/lispref/display.texi (Other Display Specs): Clarify the
19957 effect of 'height' display spec on the following 'raise'.
19958 (Bug#25824)
19959
199602017-03-04 Eli Zaretskii <eliz@gnu.org>
19961
19962 Fix header shown by Info 'L' command
19963
19964 * lisp/info.el (Info-history-find-node): A better heading for the
19965 list of visited nodes. (Bug#25876)
19966
199672017-03-04 K. Handa <handa@gnu.org>
19968
19969 Add a section about incorrect Bengali rendering.
19970
199712017-03-04 Eli Zaretskii <eliz@gnu.org>
19972
19973 Fix minor problems with loaddefs autogeneration
19974
19975 * admin/ldefs-clean.el (ldefs-clean): Bind coding-system-for-read
19976 and coding-system-for-write, to produce a UTF-8 file with Unix
19977 EOLs on MS-Windows.
19978
19979 * lisp/ldefs-boot-manual.el (image-type): Add autoload cookie.
19980
199812017-03-04 David Bremner <david@tethera.net> (tiny change)
19982
19983 Fix issues with dedicated windows in shr.el
19984
19985 * lisp/net/shr.el (shr-pixel-buffer-width, shr-render-td-1): Make
19986 the window not dedicated, to avoid errors if it was, before
19987 setting its buffer temporarily. (Bug#25828)
19988
199892017-03-04 Eli Zaretskii <eliz@gnu.org>
19990
19991 Mention problems with GPaste in PROBLEMS
19992
19993 * etc/PROBLEMS (GPaste): Mention the problem in yanking caused by
19994 GPaste, and its solution. (Bug#25902)
19995
199962017-03-04 Glenn Morris <rgm@gnu.org>
19997
19998 Avoid duplicate gud menu items with gdb-mi
19999
20000 * lisp/progmodes/gud.el (gud-menu-map): Avoid duplicate "Run"
20001 entries in gdbmi mode. (Bug#23923)
20002
200032017-03-03 Paul Eggert <eggert@cs.ucla.edu>
20004
20005 * src/editfns.c (styled_format): Omit unnecessary code.
20006
200072017-03-03 Paul Eggert <eggert@cs.ucla.edu>
20008
20009 logb now works correctly on large integers
20010
20011 * admin/merge-gnulib (GNULIB_MODULES): Add count-leading-zeros.
20012 * etc/NEWS: Document the change.
20013 * lib/count-leading-zeros.c, lib/count-leading-zeros.h:
20014 * m4/count-leading-zeros.m4: New files, copied from Gnulib.
20015 * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
20016 * src/floatfns.c: Include count-leading-zeros.h.
20017 (Flogb): Do not convert fixnum to float before taking the log,
20018 as the rounding error can cause the answer to be off by 1.
20019 * src/lisp.h (EMACS_UINT_WIDTH): New constant.
20020 * test/src/floatfns-tests.el (logb-extreme-fixnum): New test.
20021
200222017-03-03 Paul Eggert <eggert@cs.ucla.edu>
20023
20024 Merge from gnulib
20025
20026 This incorporates:
20027 2017-02-25 maintainer-makefile: Fix AC_PROG_SED with autoconf cache.
20028 2017-02-24 ftoastr: port to -Wdouble-promotion
20029 * lib/ftoastr.c, m4/gnulib-common.m4: Copy from gnulib.
20030
200312017-03-03 Eli Zaretskii <eliz@gnu.org>
20032
20033 Avoid duplicating characters recorded in macros
20034
20035 * src/keyboard.c (record_char): Don't store in macro definitions
20036 characters that came from executing a macro. (Bug#25860)
20037
200382017-03-03 Eli Zaretskii <eliz@gnu.org>
20039
20040 Fix color component calculations in color.el
20041
20042 * lisp/color.el (color-name-to-rgb): Use 16 bits per color component.
20043 (color-rgb-to-hex): Accept an optional argument
20044 DIGITS-PER-COMPONENT, defaulting to 4, and format the hexadecimal
20045 notation either for 8 or 16 bits per component. (Bug#25890)
20046 * lisp/net/shr-color.el (shr-color->hexadecimal): Call
20047 color-rgb-to-hex with the optional argument of 2, to match color
20048 processing on the Web.
20049
200502017-03-03 Tino Calancha <tino.calancha@gmail.com>
20051
20052 Use lexical binding in benchmark.el
20053
20054 * lisp/emacs-lisp/benchmark.el: Enable lexical binding.
20055 (benchmark-elapse): Use 'declare'.
20056 * test/lisp/emacs-lisp/benchmark-tests.el: Add test suite.
20057
200582017-03-03 Noam Postavsky <npostavs@gmail.com>
20059
20060 Switch pp.el to lexical binding
20061
20062 Additionally, do some minor code cleanup.
20063
20064 * lisp/emacs-lisp/pp.el: Set lexical-binding.
20065 (pp-buffer): Use skip-syntax-forward.
20066 (pp-eval-expression): Use push.
20067 (pp-last-sexp): Use with-syntax-table.
20068 * test/lisp/emacs-lisp/pp-tests.el: New tests.
20069
200702017-03-03 Chunyang Xu <mail@xuchunyang.me> (tiny change)
20071
20072 Fix completing-read call in reb-change-syntax
20073
20074 * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Use 'default' arg
20075 of completing-read.
20076
200772017-03-03 Rolf Ade <rolf@pointsman.de> (tiny change)
20078
20079 sql-mode w/ sqlite: In-memory database
20080
20081 Enable the usage of an in-memory database. Prior to this, sql-mode w/
20082 sqlite could only be used with file databases.
20083 * list/progmodes/sql.el (sql-get-login-ext): Don't expand an empty
20084 file name provided by the user, but call sub-process sqlite with that,
20085 in which case it uses an in-memory database.
20086
200872017-03-03 Allen Li <vianchielfaura@gmail.com>
20088
20089 Stop abbrev-prefix-mark from adding extra newline (Bug#25767)
20090
20091 `abbrev--before-point' does not adjust `pos' to account for when it
20092 deletes the "-" left by abbrev-prefix-mark. Therefore, when
20093 `abbrev-before-point' goes to restore point, it moves point one
20094 character too far forward.
20095
20096 * lisp/abbrev.el (abbrev--before-point): Adjust pos when deleting "-".
20097
200982017-03-03 Tino Calancha <tino.calancha@gmail.com>
20099
20100 * lisp/subr.el (apply-partially): Move to 'Basic Lisp functions' section.
20101
201022017-03-02 Paul Eggert <eggert@cs.ucla.edu>
20103
20104 Restore XFLOATINT but with restricted args
20105
20106 Turn instances of extract_float into XFLOAT_DATA when possible,
20107 and to a resurrected XFLOATINT when the arg is a number.
20108 The resurrected XFLOATINT is more like XFLOAT and XINT in
20109 that is valid only if its arg is a number. This clarifies
20110 the ways in which floats can be extracted at the C level.
20111 * src/editfns.c (styled_format):
20112 * src/floatfns.c (extract_float, Fexpt):
20113 Use XFLOATINT rather than open-coding it.
20114 * src/fns.c (internal_equal):
20115 * src/image.c (imagemagick_load_image):
20116 * src/xdisp.c (resize_mini_window):
20117 Prefer XFLOAT_DATA to extract_float on values known to be floats.
20118 * src/frame.c (x_set_screen_gamma):
20119 * src/frame.h (NUMVAL):
20120 * src/image.c (x_edge_detection, compute_image_size):
20121 * src/lread.c (read_filtered_event):
20122 * src/window.c (Fset_window_vscroll):
20123 * src/xdisp.c (handle_single_display_spec, try_scrolling)
20124 (redisplay_window, calc_pixel_width_or_height, x_produce_glyphs)
20125 (on_hot_spot_p):
20126 Prefer XFLOATINT to extract_float on values known to be numbers.
20127 * src/lisp.h (XFLOATINT): Bring back this function, except
20128 it now assumes its argument is a number.
20129
201302017-03-02 Glenn Morris <rgm@gnu.org>
20131
20132 Ert commands to error if no test at point (bug#25931)
20133
20134 * lisp/emacs-lisp/ert.el (ert-results-mode-menu):
20135 Deactivate some items if no test at point.
20136 (ert--results-test-at-point-no-redefinition):
20137 Add option to signal an error rather than return nil.
20138 (ert-results-pop-to-backtrace-for-test-at-point)
20139 (ert-results-pop-to-messages-for-test-at-point)
20140 (ert-results-pop-to-should-forms-for-test-at-point)
20141 (ert-results-describe-test-at-point): Error if no test at point.
20142
201432017-03-02 Paul Eggert <eggert@cs.ucla.edu>
20144
20145 Remove XFLOATINT
20146
20147 * src/lisp.h (XFLOATINT): Remove this alias for extract_float.
20148 All callers changed to use extract_float.
20149 * src/frame.h (NUMVAL): Now an inline function, not a macro.
20150
201512017-03-02 Paul Eggert <eggert@cs.ucla.edu>
20152
20153 Fix rounding errors in <, =, etc.
20154
20155 * etc/NEWS: Document this.
20156 * src/bytecode.c (exec_byte_code):
20157 * src/data.c (arithcompare):
20158 Do not lose information when comparing floats to integers.
20159 * test/src/data-tests.el (data-tests-=, data-tests-<)
20160 (data-tests->, data-tests-<=, data-tests->=):
20161 Test this.
20162
201632017-03-02 Eli Zaretskii <eliz@gnu.org>
20164
20165 Fix display of mouse-highlight produced by overlapping overlays
20166
20167 * src/xfaces.c (face_at_buffer_position): If called to find the
20168 mouse-face, only consider the highest-priority source for that
20169 face, and ignore the rest. Previously, all the mouse-face
20170 definitions at POS were merged in that case.
20171 * src/xdisp.c (note_mouse_highlight): Record the overlay that
20172 specifies mouse-face _after_ clearing the info about the previous
20173 overlay, so as not to clear the information about the just-recorded
20174 overlay. (Bug#25906)
20175
201762017-03-02 Eli Zaretskii <eliz@gnu.org>
20177
20178 Fix display of strike-through text in variable-height lines
20179
20180 * src/nsterm.m (ns_draw_text_decoration):
20181 * src/xterm.c (x_draw_glyph_string):
20182 * src/w32term.c (x_draw_glyph_string): Fix calculation of the
20183 strike-through y-coordinate for a glyph row which is taller than
20184 the strike-through text. (Bug#25907)
20185
201862017-03-02 Martin Rudalics <rudalics@gmx.at>
20187
20188 Don't call x_net_wm_state for scroll bar windows (Bug#24963, Bug#25887)
20189
20190 * src/xterm.c (handle_one_xevent): For ConfigureNotify events
20191 don't call x_net_wm_state when the window is a scroll bar window.
20192 (Bug#24963, Bug#25887)
20193
201942017-03-02 Katsumi Yamaoka <yamaoka@jpl.org>
20195
20196 gnus-summary-select-article-buffer: Don't re-render existing article
20197
20198 * lisp/gnus/gnus-sum.el (gnus-summary-select-article-buffer):
20199 Don't re-render existing article.
20200
202012017-03-02 Katsumi Yamaoka <yamaoka@jpl.org>
20202
20203 Don't add debbugs address to message body (bug#25896)
20204
20205 * lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group):
20206 Don't add debbugs address to message body (bug#25896), and
20207 don't add it to message header either if it already exists.
20208
202092017-03-02 Stefan Monnier <monnier@iro.umontreal.ca>
20210
20211 * lisp/cedet/semantic/db-global.el: Make dynbind use explicit
20212
20213 (semanticdb--ih): Declare.
20214 (semanticdb-enable-gnu-global-databases): Use it instead of `ih'.
20215 (semanticdb-enable-gnu-global-in-buffer, semanticdb-get-database-tables)
20216 (semanticdb-find-tags-for-completion-method): Silence compiler warning.
20217
202182017-03-02 Stefan Monnier <monnier@iro.umontreal.ca>
20219
20220 * lisp/help-fns.el (describe-variable): Use cl-print for the value
20221
20222 Use `pp-buffer' rather than `pp' so as to avoid calling prin1 twice.
20223
202242017-03-02 Glenn Morris <rgm@gnu.org>
20225
20226 * test/lisp/net/puny.el: New file.
20227
202282017-03-02 Glenn Morris <rgm@gnu.org>
20229
20230 Small puny.el fix
20231
20232 * lisp/net/puny.el (puny-decode-string-internal):
20233 Handle strings with no ascii parts. (Bug#23688)
20234
202352017-03-02 Glenn Morris <rgm@gnu.org>
20236
20237 Small recover-this-file improvement
20238
20239 * lisp/files.el (recover-this-file): Explicit error if not
20240 visiting a file. (Bug#23671)
20241
202422017-03-01 Glenn Morris <rgm@gnu.org>
20243
20244 Fix for coding-system completion (bug#23670)
20245
20246 * lisp/international/mule.el (read-buffer-file-coding-system):
20247 Ensure that completion-pcm--delim-wild-regex is enclosed in parens,
20248 so that completion-pcm--pattern->regex can append "*?".
20249
202502017-03-01 Paul Eggert <eggert@cs.ucla.edu>
20251
20252 Fix rounding error in ‘ceiling’ etc.
20253
20254 Without this fix, (ceiling most-negative-fixnum -1.0) returns
20255 most-negative-fixnum instead of correctly signaling range-error,
20256 and similarly for floor, round, and truncate.
20257 * configure.ac (trunc): Add a check, since Gnulib’s doc says
20258 ‘trunc’ is missing from MSVC 9. The Gnulib doc says ‘trunc’ is
20259 also missing from some other older operating systems like Solaris
20260 9 which I know we don’t care about any more, so MSVC is the only
20261 reason to worry about ‘trunc’ here.
20262 * src/editfns.c (styled_format): Formatting a float with %c is now an
20263 error. The old code did not work in general, because FIXNUM_OVERFLOW_P
20264 had rounding errors. Besides, the "if (FLOATP (...))" was in there
20265 only as a result of my misunderstanding old code that I introduced
20266 2011. Although %d etc. is sometimes used on floats that represent
20267 huge UIDs or PIDs etc. that do not fit in fixnums, this cannot
20268 happen with characters.
20269 * src/floatfns.c (rounding_driver): Rework to do the right thing
20270 when the intermediate result equals 2.305843009213694e+18, i.e.,
20271 is exactly 1 greater than MOST_POSITIVE_FIXNUM on a 64-bit host.
20272 Simplify so that only one section of code checks for overflow,
20273 rather than two.
20274 (double_identity): Remove. All uses changed to ...
20275 (emacs_trunc): ... this new function. Add replacement for
20276 platforms that lack ‘trunc’.
20277 * src/lisp.h (FIXNUM_OVERFLOW_P, make_fixnum_or_float):
20278 Make it clear that the arg cannot be floating point.
20279 * test/src/editfns-tests.el (format-c-float): New test.
20280 * test/src/floatfns-tests.el: New file, to test for this bug.
20281
202822017-03-01 Glenn Morris <rgm@gnu.org>
20283
20284 Small help--loaded-p fix
20285
20286 * lisp/help-fns.el (help--loaded-p): Handle entry in load-history
20287 with nil file name. (Bug#25847)
20288
202892017-03-01 Leo Liu <sdl.web@gmail.com>
20290
20291 * src/fns.c (Fbuffer_hash): Doc fix.
20292
202932017-03-01 Eric Abrahamsen <eric@ericabrahamsen.net>
20294
20295 Don't use mapconcat with chars in gnus registry marks (Bug#25839)
20296
20297 * lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
20298 Instead, use a plain concat, which will create a string out of a list
20299 of characters.
20300
203012017-03-01 Noam Postavsky <npostavs@gmail.com>
20302
20303 Fix epg-tests with dummy-pinentry program (Bug#23619)
20304
20305 * test/data/epg/dummy-pinentry: New file.
20306 * test/lisp/epg-tests.el (with-epg-tests): Add it to gpg-agent.conf
20307 when a passphrase is required. Add debug declaration. Set
20308 GPG_AGENT_INFO non-destructively.
20309
203102017-02-28 Phillip Lord <phillip.lord@russet.org.uk>
20311
20312 Speed generation of ldefs-boot-auto
20313
20314 Previously, generation of ldefs-boot-auto required at least one full
20315 bootstrap and, in extreme cases, two. Now, from build system, it
20316 requires the same time as taken to dump Emacs.
20317
20318 * Makefile.in: Remove all calls, pass to src.
20319 * admin/ldefs-clean.el: Update for changed messages.
20320 * lisp/Makefile.in (compile-first-delete): Add.
20321 * lisp/ldefs-boot-auto.el: Update.
20322 * src/Makefile.in (generate-ldefs-boot): Add.
20323
203242017-02-28 Phillip Lord <phillip.lord@russet.org.uk>
20325
20326 Add error handling to magic-mode-alist
20327
20328 * lisp/files.el (set-auto-mode): Add explicit error handling in two
20329 places.
20330
203312017-02-28 Phillip Lord <phillip.lord@russet.org.uk>
20332
20333 Remove conditional includes from bootstrap
20334
20335 Previously, bootstrap-emacs includes optional functionality, depending
20336 on the platform which is not needed for bootstrap function. As a
20337 result, bootstrap-emacs contains different functions in different
20338 circumstances. If ldefs-boot-auto.el is generated, then loaded
20339 functions will not be added to ldefs-boot-auto.el, although they may be
20340 required during some builds. With this change, bootstrap-emacs should
20341 always behave the same way and, therefore, require the same autoloads.
20342
20343 * lisp/loadup.el: No longer load optional includes during bootstrap
20344 dumping.
20345 * lisp/ldefs-boot-auto.el: Regenerate.
20346 * lisp/ldefs-boot-manual.el: Add two autoloads.
20347
203482017-02-28 Phillip Lord <phillip.lord@russet.org.uk>
20349
20350 Do not use find-file non-interactively
20351
20352 * lisp/international/titdic-cnv (miscdic-convert): Use
20353 insert-file-contents in place of find-file.
20354
203552017-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
20356
20357 * src/xdisp.c (overlay_arrows_changed_p): Fix return value and doc
20358
20359 (update_overlay_arrows): Skip non-markers.
20360
203612017-02-28 Ken Brown <kbrown@cornell.edu>
20362
20363 Try to avoid hang when logging out of MS-Windows
20364
20365 * src/w32term.c (x_update_window_begin, x_update_window_end)
20366 (my_show_window, my_set_window_pos, my_set_focus)
20367 (my_set_foreground_window, my_destroy_window)
20368 (my_bring_window_to_top, x_iconify_frame): Replace calls to
20369 SendMessage by calls to SendMessageTimeout with a 6-second
20370 timeout. (Bug#25875)
20371
203722017-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
20373
20374 * lisp/textmodes/reftex-toc.el (reftex-re-enlarge): Demote errors.
20375
203762017-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
20377
20378 * doc/misc/eieio.texi: Update to account for the cl-generic facilities
20379
20380 (Quick Start, Class Options, Generics): Adjust names for cl-generic.
20381 (Methods): Document cl-defmethod.
20382 Explain in more detail the order in which the various
20383 methods are executed. Document the conditions under which a method
20384 is redefined. Remove reference to `eieio-generic-call-arglst`.
20385 Don't document the precise return value of cl-next-method-p.
20386 (Static Methods): Adjust to use `subclass` specializer.
20387 (Method Invocation): Use cl-call-next-method and drop mention of :primary.
20388 (Signal Handling, Signals): Adjust names and args for cl-generic; add
20389 cl-no-primary-method.
20390 (CLOS compatibility, Wish List): Adjust to new featureset.
20391
203922017-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
20393
20394 * lisp/cedet/mode-local.el (define-mode-local-override): Declare doctring.
20395
20396 * lisp/nxml/nxml-mode.el (nxml-mode): Use new sgml-syntax-propertize.
20397
203982017-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
20399
20400 * lisp/textmodes/sgml-mode.el: syntax-propertize <![CDATA and <?..?>
20401
20402 (sgml-syntax-propertize-function): Mark <![CDATA and <?..?>.
20403 (sgml-syntax-propertize-inside): New fun.
20404
204052017-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
20406
20407 * lisp/textmodes/css-mode.el (css-completion-at-point): Auto-insert
20408
20409 ": ;" after completing a property.
20410
204112017-02-28 Tino Calancha <tino.calancha@gmail.com>
20412
20413 Show Ibuffer and jump to line listing current buffer
20414
20415 * lisp/ibuffer.el (ibuffer-jump): New command (Bug#25577).
20416
204172017-02-27 Juri Linkov <juri@linkov.net>
20418
20419 * lisp/vc/add-log.el (change-log-next-buffer): Check if file exists
20420
20421 before adding it to the list of files.
20422
204232017-02-27 Juri Linkov <juri@linkov.net>
20424
20425 Put text properties on query-replace separator string instead of "\0"
20426
20427 * lisp/replace.el (query-replace--split-string):
20428 Split at a substring instead of just character.
20429 (query-replace-read-from): Put text properties on the
20430 separator string instead of "\0". (Bug#25482)
20431
204322017-02-27 Juri Linkov <juri@linkov.net>
20433
20434 Add file name and its extension to suggestions in dired-mark-files-regexp
20435
20436 * lisp/dired.el (dired-mark-files-regexp): Add file name
20437 and its extension to the list of suggested defaults. (Bug#25578)
20438
204392017-02-27 Chunyang Xu <mail@xuchunyang.me> (tiny change)
20440
20441 Prompt default extension in dired-mark-extension
20442
20443 * lisp/dired-x.el (dired-mark-extension): Prompt default extension
20444 based on extension of file at point. (Bug#25578)
20445
204462017-02-27 Tino Calancha <tino.calancha@gmail.com>
20447
20448 Prevent for consing in cl-mapc and cl-mapl
20449
20450 * lisp/emacs-lisp/cl-extra.el (cl--mapcar-many): Add optional arg ACC;
20451 If non-nil, accumulate values in the result (Bug#25826).
20452 (cl-mapc): Do computations inside function instead of call cl-map.
20453 (cl-mapl): Do computations inside function instead of call cl-maplist.
20454 * lisp/emacs-lisp/cl-lib.el (mapcar): Add autoload cookie.
20455 Call cl--mapcar-many with non-nil 3rd argument.
20456 * test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map)
20457 (cl-extra-test-mapc, cl-extra-test-mapcar, cl-extra-test-mapl)
20458 (cl-extra-test-maplist): New tests.
20459
204602017-02-27 Tino Calancha <tino.calancha@gmail.com>
20461
20462 Choose the right target dir on dired operations
20463
20464 Prevent from changing the input target dir
20465 when dired-dwim-target is non-nil (Bug#25609).
20466 * lisp/dired-aux.el (dired-do-create-files):
20467 If dired-dwim-target is non-nil, then bind 'default' to nil.
20468 * test/lisp/dired-tests.el (dired-test-bug25609): Add test.
20469
204702017-02-27 Stefan Monnier <monnier@iro.umontreal.ca>
20471
20472 * src/xdisp.c (overlay_arrows_changed_p): Fix last change.
20473
204742017-02-27 Noam Postavsky <npostavs@gmail.com>
20475
20476 Don't record eshell/clear "command" in history (Bug#25838)
20477
20478 `eshell/clear' is implemented by sending a series of blank lines,
20479 which is not a useful thing to have in the history.
20480
20481 * lisp/eshell/em-hist.el (eshell-input-filter-default): Use
20482 `string-blank-p' which does check for newlines (even though newlines
20483 have comment-end syntax, not whitespace syntax class).
20484 * lisp/eshell/esh-mode.el (eshell/clear): Remove
20485 `eshell-add-to-history' from `eshell-input-filter-functions' while
20486 sending the blank lines. This change is needed to solve the bug if
20487 the user customizes `eshell-input-filter' to something that doesn't
20488 filter newlines.
20489
204902017-02-26 Paul Eggert <eggert@cs.ucla.edu>
20491
20492 Remove a few unused C functions
20493
20494 * src/eval.c (let_shadows_global_binding_p):
20495 * src/print.c (write_string):
20496 * src/systhread.c (sys_mutex_destroy, sys_thread_equal):
20497 Remove.
20498 * src/print.c (write_string): Rename from write_string_1.
20499 All uses changed.
20500
205012017-02-26 Eli Zaretskii <eliz@gnu.org>
20502
20503 Avoid segfault in overlay_arrows_changed_p
20504
20505 * src/xdisp.c (overlay_arrows_changed_p): Fix recent change
20506 to avoid a segfault.
20507
205082017-02-26 Noam Postavsky <npostavs@gmail.com>
20509
20510 Don't call package--ensure-init-file if initialized during startup
20511
20512 * lisp/emacs-lisp/package.el (package-initialize): Check
20513 `after-init-time' rather than `load-file-name' to decide if
20514 `package--ensure-init-file' should be called. Depending on
20515 `load-file-name' will fail if the user calls `pacakge-initialize' in
20516 file which is loaded from the init file (Bug#24643, Bug#25819).
20517
205182017-02-26 Eli Zaretskii <eliz@gnu.org>
20519
20520 Fix display of before- and after-strings at invisible text
20521
20522 * src/xdisp.c (next_overlay_string): Don't raise the
20523 ignore_overlay_strings_at_pos_p flag if the iterator is already
20524 set to continue at a buffer position different from the one
20525 where the overlay strings we just processed were loaded. (Bug#25856)
20526
205272017-02-26 Michael Albinus <michael.albinus@gmx.de>
20528
20529 Work on `tramp-completion-mode-p'
20530
20531 * etc/NEWS: Say that `tramp-completion-mode' is obsolete.
20532
20533 * lisp/net/tramp.el (tramp-completion-mode): Make it obsolete.
20534 (tramp-completion-mode-p): Reintroduce the check for 'tab.
20535
205362017-02-25 Tom Tromey <tom@tromey.com>
20537
20538 Use font-lock-doc-face in js-mode
20539
20540 Bug#25858:
20541 * lisp/progmodes/js.el (js-font-lock-syntactic-face-function): New
20542 defun.
20543 (js-mode): Use it.
20544 * test/lisp/progmodes/js-tests.el (js-mode-doc-comment-face): New
20545 test.
20546
205472017-02-25 Noam Postavsky <npostavs@gmail.com>
20548
20549 Don't use IP 0.0.0.0 for package test server (Bug#22582)
20550
20551 * test/lisp/emacs-lisp/package-resources/package-test-server.py: Set
20552 'server_address' when port number is given on the command line. Print
20553 IP and port number as a URL, and flush it after printing.
20554 * test/lisp/emacs-lisp/package-tests.el:
20555 (package-test-update-archives-async): Grab the whole URL from server
20556 output.
20557
205582017-02-25 Tom Tromey <tom@tromey.com>
20559
20560 Add more branch support to vc-dir
20561
20562 Bug#25859:
20563 * lisp/vc/vc-dir.el (vc-dir-mode-map) Add "B" bindings.
20564 * lisp/vc/vc.el (vc-revision-history): New defvar.
20565 (vc-read-revision): Use vc-revision-history.
20566 (vc-print-branch-log): New function.
20567 * doc/emacs/maintaining.texi (VC Directory Commands): Document new
20568 bindings.
20569 * etc/NEWS: Mention new vc-dir bindings.
20570
205712017-02-25 Alan Mackenzie <acm@muc.de>
20572
20573 Allow for the :: operator in C++ "enum class" declarations.
20574
20575 * lisp/progmodes/cc-engine.el (c-backward-typed-enum-colon): Check for
20576 "::".
20577
205782017-02-25 Michael Albinus <michael.albinus@gmx.de>
20579
20580 Fix bug#25854
20581
20582 * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
20583 Simplify error handling for huge inodes.
20584 (tramp-convert-file-attributes): Handle very huge inodes. (Bug#25854)
20585
205862017-02-25 Eli Zaretskii <eliz@gnu.org>
20587
20588 Avoid leaving garbage on screen when using 'raise' display property
20589
20590 * src/xdisp.c (display_line): Reset voffset value of the iterator
20591 when it hits ZV, to avoid "inheriting" it to glyph rows past ZV,
20592 which then leaves stuff on screen that needs to be cleared by
20593 redisplay. (Bug#25855)
20594
205952017-02-25 Eli Zaretskii <eliz@gnu.org>
20596
20597 Fix doc strings in info.el
20598
20599 * lisp/info.el (Info-selection-hook, Info-mode-hook)
20600 (Info-edit-mode-hook): Doc fixes. (Bug#25794)
20601
206022017-02-25 Eli Zaretskii <eliz@gnu.org>
20603
20604 Fix doc string of 'posn-at-point'
20605
20606 * src/keyboard.c (Fposn_at_point): Clarify the doc string.
20607 (Bug#25796)
20608
206092017-02-25 Peder O. Klingenberg <peder@klingenberg.no>
20610
20611 New option -u / --suppress-output to emacsclient
20612
20613 * lib-src/emacsclient.c (print_help_and_exit, longopts)
20614 (decode_options, main): Implement new option --suppress-output / -u to
20615 suppress printing of eval-results.
20616 * doc/emacs/misc.texi (emacsclient Options): Document the new
20617 "--suppress-output/-u" options.
20618 * etc/NEWS: Mention the new options.
20619
206202017-02-25 Noam Postavsky <npostavs@gmail.com>
20621
20622 Fix scrolling with partial line corner case (Bug#25792)
20623
20624 Also fix up the scrolling tests so that they don't make so many
20625 assumptions about the current window configuration.
20626
20627 * src/xdisp.c (try_window): Take partial line height into account when
20628 comparing cursor position against scroll margin.
20629
20630 * test/manual/scroll-tests.el (scroll-tests-with-buffer-window): Add
20631 HEIGHT argument, to allow setting up window with exact height and
20632 partial line.
20633 (scroll-tests-display-buffer-with-height): New display-buffer action
20634 function.
20635 (scroll-tests-scroll-margin-over-max):
20636 (scroll-tests--scroll-margin-whole-window): Pass HEIGHT to
20637 `scroll-tests--scroll-margin-whole-window'.
20638 (scroll-tests-conservative-show-trailing-whitespace): New test.
20639 (scroll-tests-scroll-margin-negative): Fix line counting.
20640 (scroll-tests--point-in-middle-of-window-p): Set window height
20641 properly.
20642
206432017-02-25 Tom Tromey <tom@tromey.com>
20644
20645 Fix indentation error in js.el
20646
20647 * lisp/progmodes/js.el (js--indent-in-array-comp): Wrap forward-sexp
20648 call in condition-case.
20649 * test/lisp/progmodes/js-tests.el (js-mode-indentation-error): New
20650 test.
20651
206522017-02-24 Tom Tromey <tom@tromey.com>
20653
20654 add "async" and "await" keywords
20655
20656 * lisp/progmodes/js.el (js--keyword-re): Add async, await.
20657
206582017-02-24 Stefan Monnier <monnier@iro.umontreal.ca>
20659
20660 Use cl-print for Edebug and EIEIO
20661
20662 * lisp/emacs-lisp/edebug.el (edebug-prin1-to-string): Use cl-print.
20663 (edebug-prin1, edebug-print): Remove.
20664
20665 * lisp/emacs-lisp/eieio.el (object-print): Declare obsolete.
20666 (cl-print-object): Add a method for EIEIO objects.
20667 (eieio-edebug-prin1-to-string): Delete.
20668 (edebug-prin1-to-string): Don't advise any more.
20669
20670 * lisp/emacs-lisp/eieio-datadebug.el (data-debug-insert-object-button):
20671 Replace `object-print' -> `cl-prin1-to-string'.
20672
206732017-02-24 Stefan Monnier <monnier@iro.umontreal.ca>
20674
20675 Fix left over uses of `call-next-method'
20676
20677 * lisp/cedet/semantic/db-global.el (object-print):
20678 * lisp/cedet/semantic/db.el (object-print): Use `cl-call-next-method'.
20679
206802017-02-24 Stefan Monnier <monnier@iro.umontreal.ca>
20681
20682 Minor redisplay optimisations
20683
20684 * src/frame.c (Ficonify_frame): No need to redisplay everything.
20685
20686 * src/xdisp.c (overlay_arrows_changed_p): Add `set_redisplay' argument.
20687 (redisplay_internal): Use it to avoid redisplaying everything.
20688 (try_window_id): Use it keep the same behavior as before.
20689
206902017-02-24 Stefan Monnier <monnier@iro.umontreal.ca>
20691
20692 * lisp/emacs-lisp/cl-print.el: New file
20693
20694 * lisp/emacs-lisp/nadvice.el (advice--where): New function.
20695 (advice--make-docstring): Use it.
20696
20697 * src/print.c (print_number_index): Don't declare here any more.
20698 (Fprint_preprocess): New function.
20699
20700 * test/lisp/emacs-lisp/cl-print-tests.el: New file.
20701
207022017-02-24 Peder O. Klingenberg <peder@klingenberg.no>
20703
20704 Make calc's least common multiple positive (bug#25255)
20705
20706 * lisp/calc/calc-comb.el (calcFunc-lcm): Return absolute value.
20707 * doc/misc/calc.texi (Combinatorial Functions): Update for the above.
20708
207092017-02-24 Tino Calancha <tino.calancha@gmail.com>
20710
20711 Documentation fix in elisp reference manual
20712
20713 * doc/lispref/macros.texi (Defining Macros): Drop redundant mention
20714 on 'declare' forms (Bug#25846).
20715
207162017-02-24 Gemini Lasswell <gazally@runbox.com>
20717
20718 Support read syntax for circular objects in Edebug (Bug#23660)
20719
20720 * lisp/emacs-lisp/edebug.el (edebug-read-special): New name
20721 for edebug-read-function. Handle the read syntax for circular
20722 objects.
20723 (edebug-read-objects): New variable.
20724 (edebug-read-and-maybe-wrap-form1): Reset edebug-read-objects.
20725
20726 * src/lread.c (Fsubstitute_object_in_subtree): Make
20727 substitute_object_in_subtree into a Lisp primitive.
20728
207292017-02-24 Lixin Chin <lixinchin@gmail.com> (tiny change)
20730
20731 Add Conference to the list of valid bibtex entry types
20732
20733 * lisp/textmodes/bibtex.el (bibtex-BibTeX-entry-alist):
20734 Add Conference as a duplicate of InProceedings. (Bug#25143)
20735
207362017-02-23 Glenn Morris <rgm@gnu.org>
20737
20738 * lisp/comint.el (comint-password-prompt-regexp): Add SUDO. (Bug#24817)
20739
207402017-02-23 Glenn Morris <rgm@gnu.org>
20741
20742 Small dunnet score file improvements
20743
20744 * lisp/play/dunnet.el (dun-log-file): Switch to per-user default.
20745 (dun-do-logfile): Handle non-existing score file.
20746
207472017-02-23 Glenn Morris <rgm@gnu.org>
20748
20749 * lisp/play/dunnet.el (dun-help): Doc fix.
20750
207512017-02-23 Mark Oteiza <mvoteiza@udel.edu>
20752
20753 Declare dun-line and dun-line-list
20754
20755 Previously, there were free variables 'line' and 'line-list'.
20756 * lisp/play/dunnet.el (dun-line, dun-line-list): New variables.
20757 (dun-press, dun-vparse, dun-parse2, dun-unix-parse, dun-batch-parse):
20758 (dun-batch-parse2, dun-batch-loop, dun-batch-dos-interface):
20759 (dun-batch-unix-interface): Use them.
20760
207612017-02-23 Paul Eggert <eggert@cs.ucla.edu>
20762
20763 Merge from gnulib
20764
20765 This incorporates:
20766 2017-02-16 xbinary-io: rename from xsetmode
20767 2017-02-15 xsetmode: new module
20768 * lib-src/etags.c (main):
20769 * lib-src/hexl.c (main):
20770 * src/emacs.c (main) [MSDOS]:
20771 Prefer set_binary_mode to the obsolescent SET_BINARY.
20772 * lib/binary-io.c, lib/binary-io.h: Copy from gnulib.
20773
207742017-02-23 Paul Eggert <eggert@cs.ucla.edu>
20775
20776 hexl: handle large files and I/O errors
20777
20778 * lib-src/hexl.c: Include inttypes.h, for PRIxMAX etc.
20779 Do not include ctype.h, as the code no longer uses isdigit.
20780 (DEFAULT_GROUPING, un_flag, iso_flag, group_by): Now local to ‘main’.
20781 (DEFAULT_BASE, endian): Remove; was not really used.
20782 (usage): Remove; now done by ‘main’, as that’s simpler.
20783 (progname): Now static.
20784 (output_error, hexchar): New functions.
20785 (main): Use them. Simplify. Remove "-oct", "-big-endian", and
20786 "-little-endian" options, as they did not work and were not used.
20787 Use SET_BINARY only on stdin, and fopen with "rb" otherwise.
20788 Use SET_BINARY only once on stdout.
20789 Do not assume file offsets fit in ‘long’.
20790 If an I/O error occurs, report it and exit with nonzero status.
20791
207922017-02-23 Eli Zaretskii <eliz@gnu.org>
20793
20794 Avoid quitting inside a critical section on MS-Windows
20795
20796 * src/w32uniscribe.c (uniscribe_list_family):
20797 * src/w32font.c (w32font_list_family, w32font_text_extents)
20798 (w32font_list_internal, w32font_match_internal)
20799 (list_all_matching_fonts): Prevent quitting while these functions
20800 cons lists of fonts, to avoid leaving the critical section taken
20801 by the main thread, which will then cause any other thread
20802 attempting to enter the critical section to hang. (Bug#25279)
20803
208042017-02-22 Dmitry Gutov <dgutov@yandex.ru>
20805
20806 Use revision-completion-table in vc-retrieve-tag
20807
20808 * lisp/vc/vc.el (vc-retrieve-tag): Use the
20809 revision-completion-table command for completion (bug#25710).
20810
208112017-02-22 Stefan Monnier <monnier@iro.umontreal.ca>
20812
20813 * lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-types): Add `atom'
20814
20815 remove entries whose car can't be returned by type-of.
20816 (cl--generic-all-builtin-types): New var.
20817 (cl-generic-generalizers): Use it to avoid requiring
20818 extra entries in cl--generic-typeof-types.
20819
208202017-02-22 Noam Postavsky <npostavs@gmail.com>
20821
20822 Find macro binding for symbol-bound macros too (Bug#6848)
20823
20824 There are 2 ways to bind a macro: with global-set-key or
20825 kmacro-bind-to-key. The former binds a key to a symbol, while the
20826 latter binds to a lambda. In 2010-03-03 "Fix keyboard macro key
20827 lookup (Bug#5481)", `insert-kbd-macro' was fixed to detect the lambda
20828 case, but broke the symbol case.
20829
20830 * lisp/macros.el (insert-kbd-macro): Also check for bindings of
20831 MACRONAME.
20832
208332017-02-22 Stefan Monnier <monnier@iro.umontreal.ca>
20834
20835 * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Fix last change
20836
208372017-02-22 Juri Linkov <juri@linkov.net>
20838
20839 * lisp/isearch.el (lazy-highlight-max-at-a-time): Doc fix (bug#21092).
20840
208412017-02-22 Juri Linkov <juri@linkov.net>
20842
20843 * lisp/isearch.el (isearch-lazy-highlight): New choice ‘all-windows’.
20844
20845 (isearch-lazy-highlight-update): Check it to decide whether to apply
20846 overlays only on the selected window.
20847
20848 * lisp/follow.el (follow-mode): Set isearch-lazy-highlight to ‘all-windows’.
20849 (Bug#17453, bug#21092)
20850
208512017-02-22 Paul Eggert <eggert@cs.ucla.edu>
20852
20853 Minor weak hash table performance tweaks
20854
20855 * src/fns.c (make_hash_table): Omit unnecessary assignment to
20856 h->next_weak when the hash table is not weak.
20857 (copy_hash_table): Put the copy next to the original in the
20858 weak_hash_tables list, as this should have better locality
20859 when scanning the weak hash tables.
20860
208612017-02-22 Paul Eggert <eggert@cs.ucla.edu>
20862
20863 Use float instead of Lisp_Object for rehash_size
20864
20865 * src/alloc.c (purecopy_hash_table):
20866 * src/fns.c (maybe_resize_hash_table, Fmake_hash_table):
20867 (Fhash_table_rehash_size):
20868 * src/lisp.h (struct Lisp_Hash_Table.rehash_size):
20869 The rehash_size member of struct Lisp_Hash_Table is now a
20870 float, not a Lisp_Object.
20871 * src/alloc.c (purecopy_hash_table): Assign members in order.
20872 * src/fns.c (make_hash_table): Use EMACS_INT for size and
20873 float for rehash_size, instead of Lisp_Object for both.
20874 All callers changed.
20875 * src/lisp.h (DEFAULT_REHASH_SIZE): Now float, not double,
20876 and 1 smaller.
20877 * src/print.c (print_object): Simplify by calling
20878 Fhash_table_rehash_size and Fhash_table_rehash_threshold.
20879 Avoid unnecessary NILP.
20880
208812017-02-22 Paul Eggert <eggert@cs.ucla.edu>
20882
20883 Use ptrdiff_t instead of Lisp_Object for collision
20884
20885 * src/alloc.c (purecopy_hash_table): Assign, don’t purecopy.
20886 * src/fns.c (set_hash_next_slot, set_hash_index_slot): Hash index
20887 arg is now ptrdiff_t index (or -1 if empty), not Lisp_Object
20888 integer (or Qnil if empty). All callers changed.
20889 (larger_vecalloc): New static function.
20890 (larger_vector): Use it.
20891 (HASH_NEXT, HASH_INDEX): Move here from lisp.h. Return ptrdiff_t
20892 index (or -1) not Lisp_Object integer (or Qnil). All callers changed.
20893 * src/fns.c (make_hash_table, maybe_resize_hash_table, hash_lookup)
20894 (hash_put, hash_remove_from_table, hash_clear, sweep_weak_table):
20895 * src/profiler.c (evict_lower_half, record_backtrace):
20896 -1, not nil, is now the convention for end of collision list.
20897 * src/fns.c (maybe_resize_hash_table): Avoid double-initialization
20898 of the free list. Reallocate H->next last, in case other
20899 reallocations exhaust memory.
20900 * src/lisp.h (struct Lisp_Hash_Table): ‘next_free’ is now
20901 ptrdiff_t, not Lisp_Object. Adjust commentary for ‘next’ and
20902 ‘index’, which no longer contain nil.
20903 (HASH_NEXT, HASH_INDEX): Move to src/fns.c.
20904
209052017-02-22 Paul Eggert <eggert@cs.ucla.edu>
20906
20907 Hash table threshold is now float, not double
20908
20909 Change default from 0.8 to 0.8125 so it fits in float without
20910 rounding glitches.
20911 * doc/lispref/hash.texi (Creating Hash):
20912 * doc/lispref/objects.texi (Hash Table Type):
20913 * etc/NEWS:
20914 Document change.
20915 * src/fns.c (make_hash_table, maybe_resize_hash_table)
20916 (Fmake_hash_table): Threshold is now float, not double.
20917 Be consistent about how this is rounded.
20918 * src/lisp.h (struct Lisp_Hash_Table.rehash_threshold):
20919 Change back to float, now that the other code rounds consistently.
20920 (DEFAULT_REHASH_THRESHOLD): Now float 0.8125 instead of double 0.8.
20921
209222017-02-22 Juri Linkov <juri@linkov.net>
20923
20924 Avoid flicker in lazy-highlight by doing all updates without redisplay.
20925
20926 * lisp/isearch.el (lazy-highlight-max-at-a-time):
20927 Change default value from 20 to nil to not trigger redisplay
20928 between updating iterations.
20929 (lazy-highlight-cleanup): New arg ‘procrastinate’ to not remove
20930 overlays when non-nil.
20931 (isearch-lazy-highlight-new-loop): Call lazy-highlight-cleanup
20932 with non-nil second arg when the search string is not empty.
20933 Run timer with isearch-lazy-highlight-start instead of
20934 isearch-lazy-highlight-update.
20935 (isearch-lazy-highlight-start): New function. (Bug#25751)
20936
209372017-02-21 Stefan Monnier <monnier@iro.umontreal.ca>
20938
20939 * lisp/emacs-lisp/autoload.el (make-autoload): Support cl-defgeneric
20940
20941 * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Tweak for autoloading.
20942
209432017-02-21 Stefan Monnier <monnier@iro.umontreal.ca>
20944
20945 * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Fix duplication
20946
20947 which resulted in incomplete list of parents in one copy of the
20948 cl-structure-class class.
20949
209502017-02-21 Glenn Morris <rgm@gnu.org>
20951
20952 Tweak recent custom-reevaluate-setting change
20953
20954 * lisp/custom.el (custom-reevaluate-setting):
20955 Tweak previous change to avoid font-lock init issues.
20956
209572017-02-21 Glenn Morris <rgm@gnu.org>
20958
20959 Ensure delayed-init custom variables get marked special
20960
20961 * lisp/custom.el (custom-reevaluate-setting):
20962 If the variable has never been set, defvar it. (Bug#25770)
20963
209642017-02-21 Mark Oteiza <mvoteiza@udel.edu>
20965
20966 Turn on lexical-binding in dunnet.el
20967
20968 * lisp/play/dunnet.el: Turn on lexical-binding. Re-instate lexical
20969 byte compile warnings.
20970
209712017-02-21 Mark Oteiza <mvoteiza@udel.edu>
20972
20973 Make dunnet insertion functions n-ary
20974
20975 * lisp/play/dunnet.el (dun-mprinc, dun-mprincl, dun-minsert):
20976 (dun-minsertl, dun-batch-mprinc, dun-batch-mprincl): Change to accept
20977 any number of arguments.
20978 (dun-parse, dun-describe-room, dun-quit, dun-inven, dun-shake):
20979 (dun-take, dun-go, dun-move, dun-press, dun-score):
20980 (dun-compile-save-out, dun-do-logfile): Collect arguments from
20981 multiple insertion calls into less calls with more args.
20982
209832017-02-21 Katsumi Yamaoka <yamaoka@jpl.org>
20984
20985 message-goto-body-1: Fix regexp so as not to match multi-line
20986
20987 * lisp/gnus/message.el (message-goto-body-1):
20988 Fix regexp so as not to match multi-line.
20989
209902017-02-20 Noam Postavsky <npostavs@gmail.com>
20991
20992 Simplify cl-get using `plist-member'
20993
20994 * lisp/emacs-lisp/cl-extra.el (cl-get, cl-getf, cl--set-getf): Use
20995 `plist-member' instead of explicit loop.
20996 * test/lisp/emacs-lisp/cl-extra-tests.el: New tests.
20997
209982017-02-20 Paul Eggert <eggert@cs.ucla.edu>
20999
21000 Verify xwidget USE_LSB_TAG assumption
21001
21002 * src/xwidget.c (Fxwidget_webkit_execute_script):
21003 Add verification. Problem reported by Andreas Schwab (Bug#25816#8).
21004
210052017-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
21006
21007 * src/insdel.c (make_gap): Improve comment.
21008
210092017-02-20 Mark Oteiza <mvoteiza@udel.edu>
21010
21011 Do not use switch-to-buffer for working in a temp buffer
21012
21013 * lisp/play/dunnet.el (dunnet): Use pop-to-buffer-same-window instead,
21014 cf. Bug#22244.
21015 (dun-load-d, dun-eval, dun-save-game, dun-do-logfile): Use
21016 with-temp-buffer instead.
21017
210182017-02-20 Mark Oteiza <mvoteiza@udel.edu>
21019
21020 Make dun-room-shorts a defconst
21021
21022 * lisp/play/dunnet.el (dun-room-shorts): Make defconst and collect
21023 initial value into the declaration.
21024 (dun-space-to-hyphen): Remove.
21025
210262017-02-20 Paul Eggert <eggert@cs.ucla.edu>
21027
21028 Port xwidget to -DCHECK_LISP_OBJECT_TYPE
21029
21030 * src/xwidget.c (webkit_javascript_finished_cb)
21031 (Fxwidget_webkit_execute_script): Don't assume Lisp_Object is an
21032 integer. This fix is just a hack; I’ll file a bug report about
21033 the underlying problem.
21034
210352017-02-20 Katsumi Yamaoka <yamaoka@jpl.org>
21036
21037 mm-decode.el: Simplify regexp used to search html meta tag
21038
21039 * lisp/gnus/mm-decode.el (mm-add-meta-html-tag, mm-shr):
21040 Simplify regexp used to search html meta tag.
21041
210422017-02-20 Katsumi Yamaoka <yamaoka@jpl.org>
21043
21044 mm-shr: Ignore coding-system `ascii'
21045
21046 * lisp/gnus/mm-decode.el (mm-shr): Ignore coding-system `ascii'.
21047
210482017-02-20 Tom Tromey <tom@tromey.com>
21049
21050 vc-log-outgoing fixes for git; add binding to vc-dir
21051
21052 * lisp/vc/vc-dir.el (vc-dir-mode-map): Bind "O" to vc-log-outgoing.
21053 * lisp/vc/vc-git.el (vc-git-log-outgoing, vc-git-log-incoming): Use
21054 async execution.
21055 (vc-git-log-view-mode): Also truncate lines for log-outgoing and
21056 log-incoming.
21057 * lisp/vc/vc.el (vc-log-incoming, vc-log-outgoing): Don't pass nil
21058 as remote-location argument.
21059
210602017-02-20 Tom Tromey <tom@tromey.com>
21061
21062 Remove stale comments from vc-git and vc-hg
21063
21064 * lisp/vc/vc-git.el (vc-git-retrieve-tag): Remove comment.
21065 * lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Remove comment.
21066
210672017-02-20 Mark Oteiza <mvoteiza@udel.edu>
21068
21069 Remove member clone
21070
21071 * lisp/play/dunnet.el (dun-answer): Use member instead.
21072 (dun-members): Remove.
21073
210742017-02-20 Mark Oteiza <mvoteiza@udel.edu>
21075
21076 Prefix global var
21077
21078 * lisp/play/dunnet.el (room): Rename to dun-room.
21079 (dun-messages, dunnet, dun-describe-room, dun-drop, dun-move):
21080 (dun-restore, dun-do-logfile, dun-batch-loop): Use new name.
21081
210822017-02-20 Mark Oteiza <mvoteiza@udel.edu>
21083
21084 Replace nested ifs with cond
21085
21086 * lisp/play/dunnet.el (dun-messages, dun-describe-room, dun-examine):
21087 (dun-eat, dun-put-objs, dun-turn, dun-press, dun-ls, dun-cd): Use when
21088 and cond where appropriate.
21089 (dun-sauna-heat): Accept sauna level as an argument. Use cond.
21090 (dun-take): Use null and dun-mprincl.
21091 (dun-inven-weight, dun-load-d): Reformat.
21092 (dun-remove-obj-from-inven, dun-remove-obj-from-room): Nix setq to nil.
21093
210942017-02-19 Paul Eggert <eggert@cs.ucla.edu>
21095
21096 Fix glitches in recent hash table changes
21097
21098 * src/fns.c (Fmake_hash_table): Simplify the machine code slightly
21099 by using 0 rather than -1.
21100 * src/lisp.h (struct Lisp_Hash_Table.pure): Now bool rather
21101 than a bitfield, for speed (the bitfield did not save space).
21102 (struct Lisp_Hash_Table.rehash_threshold): Now double rather than
21103 float, since the float caused unwanted rounding errors, e.g.,
21104 (hash-table-rehash-threshold (make-hash-table)) yielded
21105 0.800000011920929 instead of the correct 0.8.
21106
211072017-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
21108
21109 * src/insdel.c (make_gap): Increase enough to avoid O(N^2) behavior.
21110
211112017-02-19 Eli Zaretskii <eliz@gnu.org>
21112
21113 Avoid aborts during loadup
21114
21115 * src/emacs-module.c (syms_of_module):
21116 * src/image.c (xpm_make_color_table_h): Update calls to
21117 make_hash_table to adjust to a recent change in fns.c.
21118 * src/fns.c (make_hash_table):
21119 * src/lisp.h (make_hash_table): 4th arg is now of type double.
21120
211212017-02-19 Michael Albinus <michael.albinus@gmx.de>
21122
21123 Rework connection local variables
21124
21125 For connection local variables interface, `class' is renamed
21126 to `profile'. All arguments `criteria' are a plist now.
21127
21128 * doc/lispref/variables.texi (Connection Local Variables):
21129 Rewrite.
21130
21131 * lisp/files-x.el (connection-local-profile-alist): Rename
21132 from `connection-local-class-alist'. Adapt docstring.
21133 (connection-local-criteria-alist): Adapt docstring.
21134 (connection-local-normalize-criteria): New defun.
21135 (connection-local-get-profiles): Rename from
21136 `connection-local-get-classes'. Rewrite.
21137 (connection-local-set-profiles): Rename from
21138 `connection-local-set-classes'. Rewrite.
21139 (connection-local-get-profile-variables): Rename from
21140 `connection-local-get-class-variables'. Rewrite.
21141 (connection-local-set-profile-variables): Rename from
21142 `connection-local-set-class-variables'. Rewrite.
21143 (hack-connection-local-variables)
21144 (hack-connection-local-variables-apply)): Rewrite.
21145 (with-connection-local-profiles): Rename from
21146 `ith-connection-local-classes'. Rewrite.
21147
21148 * lisp/net/tramp.el (tramp-set-connection-local-variables):
21149 Compute criteria.
21150
21151 * lisp/net/tramp-cmds.el (tramp-bug):
21152 Use `connection-local-profile-alist'.
21153
21154 * test/lisp/files-x-tests.el (files-x-test--variables1)
21155 (files-x-test--variables2, files-x-test--variables3)
21156 (files-x-test--variables4, files-x-test--criteria1)
21157 (files-x-test--criteria2): Make them a defconst.
21158 (files-x-test--application)
21159 (files-x-test--another-application, files-x-test--protocol)
21160 (files-x-test--user, files-x-test--machine): New defconst.
21161 (files-x-test--criteria): New defvar.
21162 (files-x-test--criteria3): Remove.
21163 (files-x-test-connection-local-set-profile-variables):
21164 Rename from `files-x-test-connection-local-set-class-variables'.
21165 Rewrite.
21166 (files-x-test-connection-local-set-profiles): Rename from
21167 `files-x-test-connection-local-set-classes'. Rewrite.
21168 (files-x-test-hack-connection-local-variables-apply) Rewrite.
21169 (files-x-test-with-connection-local-profiles): Rename from
21170 `files-x-test-with-connection-local-classes'. Rewrite.
21171
211722017-02-19 Mark Oteiza <mvoteiza@udel.edu>
21173
21174 Set up combination and random item location
21175
21176 * lisp/play/dunnet.el (dun-combination): Make defconst.
21177 (tloc, tcomb): Remove. Replace with a top-level form.
21178
211792017-02-19 Mark Oteiza <mvoteiza@udel.edu>
21180
21181 Replace movement variables with an alist and accessor
21182
21183 * lisp/play/dunnet.el (north, south, east, west, northeast, southeast):
21184 (northwest, southwest, up, down, in, out): Remove.
21185 (dun-movement-alist): New constant.
21186 (dun-movement): New function.
21187 (dun-n, dun-s, dun-e, dun-w, dun-ne, dun-se, dun-nw, dun-sw, dun-up):
21188 (dun-down, dun-in, dun-out): Use a symbol for indicating movement.
21189 (dun-move, dun-special-move): Translate movement symbol to an
21190 enumeration.
21191
211922017-02-19 Mark Oteiza <mvoteiza@udel.edu>
21193
21194 Change top-level setq forms to defvar or defconst
21195
21196 Also collect some code onto fewer lines and reindent.
21197 * lisp/play/dunnet.el (dun-visited, dun-current-room, dun-exitf):
21198 (dun-badcd, dun-computer, dun-floppy, dun-key-level, dun-hole):
21199 (dun-correct-answer, dun-lastdir, dun-numsaves, dun-jar, dun-dead):
21200 (room, dun-numcmds, dun-wizard, dun-endgame-question, dun-logged-in):
21201 (dungeon-mode, dun-unix-verbs, dun-dos-verbs, dun-batch-mode):
21202 (dun-cdpath, dun-cdroom, dun-uncompressed, dun-ethernet):
21203 (dun-restricted, dun-ftptype, dun-endgame, dun-rooms):
21204 (dun-light-rooms, dun-verblist, dun-inbus, dun-nomail, dun-ignore):
21205 (dun-mode, dun-sauna-level, north, south, east, west, northeast):
21206 (southeast, northwest, southwest, up, down, in, out, dungeon-map):
21207 (dun-objnames, obj-special, dun-room-objects, dun-room-silents):
21208 (dun-inventory, dun-objects, dun-object-lbs, dun-object-pts):
21209 (dun-objfiles, dun-perm-objects, dun-physobj-desc, dun-permobj-desc):
21210 (dun-diggables, dun-room-shorts, dun-endgame-questions): Change
21211 declaration to use defvar or defconst.
21212 (dun-doverb, dun-vparse, dun-vparse2, dun-batch-parse):
21213 (dun-batch-parse2): Omit the dun- prefix from arguments dun-ignore
21214 dun-verblist. Those are now constants and the byte compiler doesn't
21215 allow defconsts in lambda lists.
21216
212172017-02-19 Mark Oteiza <mvoteiza@udel.edu>
21218
21219 Move all dunnet globals up to the top
21220
21221 * lisp/play/dunnet.el: Adjust comments to reflect moved forms.
21222 (dun-visited, dun-current-room, dun-exitf):
21223 (dun-badcd, dun-computer, dun-floppy, dun-key-level, dun-hole):
21224 (dun-correct-answer, dun-lastdir, dun-numsaves, dun-jar, dun-dead):
21225 (room, dun-numcmds, dun-wizard, dun-endgame-question, dun-logged-in):
21226 (dungeon-mode, dun-unix-verbs, dun-dos-verbs, dun-batch-mode):
21227 (dun-cdpath, dun-cdroom, dun-uncompressed, dun-ethernet):
21228 (dun-restricted, dun-ftptype, dun-endgame, dun-rooms):
21229 (dun-light-rooms, dun-verblist, dun-inbus, dun-nomail, dun-ignore):
21230 (dun-mode, dun-sauna-level, north, south, east, west, northeast):
21231 (southeast, northwest, southwest, up, down, in, out, dungeon-map):
21232 (dun-objnames, obj-special, dun-room-objects, dun-room-silents):
21233 (dun-inventory, dun-objects, dun-object-lbs, dun-object-pts):
21234 (dun-objfiles, dun-perm-objects, dun-physobj-desc, dun-permobj-desc):
21235 (dun-diggables, dun-room-shorts, dun-endgame-questions): Move to the
21236 top of the file, before any uses.
21237
212382017-02-19 Michael Albinus <michael.albinus@gmx.de>
21239
21240 Fix bug#25788
21241
21242 * lisp/net/tramp.el (tramp-autoload-file-name-handler):
21243 Do not load tramp.el just for "/". (Bug#25788)
21244
212452017-02-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
21246
21247 Fix fringe bitmap initialization on MS-Windows
21248
21249 * src/fringe.c (init_fringe_bitmap) [HAVE_NTGUI]: Fix initialization
21250 of fb->bits. (Bug#25673)
21251
212522017-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
21253
21254 Change type of `rehash_threshold' and `pure' fields in hash-tables
21255
21256 * src/lisp.h (struct Lisp_Hash_Table): Change type of
21257 `rehash_threshold' and `pure' fields and move them after `count'.
21258 * src/fns.c (make_hash_table): Change type of `rehash_threshold' and `pure'.
21259 (Fmake_hash_table, Fhash_table_rehash_threshold):
21260 * src/category.c (hash_get_category_set):
21261 * src/xterm.c (syms_of_xterm):
21262 * src/profiler.c (make_log):
21263 * src/print.c (print_object):
21264 * src/alloc.c (purecopy_hash_table, purecopy): Adjust accordingly.
21265
212662017-02-19 Paul Eggert <eggert@cs.ucla.edu>
21267
21268 Use 'char *FOO' instead of 'char* FOO'
21269
212702017-02-19 Mark Oteiza <mvoteiza@udel.edu>
21271
21272 More json.el changes
21273
21274 * lisp/json.el (json-read-keyword, json-read-number, json-read-object):
21275 (json-read-array): Just use = for char comparison.
21276
212772017-02-18 Noam Postavsky <npostavs@gmail.com>
21278
21279 * lisp/woman.el (woman): Fix docstring prefix arg description.
21280
212812017-02-18 Alan Mackenzie <acm@muc.de>
21282
21283 Fix edebug-spec on c-lang-defvar.
21284
21285 This allows c-lang-defvars with the symbol 'dont-doc in the place of the
21286 optional documentation to be instrumented for edebug.
21287
21288 lisp/progmodes/cc-langs.el (top-level): Amend the edebug-spec for
21289 c-lang-defvar.
21290 (c-opt-identifier-concat-key, c-decl-prefix-or-start-re): remove redundant
21291 'dont-doc.
21292
212932017-02-18 Lars Ingebrigtsen <larsi@gnus.org>
21294
21295 Lists used as plists now have to be an even length
21296
21297 * lisp/net/eww.el (eww-size-text-inputs): `eww-form' isn't a plist.
21298 (eww-process-text-input): Not here, either.
21299
213002017-02-18 Michael Albinus <michael.albinus@gmx.de>
21301
21302 Unset `non-essential' in Tramp when not needed anymore
21303
21304 * doc/misc/trampver.texi:
21305 * lisp/net/trampver.el: Change version to "2.3.2-pre".
21306
21307 * lisp/net/tramp-sh.el (tramp-maybe-open-connection):
21308 Use `tramp-completion-mode-p'.
21309
21310 * lisp/net/tramp.el (tramp-file-name-handler): Unset `non-essential'
21311 when file name doesn't match `tramp-completion-file-name-regexp'.
21312
213132017-02-18 Eli Zaretskii <eliz@gnu.org>
21314
21315 Automatically regenerate emacs.1 and *.rc files
21316
21317 * Makefile.in (CONFIG_STATUS_FILES_IN): New variable, lists
21318 non-Makefile files produced by config.status.
21319 ($(MAKEFILE_NAME)): Depend on $(CONFIG_STATUS_FILES_IN), so that
21320 their targets are regenerated when the source changes.
21321
213222017-02-18 Alan Mackenzie <acm@muc.de>
21323
21324 Set the syntax table in AWK Mode.
21325
21326 This is a partial reversion of CC Mode commit on 2016-05-09 17:49:45 +0000.
21327 It fixes bug #25722.
21328
21329 lisp/progmodes/cc-mode.el (awk-mode): Explicitly set the syntax table.
21330
213312017-02-18 Eli Zaretskii <eliz@gnu.org>
21332
21333 Mention "editor" in Emacs man page header
21334
21335 * doc/man/emacs.1.in: Mention "editor" in the header line.
21336 (Bug#25771, Bug#25779)
21337
213382017-02-18 Göktuğ Kayaalp <self@gkayaalp.com>
21339
21340 Fix Turkish language environment setup
21341
21342 * lisp/language/european.el ("Turkish"): Fix a typo in Turkish
21343 language setup. (Bug#25763)
21344
213452017-02-18 Rami Ylimäki <rami.ylimaki@vincit.fi>
21346
21347 Support 24-bit direct colors on text terminals
21348
21349 * src/term.c (init_tty): Use 24-bit terminal colors if corresponding
21350 foreground and background functions are present in terminal type
21351 definition.
21352 * src/tparam.h: Define prototype for tigetstr.
21353
21354 * lisp/term/tty-colors.el (tty-color-define): Convert color palette
21355 index to pixel value on 16.7M color terminals.
21356 (tty-color-24bit): New function to convert color palette index to
21357 pixel value on 16.7M color terminals.
21358 (tty-color-desc): Don't approximate colors on 16.7M color terminals.
21359 * lisp/term/xterm.el (xterm-register-default-colors): Define all named
21360 TTY colors on 16.7M color terminals.
21361
21362 * doc/misc/efaq.texi (Colors on a TTY): Add instructions on how to
21363 enable direct color TTY mode.
21364 * etc/NEWS: Mention direct color TTY mode and point to FAQ.
21365
213662017-02-18 Rami Ylimäki <rami.ylimaki@vincit.fi>
21367
21368 Remove unused TN_max_pairs field
21369
21370 * src/termchar.h (tty_display_info): Remove TN_max_pairs field,
21371 describing maximum number of terminal background/foreground color pairs.
21372 * src/term.c (tty_default_color_capabilities, tty_setup_colors)
21373 (init_tty): Remove references to TN_max_pairs.
21374
213752017-02-18 Eli Zaretskii <eliz@gnu.org>
21376
21377 Improve documentation of query-replace-from-to-separator
21378
21379 * doc/emacs/search.texi (Query Replace): Document the meaning of
21380 the nil value of query-replace-from-to-separator. (Bug#25482)
21381
213822017-02-18 Eli Zaretskii <eliz@gnu.org>
21383
21384 Document problems with nerd-fonts
21385
21386 * etc/PROBLEMS (fonts): Describe the potential problems with
21387 nerd-fonts that cause slow display. (Bug#25697)
21388
213892017-02-18 Eli Zaretskii <eliz@gnu.org>
21390
21391 Improve commentary for a recent change in keyboard.c
21392
21393 * src/keyboard.c (Fset__this_command_keys): Add a comment about
21394 the magic 248 value. (Bug#25612)
21395
213962017-02-18 Eli Zaretskii <eliz@gnu.org>
21397
21398 Avoid infloop in rect.el
21399
21400 * lisp/rect.el (rectangle--*-char): Avoid inflooping when called
21401 with argument N whose absolute value is greater than 1. (Bug#25773)
21402
214032017-02-18 Eli Zaretskii <eliz@gnu.org>
21404
21405 Remove annoying warnings about let-binding
21406
21407 * src/data.c (Fmake_variable_buffer_local, Fmake_local_variable):
21408 Remove warnings about making symbols local while let-bound.
21409 (Bug#25561)
21410
214112017-02-18 Hong Xu <hong@topbug.net>
21412
21413 Avoid errors when flyspell-generic-check-word-predicate is a lambda.
21414
21415 * flyspell.el (flyspell-auto-correct-word, flyspell-word): Apply
21416 functionp instead of fboundp on
21417 flyspell-generic-check-word-predicate (Bug#25765).
21418
214192017-02-18 Glenn Morris <rgm@gnu.org>
21420
21421 Remove the build number from emacs-version variable
21422
21423 It's a largely internal detail that can confuse users. (Bug#25590)
21424 * lisp/version.el (emacs-build-number): New constant.
21425 (emacs-version): Use emacs-build-number.
21426 * lisp/loadup.el (top-level): When dumping, increment
21427 emacs-build-number rather than emacs-version.
21428 * src/emacs.c (emacs-version): Doc fix.
21429 * doc/lispref/intro.texi (Version Info): Update emacs-version details.
21430 Mention emacs-build-number.
21431 * lisp/gnus/gnus-util.el (gnus-emacs-version):
21432 * lisp/mail/emacsbug.el (report-emacs-bug):
21433 * admin/admin.el (set-version): Update for emacs-version change.
21434
214352017-02-18 Glenn Morris <rgm@gnu.org>
21436
21437 Ensure that user-mail-address always has a value
21438
21439 * lisp/startup.el (user-mail-address): Initialize in the normal way.
21440 (command-line): Reset user-mail-address if needed using
21441 standard custom machinery.
21442 * lisp/mail/feedmail.el (feedmail-fiddle-from):
21443 * lisp/mail/rmail.el (rmail-unknown-mail-followup-to):
21444 * lisp/mail/rmailsum.el (rmail-header-summary):
21445 Simplify now that user-mail-address is always set.
21446
214472017-02-18 Mark Oteiza <mvoteiza@udel.edu>
21448
21449 Turn on lexical-binding in ruby-mode
21450
21451 * lisp/progmodes/ruby-mode.el: Turn on lexical-binding.
21452 (ruby-font-lock-syntax-table): Use make-syntax-table.
21453 (ruby-mode): 'define-derived-mode' writes the keys for us.
21454
214552017-02-18 Mark Oteiza <mvoteiza@udel.edu>
21456
21457 Turn on lexical-binding in elint.el
21458
21459 * lisp/emacs-lisp/elint.el: Quote entry point commands in commentary.
21460 (elint-running, elint-current-pos): Move these dynamic vars to toward
21461 the top of the file.
21462 (elint-check-quote-form): Ignore unused argument.
21463 (elint-check-conditional-form): Remove unused binding.
21464
214652017-02-18 Gemini Lasswell <gazally@runbox.com>
21466
21467 * lisp/emacs-lisp/subr-x.el (if-let*): Fix Edebug spec (Bug#24748)
21468
214692017-02-18 Mark Oteiza <mvoteiza@udel.edu>
21470
21471 Enable erc-accidental-paste-threshold-seconds by default
21472
21473 * lisp/erc/erc.el (erc-accidental-paste-threshold-seconds): Set
21474 default to 0.2 (Bug#25709).
21475
214762017-02-17 Michal Nazarewicz <mina86@mina86.com>
21477
21478 Fix build failure caused by ‘Generate upcase and downcase tables from Unicode’
21479
21480 The [5ec3a584: Generate upcase and downcase tables from Unicode data]
21481 commit broke bootstrap from a truly clean tree (e.g. a fresh clone or
21482 one created with ‘make extraclean’), see
21483 <http://hydra.nixos.org/build/48774928>.
21484
21485 The failure was caused by characters.el trying to read Unicode
21486 property tables which aren’t available so early in the build process.
21487
21488 Wrap the part that requires Unicode property tables in a condition
21489 checking if those are available. If they aren’t they case and syntax
21490 tables won’t be fully set but later on, the characters.el file will be
21491 evaluated again and this time with Unicode properties available so
21492 final Emacs ends up with the exact same case and syntax tables.
21493
214942017-02-17 Katsumi Yamaoka <yamaoka@jpl.org>
21495
21496 mm-add-meta-html-tag: Improve regexp
21497
21498 * lisp/gnus/mm-decode.el (mm-add-meta-html-tag):
21499 Improve regexp to search html meta tag.
21500
215012017-02-17 Katsumi Yamaoka <yamaoka@jpl.org>
21502
21503 mm-shr: Prefer charset specified in html meta tag
21504
21505 * lisp/gnus/mm-decode.el (mm-shr): Prefer charset specified in html
21506 meta tag than mail-parse-charset in the case there is no charset spec
21507 in MIME header.
21508
215092017-02-17 Glenn Morris <rgm@gnu.org>
21510
21511 Stop duplicating some custom-types in message.el
21512
21513 * lisp/gnus/message.el (user-mail-address, user-full-name):
21514 No need to re-specify custom-type.
21515
215162017-02-17 Glenn Morris <rgm@gnu.org>
21517
21518 Whitespace trivia in dunnet.el
21519
21520 * lisp/play/dunnet.el (dun-special-object, dun-put-objs)
21521 (dun-rlogin-endgame): Whitespace trivia.
21522
215232017-02-17 Glenn Morris <rgm@gnu.org>
21524
21525 Explicit error on changing case of negative integers
21526
21527 * src/casefiddle.c (casify_object): Reject negative integers:
21528 Emacs characters are positive integers. (Bug#25684)
21529
215302017-02-17 Dmitry Gutov <dgutov@yandex.ru>
21531
21532 Fix buffers update in vc-retrieve-tag
21533
21534 * lisp/vc/vc.el (vc-retrieve-tag): When the granularity is
21535 `repository', use the repository root and pass it to
21536 vc-resynch-buffer (bug#25714).
21537
215382017-02-16 Paul Eggert <eggert@cs.ucla.edu>
21539
21540 * src/buffer.h: Fix indenting.
21541
215422017-02-16 Paul Eggert <eggert@cs.ucla.edu>
21543
21544 Add sanity checks for Bswitch hash tables
21545
21546 * src/bytecode.c (exec_byte_code) [BYTE_CODE_SAFE]:
21547 Check that operand is a hash table and hashes to ints.
21548
215492017-02-16 Paul Eggert <eggert@cs.ucla.edu>
21550
21551 * src/keyboard.c (read_key_sequence): Fix integer-overflow glitch.
21552
215532017-02-16 Vibhav Pant <vibhavp@gmail.com>
21554
21555 bytecomp.el: Avoid unnecessary calculation for jump table addresses.
21556
21557 * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Don't do
21558 redundant operations while calculating the correct jump addresses
21559 from TAGs in jump tables.
21560
215612017-02-16 Mark Oteiza <mvoteiza@udel.edu>
21562
21563 Minor changes in json.el
21564
21565 * lisp/json.el (json-advance): Simpler docstring.
21566 (json-read-escaped-char): Use xdigit subform in rx expression.
21567 (json-read-string): Just use = for char comparison.
21568
215692017-02-16 Mark Oteiza <mvoteiza@udel.edu>
21570
21571 Don't expand body inside a let-binding when there are no bindings
21572
21573 * lisp/emacs-lisp/pcase.el (pcase-codegen): Only let-bind if VARS
21574 is non-nil.
21575
215762017-02-16 Glenn Morris <rgm@gnu.org>
21577
21578 Handle user-mail-address being the empty string
21579
21580 * lisp/mail/feedmail.el (feedmail-fiddle-from):
21581 * lisp/mail/rmail.el (rmail-unknown-mail-followup-to):
21582 * lisp/mail/rmailsum.el (rmail-header-summary):
21583 Belated update for 2002-09-29 startup.el change, 680ebfa, where
21584 the value of user-mail-address during initialization was changed
21585 from nil to the empty string.
21586
215872017-02-15 Michael Albinus <michael.albinus@gmx.de>
21588
21589 Continue to fix bug#25607
21590
21591 * lisp/ido.el (ido-complete): Let-bind `non-essential' to nil.
21592 (ido-file-name-all-completions-1): Do not bind `non-essential'.
21593
21594 * lisp/net/tramp.el: (tramp-completion-file-name-handler):
21595 Improve autoloaded version.
21596 (tramp-completion-file-name-handler): Remove old compat code.
21597 Check only for `tramp-completion-mode-p'.
21598 (tramp-completion-mode-p): Autoload. Do not check any longer
21599 for `last-input-event'.
21600 (tramp-completion-handle-expand-file-name): Simplify. (Bug#25607)
21601
216022017-02-15 Michal Nazarewicz <mina86@mina86.com>
21603
21604 casing: don’t assume letters are *either* upper- or lower-case (bug#24603)
21605
21606 A compatibility digraph characters, such as Dž, are neither upper- nor
21607 lower-case. At the moment however, those are reported as upper-case¹
21608 despite the fact that they change when upper-cased.
21609
21610 Stop checking if a character is upper-case before trying to up-case it
21611 so that title-case characters are handled correctly. This fixes one of
21612 the issues mentioned in bug#24603.
21613
21614 ¹ Because they change when converted to lower-case. Notice an asymmetry
21615 in that for a character to be considered lower-case it must not be
21616 upper-case (plus the usual condition of changing when upper-cased).
21617
21618 * src/buffer.h (upcase1): Delete.
21619 (upcase): Change to upcase character unconditionally just like downcase
21620 does it. This is what upcase1 was.
21621
21622 * src/casefiddle.c (casify_object, casify_region): Use upcase instead
21623 of upcase1 and don’t check !uppercasep(x) before calling upcase.
21624
21625 * src/keyboard.c (read_key_sequence): Don’t check if uppercase(x), just
21626 downcase(x) and see if it changed.
21627
21628 * test/src/casefiddle-tests.el (casefiddle-tests--characters,
21629 casefiddle-tests-casing): Update test cases which are now passing.
21630
216312017-02-15 Michal Nazarewicz <mina86@mina86.com>
21632
21633 Generate upcase and downcase tables from Unicode data (bug#24603)
21634
21635 Use Unicode data to generate case tables instead of mostly repeating
21636 them in lisp code. Do that in a way which maps ‘Dz’ (and similar)
21637 digraph to ‘dz’ when down- and ‘DZ’ when upcasing.
21638
21639 https://debbugs.gnu.org/cgi/bugreport.cgi?msg=89;bug=24603 lists all
21640 changes to syntax table and case tables introduced by this commit.
21641
21642 * lisp/international/characters.el: Remove case-pairs defined with
21643 explicit Lisp code and instead use Unicode character properties.
21644
21645 * test/src/casefiddle-tests.el (casefiddle-tests--characters,
21646 casefiddle-tests-casing): Update test cases which are now working
21647 as they should.
21648
216492017-02-15 Michal Nazarewicz <mina86@mina86.com>
21650
21651 Add tests for casefiddle.c (bug#24603)
21652
21653 Fixes cases marked FIXME upcoming in followup commits.
21654
21655 * test/src/casefiddle-tests.el (casefiddle-tests-char-properties,
21656 casefiddle-tests-case-table, casefiddle-tests-casing-character,
21657 casefiddle-tests-casing, casefiddle-tests-casing-byte8,
21658 casefiddle-tests-casing-byte8-with-changes): New tests.
21659 (casefiddle-tests--test-casing): New helper function for runnig
21660 some of the tests.
21661
216622017-02-15 Michal Nazarewicz <mina86@mina86.com>
21663
21664 oldXMenu: add missing #include <string.h>
21665
21666 Some of the files in oldXMenu use functions from string.h without
21667 including that header which results in compile warnings:
21668
21669 ChgPane.c:46:5: warning: implicit declaration of function ‘strlen’
21670 ChgPane.c:46:20: warning: incompatible implicit declaration of
21671 built-in function ‘strlen’
21672 ChgSel.c:62:2: warning: implicit declaration of function ‘strlen’
21673 ChgSel.c:62:17: warning: incompatible implicit declaration of built-in
21674 function ‘strlen’
21675 Create.c:220:5: warning: implicit declaration of function ‘strcmp’
21676 InsPane.c:65:5: warning: implicit declaration of function ‘strlen’
21677 InsPane.c:65:20: warning: incompatible implicit declaration of
21678 built-in function ‘strlen’
21679 InsSel.c:68:5: warning: implicit declaration of function ‘strlen’
21680 InsSel.c:68:20: warning: incompatible implicit declaration of built-in
21681 function ‘strlen’
21682 InsSel.c:75:5: warning: implicit declaration of function ‘strcmp’
21683
21684 Add the necessary ‘#include <string.h>’.
21685
21686 oldXMenu/ChgPane.c, oldXMenu/ChgSel.c, oldXMenu/Create.c, oldXMenu/InsPane.c,
21687 oldXMenu/InsSel.c: add missing #include <string.h>
21688
216892017-02-15 Paul Eggert <eggert@cs.ucla.edu>
21690
21691 Fixup recent rmail patch
21692
21693 * lisp/mail/rmail.el (rmail-epa-decrypt): Remove unused local.
21694
216952017-02-15 Richard Stallman <rms@gnu.org>
21696
21697 Rmail fix
21698
21699 * lisp/mail/rmail.el (rmail-epa-decrypt-1): Include the just-decrypted text
21700 as element 4 of the value.
21701 (rmail-epa-decrypt): Take the text to insert from that element.
21702
217032017-02-15 Vibhav Pant <vibhavp@gmail.com>
21704
21705 bytecomp-tests.el: Store all test forms in one constant.
21706
21707 * test/lisp/emacs-lisp/bytecomp-tests.el: Store all test expressions
21708 in a single constant (byte-opt-testsuite-arith-data), add new forms
21709 which generate lapcode with adjacent/redundant tags.
21710
217112017-02-15 Glenn Morris <rgm@gnu.org>
21712
21713 Small lispref edit
21714
21715 * doc/lispref/os.texi (User Identification):
21716 Remove extraneous detail about user-mail-address.
21717
217182017-02-15 Katsumi Yamaoka <yamaoka@jpl.org>
21719
21720 Document fill-separate-heterogeneous-words-with-space (bug#25685)
21721
21722 * doc/lispref/text.texi (Filling):
21723 Document fill-separate-heterogeneous-words-with-space (bug#25685).
21724
217252017-02-15 Noam Postavsky <npostavs@gmail.com>
21726
21727 Test comment-multi-line = nil auto fill case too
21728
21729 * test/lisp/progmodes/js-tests.el (js-mode-auto-fill): Test with
21730 `comment-multi-line' both nil and non-nil.
21731 * lisp/newcomment.el (comment-multi-line): Mark safe if it's a
21732 boolean.
21733 * etc/NEWS: Mention that `js-mode' now sets `comment-multi-line'.
21734
217352017-02-15 Katsumi Yamaoka <yamaoka@jpl.org>
21736
21737 Don't delete leading and trailing space from CJK word (bug#25685)
21738
21739 * lisp/textmodes/fill.el (fill-delete-newlines):
21740 Don't delete leading and trailing space from CJK word.
21741 (fill-separate-heterogeneous-words-with-space):
21742 New user option that controls it (bug#25685).
21743
217442017-02-15 Juri Linkov <juri@linkov.net>
21745
21746 ‘M-s w RET word C-s’ repeats incremental search.
21747
21748 * lisp/isearch.el (isearch-new-nonincremental): New variable.
21749 (with-isearch-suspended): Bind isearch-new-nonincremental to
21750 isearch-nonincremental, and restore it afterwards.
21751 (isearch-forward-exit-minibuffer, isearch-reverse-exit-minibuffer):
21752 Set isearch-new-nonincremental to nil. (Bug#25562)
21753
217542017-02-14 Tom Tromey <tom@tromey.com>
21755
21756 Make vc-git detect conflict state for vc-dir
21757
21758 * lisp/vc/vc-git.el (vc-git-dir-status-state): New struct.
21759 (vc-git-dir-status-update-file): New function.
21760 (vc-git-after-dir-status-stage, vc-git-dir-status-goto-stage): Use
21761 vc-git-dir-status-state; add 'ls-files-conflict state.
21762 (vc-git-dir-status-files): Create a vc-git-dir-status-state.
21763
217642017-02-14 Vibhav Pant <vibhavp@gmail.com>
21765
21766 byte-opt: Replace merged tags in jump tables too. (bug#25716)
21767
21768 * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): While merging
21769 adjacent tags, make sure that the old tag is replaced in all jump
21770 tables, if any. This fixes the bytecode VM jumping to the wrong
21771 address in compiled cond forms where the body of a clause was a loop
21772 of any sort.
21773
217742017-02-14 Glenn Morris <rgm@gnu.org>
21775
21776 Remove overly broad element from default mail-dont-reply-to-names
21777
21778 * lisp/mail/mail-utils.el (mail-dont-reply-to):
21779 Do not include just "user@" in mail-dont-reply-to-names, and simplify.
21780 Ref: lists.gnu.org/archive/html/help-gnu-emacs/2017-02/msg00049.html
21781 * lisp/gnus/message.el (message-dont-reply-to-names): Doc fix.
21782 * doc/misc/message.texi (Wide Reply): Tiny fix re dont-reply-to-names.
21783
217842017-02-14 Juri Linkov <juri@linkov.net>
21785
21786 * etc/NEWS: Mention query-replace-from-to-separator. (Bug#25482)
21787
217882017-02-13 Arash Esbati <arash@gnu.org>
21789
21790 Match all characters in optional argument of \documentclass
21791
21792 * lisp/textmodes/reftex.el (reftex-TeX-master-file): Match all
21793 characters in optional argument containing name of the main file.
21794
217952017-02-13 Vibhav Pant <vibhavp@gmail.com>
21796
21797 Merge branch 'master' into feature/byte-switch
21798
217992017-02-13 Katsumi Yamaoka <yamaoka@jpl.org>
21800
21801 Fix non-ASCII text encoding (bug#25658)
21802
21803 * lisp/gnus/mm-bodies.el (mm-encode-body):
21804 Fix non-ASCII text encoding (bug#25658).
21805
218062017-02-13 Vibhav Pant <vibhavp@gmail.com>
21807
21808 test/lisp/emacs-lisp/bytecomp-tests.el: Add more tests for switch.
21809
218102017-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
21811
21812 * doc/lispref/modes.texi (Derived Modes): Make example more idiomatic
21813
218142017-02-13 Glenn Morris <rgm@gnu.org>
21815
21816 Fix recent bootstrap issue by moving string-to-list
21817
21818 * lisp/international/mule-util.el (string-to-list, string-to-vector):
21819 Move from here...
21820 * lisp/subr.el (string-to-list, string-to-vector): ...to here.
21821 The implementation is trivial and at least string-to-list
21822 has ended up being needed early during bootstrap.
21823
218242017-02-13 Glenn Morris <rgm@gnu.org>
21825
21826 Doc fixes related to mail-host-address
21827
21828 * lisp/startup.el (mail-host-address): Doc fix.
21829 * doc/lispref/os.texi (System Environment):
21830 Remove extraneous details of mail-host-address.
21831
218322017-02-13 Glenn Morris <rgm@gnu.org>
21833
21834 Simplify time-stamp mail host usage
21835
21836 * lisp/time-stamp.el (time-stamp-mail-host-name): Remove function.
21837 (time-stamp-string-preprocess): Handle "h" (mail host) directly.
21838
218392017-02-13 Glenn Morris <rgm@gnu.org>
21840
21841 Doc fix for vhdl-mode re mail-host-address
21842
21843 * lisp/progmodes/vhdl-mode.el (vhdl-file-header): Doc fix.
21844 (mail-host-address): Do not add to vhdl-related custom group,
21845 since vhdl-template-replace-header-keywords doesn't use it.
21846
218472017-02-13 Mark Oteiza <mvoteiza@udel.edu>
21848
21849 Substitute leading $HOME/ in xdg-user-dirs
21850
21851 * lisp/xdg.el (xdg--substitute-home-env): New function.
21852 (xdg--user-dirs-parse-line): Use it.
21853 (xdg-user-dir): Expand ~/ in xdg-user-dirs values.
21854
218552017-02-13 Mark Oteiza <mvoteiza@udel.edu>
21856
21857 * lisp/buff-menu.el: Turn on lexical-binding.
21858
218592017-02-13 Juri Linkov <juri@linkov.net>
21860
21861 * lisp/replace.el (query-replace-from-to-separator): Move propertize
21862
21863 and char-displayable-p test to query-replace-read-from.
21864 Add choice nil to disable this feature.
21865 (query-replace-read-from): Don't reevaluate custom setting.
21866 Use char-displayable-p to test the first non-whitespace character
21867 in query-replace-from-to-separator, use " -> " when fails.
21868 Add prompt for the case when separator is nil but
21869 query-replace-defaults is non-nil.
21870 Remove unused test for regexp-flag.
21871 Thanks to Thierry Volpiatto <thierry.volpiatto@gmail.com>
21872
218732017-02-13 Karl Fogel <kfogel@red-bean.com>
21874
21875 Convert more uses of `looking-at' to `following-char'
21876
21877 This follows up to Mark Oteiza's commit of 12 Feb 2017, 14:46:03 UTC
21878 (commit 91478f46238a) with more of the same.
21879
21880 * lisp/bookmark.el (bookmark-send-edited-annotation):
21881 (bookmark-bmenu-execute-deletions): Replace instances of looking-at
21882 with char comparisons using following-char.
21883
218842017-02-12 Paul Eggert <eggert@cs.ucla.edu>
21885
21886 Fix typos in tests for lax-plist-get etc.
21887
21888 Problem reported by Eli Zaretskii (Bug#25606#62).
21889 * test/src/fns-tests.el (test-cycle-lax-plist-get)
21890 (test-cycle-plist-put, test-cycle-lax-plist-put):
21891 Fix tests to match behavior.
21892
218932017-02-12 Michael Albinus <michael.albinus@gmx.de>
21894
21895 Fix bug#25607
21896
21897 * lisp/net/tramp.el (tramp-completion-file-name-handler):
21898 Improve autoloaded version.
21899 (tramp-autoload-file-name-handler): Avoid recursive load.
21900 (tramp-completion-handle-expand-file-name): Handle empty NAME.
21901 (Bug#25607)
21902
219032017-02-12 Mark Oteiza <mvoteiza@udel.edu>
21904
21905 Remove server-buffer-clients string from minor-mode-alist
21906
21907 * lisp/server.el: Don't put an element for server-buffer-clients into
21908 minor-mode-alist. (Bug#20201)
21909
219102017-02-12 Mark Oteiza <mvoteiza@udel.edu>
21911
21912 Nix some useless uses of looking-at, looking-back
21913
21914 * lisp/allout.el (allout-kill-topic):
21915 (allout-next-topic-pending-encryption):
21916 * lisp/bookmark.el (bookmark-kill-line):
21917 * lisp/cus-edit.el (custom-save-variables, custom-save-faces):
21918 * lisp/cus-theme.el (custom-theme-write-variables):
21919 (custom-theme-write-faces):
21920 * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
21921 * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer):
21922 * lisp/emacs-lisp/checkdoc.el (checkdoc-interactive-loop):
21923 (checkdoc-interactive-ispell-loop):
21924 (checkdoc-message-interactive-ispell-loop, checkdoc-this-string-valid):
21925 (checkdoc-this-string-valid-engine):
21926 * lisp/emacs-lisp/elint.el (elint-get-top-forms):
21927 * lisp/emulation/viper-cmd.el (viper-backward-indent):
21928 * lisp/image-dired.el (image-dired-delete-char):
21929 * lisp/simple.el (kill-visual-line): Replace instances of looking-at,
21930 looking-back with char comparisons using following-char, preceding-char.
21931
219322017-02-12 Eli Zaretskii <eliz@gnu.org>
21933
21934 Clarify what is the "cursor"
21935
21936 * doc/lispref/windows.texi (Window Point): Clarify the notion of
21937 "cursor".
21938
219392017-02-11 Tom Tromey <tom@tromey.com>
21940
21941 Recognize JS regexp literals more correctly
21942
21943 Bug#25529
21944 * lisp/progmodes/js.el (js--syntax-propertize-regexp-regexp): New
21945 constant.
21946 (js-syntax-propertize-regexp): Use it. Remove "end" argument.
21947 (js--syntax-propertize-regexp-syntax-table): Remove.
21948 (js-syntax-propertize): Update.
21949 * test/lisp/progmodes/js-tests.el (js-mode-regexp-syntax-bug-25529):
21950 New test.
21951
219522017-02-11 Vibhav Pant <vibhavp@gmail.com>
21953
21954 src/bytecode.c (exec_byte_code): Make hash_code a Lisp_Object.
21955
21956 This avoids using XUINT every time while comparing it with
21957 HASH_HASH (h, i), replacing it with EQ.
21958
219592017-02-11 Vibhav Pant <vibhavp@gmail.com>
21960
21961 src/bytecode.c (exec_byte_code): Remove unnecessary (e)assert.
21962
219632017-02-11 Tom Tromey <tom@tromey.com>
21964
21965 Fix bug in css--mdn-find-symbol
21966
21967 * lisp/textmodes/css-mode.el (css--mdn-find-symbol): Skip whitespace
21968 before skipping word characters.
21969 test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): Add
21970 regression test.
21971
219722017-02-11 Vibhav Pant <vibhavp@gmail.com>
21973
21974 src/bytecode.c: Add optional sanity check for jump tables.
21975
21976 * src/bytecode.c (exec_byte_code): When sanity checks are enabled,
21977 check that the jump table's size is equal to it's count.
21978
219792017-02-11 Vibhav Pant <vibhavp@gmail.com>
21980
21981 Merge branch 'master' into feature/byte-switch
21982
21983 * src/bytecode.c: Refactor to follow GNU coding standards
21984
219852017-02-11 Eli Zaretskii <eliz@gnu.org>
21986
21987 Fix handling of XBM images on MS-Windows
21988
21989 * src/image.c (xbm_load) [HAVE_NTGUI]: Fix calculation of
21990 'nbytes' when inverting XBM data bits. (Bug#25661)
21991
219922017-02-11 Eli Zaretskii <eliz@gnu.org>
21993
21994 Fix handling of PBM data
21995
21996 * src/image.c (pbm_load): Handle PBM data with no blanks between
21997 individual pixel values correctly. (Bug#25660)
21998
219992017-02-10 Noam Postavsky <npostavs@gmail.com>
22000
22001 Fix warnings in debug tracing code
22002
22003 * src/xdisp.c (dump_glyph, dump_glyph_string):
22004 * src/xfaces.c (dump_realized_face): Cast arguments or adjust format
22005 specifiers to match signedness.
22006
220072017-02-10 Sam Steingold <sds@gnu.org>
22008
22009 Extract grep-find-ignored-directories processing from rgrep-default-command
22010
22011 (rgrep-find-ignored-directories): Extract from `rgrep-default-command'.
22012 Some Emacs packages use `grep-find-ignored-directories' to ignore some
22013 directories, so will use this function instead of custom code.
22014 (rgrep-default-command): Use `rgrep-find-ignored-directories'.
22015
220162017-02-10 Vibhav Pant <vibhavp@gmail.com>
22017
22018 src/bytecode.c: Avoid comparing values unnecessarily in Bswitch
22019
22020 * src/bytecode.c: (exec_byte_code) While linear searching the jump
22021 table, compare the value's hash table first to avoid calling
22022 h->test.cmpfn every time.
22023
220242017-02-10 Paul Eggert <eggert@cs.ucla.edu>
22025
22026 Fix a few integer-overflow glitches
22027
22028 * src/composite.c (composition_compute_stop_pos, composition_reseat_it):
22029 * src/dispextern.h (struct composition_it.rule_idx):
22030 * src/keyboard.c (Fset__this_command_keys):
22031 * src/xwidget.c (webkit_js_to_lisp):
22032 Don’t assume object sizes fit in ‘int’.
22033 * src/xwidget.c (Fxwidget_resize):
22034 Don’t assume Emacs integers fit in ‘int’.
22035
220362017-02-10 Eli Zaretskii <eliz@gnu.org>
22037
22038 Fix a bug with displaying an image after a TAB
22039
22040 * src/xdisp.c (display_line): Handle TAB at end of screen line
22041 specially only when we are displaying characters. (Bug#25662)
22042
220432017-02-10 Eli Zaretskii <eliz@gnu.org>
22044
22045 Improve commentary in lisp.h
22046
22047 * src/lisp.h: Explain in the comment why enlarging a Lisp_Misc
22048 object is discouraged.
22049
220502017-02-10 Paul Eggert <eggert@cs.ucla.edu>
22051
22052 Move cyclic tests to fns-tests.el
22053
22054 * test/src/fns-tests.el (cyc1, cyc2, dot1, dot2): New functions.
22055 (test-cycle-length, test-cycle-safe-length, test-cycle-member)
22056 (test-cycle-memq, test-cycle-memql, test-cycle-assq)
22057 (test-cycle-assoc, test-cycle-rassq, test-cycle-rassoc)
22058 (test-cycle-delq, test-cycle-delete, test-cycle-reverse)
22059 (test-cycle-plist-get, test-cycle-lax-plist-get)
22060 (test-cycle-plist-member, test-cycle-plist-put)
22061 (test-cycle-lax-plist-put, test-cycle-equal, test-cycle-nconc):
22062 New tests.
22063 * test/manual/cyclic-tests.el: File deleted.
22064
220652017-02-10 Gemini Lasswell <gazally@runbox.com>
22066
22067 Fix instrumenting code with propertized strings in Edebug
22068
22069 * lisp/emacs-lisp/edebug.el (edebug-read-function): Allow
22070 'read' to decide what is and isn't a syntax error. (Bug#25068)
22071
220722017-02-10 Vladimir Panteleev <vladimir@thecybershadow.net>
22073
22074 Improve fontification in bat-mode
22075
22076 * lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Match
22077 word and symbol constituents when looking for variable names
22078 to fontify; also, correct the syntax table and mark the equal
22079 sign (=) character as punctuation. Improve fontification
22080 accuracy of iteration/positional variables.
22081 (bat-mode): Set comment-start-skip. (Bug#25541)
22082
22083 * test/lisp/progmodes/bat-mode-tests.el: New file, tests for
22084 bat-mode.el.
22085
220862017-02-10 Eli Zaretskii <eliz@gnu.org>
22087
22088 Restore special setting of this-command-keys by M-x
22089
22090 It was lost when execute-extended-command was reimplemented in Lisp.
22091
22092 * src/keyboard.c (Fset__this_command_keys): New function.
22093 (syms_of_keyboard): Defsubr it.
22094
22095 * lisp/simple.el (execute-extended-command): Set this-command-keys
22096 as novice.el expects. (Bug#25612)
22097
220982017-02-09 Juri Linkov <juri@linkov.net>
22099
22100 * lisp/isearch.el (isearch-search-fun-default): Set isearch-adjusted
22101
22102 to t to display "Pending" in the search prompt for lax
22103 word/symbol search (bug#25562). Don't use lax for lazy-highlighting
22104 when 'bound' is non-nil.
22105 (word-search-regexp, isearch-symbol-regexp): Don't depend on lax
22106 at the beginning of regexp (bug#22589).
22107
22108 * lisp/info.el (Info-isearch-search):
22109 Use isearch--lax-regexp-function-p.
22110
22111 * doc/emacs/search.texi (Word Search, Symbol Search):
22112 Mention "Pending" prompt for lax word/symbol search.
22113
221142017-02-09 Vibhav Pant <vibhavp@gmail.com>
22115
22116 src/bytecode.c (exec_byte_code): Remove unneeded assert.
22117
22118 bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZE
22119
221202017-02-09 Vibhav Pant <vibhavp@gmail.com>
22121
22122 bytecode.c (exec_byte_code): don't check hash code in linear search.
22123
22124 * src/bytecode.c (exec_byte_code): Don't check that the hash code is
22125 not nil when linear scanning the jump table. Hash tables for are
22126 declared with :size as the exact number of cases, so each entry i
22127 should have a hash code. When BYTE_CODE_SAFE, do it as a sanity
22128 check.
22129
221302017-02-09 Tino Calancha <tino.calancha@gmail.com>
22131
22132 Ibuffer: Update mode documentation
22133
22134 * lisp/ibuffer.el (ibuffer-mode): List newest commands in mode documentation.
22135
221362017-02-09 Steven Allen <steven@stebalien.com> (tiny change)
22137
22138 Fix environment variable for xdg-data-dirs
22139
22140 * lisp/xdg.el (xdg-data-dirs): Use XDG_DATA_DIRS, not XDG_CONFIG_DIRS
22141
221422017-02-09 Tino Calancha <tino.calancha@gmail.com>
22143
22144 Ibuffer: Erase output buffer before shell commands
22145
22146 * lisp/ibuf-macs.el (define-ibuffer-op): Add keyword arguments
22147 BEFORE and AFTER; they are forms to run before/after the operation.
22148 * lisp/ibuf-ext.el (ibuffer--maybe-erase-shell-cmd-output):
22149 New defun; if shell-command-dont-erase-buffer is nil, then
22150 erase shell command output buffer.
22151 (ibuffer-do-shell-command-pipe, ibuffer-do-shell-command-file): Use it.
22152
221532017-02-09 Tino Calancha <tino.calancha@gmail.com>
22154
22155 Ibuffer: Don't truncate shell command output
22156
22157 * lisp/ibuf-ext.el (ibuffer-do-shell-command-pipe)
22158 (ibuffer-do-shell-command-pipe-replace)
22159 Use 'call-shell-region' (Bug#22679).
22160 (ibuffer-do-shell-command-file): Use call-process-shell-command.
22161 If FILE, the file that the buffer object is visiting,
22162 exists and the buffer is up-to-date, then use
22163 FILE instead of creating a temporary file (Bug#22679).
22164
221652017-02-09 Vibhav Pant <vibhavp@gmail.com>
22166
22167 Improve byte-switch execution.
22168
22169 * lisp/emacs-lisp/byte-opt.el,
22170 lisp/emacs-lisp/bytecomp.el (byte-decompile-bytecode-1),
22171 (byte-compile-lapcode): Calculate the actual jump address while
22172 compiling, store it in the jump table.
22173
22174 * src/bytecode.c: Jump to the looked up value directly, do a linear
22175 search when the number of elements is <= 5.
22176
221772017-02-09 Noam Postavsky <npostavs@gmail.com>
22178
22179 Make sure eshell pipelines don't drop data
22180
22181 * lisp/eshell/esh-proc.el (eshell-sentinel): If called while still
22182 handling output of the process, make sure to close the pipes only later,
22183 so that the next process in the pipeline recieves EOF only after getting
22184 all its input (Bug#25549).
22185
221862017-02-09 Katsumi Yamaoka <yamaoka@jpl.org>
22187
22188 Make mm-shr use mail-parse-charset by default
22189
22190 * lisp/gnus/mm-decode.el (mm-shr): Use mail-parse-charset by default.
22191 This helps an html message with no charset spec to be decoded.
22192
221932017-02-08 Stephen Berman <stephen.berman@gmx.net>
22194
22195 describe-char: unambiguous name for inserting ASCII 7
22196
22197 * lisp/descr-text.el (describe-char): Make the input
22198 suggestion for inserting ASCII character 7 by name use the
22199 unambiguous name "BELL (BEL)" (bug#25641).
22200
222012017-02-08 Michael Albinus <michael.albinus@gmx.de>
22202
22203 Modify suppressing `vc-refresh-state' in filenotify-tests.el
22204
22205 * test/lisp/filenotify-tests.el (file-notify-test03-autorevert):
22206 Use an advice rather than an alias for suppressing `vc-refresh-state'.
22207
222082017-02-08 Noam Postavsky <npostavs@gmail.com>
22209
22210 Disable native completion for ipython (Bug#25067)
22211
22212 * lisp/progmodes/python.el:
22213 (python-shell-completion-native-disabled-interpreters): Add "ipython".
22214
222152017-02-07 Michael Albinus <michael.albinus@gmx.de>
22216
22217 Suppress undesired error messages in filenotify-tests.el
22218
22219 * test/lisp/filenotify-tests.el (file-notify-test03-autorevert):
22220 Suppress `vc-refresh-state', it produces undesired error messages.
22221
222222017-02-07 Eli Zaretskii <eliz@gnu.org>
22223
22224 Fix a typo in ada-mode manual
22225
22226 * doc/misc/ada-mode.texi (Project file variables): Add a missing
22227 right bracket. Reported by Jean-Christophe Helary
22228 <jean.christophe.helary@gmail.com>.
22229
222302017-02-07 Lars Ingebrigtsen <larsi@gnus.org>
22231
22232 Ensure that Gnus bugs show up in the Emacs tracker
22233
22234 * lisp/gnus/gnus.el (gnus-bug-package): Include Emacs in the
22235 package spec.
22236
222372017-02-07 Lars Ingebrigtsen <larsi@gnus.org>
22238
22239 Revert "Don't tag Gnus bugs with "gnus""
22240
22241 This reverts commit b6fa58072304c2a24f1fe8a0e06a4739a7f8211b.
22242
22243 The debbugs syntax requires a package name
22244
222452017-02-07 Vibhav Pant <vibhavp@gmail.com>
22246
22247 Add tests for checking byte-switch code.
22248
22249 * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-cond): New test,
22250 test byte-switch bytecode.
22251
222522017-02-07 Mark Oteiza <mvoteiza@udel.edu>
22253
22254 Add xdg library
22255
22256 * etc/NEWS: Mention new library.
22257 * lisp/xdg.el: New file.
22258
222592017-02-07 Paul Eggert <eggert@cs.ucla.edu>
22260
22261 Do not trick info/dir’s timestamp
22262
22263 * Makefile.in (${srcdir}/info/dir): When making this file, do not
22264 do anything special about its timestamp. Previously this rule
22265 used move-if-change, which meant that this file’s timestamp could
22266 end up being older than the files it depends on, and this caused
22267 ‘make --question info’ to fail, which caused ‘make-dist’ to fail
22268 now that ‘make-dist’ invokes ‘make --question info’.
22269
222702017-02-07 Paul Eggert <eggert@cs.ucla.edu>
22271
22272 Make FOR_EACH_TAIL more like other FOR_EACH macros
22273
22274 See comments by Stefan Monnier in:
22275 http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00181.html
22276 and by Eli Zaretskii in:
22277 http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00207.html
22278 * src/fns.c (internal_equal): Do not bypass check for depth
22279 overflow when tail-recursing via a dotted list tail or an overlay
22280 plist, to avoid a rare infloop.
22281 * src/lisp.h (FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE): Take TAIL as an
22282 arg, and update it at each iteration, rather than have callers
22283 access it.tail. All callers changed.
22284 (FOR_EACH_TAIL): Do not check for dotted lists, as this is now
22285 the caller’s responsibility. All callers changed.
22286 (FOR_EACH_TAIL_CONS): Remove. All callers changed.
22287 (struct for_each_tail_internal.tail): Remove; no longer needed.
22288 (FOR_EACH_TAIL_INTERNAL): Remove dotted arg, and set the tail
22289 arg each time through the loop. All callers changed.
22290
222912017-02-05 Paul Eggert <eggert@cs.ucla.edu>
22292
22293 Port to clang 3.8.0
22294
22295 It does not allow a for-loop's control var to be an anonymous struct.
22296 * src/lisp.h (struct for_each_tail_internal): New type.
22297 (FOR_EACH_TAIL_INTERNAL): Use it.
22298
222992017-02-05 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
22300
22301 Add cyclic-list tests
22302
22303 * test/manual/cycle-tests.el: New file (Bug#25606).
22304
223052017-02-05 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
22306
22307 FOR_EACH_TAIL now checks for quit
22308
22309 As per Eli Zaretskii (Bug#25606#20). Although these calls to
22310 maybe_quit are unnecessary in practice, Eli was not convinced
22311 that the calls are unnecessary.
22312 * src/lisp.h (FOR_EACH_TAIL, FOR_EACH_TAIL_CONS):
22313 Call maybe_quit every so often.
22314 (FOR_EACH_TAIL_INTERNAL): New arg CHECK_QUIT. All callers changed.
22315
223162017-02-05 Paul Eggert <eggert@cs.ucla.edu>
22317
22318 Signal list cycles in ‘length’ etc.
22319
22320 Use macros like FOR_EACH_TAIL instead of maybe_quit to
22321 catch list cycles automatically instead of relying on the
22322 user becoming impatient and typing C-g (Bug#25606).
22323 * src/fns.c (Flength, Fmember, Fmemq, Fmemql, Fassq, Fassoc, Frassq)
22324 (Frassoc, Fdelete, Freverse):
22325 Use FOR_EACH_TAIL instead of maybe_quit.
22326 (Fnreverse): Use simple EQ to check for circular list instead
22327 of rarely_quit, as this suffices in this unusual case.
22328 (Fplist_put, Flax_plist_put, Flax_plist_put):
22329 Use FOR_EACH_TAIL_CONS instead of maybe_quit.
22330 (internal_equal): Use FOR_EACH_TAIL_CONS to check lists, instead
22331 of by-hand tail recursion that did not catch cycles.
22332 * src/fns.c (Fsafe_length, Fplist_get):
22333 * src/xdisp.c (display_mode_element):
22334 Use FOR_EACH_TAIL_SAFE instead of by-hand Floyd’s algorithm.
22335 * src/lisp.h (QUIT_COUNT_HEURISTIC): Remove; no longer needed.
22336 (rarely_quit): Simply count toward USHRT_MAX + 1, since the
22337 fancier versions are no longer needed.
22338 (FOR_EACH_TAIL_CONS, FOR_EACH_TAIL_SAFE)
22339 (FOR_EACH_TAIL_INTERNAL): New macros, the last with definiens
22340 mostly taken from FOR_EACH_TAIL.
22341 (FOR_EACH_TAIL): Rewrite in terms of FOR_EACH_TAIL_INTERNAL.
22342
223432017-02-05 Paul Eggert <eggert@cs.ucla.edu>
22344
22345 Simplify use of FOR_EACH_TAIL
22346
22347 * src/data.c (circular_list): New function.
22348 * src/lisp.h (FOR_EACH_TAIL): Use Brent’s algorithm and C99 for-loop
22349 decl, to eliminate the need for the args TAIL, TORTOISE and N, and
22350 to speed things up a bit on typical hosts with optimization.
22351 All uses changed (Bug#25605).
22352
223532017-02-05 Simen Heggestøyl <simenheg@gmail.com>
22354
22355 * lisp/textmodes/css-mode.el: Require subr-x at compile time
22356
223572017-02-05 Eli Zaretskii <eliz@gnu.org>
22358
22359 Clarify documentation of 'bufferpos-to-filepos' and 'filepos-to-bufferpos'
22360
22361 * doc/lispref/nonascii.texi (Text Representations): Clarify that
22362 'exact' value of QUALITY argument to 'bufferpos-to-filepos' and
22363 'filepos-to-bufferpos' can lead to expensive and slow processing.
22364
22365 * lisp/international/mule-util.el (filepos-to-bufferpos)
22366 (bufferpos-to-filepos): Doc fix. (Bug#25626)
22367
223682017-02-05 Vibhav Pant <vibhavp@gmail.com>
22369
22370 Merge remote-tracking branch 'origin/master' into feature/byte-switch
22371
223722017-02-05 Vibhav Pant <vibhavp@gmail.com>
22373
22374 bytecomp.el: Use macroexp-const-p instead of bc-cond-valid-obj2-p.
22375
22376 * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Use
22377 (macroexp-cons-p) instead of (byte-compile-cond-valid-obj2-p) to
22378 make sure that obj1/obj2 can be compared with `eq'.
22379
223802017-02-05 Vibhav Pant <vibhavp@gmail.com>
22381
22382 * byte-opt.el (byte-decompile-bytecode-1): Use eq instead of =.
22383
223842017-02-05 Vibhav Pant <vibhavp@gmail.com>
22385
22386 bytecomp.el: Inline lapcode containing `byte-switch' correctly.
22387
22388 * lisp/emacs-lisp/bytecomp.el (byte-compile-inline-lapcode):
22389 Restore value of byte-compile-depth after emitting a jump to a tag
22390 in a jump table, or default/done tags.
22391 Set the depth of final tags for byte-switch to nil after emitting
22392 any jumps to them.
22393
223942017-02-05 Vibhav Pant <vibhavp@gmail.com>
22395
22396 byte-opt.el: Replace jump tables while decompiling correctly.
22397
22398 * lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1):
22399 Don't make a copy of the constant vector, as it isn't used with
22400 the decompiled lapcode.
22401 Make sure that the correct lapcode pair/list is being modified while
22402 replacing the jump table.
22403
224042017-02-05 Vibhav Pant <vibhavp@gmail.com>
22405
22406 bytecomp.el: Don't store non-keyword symbols in jump-tables.
22407
22408 * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-valid-obj2-p) return
22409 nil when OBJ is a non-keyword symbol (i.e a variable), as the jump
22410 table can only be used when comparing variables with constant values.
22411
224122017-02-04 Tom Tromey <tom@tromey.com>
22413
22414 typo fix
22415
22416 (css--colon-inside-selector-p): Fix typo in docstring.
22417
224182017-02-04 Tom Tromey <tom@tromey.com>
22419
22420 Set comment-multi-line in js-mode
22421
22422 Bug#6806:
22423 * lisp/progmodes/js.el (js-mode): Set comment-multi-line to t.
22424 * test/lisp/progmodes/js-tests.el (js-mode-auto-fill): New test.
22425
224262017-02-04 Simen Heggestøyl <simenheg@gmail.com>
22427
22428 * test/manual/indent/scss-mode.scss: Fix indentation
22429
224302017-02-04 Simen Heggestøyl <simenheg@gmail.com>
22431
22432 Fix indentation of multiline CSS property values
22433
22434 * lisp/textmodes/css-mode.el (css-smie-grammar): Give colons belonging
22435 to properties higher precedence.
22436 (css--colon-inside-selector-p, css--colon-inside-funcall): New
22437 functions for helping SMIE during tokenization.
22438 (css-smie--forward-token, css-smie--backward-token): Distinguish
22439 colons belonging to properties from other colons.
22440
22441 * test/manual/indent/css-mode.css: Add tests for the changes above.
22442
22443 * test/manual/indent/scss-mode.scss: Ditto.
22444
224452017-02-04 Gemini Lasswell <gazally@runbox.com>
22446
22447 Add tests for lisp/kmacro.el
22448
22449 * test/lisp/kmacro-tests.el: New file. (Bug#24939)
22450
224512017-02-04 Eli Zaretskii <eliz@gnu.org>
22452
22453 Fix autorevert-tests on MS-Windows
22454
22455 * test/lisp/autorevert-tests.el
22456 (auto-revert-test02-auto-revert-deleted-file): Don't check that
22457 auto-revert-use-notify was reset to nil on w32.
22458
224592017-02-04 Gemini Lasswell <gazally@runbox.com>
22460
22461 New macro 'ert-with-message-capture'
22462
22463 * lisp/emacs-lisp/ert-x.el (ert-with-message-capture): New macro.
22464 (Bug#25158)
22465
22466 * test/lisp/autorevert-tests.el (auto-revert--wait-for-revert)
22467 (auto-revert-test00-auto-revert-mode)
22468 (auto-revert-test01-auto-revert-several-files)
22469 (auto-revert-test02-auto-revert-deleted-file)
22470 (auto-revert-test03-auto-revert-tail-mode)
22471 (auto-revert-test04-auto-revert-mode-dired):
22472 * test/lisp/filenotify-tests.el (file-notify-test03-autorevert): Use
22473 ert-with-message-capture.
22474
224752017-02-04 Gemini Lasswell <gazally@runbox.com>
22476
22477 Avoid invalid read syntax errors due to 'ert-with-test-buffer'
22478
22479 * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): Fix the
22480 'declare' form. (Bug#24722)
22481
224822017-02-04 Eli Zaretskii <eliz@gnu.org>
22483
22484 Fix a syntax error when evaluating pcase.el under Edebug
22485
22486 * lisp/emacs-lisp/pcase.el (pcase-MACRO): Replace def-edebug-spec
22487 with an explicit 'put' form. Suggested by Gemini Lasswell
22488 <gazally@runbox.com>. (Bug#24717)
22489
224902017-02-04 Gemini Lasswell <gazally@runbox.com>
22491 Eli Zaretskii <eliz@gnu.org>
22492
22493 Change edebug-max-depth from defconst to defcustom
22494
22495 * lisp/emacs-lisp/edebug.el (edebug-max-depth): Add defcustom.
22496 (Bug#24713)
22497
22498 * etc/NEWS: Mention edebug-max-depth.
22499
22500 * doc/lispref/edebug.texi (Checking Whether to Stop): Mention
22501 edebug-max-depth and index it. Add cross-references for
22502 max-lisp-eval-depth and max-specpdl-size.
22503
225042017-02-04 Eli Zaretskii <eliz@gnu.org>
22505
22506 Support options with embedded whitespace in 'dired-listing-switches'
22507
22508 * lisp/dired.el (dired-listing-switches): Document how to quote
22509 options with embedded whitespace.
22510
22511 * lisp/files.el (insert-directory): Use split-string-and-unquote
22512 to support dired-listing-switches that specify command-line
22513 options with embedded spaces. (Bug#25485)
22514
225152017-02-04 Gemini Lasswell <gazally@runbox.com>
22516 Noam Postavsky <npostavs@users.sourceforge.net>
22517
22518 Add tests for lisp/emacs-lisp/testcover.el
22519
22520 * test/lisp/emacs-lisp/testcover-tests.el: New file.
22521 * test/lisp/emacs-lisp/testcover-resources/testcases.el: New file.
22522
225232017-02-04 Eli Zaretskii <eliz@gnu.org>
22524
22525 Document 'save-some-buffers-default-predicate'
22526
22527 * doc/lispref/files.texi (Saving Buffers):
22528 * doc/emacs/files.texi (Save Commands): Document
22529 save-some-buffers-default-predicate.
22530
225312017-02-04 Richard Stallman <rms@gnu.org>
22532
22533 New defcustom 'save-some-buffers-default-predicate'
22534
22535 * lisp/files.el (save-some-buffers-default-predicate): New defcustom.
22536 (save-some-buffers): Use it when PRED is nil or omitted.
22537
225382017-02-04 Mark Oteiza <mvoteiza@udel.edu>
22539
22540 Rename to if-let* and when-let*
22541
22542 Make the existing if-let and when-let aliases.
22543 * lisp/emacs-lisp/subr-x.el (if-let*, when-let*): New macros. Rewrite
22544 docstrings, incorporating that from let* and the existing if-let.
22545 (if-let, when-let, and-let*): Alias them.
22546
225472017-02-03 Vibhav Pant <vibhavp@gmail.com>
22548
22549 Revert "Use maphash instead of cl-loop."
22550
22551 This reverts commit bfa88520136dd6b187ba101e6db5a5f8f0d5e874.
22552
225532017-02-03 Nicolas Petton <nicolas@petton.fr>
22554
22555 Bump Emacs version to 25.2 RC1
22556
22557 * README:
22558 * configure.ac:
22559 * msdos/sed2v2.inp:
22560 * nt/README.W32: Bump Emacs version.
22561 * lisp/ldefs-boot.el: Update.
22562
225632017-02-03 Nicolas Petton <nicolas@petton.fr>
22564
22565 * admin/make-tarball.txt: Add documentation regarding the release banner.
22566
225672017-02-03 Tino Calancha <tino.calancha@gmail.com>
22568
22569 * CONTRIBUTE (Documenting your changes): Index new vars/commands in manual.
22570
225712017-02-03 Paul Eggert <eggert@cs.ucla.edu>
22572
22573 Re-port alloc.c to Solaris sparc and simplify
22574
22575 alloc.c had bitrotted a bit, and used an undefined symbol
22576 stack_base when Emacs was built on Solaris sparc, leading to
22577 compilation failures. Also, code related to __builtin_unwind_init
22578 was unnecessarily duplicated. Fix the bitrot and remove some
22579 duplication.
22580 * src/alloc.c: Remove uses of GC_SAVE_REGISTERS_ON_STACK, since it
22581 is never defined.
22582 (test_setjmp) [!HAVE___BUILTIN_UNWIND_INIT && GC_SETJMP_WORKS]:
22583 Define a no-op dummy, to simplify use.
22584 (test_setjmp) [!GC_SETJMP_WORKS]: Test setjmp_tested_p here rather
22585 than in the caller, to simplify use.
22586 (stacktop_sentry): New type.
22587 (__builtin_unwind_init) [!HAVE___BUILTIN_UNWIND_INIT]: New macro.
22588 (SET_STACK_TOP_ADDRESS): New macro, containing code that was duplicated.
22589 (flush_stack_call_func, Fgarbage_collect): Use it.
22590 (init_alloc): Omit unnecessary initialization.
22591 After dumping, Emacs need not re-test setjmp.
22592
225932017-02-03 Noam Postavsky <npostavs@gmail.com>
22594
22595 Add tests for scrolling
22596
22597 * test/manual/scroll-tests.el: New tests for scroll-margin behavior.
22598
225992017-02-03 Noam Postavsky <npostavs@gmail.com>
22600
22601 Fix scrolling with partial lines
22602
22603 * src/xdisp.c (partial_line_height): New function.
22604 (try_scrolling):
22605 * src/window.c (window_scroll_pixel_based): Use it for calculating the
22606 pixel scroll margin correctly in a window with partial lines.
22607
226082017-02-03 Noam Postavsky <npostavs@gmail.com>
22609
22610 Make limit on scroll-margin variable
22611
22612 * src/xdisp.c (maximum-scroll-margin): New variable.
22613 * lisp/cus-start.el: Make it customizable.
22614 * etc/NEWS: Mention it.
22615 * doc/emacs/display.texi (Auto Scrolling):
22616 * doc/lispref/windows.texi (Textual Scrolling): Document it.
22617 * src/window.c (window_scroll_pixel_based): Use it instead of hardcoding
22618 division by 4 (Bug #5718).
22619
226202017-02-03 Noam Postavsky <npostavs@gmail.com>
22621
22622 Don't count mode line for scroll-margin limit
22623
22624 * src/window.c (window_scroll_margin): Use window_box_height to avoid
22625 counting header line, scrollbars for scroll-margin limit (Bug #5718).
22626
226272017-02-03 Noam Postavsky <npostavs@gmail.com>
22628
22629 Refactor uses of scroll_margin to a function
22630
22631 Its effective range needs to be clamped between 0 and (window height /
22632 4), so it's better to have this constraint in a single place.
22633
22634 * src/window.c (window_scroll_margin): New function.
22635 (window_scroll_pixel_based, window_scroll_line_based):
22636 (Frecenter, Fmove_to_window_line):
22637 * src/xdisp.c (try_scrolling, try_cursor_movement):
22638 (redisplay_window, try_window, try_window_id): Use it.
22639
226402017-02-03 Dmitry Gutov <dgutov@yandex.ru>
22641
22642 (xref-collect-matches): Use '-E' together with '-e'
22643
22644 * lisp/progmodes/xref.el (xref-collect-matches): Use '-E'
22645 together with '-e', as suggested by Noam Postavsky
22646 (http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00780.html).
22647
226482017-02-03 Paul Eggert <eggert@cs.ucla.edu>
22649
22650 Pacify Oracle Studio 12.5
22651
22652 * src/emacs.c (main): Do not silently convert char * to bool.
22653
226542017-02-02 Paul Eggert <eggert@cs.ucla.edu>
22655
22656 Fix lisp.h underparenthesization
22657
22658 * src/lisp.h (STACK_CONS, AUTO_STRING_WITH_LEN):
22659 Parenthesize compound literals that are function call args.
22660 Although this does not fix any bugs, it is the proper style for
22661 macro parenthesization as it means this code will continue to
22662 work even if make_lisp_ptr is changed to a macro.
22663
226642017-02-02 Stefan Monnier <monnier@iro.umontreal.ca>
22665
22666 * lisp/doc-view.el (doc-view-mode): Don't require a final newline
22667
22668 (doc-view-revert-buffer): Silence overflow warnings.
22669
226702017-02-02 Paul Eggert <eggert@cs.ucla.edu>
22671
22672 Merge from gnulib
22673
22674 2017-01-30 Port to PGI 16.10 x86-64
22675 2017-01-20 time_rz: fix comment typo
22676 2017-01-14 strftime: %z is -00 if unknown
22677 This incorporates:
22678 * doc/misc/texinfo.tex, lib/c-ctype.h, lib/strftime.c:
22679 * lib/time-internal.h, lib/verify.h:
22680 Copy from gnulib.
22681
226822017-02-02 Tino Calancha <tino.calancha@gmail.com>
22683
22684 Check if there are hunks before kill or refine a hunk
22685
22686 * lisp/vc/diff-mode.el (diff--some-hunks-p): New predicate.
22687 (diff-hunk-kill, diff-file-kill, diff-refine-hunk): Use it (Bug#25571).
22688
226892017-02-02 Tino Calancha <tino.calancha@gmail.com>
22690
22691 Ignore error after kill last file or hunk
22692
22693 * lisp/vc/diff-mode.el (diff-hunk-kill): Go to beginning of hunk before kill.
22694 Ignore error after kill last hunk (Bug#25570).
22695 (diff-file-kill): Idem.
22696
226972017-02-02 Tino Calancha <tino.calancha@gmail.com>
22698
22699 Show current line highlighted in *Occur* buffer
22700
22701 * lisp/replace.el (list-matching-lines-current-line-face)
22702 (list-matching-lines-jump-to-current-line): New user options.
22703 (occur--orig-line, occur--orig-line-str): New variables.
22704 (occur, occur-engine): Use them.
22705 (occur--final-pos): New variable.
22706 (occur-1): Use it.
22707 (occur-engine): Idem.
22708 Show the current line with 'list-matching-lines-current-line-face'.
22709 Set point on the first matching line after the current one.
22710 * etc/NEWS: Add entry for the new option.
22711
227122017-02-02 Tino Calancha <tino.calancha@gmail.com>
22713
22714 Allow occur command to operate on the region
22715
22716 See discussion in:
22717 https://lists.gnu.org/archive/html/emacs-devel/2016-12/msg01084.html
22718 * lisp/replace.el (occur--region-start, occur--region-end)
22719 (occur--matches-threshold): New variables.
22720 (occur-engine): Use them.
22721 (occur): Idem.
22722 Add optional arg REGION; if non-nil occur applies in that region.
22723 * doc/lispintro/emacs-lisp-intro.texi (Keybindings): Update manual
22724 * doc/emacs/search.texi (Other Repeating Search): Idem.
22725
227262017-02-02 Mark Oteiza <mvoteiza@udel.edu>
22727
22728 Treat list-buffers-directory as a string
22729
22730 Another step in the long history of list-buffers-directory. A thread
22731 branch discussing the meaning/use of the variable starts here
22732 https://lists.gnu.org/archive/html/emacs-devel/2009-09/msg00684.html
22733 Also see (info "(elisp) Buffer File Name").
22734 * lisp/buff-menu.el: Relocate special case code into info.el. Nix
22735 Info-* defvars.
22736 (Buffer-menu--pretty-file-name): Remove special case. Use
22737 bound-and-true-p.
22738 (Buffer-menu-info-node-description): Remove.
22739 * lisp/ibuffer.el (ibuffer-buffer-file-name): Treat
22740 list-buffers-directory as a string.
22741 * lisp/info.el (Info-node-description): New function.
22742 (Info-select-node): Use it.
22743
227442017-02-02 Mark Oteiza <mvoteiza@udel.edu>
22745
22746 Turn on lexical-binding in parse-time.el
22747
22748 * lisp/calendar/parse-time.el: Turn on lexical-binding.
22749 (parse-time-iso8601-regexp, parse-iso8601-time-string): Remove unused
22750 bindings.
22751
227522017-02-02 Mark Oteiza <mvoteiza@udel.edu>
22753
22754 Prevent creating thumbnails of all gif frames
22755
22756 With the previous defaults, doing image-dired on a directory with an
22757 animated foo.gif would cause creation of foo.thumb-N.gif for each of
22758 N frames in foo.gif. By default image-dired looks for foo.thumb.gif, so
22759 there additionally is no usable thumbnail after all the needless effort.
22760 image-dired never handled animation, regardless.
22761 * lisp/image-dired.el: Mention limitation.
22762 (image-dired-cmd-create-thumbnail-options):
22763 (image-dired-cmd-create-temp-image-options):
22764 (image-dired-cmd-create-standard-thumbnail-options): Append [0] to
22765 filename to indicate only converting the 0th frame.
22766 (image-dired-display-image-mode): Don't show a cursor.
22767
227682017-02-02 Paul Eggert <eggert@cs.ucla.edu>
22769
22770 Fix quitting bug when buffers are frozen
22771
22772 Problem noted by Eli Zaretskii in:
22773 http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00721.html
22774 This patch also fixes some other issues in that report.
22775 * src/lisp.h (incr_rarely_quit): Remove.
22776 All callers changed to use rarely_quit directly.
22777 * src/search.c (freeze_buffer_relocation)
22778 (thaw_buffer_relocation): New functions.
22779 (looking_at_1, fast_looking_at, search_buffer):
22780 Use them to fix bug when quitting when buffers are frozen.
22781 * src/sysdep.c (emacs_intr_read): Rename from emacs_nointr_read.
22782 All uses changed.
22783
227842017-02-02 Paul Eggert <eggert@cs.ucla.edu>
22785
22786 Revamp quitting and fix infloops
22787
22788 This fixes some infinite loops that cannot be quitted out of,
22789 e.g., (defun foo () (nth most-positive-fixnum '#1=(1 . #1#)))
22790 when byte-compiled and when run under X. See:
22791 http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00577.html
22792 This also attempts to keep the performance improvements I recently
22793 added, as much as possible under the constraint that the infloops
22794 must be caught. In some cases this fixes infloop bugs recently
22795 introduced when I removed immediate_quit.
22796 * src/alloc.c (Fmake_list):
22797 Use rarely_quit, not maybe_quit, for speed in the usual case.
22798 * src/bytecode.c (exec_byte_code):
22799 * src/editfns.c (Fcompare_buffer_substrings):
22800 * src/fns.c (Fnthcdr):
22801 * src/syntax.c (scan_words, skip_chars, skip_syntaxes)
22802 (Fbackward_prefix_chars):
22803 Use rarely_quit so that users can C-g out of long loops.
22804 * src/callproc.c (call_process_cleanup, call_process):
22805 * src/fileio.c (read_non_regular, Finsert_file_contents):
22806 * src/indent.c (compute_motion):
22807 * src/syntax.c (scan_words, Fforward_comment):
22808 Remove now-unnecessary maybe_quit calls.
22809 * src/callproc.c (call_process):
22810 * src/doc.c (get_doc_string, Fsnarf_documentation):
22811 * src/fileio.c (Fcopy_file, read_non_regular, Finsert_file_contents):
22812 * src/lread.c (safe_to_load_version):
22813 * src/sysdep.c (system_process_attributes) [GNU_LINUX]:
22814 Use emacs_read_quit instead of emacs_read in places where
22815 C-g handling is safe.
22816 * src/eval.c (maybe_quit): Move comment here from lisp.h.
22817 * src/fileio.c (Fcopy_file, e_write):
22818 Use emacs_write_quit instead of emacs_write_sig in places where
22819 C-g handling is safe.
22820 * src/filelock.c (create_lock_file): Use emacs_write, not
22821 plain write, as emacs_write no longer has a problem.
22822 (read_lock_data): Use emacs_read, not read, as emacs_read
22823 no longer has a problem.
22824 * src/fns.c (rarely_quit): Move to lisp.h and rename to
22825 incr_rarely_quit. All uses changed..
22826 * src/fns.c (Fmemq, Fmemql, Fassq, Frassq, Fplist_put, Fplist_member):
22827 * src/indent.c (compute_motion):
22828 * src/syntax.c (find_defun_start, back_comment, forw_comment)
22829 (Fforward_comment, scan_lists, scan_sexps_forward):
22830 Use incr_rarely_quit so that users can C-g out of long loops.
22831 * src/fns.c (Fnconc): Move incr_rarely_quit call to within
22832 inner loop, so that it catches C-g there too.
22833 * src/keyboard.c (tty_read_avail_input): Remove commented-out
22834 and now-obsolete code dealing with interrupts.
22835 * src/lisp.h (rarely_quit, incr_rarely_quit): New functions,
22836 the latter moved here from fns.c and renamed from rarely_quit.
22837 (emacs_read_quit, emacs_write_quit): New decls.
22838 * src/search.c (find_newline, search_buffer, find_newline1):
22839 Add maybe_quit to catch C-g.
22840 * src/sysdep.c (get_child_status): Always invoke maybe_quit
22841 if interruptible, so that the caller need not bother.
22842 (emacs_nointr_read, emacs_read_quit, emacs_write_quit):
22843 New functions.
22844 (emacs_read): Rewrite in terms of emacs_nointr_read.
22845 Do not handle C-g or signals; that is now for emacs_read_quit.
22846 (emacs_full_write): Replace PROCESS_SIGNALS two-way arg
22847 with INTERRUPTIBLE three-way arg. All uses changed.
22848
228492017-02-02 Paul Eggert <eggert@cs.ucla.edu>
22850
22851 Remove immediate_quit.
22852
22853 The old code that sets and clears immediate_quit was
22854 ineffective except when Emacs is running in terminal mode, and
22855 has problematic race conditions anyway, so remove it. This
22856 will introduce some hangs when Emacs runs in terminal mode,
22857 and these hangs should be fixed in followup patches.
22858 * src/keyboard.c (immediate_quit): Remove. All uses removed.
22859
228602017-02-01 Alan Mackenzie <acm@muc.de>
22861
22862 Allow C++ nested brace-list-entries to be better indented.
22863
22864 This fixes bug #24431. The key change of this bug fix is correctly analyzing
22865 nested brace lists when the opening element stands on the same line as both
22866 its introductory brace and an enclosing parameter list parenthesis.
22867
22868 * list/progmodes/cc-align.el (c-lineup-under-anchor): New line-up function.
22869
22870 * list/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): Accept the
22871 presence of exactly an identifier between an open parenthesis and an open
22872 brace as evidence of the brace starting a brace list.
22873 (c-looking-at-statement-block): New function, extracted from
22874 c-looking-at-inexpr-block. Enhance it to analyze inner blocks recursively
22875 when needed.
22876 (c-looking-at-inexpr-block): Extract new function (see above) and call it.
22877 (c-add-stmt-syntax): Enhance, with new &optional parameter, to supply the
22878 prime syntactic symbol with a fixed anchor point. When this is used, restrict
22879 all added syntactic symbols to those having an anchor point on the same line.
22880 Add, in addition to the current additional symbols, c-brace-list-entry when
22881 needed; use c-looking-at-statement-block to determine the latter.
22882 (c-guess-basic-syntax, CASE 9D): Use c-add-stmt-syntax rather than just
22883 c-add-syntax, to assemble the syntactic context of a 'brace-list-entry, thus
22884 getting, possibly, several accompanying syntactic entries.
22885
22886 * lisp/progmodes/cc-styles.el (c-style-alist, "gnu" style): New entry for
22887 'brace-list-intro, namely c-lineup-arglist-intro-after-paren.
22888
22889 * lisp/progmodes/cc-vars.el (c-offsets-alist): Change the factory default
22890 offset for 'brace-list-entry from 0 to c-lineup-under-anchor.
22891
22892 * doc/misc/cc-mode.texi (Syntactic Symbols): Amend the definition of
22893 brace-list-intro.
22894 (Brace List Symbols): Amend the example to show the new analysis of brace
22895 lists when the first element comes on the same line as the opening brace.
22896 (Misc Line-Up): Document the new line-up function c-lineup-under-anchor.
22897
228982017-02-01 Lars Ingebrigtsen <larsi@gnus.org>
22899
22900 Revert "DOn't use string-as-unibyte in Gnus"
22901
22902 This reverts commit d1c931009004aef847105b7bac6b6ffafd985b82.
22903
22904 Not all the cases where we had string-as-unibyte were characters,
22905 so this needs to be considered more thoroughly before being redone.
22906
229072017-02-01 Vibhav Pant <vibhavp@gmail.com>
22908
22909 Use maphash instead of cl-loop.
22910
22911 * lisp/emacs-lisp/bytecomp.el: (byte-compile-lapcode) Use maphash
22912 instead of cl-loop
22913
229142017-02-01 Michael Albinus <michael.albinus@gmx.de>
22915
22916 Fix a subtle problem in Tramp with timers
22917
22918 * lisp/net/tramp.el (tramp-accept-process-output): Change argument
22919 list. Make it work when called inside a timer. See
22920 <http://lists.gnu.org/archive/html/tramp-devel/2017-01/msg00010.html>.
22921
229222017-01-31 Eli Zaretskii <eliz@gnu.org>
22923
22924 Index byte-compile-debug
22925
22926 * doc/lispref/compile.texi (Compilation Functions): Index
22927 byte-compile-debug.
22928
229292017-01-31 Philipp Stephani <phst@google.com>
22930
22931 Document `byte-compile-debug' in the ELisp manual
22932
22933 * doc/lispref/compile.texi: Document variable `byte-compile-debug'.
22934
229352017-01-31 Ted Zlatanov <tzz@lifelogs.com>
22936
22937 read-multiple-choice: explain dialog popups more
22938
22939 * lisp/emacs-lisp/subr-x.el (read-multiple-choice): Explain
22940 when a graphical popup is used and how it can be avoided.
22941
229422017-01-31 Ted Zlatanov <tzz@lifelogs.com>
22943
22944 auth-source-user-and-password: add forgotten user parameter
22945
22946 * lisp/auth-source.el (auth-source-user-and-password): Use
22947 accidentally unused "user" parameter.
22948 Reported by Oscar Najera <najera.oscar@gmail.com>.
22949
229502017-01-31 Simen Heggestøyl <simenheg@gmail.com>
22951
22952 Fix typo in a NEWS entry for CSS mode
22953
229542017-01-31 Philipp Stephani <phst@google.com>
22955
22956 Document variable `byte-compile-debug'
22957
22958 * lisp/emacs-lisp/bytecomp.el (byte-compile-debug): Document variable.
22959
229602017-01-31 Lars Ingebrigtsen <larsi@gnus.org>
22961
22962 DOn't use string-as-unibyte in Gnus
22963
22964 * lisp/gnus/nnmail.el (nnmail-parse-active): Don't use
22965 string-as-unibyte.
22966 (nnmail-insert-xref): Ditto.
22967
22968 * lisp/gnus/canlock.el (canlock-make-cancel-key): Ditto.
22969
22970 * lisp/gnus/gnus-art.el (gnus-article-browse-html-parts): Ditto.
22971
22972 * lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Ditto.
22973 (gnus-browse-foreign-server): Ditto.
22974 (gnus-browse-foreign-server): Ditto.
22975
22976 * lisp/gnus/gnus-start.el
22977 (gnus-update-active-hashtb-from-killed): Ditto.
22978 (gnus-read-newsrc-el-file): Ditto.
22979
22980 * lisp/gnus/mml.el (mml-generate-mime-1): Ditto.
22981
22982 * lisp/gnus/nnir.el (nnir-get-active): Ditto.
22983 (nnir-get-active): Ditto.
22984
229852017-01-31 Juri Linkov <juri@linkov.net>
22986
22987 Allow C-s C-w to yank ' to the search ring in the Gnus article buffer
22988
22989 * lisp/gnus/gnus-art.el (gnus-article-mode-syntax-table): Make
22990 M-. in article buffers work for `foo' strings, and still allow
22991 C-s C-w to yank ' to the search ring (bug#22248).
22992
229932017-01-31 Paul Eggert <eggert@cs.ucla.edu>
22994
22995 * src/alloc.c, src/lisp.h: Fix minor glitches in recent changes.
22996
229972017-01-31 Tino Calancha <tino.calancha@gmail.com>
22998
22999 * test/lisp/vc/diff-mode-tests.el: Require diff-mode.
23000
230012017-01-31 Dima Kogan <dima@secretsauce.net>
23002
23003 New test for diff-mode handling trailing --
23004
23005 test/lisp/vc/diff-mode-tests.el: New test file
23006
230072017-01-31 Dima Kogan <dima@secretsauce.net>
23008
23009 Handle patch terminators produced by git and bzr patch export
23010
23011 Patch by Juri Linkov posted in the #9597 bug report
23012
23013 * lisp/vc/diff-mode.el (diff-sanity-check-hunk): Find and ignore
23014 terminator (Bug #9597, #5302)
23015
230162017-01-31 Dima Kogan <dima@secretsauce.net>
23017
23018 Revert two accidental commits
23019
23020 This reverts commit f3c77d11af65f3b319b1784b4c3cf08c51aa7997.
23021 This reverts commit 3c941b900007c9e79c00af0f21d88154f6d8af1a.
23022
230232017-01-31 Dima Kogan <dima@secretsauce.net>
23024
23025 stash
23026
230272017-01-31 Dima Kogan <dima@secretsauce.net>
23028
23029 comint-get-old-input-default: behavior follows docstring
23030
23031 lisp/comint.el (comint-get-old-input-default): Modify behavior to follow
23032 docstring: if `comint-use-prompt-regexp' is nil, then return the CURRENT LINE,
23033 if point is on an output field.
23034
230352017-01-31 Noam Postavsky <npostavs@gmail.com>
23036
23037 Fix call to debugger on assertion failure
23038
23039 * lisp/emacs-lisp/cl-preloaded.el (cl--assertion-failed): The first
23040 argument must be `error', and the second is a list of arguments for
23041 `signal'.
23042
230432017-01-30 Tom Tromey <tom@tromey.com>
23044
23045 css-mode documentation lookup feature
23046
23047 * etc/NEWS: Mention new feature.
23048 * lisp/textmodes/css-mode.el (css-mode-map): New defvar.
23049 (css--mdn-lookup-history): New defvar.
23050 (css-lookup-url-format): New defcustom.
23051 (css--mdn-property-regexp, css--mdn-completion-list): New defconsts.
23052 (css--mdn-after-render, css--mdn-find-symbol, css-lookup-symbol): New
23053 defuns.
23054 * test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): New
23055 test.
23056
230572017-01-30 Glenn Morris <rgm@gnu.org>
23058
23059 edt-mapper: just loading a library should not run code
23060
23061 * lisp/emulation/edt-mapper.el (edt-mapper): New function,
23062 containing code previously at top-level.
23063 * lisp/emulation/edt.el (edt-load-keys): After loading edt-mapper,
23064 run edt-mapper function.
23065
230662017-01-30 Glenn Morris <rgm@gnu.org>
23067
23068 mh-compat.el: remove duplicate definition
23069
23070 * lisp/mh-e/mh-compat.el (mh-make-obsolete-variable):
23071 Remove duplicate definition.
23072
230732017-01-30 Paul Eggert <eggert@cs.ucla.edu>
23074
23075 Add delq list arg check
23076
23077 * src/fns.c (Fdelq): Check that list is a proper list.
23078 This is more compatible with what ‘delete’ does.
23079
230802017-01-30 Stefan Monnier <monnier@iro.umontreal.ca>
23081
23082 * lisp/indent.el (indent-region-line-by-line): New function.
23083
23084 Extracted from indent-region.
23085 (indent-region, indent-region-function): Use it.
23086
230872017-01-30 Stefan Monnier <monnier@iro.umontreal.ca>
23088
23089 * lisp/subr.el (string-make-unibyte, string-make-multibyte): Obsolete.
23090
230912017-01-30 Eli Zaretskii <eliz@gnu.org>
23092
23093 More fixes to prevent crashes on C-g
23094
23095 * src/fns.c (Fassq, Frassq, Fplist_put): Reset immediate_quit
23096 before returning, to avoid crashes in quit. (Bug#25566)
23097
230982017-01-30 Eli Zaretskii <eliz@gnu.org>
23099
23100 Avoid crashes on C-g in TTY sessions
23101
23102 * src/keyboard.c (handle_interrupt): Don't quit if
23103 waiting_for_input is set, as doing that is "unsafe": it will
23104 abort. (Bug#25566)
23105
231062017-01-30 Vibhav Pant <vibhavp@gmail.com>
23107
23108 * lisp/emacs-lisp/bytecomp.el: Create jump tables with :purecopy t
23109
23110 Merge remote-tracking branch 'origin/master' into feature/byte-switch
23111
231122017-01-30 Vibhav Pant <vibhavp@gmail.com>
23113
23114 Fix hash tables not being purified correctly.
23115
23116 * src/alloc.c
23117 (purecopy_hash_table) New function, makes a copy of the given hash
23118 table in pure storage.
23119 Add new struct `pinned_object' and `pinned_objects' linked list for
23120 pinning objects.
23121 (Fpurecopy) Allow purifying hash tables
23122 (purecopy) Pin hash tables that are either weak or not declared with
23123 `:purecopy t`, use purecopy_hash_table otherwise.
23124 (marked_pinned_objects) New function, marks all objects in pinned_objects.
23125 (garbage_collect_1) Use it. Mark all pinned objects before sweeping.
23126 * src/lisp.h Add new field `pure' to struct `Lisp_Hash_Table'.
23127 * src/fns.c: Add `purecopy' parameter to hash tables.
23128 (Fmake_hash_table): Check for a `:purecopy PURECOPY' argument, pass it
23129 to make_hash_table.
23130 (make_hash_table): Add `pure' parameter, set h->pure to it.
23131 (Fclrhash, Fremhash, Fputhash): Enforce that the table is impure with
23132 CHECK_IMPURE.
23133 * src/lread.c: (read1) Parse for `purecopy' parameter while reading
23134 hash tables.
23135 * src/print.c: (print_object) add the `purecopy' parameter while
23136 printing hash tables.
23137 * src/category.c, src/emacs-module.c, src/image.c, src/profiler.c,
23138 src/xterm.c: Use new (make_hash_table).
23139
231402017-01-29 Dmitry Gutov <dgutov@yandex.ru>
23141
23142 Escape dash in xref rgrep regexp
23143
23144 * lisp/progmodes/xref.el (xref-collect-matches): Escape dash
23145 in REGEXP if it's the first character.
23146
231472017-01-29 Dmitry Gutov <dgutov@yandex.ru>
23148
23149 Say JavaScript, not Javascript
23150
23151 * lisp/progmodes/js.el (js-mode-map, js-syntax-propertize)
23152 (js-js-error, js-eval, js-set-js-context)
23153 (js--get-js-context):
23154 Refer to the language consistently as JavaScript.
23155
231562017-01-29 Juanma Barranquero <lekktu@gmail.com>
23157
23158 lisp/*.el: Fix some warnings
23159
23160 * lisp/battery.el (dbus-get-property):
23161 * lisp/dired-aux.el (format-spec): Declare function.
23162
23163 * lisp/net/zeroconf.el (zeroconf-list-service-names)
23164 (zeroconf-list-service-types, zeroconf-list-services):
23165 Mark unused lexical arg.
23166
23167 * lisp/progmodes/hideshow.el (hs-hide-block-at-point):
23168 * lisp/progmodes/sql.el (sql-end-of-statement):
23169 Pass LIMIT to 'looking-back'.
23170
231712017-01-29 Noam Postavsky <npostavs@gmail.com>
23172
23173 Don't warn about obsolete defgenerics when defining them
23174
23175 * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): The declaration code
23176 should run after the definition code (Bug#25556).
23177
231782017-01-29 Noam Postavsky <npostavs@gmail.com>
23179
23180 Call modification hooks in org-src fontify buffers
23181
23182 * lisp/org/org-src.el (org-src-font-lock-fontify-block): Let-bind
23183 `inhibit-modification-hooks' to nil, since this function can be called
23184 from jit-lock-function which binds that variable to t (Bug#25132).
23185
231862017-01-29 Tino Calancha <tino.calancha@gmail.com>
23187
23188 Fix Bug#25524
23189
23190 * lisp/vc/diff-mode.el (diff-beginning-of-hunk):
23191 Return position at the beginning off the hunk.
23192 (diff-file-junk-re): Add SVN keywords.
23193
231942017-01-28 Stephen Berman <stephen.berman@gmx.net>
23195
23196 hl-line.el: Don't try to operate on a killed buffer
23197
23198 * lisp/hl-line.el (hl-line-maybe-unhighlight): Examine only
23199 live buffers (bug#25522).
23200
232012017-01-28 Mark Oteiza <mvoteiza@udel.edu>
23202
23203 Use access-file in EWW to check before downloading a file
23204
23205 * lisp/net/eww.el (eww-download): Check accessibility of
23206 eww-download-directory to prevent starting a download that will fail
23207 to write.
23208 * src/fileio.c (Faccess_file): Clarify the use of string argument in
23209 the docstring.
23210
232112017-01-28 Yuri D'Elia <wavexx@thregr.org>
23212
23213 Subject: Check Bcc after the Messag hook has run
23214
23215 * lisp/gnus/message.el (message-send): If the hook modifies
23216 the message (mml tags or headers), we should check bcc on the
23217 final message, not on the original.
23218
232192017-01-28 Eli Zaretskii <eliz@gnu.org>
23220
23221 Improve documentation of 'format' conversions
23222
23223 * src/editfns.c (Fformat): More accurate description of %g and
23224 effects of the various flags on it. More accurate description of
23225 integer conversions.
23226
23227 * doc/lispref/strings.texi (Formatting Strings): More accurate
23228 description of %g and effects of the various flags on it. More
23229 accurate description of integer conversions. (Bug#25557)
23230
232312017-01-28 Juanma Barranquero <lekktu@gmail.com>
23232
23233 test/*.el: Avoid byte-compiler warnings
23234
23235 * test/lisp/abbrev-tests.el (abbrev-table-p-test): Remove unused 'let*'.
23236
23237 * test/lisp/faces-tests.el (faces--test): New customization group.
23238 (faces--test1, faces--test2): Use it.
23239
23240 * test/lisp/ffap-tests.el (ffap-tests-25243):
23241 Call 'mark-whole-buffer' interactively.
23242
23243 * test/lisp/ibuffer-tests.el (ibuffer-filter-groups, ibuffer-filtering-alist)
23244 (ibuffer-filtering-qualifiers, ibuffer-save-with-custom)
23245 (ibuffer-saved-filter-groups, ibuffer-saved-filters): Defvar.
23246 (ibuffer-format-qualifier, ibuffer-unary-operand): Declare.
23247
23248 * test/lisp/minibuffer-tests.el (completion-test1):
23249 Mark unused lexical arguments.
23250
23251 * test/lisp/simple-tests.el (simple-test--dummy-buffer): Wrap result in
23252 'with-no-warnings' to avoid them when the macro is invoked for effect.
23253
23254 * test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-count-test):
23255 Mark unused lexical arguments.
23256
23257 * test/lisp/emacs-lisp/let-alist-tests.el (let-alist-surface-test):
23258 Mark unused lexical arguments.
23259 (let-alist-cons): Remove unused let binding.
23260
23261 * test/lisp/net/dbus-tests.el (dbus-debug): Defvar.
23262 (dbus-get-unique-name): Declare.
23263
23264 * test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid):
23265 Call 'font-lock-fontify-buffer' interactively.
23266
23267 * test/lisp/textmodes/tildify-tests.el (tildify-space-undo-test--test):
23268 Mark unused lexical argument.
23269
232702017-01-27 Eli Zaretskii <eliz@gnu.org>
23271
23272 Restore a test that was removed by a recent commit
23273
23274 * src/fileio.c (Ffile_accessible_directory_p): Don't overwrite the
23275 errno value unless it's necessary. (Bug#25419)
23276
232772017-01-27 Mark Oteiza <mvoteiza@udel.edu>
23278
23279 Fix a couple eww customization types
23280
23281 * lisp/new/eww.el (eww-download-directory, eww-bookmarks-directory):
23282 Change customization type to "directory".
23283
232842017-01-27 Philipp Stephani <phst@google.com>
23285
23286 Don't require a shell when loading htmlfontify
23287
23288 * lisp/htmlfontify.el (hfy-which-etags): Don't call a shell for
23289 detecting the etags version (Bug#25468).
23290 * test/lisp/htmlfontify-tests.el (htmlfontify-bug25468): Add unit
23291 test.
23292
232932017-01-27 Paul Eggert <eggert@cs.ucla.edu>
23294
23295 Slightly tune file-accessible-directory-p fix
23296
23297 * src/fileio.c (Ffile_accessible_directory_p):
23298 Remove unnecessary test (Bug#25419).
23299
233002017-01-27 Arash Esbati <arash@gnu.org>
23301
23302 Add \citetitle to biblatex cite format
23303
23304 * lisp/textmodes/reftex-vars.el (reftex-cite-format-builtin): Add
23305 \citetitle[*] to `reftex-cite-format' and bind them to keys i/I
23306 per user request
23307 http://lists.gnu.org/archive/html/auctex/2017-01/msg00049.html.
23308
233092017-01-27 Lars Ingebrigtsen <larsi@gnus.org>
23310
23311 Fix charsets and encodings from non-file MIME parts
23312
23313 * lisp/gnus/mml.el (mml-generate-mime-1): Get the charsets and
23314 encoding right for parts that do not originate from files.
23315
233162017-01-27 Eli Zaretskii <eliz@gnu.org>
23317
23318 Fix 'describe-variable' for longish variable values
23319
23320 * lisp/help-fns.el (describe-variable): Don't accidentally remove
23321 the last character of a variable's value. (Bug#25545)
23322
233232017-01-27 Vladimir Panteleev <git@thecybershadow.net> (tiny change)
23324
23325 Remove stale functions from ert manual
23326
23327 * doc/misc/ert.texi (Useful Techniques when Writing Tests):
23328 Replace ert--mismatch references with its cl-lib replacement,
23329 cl-mismatch.
23330
233312017-01-27 Eli Zaretskii <eliz@gnu.org>
23332
23333 Fix a typo in Eshell manual
23334
23335 * doc/misc/eshell.texi (History): Fix a typo. Reported by Mak
23336 Kolybabi <mak@kolybabi.com>.
23337
233382017-01-27 Eli Zaretskii <eliz@gnu.org>
23339
23340 Ensure last line is at window bottom in shell buffers
23341
23342 * lisp/shell.el (shell-mode): Use setq-local. Set
23343 scroll-conservatively to 101 locally. See the discussion at
23344 http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00736.html
23345 for the reasons.
23346
233472017-01-27 Michael Hoffman <emacs-hoffman@sneakemail.com> (tiny change)
23348
23349 Support Bash Ctrl-Z indication of directory name in term.el
23350
23351 * term.el (term-emulate-terminal): Do not display ?\032 escape
23352 codes even when 'handled-ansi-message' is non-nil. (Bug#11919)
23353
233542017-01-27 Eli Zaretskii <eliz@gnu.org>
23355
23356 Don't report zero errno for inaccessible directory
23357
23358 * src/fileio.c (Ffile_accessible_directory_p): Report EACCES when
23359 a file handler reports a failure. (Bug#25419)
23360
233612017-01-27 Eli Zaretskii <eliz@gnu.org>
23362
23363 Fix filenotify-tests on MS-Windows
23364
23365 * test/lisp/filenotify-tests.el (file-notify-test04-file-validity)
23366 (file-notify-test05-dir-validity)
23367 (file-notify-test06-many-events)
23368 (file-notify-test08-watched-file-in-watched-dir): Manually remove
23369 the watch descriptor before calling file-notify--test-cleanup-p.
23370 (Bug#25539)
23371
233722017-01-27 Hong Xu <hong@topbug.net>
23373
23374 python-mode: Fix detection for opening blocks.
23375
23376 * python.el (python-info-dedenter-opening-block-positions): There
23377 can't be any back-indented lines between an opening block and the
23378 current line.
23379
23380 * python-tests.el (python-indent-electric-colon-4): Add an indent
23381 test case where there is one-more indented previous opening block.
23382
233832017-01-27 Lars Ingebrigtsen <larsi@gnus.org>
23384
23385 Fix Message check for bogus domain names
23386
23387 * lisp/gnus/message.el (message-make-fqdn): Fix check for
23388 bogus system names (bug#24570).
23389
233902017-01-27 Øyvind Stegard <oyvind@stegard.net> (tiny change)
23391
23392 Subject: Restore correct Gnus newsgroup name after sending message
23393
23394 * lisp/gnus/gnus-msg.el (gnus-msg-mail): Set the value of
23395 gnus-newsgroup-name in the correct buffer (bug#24329).
23396
233972017-01-27 Lars Ingebrigtsen <larsi@gnus.org>
23398
23399 Mention the new Gnus sorting command
23400
234012017-01-27 Lars Ingebrigtsen <larsi@gnus.org>
23402
23403 Don't try to find charsets of non-text MIME parts
23404
23405 * lisp/gnus/mml.el (mml-generate-mime-1): It seems nonsensical
23406 to try to determine the charset of non-text message parts, so
23407 skip that (bug#24190). This will also remove messages like
23408 "bunzip2ing /tmp/acsb.cpio.bz2...done" while sending messages
23409 if you include such files.
23410
234112017-01-27 Lars Ingebrigtsen <larsi@gnus.org>
23412
23413 Add new command gnus-article-sort-by-marks
23414
23415 * doc/misc/gnus.texi (Summary Sorting): Mention
23416 gnus-summary-sort-by-marks.
23417
23418 * lisp/gnus/gnus-sum.el (gnus-article-sort-by-marks): New
23419 function (bug#23393).
23420 (gnus-thread-sort-by-marks): Ditto.
23421 (gnus-summary-sort-by-mark): New command suggested by Dan Jacobson.
23422 (gnus-summary-mode-map): Add keystroke.
23423 (gnus-summary-make-menu-bar): Add to menu.
23424
234252017-01-26 Katsumi Yamaoka <yamaoka@jpl.org>
23426
23427 Make `C-h b' work correctly in Gnus article buffer (bug#18257)
23428
23429 * lisp/gnus/gnus-art.el (gnus-article-describe-bindings):
23430 Ignore summary commands that aren't bound to
23431 gnus-article-read-summary-keys keys (bug#18257).
23432
234332017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23434
23435 Fix crossposting in non-primary groups
23436
23437 * lisp/gnus/message.el
23438 (message-cross-post-followup-to-header): Gnus server prefixes
23439 shouldn't be included in the group names (bug#21661).
23440 (message-cross-post-followup-to): Ditto.
23441
234422017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23443
23444 Gnus doc clarification
23445
23446 * doc/misc/gnus.texi (Unavailable Servers): Explicitly say
23447 that "unreachable" is the same as disabling it (bug#21630).
23448
234492017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23450
23451 Remove dead code from rfc2047
23452
23453 * lisp/mail/rfc2047.el (rfc2047-fold-field): Remove dead code.
23454
23455 It's been disabled since 2005, when I made the change with the
23456 following comment.
23457
23458 (rfc2047-encode-message-header): Disabled header folding -- not
23459 all headers can be folded, and this should be done by the message
23460 composition mode. Probably. I think.
23461
234622017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23463
23464 Fill too long mail headers
23465
23466 * lisp/gnus/message.el (message--fold-long-headers): New
23467 function to fold too-long headers (bug#21608).
23468 (message-send-mail): Use it to fill headers longer than 998
23469 characters (which is the protocol limit).
23470
234712017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23472
23473 Make nndoc more resilient against corrupted files
23474
23475 * lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): Don't bug
23476 out on invalid files, like invalid .gz files (bug#21538).
23477 This may hinder Gnus from starting up.
23478
234792017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23480
23481 Respect buffer-local message-fcc-handler-function
23482
23483 * lisp/gnus/message.el (message-do-fcc): Copy the local
23484 variables from the Message buffer so that local settings of
23485 `message-fcc-handler-function' etc are respected (bug#21174).
23486
234872017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23488
23489 (message-do-fcc): Modernise the code slightly.
23490
23491 * lisp/gnus/message.el (message-do-fcc): Modernise the code slightly.
23492
234932017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23494
23495 Avoid a regexp overflow in message-goto-body
23496
23497 * lisp/gnus/message.el (message-goto-body-1): Avoid using a
23498 complicated backtracking regexp, because they may overflow on
23499 large headers (bug#21160).
23500
235012017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23502
23503 Refactor message-goto-body
23504
23505 * lisp/gnus/message.el (message-goto-body-1): Refactor out for reuse.
23506
235072017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23508
23509 Fix typo in last checkin
23510
23511 * lisp/gnus/nnimap.el (nnimap-shell-program): Document
23512 nnimap-shell-program (bug#20651).
23513
235142017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23515
23516 Document nnimap-shell-program
23517
23518 * lisp/gnus/nnimap.el (nnimap-shell-program): Document
23519 nnimap-shell-program (bug#20651).
23520
235212017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23522
23523 Document :shell-command in `make-network-process'
23524
23525 * doc/lispref/processes.texi (Network): Document :shell-command.
23526
23527 * lisp/net/network-stream.el (open-network-stream): Document
23528 the :shell-command parameter (bug#20651).
23529
235302017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23531
23532 Gnus doc clarification
23533
23534 * lisp/gnus/gnus-sum.el (gnus-summary-save-article): Mention
23535 the gnus-prompt-before-saving variable (bug#20500).
23536
235372017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23538
23539 Fix the previous mml patch better
23540
23541 * lisp/gnus/mml.el (mml-minibuffer-read-file): Fix the
23542 previous patch in a better way (bug#20480).
23543
235442017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23545
23546 Give a slight better error message in mml-minibuffer-read-file
23547
23548 * lisp/gnus/mml.el (mml-minibuffer-read-file): Give a slightly
23549 better error message when the user enters nothing (bug#20480).
23550
235512017-01-26 Vibhav Pant <vibhavp@gmail.com>
23552
23553 * lisp/emacs-lisp/bytecomp.el:(bc-cond-jump-table-info)add docstring
23554
235552017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23556
23557 Make eww buffers prettier in the buffer listing
23558
23559 * lisp/net/eww.el (eww-render): Put the currently visited URL
23560 into the buffer listing (bug#23738).
23561 (eww-render): Ditto.
23562
235632017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23564
23565 Allow mml-attach-file to prompt less
23566
23567 * lisp/gnus/mml.el (mml-attach-file): If given a prefix, don't
23568 prompt for type/description/disposition, but use defaults
23569 (bug#19202).
23570
235712017-01-26 Lars Ingebrigtsen <larsi@gnus.org>
23572
23573 Don't allow message-newline-and-reformat to be run outside the body
23574
23575 * lisp/gnus/message.el (message-newline-and-reformat): Error
23576 out if run outside the body of a message (bug#18820).
23577
235782017-01-26 Vibhav Pant <vibhavp@gmail.com>
23579
23580 * lisp/emacs-lisp/bytecomp.el: Use correct function to push nil
23581
23582 * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table) Use
23583 byte-compile-constant instead of byte-compile-form to push nil.
23584
235852017-01-26 Vibhav Pant <vibhavp@gmail.com>
23586
23587 * lisp/emacs-lisp/disass.el: Fix spacing while showing jump tables
23588
235892017-01-26 Paul Eggert <eggert@cs.ucla.edu>
23590
23591 Replace QUIT with maybe_quit
23592
23593 There’s no longer need to have QUIT stand for a slug of C statements.
23594 Use the more-obvious function-call syntax instead.
23595 Also, use true and false when setting immediate_quit.
23596 These changes should not affect the generated machine code.
23597 * src/lisp.h (QUIT): Remove. All uses replaced by maybe_quit.
23598
235992017-01-26 Paul Eggert <eggert@cs.ucla.edu>
23600
23601 A quicker check for quit
23602
23603 On some microbenchmarks this lets Emacs run 60% faster on my
23604 platform (AMD Phenom II X4 910e, Fedora 25 x86-64).
23605 * src/atimer.c: Include keyboard.h, for pending_signals.
23606 * src/editfns.c (Fcompare_buffer_substrings):
23607 * src/fns.c (Fnthcdr, Fmemq, Fmemql, Fassq, Frassq, Fplist_put)
23608 (Fnconc, Fplist_member):
23609 Set and clear immediate_quit before and after loop instead of
23610 executing QUIT each time through the loop. This is OK for loops
23611 that affect only locals.
23612 * src/eval.c (process_quit_flag): Now static.
23613 (maybe_quit): New function, containing QUIT’s old body.
23614 * src/fns.c (rarely_quit): New function.
23615 (Fmember, Fassoc, Frassoc, Fdelete, Fnreverse, Freverse)
23616 (Flax_plist_get, Flax_plist_put, internal_equal, Fnconc):
23617 Use it instead of QUIT, for
23618 speed in tight loops that might modify non-locals.
23619 * src/keyboard.h (pending_signals, process_pending_signals):
23620 These belong to keyboard.c, so move them here ...
23621 * src/lisp.h: ... from here.
23622 (QUIT): Redefine in terms of the new maybe_quit function, which
23623 contains this macro’s old definiens. This works well with branch
23624 prediction on processors with return stack buffers, e.g., x86
23625 other than the original Pentium.
23626
236272017-01-26 Paul Eggert <eggert@cs.ucla.edu>
23628
23629 Simplify make-list implementation
23630
23631 * src/alloc.c (Fmake_list): Don’t unroll loop, as the complexity
23632 is not worth it these days.
23633
236342017-01-26 Mark Oteiza <mvoteiza@udel.edu>
23635
23636 Make use of cl-loop destructuring
23637
23638 * lisp/progmodes/js.el (js--get-tabs): Replace extraneous bits with
23639 destructuring.
23640 (with-js): Add declare forms.
23641
236422017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23643
23644 Revert "Bind C-c keys in the article buffer"
23645
23646 This reverts commit 6b4195f2ace1f6328c5a833fde40f39babef4fa6.
23647
23648 The commit somehow lead to problems in other parts of Emacs.
23649
236502017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23651
23652 Document how to quote MML tags
23653
23654 * doc/misc/emacs-mime.texi (MML Definition): Mention how to
23655 quote MML tags (bug#18881).
23656
236572017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23658
23659 Make address parsing more robust
23660
23661 * lisp/mail/ietf-drums.el (ietf-drums-parse-address): Don't
23662 bug out on addresses like
23663 (ietf-drums-parse-address "\"Foo \"bar\" <larsi@gnus.org>")
23664 (bug#18572).
23665
236662017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23667
23668 Fix the %P (line number) thing in Gnus summary buffers
23669
23670 * lisp/gnus/gnus-salt.el (gnus-pick-line-number): Remove hack.
23671
23672 * lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Reset the
23673 "pick" mode line number on entry instead of relying in a hack (bug#18311).
23674
236752017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23676
23677 Fix wrong documentation on nnmairix keystrokes
23678
23679 * doc/misc/gnus.texi (nnmairix keyboard shortcuts): The
23680 nnmairix commands are on G G, not $ (bug#18260).
23681
236822017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23683
23684 Bind C-c keys in the article buffer
23685
23686 * lisp/gnus/gnus-art.el (gnus-article-mode-map): Also bind the
23687 C-c keys so that they execute in the summary buffer
23688 (bug#18257). This makes commands like `C-c C-f' work from the
23689 article buffer.
23690
236912017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23692
23693 Don't mark articles in Gnus as displayed when they aren't
23694
23695 * lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Don't
23696 mark any articles as selected if we're not selecting any
23697 articles (bug#18255).
23698
236992017-01-25 Vibhav Pant <vibhavp@gmail.com>
23700
23701 * lisp/emacs-lisp/disass.el: Display jump tables for switch.
23702
23703 * lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table
23704
23705 * lisp/emacs-lisp/bytecomp.el: Simplify b-c-cond-valid-obj2-p
23706
23707 * lisp/emacs-lisp/bytecomp.el: Fix byte-switch codegen with symbols.
23708
237092017-01-25 Vibhav Pant <vibhavp@gmail.com>
23710
23711 * lisp/emacs-lisp/byte-opt.el: Add support for decompiling switch
23712
23713 * lisp/emacs-lisp/byte-opt.el: (byte-decompile-bytecode-1) When the
23714 constant encountered precedes a byte-switch op, replace all the
23715 addresses in the jump table with tags.
23716
237172017-01-25 Mark Oteiza <mvoteiza@udel.edu>
23718
23719 Move cXXXr and cXXXXr to subr.el
23720
23721 * etc/NEWS: Mention new core Elisp.
23722 * doc/lispref/lists.texi (List Elements): Document and index the new
23723 functions.
23724 * doc/misc/cl.texi (List Functions): Change "defines" to "aliases".
23725 * lisp/subr.el (caaar, caadr, cadar, caddr, cdaar, cdadr, cddar)
23726 (cdddr, caaaar caaadr, caadar, caaddr, cadaar, cadadr, caddar):
23727 (cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar):
23728 (cddddr): New functions.
23729 * lisp/emacs-lisp/cl-lib.el (cl-caaar, cl-caadr, cl-cadar, cl-caddr):
23730 (cl-cdaar, cl-cdadr, cl-cddar cl-cdddr, cl-caaaar cl-caaadr):
23731 (cl-caadar, cl-caaddr, cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr):
23732 (cl-cdaaar, cl-cdaadr, cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr):
23733 (cl-cdddar, cl-cddddr): Alias to new subr functions.
23734 * lisp/emacs-lisp/cl.el (cl-unload-function): Remove cXXXr and cXXXXr
23735 elements.
23736
237372017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23738
23739 Only save .newsrc file if the native method is NNTP
23740
23741 * lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Only save
23742 the .newsrc file if the native select method is NNTP
23743 (bug#18198). This avoids problems with invalid IMAP group
23744 names and the like in the .newsrc file.
23745
237462017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23747
23748 Only save .newsrc file if the native method is NNTP
23749
23750 * lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Only save
23751 the .newsrc file if the native select method is NNTP
23752 (bug#18198). This avoids problems with invalid IMAP group
23753 names and the like in the .newsrc file.
23754
237552017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23756
23757 Gnus custom spec fix
23758
23759 * lisp/gnus/gnus-art.el (gnus-signature-limit): Fix customize
23760 spec to match the doc string (bug#17679).
23761
237622017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23763
23764 Clarify confusing Gnus error message
23765
23766 * lisp/gnus/gnus-topic.el (gnus-topic-unindent): Clarify
23767 confusing error message (bug#17677).
23768
237692017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23770
23771 Make C-u C-x m work with Message as documented
23772
23773 * lisp/gnus/message.el (message-mail): Respect the CONTINUE
23774 parameter (bug#17175).
23775
237762017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23777
23778 Fix problem with auto-mode and dir-locals-collect-variables
23779
23780 * lisp/files.el (dir-locals-collect-variables): When run from
23781 auto-mode, the file in question may not be an absolute path
23782 name (bug#24016).
23783
23784 Example backtrace:
23785
23786 Debugger entered--Lisp error: (args-out-of-range "compile-1st-in-loa
23787 dir-locals-collect-variables(((emacs-lisp-mode (indent-tabs-mode))
23788 hack-dir-local-variables()
23789 hack-local-variables(no-mode)
23790 run-mode-hooks(diff-mode-hook)
23791 diff-mode()
23792 mm-display-inline-fontify((#<buffer *mm*-923037> ("text/x-diff" (
23793
237942017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23795
23796 Attach text files correctly in Message
23797
23798 * lisp/gnus/mml.el (mml-generate-mime-1): Detect which coding
23799 system has been used in attached text files, and don't try to
23800 do any encoding of these files (bug#13808).
23801
238022017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23803
23804 Build fix for older gnutls versions
23805
23806 * src/gnutls.c (emacs_gnutls_handle_error):
23807 GNUTLS_E_PREMATURE_TERMINATION is apparently only present in
23808 gnutls-3.
23809
238102017-01-25 Tino Calancha <tino.calancha@gmail.com>
23811
23812 ediff-difference-vector-alist: Drop duplicated definition
23813
23814 * lisp/vc/ediff-init.el (ediff-difference-vector-alist):
23815 Drop duplicated definition.
23816 (ediff-difference-vector-A, ediff-difference-vector-B)
23817 (ediff-difference-vector-C, ediff-difference-vector-Ancestor):
23818 Move definition before 'ediff-difference-vector-alist'.
23819
238202017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23821
23822 Revert "nnimap.el: support additional expunge options"
23823
23824 This reverts commit 4e9baea6aba1633074889339dcc7cdc9d73880d3.
23825
23826 The patch broke fetching new mail:
23827
23828 Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type")
23829 format("%d .*\n" (t ("OK" ("HIGHESTMODSEQ" "914696") "Expunge" "completed.") ("VANISHED" "1825937") ("0" "RECENT")))
23830 (looking-at (format "%d .*\n" sequence))
23831 (not (looking-at (format "%d .*\n" sequence)))
23832 (progn (while (and (not (bobp)) (progn (forward-line -1) (looking-at "\\*\\|[0-9]+ OK NOOP")))) (not (looking-at (format "%d .*\n" sequence))))
23833
238342017-01-25 Nikolaus Rath <Nikolaus@rath.org>
23835
23836 nnimap.el: support additional expunge options
23837
23838 * lisp/gnus/nnimap.el (nnimap-close-group)
23839 (nnimap-request-expire-articles, nnimap-delete-article)
23840 (nnimap-request-scan): add new 'never, 'immediate, and 'on-exit
23841 settings for nnimap-expunge (bug#20670).
23842
238432017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23844
23845 Don't tag Gnus bugs with "gnus"
23846
23847 * lisp/gnus/gnus-msg.el (gnus-bug): Remove the bug package tags.
23848
23849 * lisp/gnus/gnus.el (gnus-bug-package): Removed; Gnus doesn't
23850 have its own package any more in the bug tracker.
23851
238522017-01-25 Lars Ingebrigtsen <larsi@gnus.org>
23853
23854 Tweak TLS error messaging on closed connections
23855
23856 * src/gnutls.c (emacs_gnutls_handle_error): Demote the normal
23857 peer-closed-connection "The TLS connection was non-properly
23858 terminated" message to a lower level so that it isn't shown to
23859 the user by default.
23860
238612017-01-24 Lars Ingebrigtsen <larsi@gnus.org>
23862
23863 Avoid having eww unexpectedly open external browsers
23864
23865 * lisp/net/eww.el (eww-render): Instead of opening unsupported
23866 content types like audio/mpeg directly in an external browser
23867 (which can be very confusing especially when something
23868 redirects to a file like that), just display a simple
23869 interstitial that people can choose to click on or not
23870 (bug#22671).
23871
238722017-01-24 Lars Ingebrigtsen <larsi@gnus.org>
23873
23874 When opening new eww buffers, use buffer names based on the host name
23875
23876 * lisp/net/eww.el (eww-browse-url): When opening in a new
23877 window, use a buffer name based on the host name (bug#23738).
23878 (eww--dwim-expand-url): Refactored out into its own function
23879 for easier reuse.
23880
238812017-01-24 David Engster <deng@randomsample.de>
23882
23883 xml: Fix parsing of default namespace with quoted names
23884
23885 * lisp/xml.el (xml-parse-attlist): Properly extract namespace when
23886 parsing is done with quoted symbol names (bug#23440).
23887 * test/lisp/xml-tests.el (xml-parse-test--default-namespace-qnames)
23888 (xml-parse-test-default-namespace-qnames): Test for the above.
23889
238902017-01-24 Lars Ingebrigtsen <larsi@gnus.org>
23891
23892 Fix rendering of some complex SVG images
23893
23894 * lisp/net/shr.el (shr-parse-image-data): Don't transform
23895 SVG->DOM->XML unless we're blocking images, as this is apt to
23896 destroy the SVG (bug#24111).
23897
238982017-01-24 Lars Ingebrigtsen <larsi@gnus.org>
23899
23900 Clarify the last clarification
23901
23902 * lisp/net/shr.el (shr-width): Clarify the interaction with
23903 `shr-use-fonts' (bug#24928).
23904
239052017-01-24 Lars Ingebrigtsen <larsi@gnus.org>
23906
23907 shr-width doc clarification
23908
23909 * lisp/net/shr.el (shr-width): Clarify the interaction with
23910 `shr-use-fonts' (bug#24928).
23911
239122017-01-24 Lars Ingebrigtsen <larsi@gnus.org>
23913
23914 Allow passing in max-width/height
23915
23916 * lisp/net/shr.el (shr-rescale-image): Allow passing in
23917 max-width/height (bug#25287).
23918
239192017-01-24 Stefan Monnier <monnier@iro.umontreal.ca>
23920
23921 * lisp/progmodes/vhdl-mode.el: Avoid add-to-list on local vars
23922
23923 Require `cl' for `pushnew'.
23924 (vhdl-scan-project-contents, vhdl-compose-wire-components)
23925 (vhdl-uniquify): Use `pushnew' instead of `add-to-list'.
23926
239272017-01-24 Noam Postavsky <npostavs@gmail.com>
23928
23929 Fix comment detection on open parens
23930
23931 Characters having both open paren syntax and comment start syntax were
23932 being detected as open parens even when they should have been part a
23933 comment starter (Bug#24870).
23934
23935 * src/syntax.c (in_2char_comment_start): New function, extracted from
23936 `scan_sexps_forward'.
23937 (scan_sexps_forward): Add check for a 2-char comment starter before the
23938 loop. Inside the loop, do that check after incrementing the 'from'
23939 character index. Move the single char comment syntax cases into the
23940 switch instead of special casing them before.
23941 * test/src/syntax-tests.el (parse-partial-sexp-paren-comments):
23942 (parse-partial-sexp-continue-over-comment-marker): New tests.
23943
239442017-01-23 Alan Mackenzie <acm@muc.de>
23945
23946 Give , and .@ doc strings. Fixes bug #24561.
23947
23948 Also make *Help* links to ``' possible. Also make usable as such doc strings
23949 on the function-documentation property of a symbol.
23950
23951 * lisp/emacs-lisp/backquote.el (top-level): Give , and '@ doc strings on the
23952 function-documentation property. Also give these symbols a reader-construct
23953 property.
23954
23955 * lisp/help-fns.el (describe-function): Allow the function-documentation
23956 property to work. Use princ rather than prin1 to print the function's name
23957 when it has a reader-construct property.
23958 (help-fns-signature): Don't insert `high-usage' for a reader-construct.
23959 (describe-function-1): Adapt to process documentation on the
23960 function-documentation property. Print "a reader construct" when appropriate.
23961
23962 * lisp/help-mode.el (help-xref-symbol-regexp): Amend this regexp also to match
23963 ``'.
23964
239652017-01-22 Paul Eggert <eggert@cs.ucla.edu>
23966
23967 Improve uses of CHECK_LIST etc.
23968
23969 * src/eval.c (FletX): Report an error for invalid constructs like
23970 ‘(let* (a . 0))’, so that ‘let*’ is more consistent with ‘let’.
23971 (lambda_arity): Use plain CHECK_CONS.
23972 * src/fns.c (CHECK_LIST_END): Move from here to lisp.h.
23973 (Fcopy_alist): Remove unnecessary CHECK_LIST call, since
23974 concat does that for us.
23975 (Fnthcdr, Fmember, Fmemql, Fdelete, Fnreverse):
23976 Use CHECK_LIST_END, not CHECK_LIST_CONS. This hoists a
23977 runtime check out of the loop.
23978 (Fmemq): Simplify and use CHECK_LIST_END instead of CHECK_LIST.
23979 (Fassq, Fassoc, Frassq, Frassoc):
23980 Simplify and use CHECK_LIST_END instead of CAR.
23981 (assq_no_quit, assoc_no_quit): Simplify and assume proper list.
23982 (Fnconc): Use plain CHECK_CONS, and do-while instead of while loop.
23983 * src/fontset.c (Fnew_fontset):
23984 * src/frame.c (Fmodify_frame_parameters):
23985 Use CHECK_LIST_END at end, rather than CHECK_LIST at start, for a
23986 more-complete check.
23987 * src/gfilenotify.c (Fgfile_add_watch):
23988 Omit unnecessary CHECK_LIST, since Fmember does that for us.
23989 * src/lisp.h (lisp_h_CHECK_LIST_CONS, CHECK_LIST_CONS):
23990 Remove; no longer used.
23991 (CHECK_LIST_END): New inline function.
23992
239932017-01-22 Tino Calancha <tino.calancha@gmail.com>
23994
23995 Prevent to use tabulated-list--near-rows unbound
23996
23997 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry):
23998 Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506).
23999
240002017-01-22 Juri Linkov <juri@linkov.net>
24001
24002 * lisp/simple.el (region-bounds): New function.
24003
24004 (region-noncontiguous-p): Use it.
24005 http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00044.html
24006
240072017-01-21 Alan Mackenzie <acm@muc.de>
24008
24009 Fix low-level handling of (big) C macros.
24010
24011 In particular, ensure that a comment detected by its syntax is not a CPP
24012 construct marked with generic comment delimiter syntax-table text
24013 properties.
24014
24015 * lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Set
24016 c-macro-cache-syntactic to nil when the cached macro changes.
24017 (c-syntactic-end-of-macro, c-no-comment-end-of-macro)
24018 (c-state-semi-pp-to-literal, c-state-full-pp-to-literal)
24019 (c-state-pp-to-literal, c-parse-ps-state-to-cache)
24020 (c-state-cache-non-literal-place, c-literal-limits, c-literal-start)
24021 (c-determine-limit): When checking a parse syntax for a comment, check that
24022 we're not in a CPP construct marked by syntax-table generic comment delimiter
24023 text property.
24024 (c-state-pp-to-literal): Change from a defsubst to a defun.
24025
24026 * lisp/progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Check a
24027 parse syntax as described above under cc-engine.el.
24028
240292017-01-21 Vibhav Pant <vibhavp@gmail.com>
24030
24031 * lisp/emacs-lisp/bytecomp.el: Remove unused debugging statements.
24032
240332017-01-21 Noam Postavsky <npostavs@gmail.com>
24034
24035 Don't wait for frame to become visible
24036
24037 * src/xterm.c (x_make_frame_visible): Remove code that waits for the
24038 frame to become visible. We have to deal with invisible frames anyway,
24039 the loop could sometimes before the frame turned visible, and for some
24040 window managers (e.g., XMonad, i3wm) it caused Emacs to get stuck in a
24041 busy loop (Bug#24091).
24042
240432017-01-21 Tino Calancha <tino.calancha@gmail.com>
24044
24045 diff-hunk-kill independent of point inside headers
24046
24047 Make diff-apply-hunk and diff-hunk-kill independent of the point
24048 position in a diff header (Bug#17544).
24049 This change allows to apply hunks in order. It also makes possible to
24050 press M-k repeatedly to kill hunks in the order they appear in the buffer.
24051 See discussion on #Bug25105.
24052 * lisp/vc/diff-mode.el (diff-file-junk-re):
24053 Move definition before it's used.
24054 (diff--at-diff-header-p): New predicate; return non-nil when point
24055 is inside a hunk header, a file header, or within a line
24056 matching diff-file-junk-re.
24057 (diff-beginning-of-hunk): Use it.
24058 Check if the point is inside a diff header, in the middle of a hunk,
24059 or before the first hunk.
24060 (diff-apply-hunk): Call diff-beginning-of-hunk with non-nil arg
24061 before apply the hunk.
24062 (diff-hunk-kill, diff-file-kill):
24063 Call diff-beginning-of-hunk with non-nil arg after kill the hunks.
24064 (diff-post-command-hook): Call diff-beginning-of-hunk with non-nil argument.
24065
240662017-01-20 Eli Zaretskii <eliz@gnu.org>
24067
24068 Improve documentation of hooks related to saving buffers
24069
24070 * lisp/files.el (write-file-functions, write-contents-functions)
24071 (before-save-hook, after-save-hook): Note that these are only used
24072 by save-buffer.
24073
24074 * doc/lispref/backups.texi (Auto-Saving):
24075 * doc/lispref/files.texi (Saving Buffers): Mention that
24076 save-related hooks are not run by auto-saving. (Bug#25460)
24077
240782017-01-20 Eli Zaretskii <eliz@gnu.org>
24079
24080 Improve documentation of auto-save-visited-file-name
24081
24082 * doc/emacs/files.texi (Auto Save Files): Mention subtle
24083 differences between saving the buffer and auto-saving with
24084 auto-save-visited-file-name set non-nil. (Bug#25478)
24085
240862017-01-20 Noam Postavsky <npostavs@gmail.com>
24087
24088 Fix free var FOO-mode-{syntax,abbrev}-table warnings
24089
24090 * lisp/emacs-lisp/derived.el (define-derived-mode): Unconditionally
24091 defvar the syntax and abbrev tables so that the compiler will know that
24092 they are dynamically bound variables (Bug#25446).
24093
240942017-01-19 Vibhav Pant <vibhavp@gmail.com>
24095
24096 * lisp/emacs-lisp/bytecomp.el: Fix errors with matching quoted forms
24097
24098 * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table-info)
24099 eval obj2 to avoid quoted forms being stored as is.
24100
241012017-01-19 Vibhav Pant <vibhavp@gmail.com>
24102
24103 lisp/emacs-lisp/bytecomp.el: Use byte-switch only for quoted symbols
24104
241052017-01-19 Vibhav Pant <vibhavp@gmail.com>
24106
24107 * lisp/emacs-lisp/bytecomp.el: Add default-case for last cond clause.
24108
24109 * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table) Add
24110 default-case for last cond clause.
24111
241122017-01-19 Philipp Stephani <phst@google.com>
24113
24114 Check that variable lists are actually lists
24115
24116 'let' and 'let*' document that their first argument has to be a list,
24117 but don't check for that; instead, they allow (and silently ignore)
24118 other types. Introduce an explicit type check.
24119
24120 * src/eval.c (Flet, FletX): Check that the variable list is indeed a
24121 list.
24122 * test/src/eval-tests.el: Add unit tests.
24123
241242017-01-19 Vibhav Pant <vibhavp@gmail.com>
24125
24126 Add type checking for Bswitch, when enabled at compile time.
24127
24128 * src/bytecode.c: (exec_byte_code) If BYTE_CODE_SAFE is enabled at
24129 compile time, use CHECK_TYPE to verify that the jump table is a hash table.
24130
241312017-01-19 Vibhav Pant <vibhavp@gmail.com>
24132
24133 Use byte-switch for all symbols.
24134
24135 * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-valid-obj2-p) Return
24136 t for all symbols (instead for just keywords)
24137
241382017-01-19 Noam Postavsky <npostavs@gmail.com>
24139
24140 Avoid inefficient regex in diff-refine-hunk (Bug#25410)
24141
24142 * lisp/vc/diff-mode.el (diff--forward-while-leading-char): New function.
24143 (diff-refine-hunk): Use it instead of trying to match multiple lines
24144 with a single lines.
24145
241462017-01-18 Eli Zaretskii <eliz@gnu.org>
24147
24148 Remove lock file when auto-saving into the visited file
24149
24150 * src/fileio.c (write_region): When auto-saving into the visited
24151 file, unlock the file whenever we mark the buffer unmodified.
24152 (Bug#25470)
24153
241542017-01-18 Vibhav Pant <vibhavp@gmail.com>
24155
24156 * src/bytecode.c: (exec_byte_code) Use hash_lookup for Bswitch
24157
24158 Fgethash type checks the provided table object, which is unnecessary
24159 for compiled bytecode.
24160
241612017-01-18 Tom Tromey <tom@tromey.com>
24162
24163 fix typo in mailcap-mime-extensions
24164
24165 * lisp/net/mailcap.el (mailcap-mime-extensions): Use "text/x-patch",
24166 not "test/x-patch". (Bug#25472)
24167
241682017-01-18 Lele Gaifax <lele@metapensiero.it> (tiny change)
24169
24170 Fix typos in flymake.el
24171
24172 * lisp/progmodes/flymake.el (flymake-check-patch-master-file-buffer):
24173 Spelling fixes in the doc string.
24174
241752017-01-18 Eli Zaretskii <eliz@gnu.org>
24176
24177 Fix a bug with signaling a thread that waits for condvar
24178
24179 * src/thread.c (lisp_mutex_lock_for_thread): New function,
24180 with all the guts of lisp_mutex_lock.
24181 (lisp_mutex_lock): Call lisp_mutex_lock_for_thread.
24182 (condition_wait_callback): Don't call post_acquire_global_lock
24183 before locking the mutex, as that could cause a signaled thread to
24184 exit prematurely, because the condvar's mutex is recorded to be
24185 not owned by any thread, and with-mutex wants to unlock it as part
24186 of unwinding the stack in response to the signal.
24187
241882017-01-18 Eli Zaretskii <eliz@gnu.org>
24189
24190 Rudimentary error handling for non-main threads
24191
24192 * src/thread.c (last_thread_error): New static variable.
24193 (syms_of_threads): Staticpro it.
24194 (record_thread_error, Fthread_last_error): New functions.
24195 (syms_of_threads): Defsubr Fthread_last_error.
24196
24197 * doc/lispref/threads.texi (Basic Thread Functions): Document
24198 thread-last-error.
24199
24200 * test/src/thread-tests.el (thread-errors, thread-signal-early)
24201 (threads-condvar-wait): Test the values returned by
24202 thread-last-error.
24203
242042017-01-17 Tom Tromey <tom@tromey.com>
24205
24206 Add info-lookup help for gdb-script-mode
24207
24208 Bug#25464:
24209 * lisp/info-look.el (info-lookup-guess-gdb-script-symbol): New
24210 function.
24211 Add help for gdb-script-mode.
24212
242132017-01-17 Tom Tromey <tom@tromey.com>
24214
24215 Treat ":root" as a css-selector
24216
24217 * lisp/textmodes/css-mode.el (css--font-lock-keywords): Recognize bare
24218 ":root" as selector.
24219
242202017-01-17 Tom Tromey <tom@tromey.com>
24221
24222 Fix JS regexp literal syntax propertization in expressions
24223
24224 Bug#25465:
24225 * lisp/progmodes/js.el (js-syntax-propertize): Recognize a regexp
24226 literal after "!", "&", and "|".
24227 test/lisp/progmodes/js-tests.el (js-mode-regexp-syntax): New test.
24228
242292017-01-17 Glenn Morris <rgm@gnu.org>
24230
24231 More NEWS checking for admin.el's set-version
24232
24233 * admin/admin.el (set-version): Warn if temporary NEWS markup
24234 still present in release candidates.
24235
242362017-01-17 Mark Oteiza <mvoteiza@udel.edu>
24237
24238 Mark unused arguments and remove unused variables
24239
24240 * lisp/play/dunnet.el (dun-mode, dun-die, dun-inven, dun-try-take):
24241 (dun-dig, dun-type, dun-n, dun-s, dun-e, dun-w, dun-ne, dun-se):
24242 (dun-nw, dun-sw, dun-up, dun-down, dun-in, dun-out, dun-long):
24243 (dun-swim, dun-score, dun-flush, dun-piss, dun-sleep, dun-drive):
24244 (dun-superb, dun-power, dun-unix-parse, dun-bin, dun-fascii):
24245 (dun-ftpquit, dun-ftphelp, dun-uexit, dun-pwd, dun-dos-parse):
24246 (dun-dos-invd, dun-dos-spawn, dun-dos-exit, dun-dos-nil):
24247 (dungeon-nil): Mark arguments as unused.
24248 (dun-drop, dun-objnum-from-args, dun-get-path, dun-ftp):
24249 (dun-restore): Remove unused variable.
24250
242512017-01-17 Michael Albinus <michael.albinus@gmx.de>
24252
24253 Fix auto-save-file-name problem in Tramp on MS Windows
24254
24255 * lisp/files.el (make-auto-save-file-name): Use `file-remote-p'
24256 rather than an ange-ftp regexp.
24257
24258 * lisp/net/tramp.el (tramp-handle-make-auto-save-file-name):
24259 Fix a problem when running on MS Windows.
24260
24261 * test/lisp/net/tramp-tests.el (tramp-test31-make-auto-save-file-name):
24262 Adapt test.
24263
242642017-01-17 Michael Albinus <michael.albinus@gmx.de>
24265
24266 Fix auto-save-file-name problem in Tramp on MS Windows. Do not merge
24267
24268 * lisp/net/tramp.el (tramp-handle-make-auto-save-file-name):
24269 Fix a problem when running on MS Windows.
24270
242712017-01-17 Paul Eggert <eggert@cs.ucla.edu>
24272
24273 Merge from origin/emacs-25
24274
24275 42614fa Update remaining copyright years with admin.el M-x set-copyright
24276 f17a006 * lisp/ffap.el (ffap-lax-url): Bump :version after recent cha...
24277
242782017-01-17 Mark Oteiza <mvoteiza@udel.edu>
24279
24280 Nix some uses of eval
24281
24282 * lisp/play/dunnet.el: Fix triple negative.
24283 (dun-doverb): Use funcall instead of eval.
24284 (dun-echo): Just call dun-mprinc.
24285 (dun-save-val): Just bind value without eval.
24286
242872017-01-17 Tom Tromey <tom@tromey.com>
24288
24289 Fix comment in css-mode.el
24290
24291 * lisp/textmodes/css-mode.el: Remove obsolete comment.
24292
242932017-01-16 Vibhav Pant <vibhavp@gmail.com>
24294
24295 update branch
24296
242972017-01-16 Ian Dunn <dunni@gnu.org> (tiny change)
24298
24299 * lisp/net/eww.el (eww-tag-meta): Handle single quoted URLs (Bug#25445).
24300
243012017-01-15 Noam Postavsky <npostavs@gmail.com>
24302
24303 Improve ffap-gopher-at-point handling of long lines
24304
24305 * lisp/ffap.el (ffap-gopher-regexp): Only match the KEY part. Note
24306 setting to nil is now supported.
24307 (ffap--gopher-var-on-line): New function.
24308 (ffap-gopher-at-point): Use it instead of the old ffap-gopher-regexp
24309 which could overflow the regexp stack on long lines (Bug#25391). Use
24310 `let-alist' instead of calling `set' on local variables.
24311 * test/lisp/ffap-tests.el (ffap-gopher-at-point): New test.
24312
243132017-01-15 Vibhav Pant <vibhavp@gmail.com>
24314
24315 * lisp/emacs-lisp/byte-opt.el: Optimize how tags are checked for use.
24316
24317 * byte-opt.el: (byte-optimize-lapcode): Return nil instantly on
24318 finding the tag in a jump table.
24319
243202017-01-15 Vibhav Pant <vibhavp@gmail.com>
24321
24322 * lisp/emacs-lisp/bytecomp.el: Add documentation, remove code duplication
24323
243242017-01-14 Vibhav Pant <vibhavp@gmail.com>
24325
24326 Add new 'switch' byte-code.
24327
24328 'switch' takes two arguments from the stack: the variable to test, and
24329 a jump table (implemented as a hash-table with the appropriate :test
24330 function). By looking up the value of the variable in the hash table,
24331 the interpreter can jump to the label pointed to by the value, if any.
24332 This implementation can only be used for `cond' forms of the type
24333 `(cond ((test x 'foo) 'bar) ...)`, such that the function `test` and
24334 variable `x` is same for all clauses.
24335
24336 * lisp/emacs-lisp/bytecomp.el:
24337
24338 * Add (byte-compile-cond-valid-obj2-p), (byte-compile-cond-vars),
24339 (byte-compile-cond-jump-table-info), (byte-compile-jump-table-add-tag),
24340 (byte-compile-cond-jump-table), byte-compile-jump-tables.
24341
24342 * Add defcustom `byte-compile-cond-use-jump-table'.
24343
24344 * (byte-compile-cond): Use them.
24345
24346 * (byte-compile-lapcode): Patch tags present in jump tables, if any.
24347
24348 * lisp/emacs-lisp//byte-opt.el: (byte-optimize-lapcode): Add checks to
24349 some peephole optimizations to prevent them from messing up any code
24350 involving `byte-switch`.
24351
24352 * src/bytecode.c: (exec_byte_code): Add bytecode Bswitch.
24353
243542017-01-14 Alan Third <alan@idiocy.org>
24355
24356 Fix NS main thread check (bug#25265)
24357
24358 * src/nsterm.m (ns_read_socket, ns_select): Replace mainThread with
24359 isMainThread.
24360
243612017-01-14 Stefan Monnier <monnier@iro.umontreal.ca>
24362
24363 * lisp/progmodes/sql.el (sql-product-alist): Doc tweak
24364
24365 `:sqli-comint-func' does not have to be a symbol.
24366
243672017-01-14 Alan Mackenzie <acm@muc.de>
24368
24369 Correct c-parse-state-get-strategy for moving HERE backward into a macro.
24370
24371 * list/progmodes/c-engine.el (c-parse-state-get-strategy): When HERE is below
24372 its previous value, we chose strategy 'forward, and the new HERE is in a
24373 (different) macro, ensure the returned START-POINT is not above the start of
24374 the macro.
24375
243762017-01-14 Eli Zaretskii <eliz@gnu.org>
24377
24378 Include "Date:" in mail messages filed by 'sendmail-send-it'
24379
24380 * lisp/mail/sendmail.el (mail-do-fcc): Insert a 'Date:' header
24381 into the filed message. In the outgoing message, sendmail will
24382 add the date, but the composed message body doesn't have it.
24383 (Bug#25436)
24384
243852017-01-14 Eli Zaretskii <eliz@gnu.org>
24386
24387 * lisp/progmodes/sql.el (sql-product-alist): Doc fix. (Bug#25440)
24388
243892017-01-14 Dmitry Gutov <dgutov@yandex.ru>
24390
24391 Remove leftover references to log-view-message-face
24392
24393 * lisp/vc/vc-bzr.el (vc-bzr-log-view-mode): Use log-view-message.
24394
24395 * lisp/vc/vc-git.el (vc-git-root-log-format): Same.
24396
24397 * lisp/vc/vc-hg.el (vc-hg-root-log-format): Same.
24398
243992017-01-13 Phillip Lord <phillip.lord@russet.org.uk>
24400
24401 Record autoloads till emacs dump
24402
24403 * admin/ldefs-clean.el (ldefs-clean-up): Record autoloads till emacs dump
24404 * lisp/ldefs-boot-auto.el (batch-byte-compile): Update
24405
24406 Previously, autoloads were collected till loaddefs.el was generated as
24407 part of the build. However, bootstrap-emacs does not load
24408 loaddefs (rather it is dumped), hence we must record autoloads until the
24409 full emacs binary is dumped.
24410
244112017-01-13 Tom Tromey <tom@tromey.com>
24412
24413 Add chained indentation to js-mode
24414
24415 Bug#20896
24416 * lisp/progmodes/js.el (js-chain-indent): New variable.
24417 (js--skip-term-backward, js--skip-terms-backward)
24418 (js--chained-expression-p): New functions.
24419 (js--proper-indentation): Call js--chained-expression-p.
24420 * test/manual/indent/js-chain.js: New file.
24421 * test/manual/indent/js.js: Add (non-)chained indentation test.
24422
244232017-01-13 Tom Tromey <tom@tromey.com>
24424
24425 Fix js-mode indentation bug
24426
24427 Bug#15582:
24428 * lisp/progmodes/js.el (js--find-newline-backward): New function.
24429 (js--continued-expression-p): Use it.
24430 * test/manual/indent/js.js: Add new test.
24431
244322017-01-13 Tom Tromey <tom@tromey.com>
24433
24434 Fix definition of EMACS in test/manual/indent/Makefile
24435
24436 * test/manual/indent/Makefile (EMACS): Add one more "..".
24437
244382017-01-13 Tom Tromey <tom@tromey.com>
24439
24440 Add .jsx to auto-mode-alist
24441
24442 Bug#25389:
24443 * lisp/files.el (auto-mode-alist): Add entry for .jsx.
24444
244452017-01-13 Tom Tromey <tom@tromey.com>
24446
24447 Fix two js-mode filling bugs
24448
24449 Bug#19399 and Bug#22431:
24450 * lisp/progmodes/js.el (js-mode): Set comment-line-break-function and
24451 c-block-comment-start-regexp.
24452 * test/lisp/progmodes/js-tests.el: New file.
24453
244542017-01-13 Eli Zaretskii <eliz@gnu.org>
24455
24456 Fix last change
24457
24458 * test/src/thread-tests.el (threads-condvar-wait): Revert
24459 previous change. Make sure no other threads from previous
24460 tests are running, to avoid interfering with our thread counts.
24461
244622017-01-13 Eli Zaretskii <eliz@gnu.org>
24463
24464 Fix the new condvar test
24465
24466 * test/src/thread-tests.el (threads-condvar-wait): Enlarge the
24467 time we sleep in the main thread to let the other thread
24468 process notifications.
24469
244702017-01-13 Eli Zaretskii <eliz@gnu.org>
24471
24472 Minor improvements in the new condvar test
24473
24474 * test/src/thread-tests.el (threads-test-condvar-wait): Use
24475 with-mutex instead of emulating it inline.
24476 (threads-condvar-wait): Improve comments. Check that the new
24477 thread is alive before waiting for it to become blocked on the
24478 conditional variable.
24479
244802017-01-13 Eli Zaretskii <eliz@gnu.org>
24481
24482 Fix a bug in waiting for condition variable
24483
24484 * src/thread.c (lisp_mutex_lock, lisp_mutex_unlock)
24485 (lisp_mutex_unlock_for_wait, condition_wait_callback)
24486 (condition_notify_callback): Improve commentary.
24487 (condition_wait_callback): Call post_acquire_global_lock before
24488 attempting to lock the mutex, to make sure the lock's owner is
24489 recorded correctly.
24490
24491 * test/src/thread-tests.el (threads-condvar-wait): New test.
24492
244932017-01-13 Eli Zaretskii <eliz@gnu.org>
24494
24495 Improve documentation of dabbrevs
24496
24497 * doc/emacs/abbrevs.texi (Dynamic Abbrevs): Add a cross reference
24498 to "Dabbrev Customization".
24499 (Dabbrev Customization): More details about the default value of
24500 dabbrev-abbrev-char-regexp and use cases when it might not be good
24501 enough. (Bug#25432)
24502
245032017-01-13 Katsumi Yamaoka <yamaoka@jpl.org>
24504
24505 Fix last change of dd80ee6 (was: mm-uu.el: Don't dissect patch part)
24506
245072017-01-13 Katsumi Yamaoka <yamaoka@jpl.org>
24508
24509 mm-uu.el: Don't dissect patch part
24510
24511 This fixes a bug that the patch part is broken in the article
24512 <87inpjzhpb.fsf@users.sourceforge.net> in the bug-gnu-emacs list.
24513
24514 * lisp/gnus/mm-uu.el (mm-uu-dissect-text-parts):
24515 Don't dissect patch part.
24516
245172017-01-13 Dmitry Lazurkin <dilaz03@gmail.com>
24518
24519 Fix extracting async def type and name in python mode imenu
24520
24521 * lisp/progmodes/python.el (python-imenu--get-defun-type-name):
24522 New function.
24523 (python-imenu--build-tree): Use python-imenu--get-defun-type-name for
24524 extract async or simple def type and name at current
24525 position (Bug#24820).
24526 * test/lisp/progmodes/python-tests.el (python-imenu-create-index-1):
24527 (python-imenu-create-flat-index-1): Add async def's.
24528
245292017-01-13 Katsumi Yamaoka <yamaoka@jpl.org>
24530
24531 Remove garbage from Content-Transfer-Encoding value (bug#25420)
24532
24533 * lisp/mail/ietf-drums.el (ietf-drums-strip-cte): New function.
24534 (ietf-drums-remove-garbage): New function.
24535 (ietf-drums-remove-whitespace): Remove CR as well.
24536
24537 * lisp/mail/mail-parse.el (mail-header-strip-cte):
24538 Alias to ietf-drums-strip-cte.
24539
24540 * lisp/gnus/gnus-art.el (article-decode-charset):
24541 * lisp/gnus/gnus-sum.el (gnus-summary-enter-digest-group):
24542 * lisp/gnus/mm-decode.el (mm-dissect-buffer):
24543 * lisp/gnus/nndoc.el (nndoc-decode-content-transfer-encoding)
24544 (nndoc-rfc822-forward-generate-article):
24545 * lisp/mh-e/mh-mime.el (mh-decode-message-body):
24546 Replace mail-header-strip with mail-header-strip-cte.
24547
245482017-01-13 Paul Eggert <eggert@cs.ucla.edu>
24549
24550 Restore behavior of ‘./autogen.sh autoconf git’
24551
24552 * autogen.sh: Do both autoconf and git setup when invoked
24553 as ‘./autogen.sh autoconf git’. Avoid unnecessary newline in chatter.
24554 Mention new --no-check option in usage message. (Bug#25359)
24555
245562017-01-12 Glenn Morris <rgm@gnu.org>
24557
24558 * autogen.sh: Simplify argument parsing.
24559
245602017-01-12 Noam Postavsky <npostavs@gmail.com>
24561
24562 Clarify that easy-menu-add is a nop (Bug#25382)
24563
24564 * lisp/emacs-lisp/easymenu.el (easy-menu-add): Make it into an alias of
24565 `ignore', like `easy-menu-remove'.
24566
245672017-01-12 Glenn Morris <rgm@gnu.org>
24568
24569 * lisp/textmodes/rst.el (rst-package-emacs-version-alist): Fix entry.
24570
245712017-01-11 Glenn Morris <rgm@gnu.org>
24572
24573 * autogen.sh: Add --no-check option. (Bug#25359)
24574
245752017-01-11 Glenn Morris <rgm@gnu.org>
24576
24577 Convert some network test failures to skipping
24578
24579 These tests intermittently fail on hydra.nixos.org for unclear
24580 reasons related to starting the external process.
24581 This isn't an Emacs issue, and the failures cause noise on
24582 the emacs-buildstatus list. (Bug#24503)
24583 * test/lisp/net/network-stream-tests.el (echo-server-nowait)
24584 (connect-to-tls-ipv4-nowait): Skip rather than fail if the
24585 external process fails to start properly.
24586
245872017-01-11 Eli Zaretskii <eliz@gnu.org>
24588
24589 Revert "Add DNS keywords and remove duplications"
24590
24591 This reverts commit 1cb9aa5b14867983d0013a61709b4d0af18364ff.
24592
245932017-01-11 Alexander Kuleshov <kuleshovmail@gmail.com>
24594
24595 Add DNS keywords and remove duplications
24596
24597 * lisp/textmodes/dns-mode.el (dns-mode-types): Add two TLSA and
24598 NSEC" DNS related keywords and remove duplication of "NSAP".
24599
246002017-01-11 Alexander Kuleshov <kuleshovmail@gmail.com>
24601
24602 Add DNS keywords and remove duplications
24603
24604 * lisp/textmodes/dns-mode.el (dns-mode-types): Add two TLSA and
24605 NSEC" DNS related keywords and remove duplication of "NSAP".
24606
246072017-01-11 Alan Mackenzie <acm@muc.de>
24608
24609 Handle syntactic WS cache properties more accurately at buffer changes.
24610
24611 This fixes bug #25362.
24612
24613 * lisp/progmodes/cc-engine.el (c-sws-lit-type, c-sws-lit-limits)
24614 (c-invalidate-sws-region-before, c-invalidate-sws-region-after-del)
24615 (c-invalidate-sws-region-after-ins): New variables and functions.
24616 (c-invalidate-sws-region-after): Change from a defsubst to a defun.
24617 Also pass
24618 it the standard OLD-LEN argument. Call both
24619 c-invalidate-sws-region-after-{ins,del} to check for "dangerous" WS
24620 cache
24621 properties.
24622
24623 * lisp/progmodes/cc-langs.el (c-block-comment-ender-regexp): New language
24624 variable.
24625
24626 * lisp/progmodes/cc-mode.el (c-before-change): Call
24627 c-invalidate-sws-region-before.
24628 (c-after-change): Pass old-len to c-invalidate-sws-region-after.
24629
246302017-01-11 Michael Albinus <michael.albinus@gmx.de>
24631
24632 Support stat 8.26 in Tramp
24633
24634 * lisp/net/tramp-sh.el (tramp-get-remote-stat): Use QUOTING_STYLE
24635 environment variable of newer coreutils. (Bug#23422)
24636
246372017-01-10 Eli Zaretskii <eliz@gnu.org>
24638
24639 Improve documentation of coding-systems
24640
24641 * doc/lispref/nonascii.texi (Coding System Basics): Mention
24642 'prefer-utf-8'. Index it and 'undecided'.
24643 (Encoding and I/O): Fix a typo.
24644 (User-Chosen Coding Systems): Improve the documentation of
24645 ACCEPT-DEFAULT-P argument to select-safe-coding-system. Document
24646 select-safe-coding-system-function.
24647 (Specifying Coding Systems): Document coding-system-require-warning.
24648
246492017-01-10 Paul Eggert <eggert@cs.ucla.edu>
24650
24651 Merge from gnulib
24652
24653 This incorporates:
24654 2017-01-09 maint: time stamp -> timestamp
24655 2017-01-07 stdioext: Port to Minix 3.2 and newer
24656 2017-01-06 glob, intprops, xalloc: work around Clang bug
24657 2017-01-02 revert copyright-year change to synced files
24658 * doc/misc/texinfo.tex, lib/fpending.c, lib/intprops.h, lib/mktime.c:
24659 * lib/stat-time.h, lib/stdio-impl.h, lib/time.in.h, lib/timespec.h:
24660 * lib/utimens.c, lib/xalloc-oversized.h:
24661 Copy from gnulib.
24662
246632017-01-10 Eli Zaretskii <eliz@gnu.org>
24664
24665 Don't use unsafe encoding for the bookmark file
24666
24667 * lisp/bookmark.el (bookmark-write-file): Handle the case when the
24668 explicitly specified encoding of the bookmark file cannot encode the
24669 additional bookmarks just added. (Bug#25365)
24670
246712017-01-09 Eli Zaretskii <eliz@gnu.org>
24672
24673 Improve definition of 'variable-pitch' face on MS-Windows
24674
24675 * lisp/faces.el (variable-pitch): Don't specify too many
24676 attributes of the font, otherwise faces that request different
24677 weight or slant or size will not get them.
24678
246792017-01-09 Eli Zaretskii <eliz@gnu.org>
24680
24681 Fix an error message in python.el
24682
24683 * lisp/progmodes/python.el (python-shell-get-process-or-error):
24684 Don't repeat the same key binding twice. (Bug#25405)
24685
246862017-01-09 Phillip Lord <phillip.lord@russet.org.uk>
24687
24688 Remove unused ldefs-boot.el
24689
24690 * lisp/ldefs-boot.el: Remove
24691
24692 This file was not removed as reported in c27b645956a11, but accidentally
24693 left.
24694
246952017-01-09 Noam Postavsky <npostavs@gmail.com>
24696 Eli Zaretskii <eliz@gnu.org>
24697
24698 Use expanded stack during regex matches
24699
24700 While the stack is increased in main(), to allow the regex stack
24701 allocation to use alloca we also need to modify regex.c to actually take
24702 advantage of the increased stack, and not limit stack allocations to
24703 SAFE_ALLOCA bytes.
24704
24705 * src/regex.c (MATCH_MAY_ALLOCATE): Remove obsolete comment about
24706 allocations in signal handlers which no longer happens and correct
24707 description about when and why MATCH_MAY_ALLOCATE should be defined.
24708 (emacs_re_safe_alloca): New variable.
24709 (REGEX_USE_SAFE_ALLOCA): Use it as the limit of stack allocation instead
24710 of MAX_ALLOCA.
24711 (emacs_re_max_failures): Rename from `re_max_failures' to avoid
24712 confusion with glibc's `re_max_failures'.
24713 * src/emacs.c (main): Increase the amount of fixed 'extra' bytes we add
24714 to the stack. Instead of changing emacs_re_max_failures based on the
24715 new stack size, just change emacs_re_safe_alloca; emacs_re_max_failures
24716 remains constant regardless, since if we run out stack space SAFE_ALLOCA
24717 will fall back to heap allocation.
24718
247192017-01-09 Noam Postavsky <npostavs@gmail.com>
24720
24721 Fix computation of regex stack limit
24722
24723 The regex stack limit was being computed as the number of stack entries,
24724 whereas it was being compared with the current size as measured in
24725 bytes. This could cause indefinite looping when nearing the stack limit
24726 if re_max_failures happened not to be a multiple of sizeof
24727 fail_stack_elt_t (Bug #24751).
24728
24729 * src/regex.c (GROW_FAIL_STACK): Compute both current stack size and
24730 limit as numbers of stack entries.
24731
247322017-01-08 Alan Third <alan@idiocy.org>
24733
24734 Remove apploopnr
24735
24736 * src/nsterm.m (ns_select, ns_read_socket): Remove apploopnr and only
24737 allow app loop to run in main thread.
24738
247392017-01-08 Glenn Morris <rgm@gnu.org>
24740
24741 Remove unused configure output variable
24742
24743 * configure.ac (GNULIB_MK):
24744 * Makefile.in (gnulib_mk): Remove, no longer used.
24745
247462017-01-08 Glenn Morris <rgm@gnu.org>
24747
24748 Fix automake dependencies
24749
24750 * Makefile.in (AUTOMAKE_INPUTS): Add nt/gnulib.mk. (Bug#25372)
24751 All platforms need this file to exist.
24752
247532017-01-08 Paul Eggert <eggert@cs.ucla.edu>
24754
24755 Remove unnecessary blankp code
24756
24757 * src/character.c (blankp): Remove redundant code that slows Emacs
24758 down a bit. The caller already does the test.
24759
247602017-01-08 Stefan Merten <stefan@merten-home.de>
24761
24762 * lisp/textmodes/rst.el: Fix rst-forward-indented-block.
24763
24764 * rst.el (rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
24765 (rst-official-version, rst-official-cvs-rev)
24766 (rst-package-emacs-version-alist): Maintain version numbers.
24767 (rst-forward-indented-block): Fix. Start searching at next
24768 line again. Fixes fontification of comments continuing on the
24769 same line they started.
24770
247712017-01-08 Paul Eggert <eggert@cs.ucla.edu>
24772
24773 Remove @SET_MAKE@ from manually-maintained files
24774
24775 Emacs now assumes GNU Make, so @SET_MAKE@ is no longer needed.
24776 * Makefile.in, lwlib/Makefile.in, nextstep/Makefile.in:
24777 * src/Makefile.in: Remove @SET_MAKE@.
24778
247792017-01-07 Michael Albinus <michael.albinus@gmx.de>
24780
24781 Fix a problem with `start-file-process' in Tramp
24782
24783 * lisp/net/tramp-sh.el (tramp-maybe-open-connection):
24784 `start-file-process' shall work when `non-essential' is
24785 non-nil, but there is already an established connection.
24786 <https://github.com/company-mode/company-mode/issues/462>
24787
247882017-01-07 Rolf Ade <rolf@pointsman.de> (tiny change)
24789
24790 Fix selecting SQLite database files with sql-mode (Bug#23566)
24791
24792 * lisp/progmodes/sql.el (sql-sqlite-login-params): Allow any name as
24793 SQLite database file name, by default.
24794 (sql-get-login-ext): Fixed read-file-name arguments to provide
24795 path completion even if a database name pattern is customized and to
24796 allow creation of new SQLite database files.
24797
247982017-01-07 Noam Postavsky <npostavs@gmail.com>
24799
24800 Clarify major mode switching
24801
24802 * doc/emacs/modes.texi (Major Modes):
24803 * doc/lispref/modes.texi (Modes, Major Modes): Explictly say that each
24804 buffer has exactly one major mode and can't be "turned off", only
24805 switched away from (Bug#25357).
24806
248072017-01-07 Noam Postavsky <npostavs@gmail.com>
24808
24809 Add helpful comment to compile-command's docstring
24810
24811 * lisp/progmodes/compile.el (compile-command): Mention trailing space in
24812 docstring (Bug#25337).
24813
248142017-01-07 Eli Zaretskii <eliz@gnu.org>
24815
24816 Specify encoding of the bookmark file
24817
24818 * lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
24819 Accept an argument CODING and include a 'coding:' cookie in the
24820 bookmark file preamble.
24821 (bookmark-upgrade-file-format-from-0): Call
24822 'bookmark-insert-file-format-version-stamp' with the file buffer's
24823 encoding, as detected when it was read.
24824 (bookmark-file-coding-system): New variable.
24825 (bookmark-load): Set bookmark-file-coding-system to the encoding
24826 of the loaded file.
24827 (bookmark-write-file): Bind coding-system-for-write to either the
24828 user setting via "C-x RET c" or to the existing file encoding,
24829 defaulting to 'utf-8-emacs'. Update the value of
24830 bookmark-file-coding-system. (Bug#25365)
24831
248322017-01-07 Eli Zaretskii <eliz@gnu.org>
24833
24834 Avoid infloop in 'ispell-region'
24835
24836 * lisp/textmodes/ispell.el (ispell-begin-skip-region-regexp):
24837 Protect against 'ispell-skip-region-alist' being nil. Reported by
24838 Ernest Adrogué <nfdisco@gmail.com>, see
24839 http://lists.gnu.org/archive/html/help-gnu-emacs/2017-01/msg00007.html.
24840
248412017-01-06 Philipp Stephani <phst@google.com>
24842
24843 Add support for Unicode whitespace in [:blank:]
24844
24845 See Bug#25366.
24846
24847 * src/character.c (blankp): New function for checking Unicode
24848 horizontal whitespace.
24849 * src/regex.c (ISBLANK): Use 'blankp' for non-ASCII horizontal
24850 whitespace.
24851 (BIT_BLANK): New bit for range table.
24852 (re_wctype_to_bit, execute_charset): Use it.
24853 * test/lisp/subr-tests.el (subr-tests--string-match-p--blank): Add
24854 unit test for [:blank:] character class.
24855 * test/src/regex-tests.el (test): Adapt unit test.
24856 * doc/lispref/searching.texi (Char Classes): Document new Unicode
24857 behavior for [:blank:].
24858
248592017-01-06 Eli Zaretskii <eliz@gnu.org>
24860
24861 Fix ':version' of 'select-enable-primary'
24862
24863 * lisp/select.el (select-enable-primary): Fix a typo in
24864 ':version'. (Bug#25375)
24865
248662017-01-06 Stefan Monnier <monnier@iro.umontreal.ca>
24867
24868 (feedmail-deduce-address-list): Avoid add-to-list on local variables.
24869
24870 Author:
24871
24872 * lisp/mail/feedmail.el (feedmail-deduce-address-list):
24873 Avoid add-to-list on local variables.
24874
248752017-01-06 Noam Postavsky <npostavs@gmail.com>
24876
24877 Fix isearch handling of C-u C-u...
24878
24879 * lisp/isearch.el: Add `isearch-scroll' property to
24880 universal-argument-more so that `isearch-allow-scroll' will apply to it
24881 as well.
24882 (isearch-pre-command-hook): Let `isearch-allow-prefix' apply to
24883 `universal-argument-more' as well (Bug#25302).
24884
248852017-01-05 Paul Eggert <eggert@cs.ucla.edu>
24886
24887 Shorten autogen.sh script
24888
24889 * autogen.sh: Use a shorter script, as some 'sed' implementations
24890 mishandle long scripts.
24891
248922017-01-05 Eli Zaretskii <eliz@gnu.org>
24893
24894 Yet another fix for autogen.sh
24895
24896 * autogen.sh (gnulib.mk): Make the Sed script more portable.
24897
24898 * nt/Makefile.in (${srcdir}/gnulib.mk): Adapt the Sed command to
24899 the changes in autogen.sh.
24900
249012017-01-05 Eli Zaretskii <eliz@gnu.org>
24902
24903 * autogen.sh (gnulib.mk): Another attempt to fix macOS build.
24904
249052017-01-05 Eli Zaretskii <eliz@gnu.org>
24906
24907 Fix dependencies of nt/gnulib.mk
24908
24909 * Makefile.in ($(srcdir)/nt/gnulib.mk): Avoid circular dependency
24910 of nt/gnulib.mk on lib/Makefile.in.
24911
249122017-01-05 Eli Zaretskii <eliz@gnu.org>
24913
24914 Unbreak macOS build
24915
24916 * autogen.sh (gnulib.mk): Don't use non-portable extensions of GNU
24917 Sed.
24918
249192017-01-05 Johan Claesson <johanclaesson@bredband.net> (tiny change)
24920
24921 Fix term.el handling of ^Z-sequences spanning chunks
24922
24923 Bash will after each command send ?\032 and the current directory "/tmp"
24924 to inform term.el. Bash output is buffered in 4096 bytes chunks. If a
24925 command outputs roughly 4096 bytes then the end of the first chunk will
24926 be "/tm" (Bug#13350).
24927
24928 * lisp/term.el (term-emulate-terminal): Change the regexp to find the
24929 end of the ?\032 sequence to use \n instead of $, the latter can match
24930 end of string as well.
24931
249322017-01-05 Mark Oteiza <mvoteiza@udel.edu>
24933
24934 Turn on lexical-binding in mb-depth.el
24935
24936 * lisp/mb-depth.el: Turn on lexical-binding.
24937 (minibuffer-depth-setup): Bind things used multiple times.
24938
249392017-01-04 Alan Third <alan@idiocy.org>
24940
24941 Revert "Rework NS event handling (bug#25265)"
24942
24943 This reverts commit e0e5b0f4a4ce1d19ee0240c514dedd873d4165dc.
24944
249452017-01-04 Glenn Morris <rgm@gnu.org>
24946
24947 Update remaining copyright years with admin.el M-x set-copyright
24948
24949 * etc/refcards/ru-refcard.tex (cyear): Set to 2017.
24950
249512017-01-04 Glenn Morris <rgm@gnu.org>
24952
24953 * lisp/ffap.el (ffap-lax-url): Bump :version after recent change.
24954
249552017-01-04 Paul Eggert <eggert@cs.ucla.edu>
24956
24957 Port recent autogen.sh changes to Darwin
24958
24959 Problem reported by Sam Steingold (Bug#25347).
24960 * autogen.sh: Don't assume 'sed -f-' reads a script from stdin, as
24961 POSIX does not require it and it does not work on Darwin.
24962
249632017-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
24964
24965 Avoid add-to-list on local variables
24966
24967 * lisp/gnus/nnir.el: Use lexical-binding and cl-lib.
24968 (nnir-retrieve-headers): Use pcase.
24969 (nnir-search-thread): Avoid add-to-list on local variables.
24970
24971 * lisp/gnus/smime.el: Use lexical-binding and cl-lib.
24972 (smime-verify-region): Avoid add-to-list on local variables.
24973
24974 * lisp/mail/undigest.el: Use lexical-binding and cl-lib.
24975 (rmail-digest-parse-mime, rmail-digest-rfc1153)
24976 (rmail-digest-parse-rfc934): Avoid add-to-list on local variable.
24977
24978 * lisp/net/ldap.el (ldap-search): Move init into declaration.
24979
24980 * lisp/net/newst-backend.el (newsticker--cache-add):
24981 Avoid add-to-list on local variables; Simplify code with `assq'.
24982
24983 * lisp/net/zeroconf.el: Use lexical-binding and cl-lib.
24984 (dbus-debug): Remove declaration, unused.
24985 (zeroconf-service-add-hook, zeroconf-service-remove-hook)
24986 (zeroconf-service-browser-handler, zeroconf-publish-service):
24987 Avoid add-to-list and *-hook on local variables.
24988
24989 * lisp/org/org-archive.el (org-all-archive-files):
24990 * lisp/org/org-agenda.el (org-agenda-get-restriction-and-command):
24991 Avoid add-to-list on local variables.
24992
24993 * lisp/org/ox-publish.el (org-publish--run-functions): New function.
24994 (org-publish-projects): Use it to avoid run-hooks on a local variable.
24995 (org-publish-cache-file-needs-publishing): Avoid add-to-list on
24996 local variables.
24997
24998 * lisp/progmodes/ada-prj.el: Use setq instead of (set '...).
24999 (ada-prj-load-from-file): Avoid add-to-list on local variables.
25000
25001 * lisp/progmodes/ada-xref.el (ada-initialize-runtime-library): Simplify.
25002 (ada-gnat-parse-gpr, ada-parse-prj-file-1)
25003 (ada-xref-find-in-modified-ali): Avoid add-to-list on local variables.
25004
25005 * lisp/progmodes/idlw-shell.el (idlwave-shell-update-bp-overlays):
25006 Avoid add-to-list on local variables.
25007
250082017-01-04 Mark Oteiza <mvoteiza@udel.edu>
25009
25010 Turn on lexical-binding in md4.el
25011
25012 * lisp/md4.el: Turn on lexical-binding.
25013 * test/lisp/md4-tests.el: New file.
25014
250152017-01-03 Stefan Merten <stefan@merten-home.de>
25016
25017 Lots of refactorings and a few minor improvements.
25018
25019 User visible improvements and changes:
25020 * Improve and debug `rst-forward-section` and `rst-backward-section`.
25021 * Auto-enumeration may be used with all styles for list insertion.
25022 * Improve and debug `rst-toc-insert`.
25023 * Adapt change in Emacs to use customization group `text` instead of `wp`.
25024 * Bind `n` and `p` in `rst-toc-mode`.
25025 * `z` in `toc-mode` returns to the previous window configuration.
25026 * Require Emacs version >= 24.1.
25027
25028 Lots of refactorings including:
25029 * Silence byte compiler.
25030 * Use lexical binding.
25031 * Use `cl-lib`.
25032 * Add tests and raise test coverage.
25033
250342017-01-03 Stefan Monnier <monnier@iro.umontreal.ca>
25035
25036 (cl-defstruct): Improve error message for slots w/o value (bug#25312)
25037
25038 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't signal an error but
25039 emit a warning for those coders who forgot to put a default value in
25040 their slot.
25041
250422017-01-03 Philipp Stephani <p.stephani2@gmail.com>
25043
25044 Small patch for ffap.el
25045
25046 * lisp/ffap.el (ffap-alist): Document that ffap sets the match data
25047 while walking 'ffap-alist'.
25048
250492017-01-03 Eli Zaretskii <eliz@gnu.org>
25050
25051 Generate nt/gnulib.mk from lib/gnulib.mk
25052
25053 This was proposed by Paul Eggert <eggert@cs.ucla.edu>,
25054 with the purpose of avoiding manual maintenance of
25055 nt/gnulib.mk.
25056
25057 * nt/gnulib-modules-to-delete.cfg: New file.
25058 * nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0)
25059 (am__v_GEN_1): New variables.
25060 (${srcdir}/gnulib.mk): Rules to generate gnulib.mk from
25061 lib/gnulib.mk and list of modules in gnulib-modules-to-delete.cfg.
25062
25063 * make-dist (nt): Add gnulib-modules-to-delete.cfg to the list of
25064 files to link.
25065 * configure.ac (GNULIB_MK): Compute the value according to $opsys.
25066 * autogen.sh: Create nt/gnulib.mk if it doesn't exist, before
25067 running autoreconf.
25068 * Makefile.in (gnulib_mk): New variable.
25069 ($(srcdir)/nt/gnulib.mk): Rule to produce it.
25070 (AUTOMAKE_INPUTS): Use $(gnulib_mk) instead of a literal file
25071 name.
25072 * .gitignore: Add nt/gnulib.mk.
25073
25074 * src/w32.c (acl_errno_valid): Implement it here, as we no longer
25075 build the acl-permissions module from Gnulib.
25076
250772017-01-03 Noam Postavsky <npostavs@gmail.com>
25078
25079 Handle multibyte chars spanning chunks in term.el
25080
25081 * lisp/term.el (term-terminal-undecoded-bytes): New variable.
25082 (term-mode): Make it buffer local. Don't make `term-terminal-parameter'
25083 buffer-local twice.
25084 (term-emulate-terminal): Check for bytes of incompletely decoded
25085 characters, and save them until the next call when they can be fully
25086 decoded (Bug#25288).
25087
250882017-01-03 Michael Albinus <michael.albinus@gmx.de>
25089
25090 Finish work on filenotify-tests.el
25091
25092 * test/lisp/filenotify-tests.el (file-notify--test-monitors):
25093 New variable.
25094 (file-notify--test-cleanup, file-notify--test-monitor): Use it.
25095 (file-notify--test-read-event, file-notify-test02-events)
25096 (file-notify-test04-file-validity): Handle "gvfs-monitor-dir.exe".
25097 (file-notify-test03-autorevert)
25098 (file-notify-test08-watched-file-in-watched-dir):
25099 Set `file-notify--test-desc' for proper work of
25100 `file-notify--test-monitor'. (Bug#21804)
25101
251022017-01-02 Michael Albinus <michael.albinus@gmx.de>
25103
25104 Check also for "gvfs-monitor-dir.exe" in Tramp
25105
25106 * lisp/net/tramp-sh.el (tramp-get-remote-gvfs-monitor-dir): Check also
25107 for "gvfs-monitor-dir.exe".
25108
251092017-01-02 Eli Zaretskii <eliz@gnu.org>
25110
25111 Fix compilation --without-x
25112
25113 * src/composite.c (autocmp_chars) [HAVE_WINDOW_SYSTEM]: Call
25114 font_range only if it is compiled in. (Bug#25334)
25115
251162017-01-02 Sašo Živanović <saso.zivanovic@guest.arnes.si>
25117
25118 Fix RefTeX to show table of contents for dtx files (tiny change)
25119
25120 * lisp/textmodes/reftex.el (reftex-compile-variables): Change the
25121 section regexp so that it accepts lines starting with the comment
25122 character. (tiny change)
25123 * lisp/textmodes/reftex-parse.el (reftex-parse-from-file): Filter
25124 gathered toc entries, accepting a commented entry if and only if the
25125 source file is a ".dtx" file. (tiny change)
25126
251272017-01-02 Paul Eggert <eggert@cs.ucla.edu>
25128
25129 Remove mistakenly-added files
25130
25131 Problem reported by Glenn Morris in:
25132 http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00008.html
25133 * lisp/gnus/gnus-ems.el, lisp/gnus/gnus-sync.el:
25134 * lisp/gnus/messcompat.el, lisp/nxml/nxml-glyph.el:
25135 * lisp/nxml/nxml-uchnm.el, lisp/obsolete/awk-mode.el:
25136 * lisp/obsolete/iso-acc.el, lisp/obsolete/iso-insert.el:
25137 * lisp/obsolete/iso-swed.el, lisp/obsolete/resume.el:
25138 * lisp/obsolete/scribe.el, lisp/obsolete/spell.el:
25139 * lisp/obsolete/swedish.el, lisp/obsolete/sym-comp.el:
25140 Remove files that were added by mistake during a merge.
25141
251422017-01-01 Noam Postavsky <npostavs@gmail.com>
25143
25144 Warn about incomplete untarring of link files
25145
25146 The current tar-mode doesn't really support unpacking symlinks, it
25147 simply creates an empty file of the same name.
25148
25149 * lisp/tar-mode.el (tar--describe-as-link): New function extracted from
25150 `tar--check-descriptor'.
25151 (tar-untar-buffer): Use it to warn about imperfectly untarred link
25152 files.
25153
251542017-01-01 Noam Postavsky <npostavs@gmail.com>
25155
25156 Remove sh-mode's skeleton-end-hook
25157
25158 * lisp/progmodes/sh-script.el (sh-mode): Remove local setting of
25159 `skeleton-end-hook', `skeleton-insert' already does `newline-and-indent'
25160 and also respects `skeleton-end-newline' (Bug#16634).
25161
251622017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25163
25164 * nt/gnulib.mk (stdint.h): Update to match lib/gnulib.mk here.
25165
251662017-01-01 Mark Oteiza <mvoteiza@udel.edu>
25167
25168 Add term/tmux.el
25169
25170 Since tmux version 2.1, new tmux terminfos are shipped due to oddities
25171 with xterm and screen terminfos. This is simply a duplication of
25172 term/screen.el with screen -> tmux.
25173 * lisp/term/tmux.el: New file.
25174
251752017-01-01 Philipp Stephani <phst@google.com>
25176
25177 Fix encoding of JSON surrogate pairs
25178
25179 JSON requires that such pairs be treated as UTF-16 surrogate pairs, not
25180 individual code points; cf. Bug #24784.
25181
25182 * lisp/json.el (json-read-escaped-char): Fix decoding of surrogate
25183 pairs.
25184 (json--decode-utf-16-surrogates): New defun.
25185
25186 * test/lisp/json-tests.el (test-json-read-string): Add test for
25187 surrogate pairs.
25188
251892017-01-01 Michael Albinus <michael.albinus@gmx.de>
25190
25191 Remove tramp-gw.el, which was synced from emacs-25 by accident
25192
251932017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25194
25195 Do not use Gnulib’s m4/wint_t.m4.
25196
25197 * admin/merge-gnulib: Remove m4/wint_t.m4 when merging.
25198 Fix typo so that warn-on-use.m4 is removed too.
25199 * configure.ac (gt_TYPE_WINT_T): New macro, replacing Gnulib’s.
25200 * m4/wint_t.m4: Remove.
25201
252022017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25203
25204 Merge from gnulib, continued
25205
25206 * m4/wint_t.m4: New file, copied from gnulib.
25207
252082017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25209
25210 Update copyright year to 2017 in master
25211
25212 Run admin/update-copyright in the master branch. This fixes files
25213 that were not already fixed in the emacs-25 branch before it was
25214 merged here.
25215
252162017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25217
25218 Remove test/automated detritus from merge
25219
252202017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25221
25222 Merge from gnulib
25223
25224 This incorporates:
25225 2016-12-19 stdint: Fix WINT_MAX to match wint_t on mingw
25226 2016-12-18 getopt: Fix link error for users of getopt() in <unistd.h>
25227 2016-12-17 getlogin: Port to newer mingw
25228 2016-12-17 stdint: Fix WINT_MAX to match wint_t on MSVC
25229 2016-12-17 Avoid redefinition errors on MSVC
25230 * lib/getopt.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/unistd.in.h:
25231 * m4/stdint.m4, m4/unistd_h.m4:
25232 Copy from gnulib.
25233 * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
25234 Plus, this commit updates the indenting on copyright notices to
25235 match that of gnulib.
25236
252372017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25238
25239 Merge from origin/emacs-25
25240
25241 2e2a806 Fix copyright years by hand
25242 5badc81 Update copyright year to 2017
25243
252442017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25245
25246 Merge from origin/emacs-25
25247
25248 665be69 ; Update ChangeLog.2 and AUTHORS files
25249
25250 # Conflicts:
25251 # etc/AUTHORS
25252
252532017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25254
25255 Merge from origin/emacs-25
25256
25257 697167b ; Improve wording of previous change in variables.texi
25258 d7973e8 Document 'default-toplevel-value' and 'set-default-toplevel-v...
25259 8b71826 Don't modify minibuffer variables globally
25260 5b5e036 Revert to pre-25.1 behavior in ffap
25261 19994a1 * lisp/ffap.el: Fix obsolete comment referencing ffap-bug.
25262 3ace730 Attempt to fix 64-bit AIX build
25263 f69bd79 Clarify usage of 'ediff-cleanup-hook' (Bug#24675)
25264 c04ac8a Document that variable binding order is unspecified
25265 272554a * lisp/desktop.el (desktop-buffers-not-to-save): Doc fix.
25266 08de101 Fix M-x hints on Mac port
25267 86a297a Work around reporting a dpi change in apply_xft_settings
25268 cf1f985 ; lisp/skeleton.el (skeleton-insert): Fix typo in last change
25269 9e1209d Amend the version number of CC Mode 5.33 -> 5.32.99. Don't m...
25270 88cdf14 Improve skeleton docstrings
25271
252722017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25273
25274 Merge from origin/emacs-25
25275
25276 4179238 Improve documentation of 'w32-scroll-lock-modifier'
25277
252782017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25279
25280 Merge from origin/emacs-25
25281
25282 9adb101 Document 'describe-fontset'
25283 229315c ; Add missing symbol quoting.
25284 3d94931 Repair desktop restoration on text terminals
25285 43022f9 Ignore forward-sexp-function in js-mode indentation code
25286 b19fb49 Improve documentation of 'define-coding-system'
25287 467768f Fix Bug#25162
25288 6db78ae Fix a typo in define-abbrev-table
25289 5f7d906 Bump makeinfo requirement from 4.7 to 4.13
25290 442e2f6 Fixes related to select-enable-clipboard
25291 e4ac450 Define struct predicate before acccesors
25292 08decbd Doc fix for vc-git
25293 5531e75 Further improve make-dist checking
25294 953bf67 Improve previous make-dist change
25295 129645a Make make-dist --snapshot do some sanity checks
25296
25297 # Conflicts:
25298 # lisp/menu-bar.el
25299
253002017-01-01 Alan Mackenzie <acm@muc.de>
25301
25302 Give eval-and-compile a correct edebug spec. Fixes bug #16184 properly.
25303
25304 * lisp/emacs-lisp/edebug.el (edebug_offset_indices): Revert abortive commit
25305 from Thu Dec 29 09:22:36 2016 +0000 which didn't really fix the bug.
25306
25307 * lisp/emacs-lisp/byte-run.el (eval-and-compile): Change the edebug spec from
25308 t to (&rest def-form).
25309
253102017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25311
25312 Fix copyright years by hand
25313
25314 These are dates that admin/update-copyright did not update, or
25315 updated incorrectly.
25316
253172017-01-01 Paul Eggert <eggert@cs.ucla.edu>
25318
25319 Update copyright year to 2017
25320
25321 Run admin/update-copyright.
25322
253232016-12-31 Paul Eggert <eggert@cs.ucla.edu>
25324
25325 Clarify internal_catch etc.
25326
25327 The recent change to internal_catch and friends relied on some
25328 confusion I introduced to the code in 2013. Attempt to fix
25329 the confusion by clarifying the code instead. This saves an
25330 instruction and a load dependency in the typical case.
25331 * src/eval.c (internal_catch, internal_condition_case)
25332 (internal_condition_case_1, internal_condition_case_2)
25333 (internal_condition_case_n): Undo the previous change. Instead,
25334 use use ‘c’ rather than ‘handlerlist’ in the typical case.
25335 Also, use ‘eassert’ rather than ‘clobbered_eassert’ when possible.
25336
253372016-12-31 Ken Brown <kbrown@cornell.edu>
25338
25339 Further improve filenotify-tests.el
25340
25341 * test/lisp/filenotify-tests.el
25342 (file-notify--test-read-event): Adapt to file monitors of type
25343 GFamFileMonitor, which occur on Cygwin.
25344 (file-notify--test-monitor): Update doc string.
25345
253462016-12-31 Paul Eggert <eggert@cs.ucla.edu>
25347
25348 * src/xdisp.c (string_from_display_spec): Simplify.
25349
253502016-12-31 Alan Third <alan@idiocy.org>
25351
25352 Rework NS event handling (bug#25265)
25353
25354 * src/nsterm.m (unwind_apploopnr): Remove.
25355 (ns_read_socket): Remove references to apploopnr. Make processing the
25356 NS event loop conditional on being in the main thread.
25357 (ns_select): Remove references to apploopnr. Remove all fd_handler
25358 related stuff. Check if there are events waiting on the NS event
25359 queue rather than running the event loop. Remove unused variables and
25360 code.
25361 (fd_handler): Remove.
25362 (ns_term_init): Remove creation of fd_handler thread.
25363 (hold_event, EmacsApp:sendEvent, EmacsView:mouseMoved,
25364 EmacsView:windowDidExpose): Remove send_appdefined.
25365 (ns_send_appdefined): Always check the event queue for
25366 applicationDefined events rather than relying on send_appdefined var.
25367 * src/nsterm.h: Remove reference to fd_handler method.
25368
253692016-12-31 Philipp Stephani <phst@google.com>
25370
25371 Checkdoc: use syntax functions instead of regex
25372
25373 In checkdoc.el, get rid of the error-prone regex to find definition
25374 forms, and use existing syntax-based navigation functions instead.
25375 This fixes a corner case with one-argument `defvar' forms.
25376
25377 * lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): New function.
25378 (checkdoc-next-docstring, checkdoc-defun): Use it.
25379 * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--next-docstring):
25380 Add unit test.
25381
253822016-12-31 Eli Zaretskii <eliz@gnu.org>
25383
25384 Don't define NOMINMAX on MS-Windows
25385
25386 * src/callproc.c (NOMINMAX) [WINDOWSNT]: Don't define. This is no
25387 longer needed with the current sources and MinGW headers, while
25388 defining NOMINMAX causes an annoying compiler warning.
25389
253902016-12-31 Chris Gregory <czipperz@gmail.com> (tiny change)
25391
25392 Simplify code in eval.c that calls 'setjmp'
25393
25394 * src/eval.c (internal_catch, internal_condition_case)
25395 (internal_condition_case_1, internal_condition_case_2)
25396 (internal_condition_case_n): Factor out the common tail of the
25397 functions.
25398
253992016-12-31 Chris Gregory <czipperz@gmail.com> (tiny change)
25400
25401 Simplify code in 'string_from_display_spec'
25402
25403 * src/xdisp.c (string_from_display_spec): Eliminate a redundant
25404 test before the loop.
25405
254062016-12-31 Eli Zaretskii <eliz@gnu.org>
25407
25408 Serialize random number generation on MS-Windows
25409
25410 * src/w32.c (rand_as183): New function.
25411 (random): Use it instead of MS runtime's 'rand'. This avoids
25412 producing separate and identical random series in each Lisp
25413 thread.
25414 (srandom): Modify to supply 3 seed values to 'rand_as183'.
25415
254162016-12-31 Michael Albinus <michael.albinus@gmx.de>
25417
25418 * src/gfilenotify.c (Fgfile_monitor_name): Return interned symbol.
25419
254202016-12-30 Ken Raeburn <raeburn@raeburn.org>
25421
25422 Don't call xg_select for a NextStep build.
25423
25424 NextStep builds use glib but don't use xg_select.
25425
25426 * src/process.c (wait_reading_process_output): Don't call xg_select
25427 for a NextStep build.
25428
254292016-12-30 Ken Raeburn <raeburn@raeburn.org>
25430
25431 Increase the obarray size.
25432
25433 In a typical GNU/Linux/X11 build, we wind up with over 15k symbols by
25434 the time we've started. The old obarray size ensured an average chain
25435 length of 10 or more.
25436
25437 * src/lread.c (OBARRAY_SIZE): Increase to 15121.
25438
254392016-12-30 Ken Raeburn <raeburn@raeburn.org>
25440
25441 Initialize thread support for Xlib.
25442
25443 * src/xterm.c (x_initialize) [THREADS_ENABLED]: Call XInitThreads
25444 before doing anything else with X.
25445
254462016-12-30 Paul Eggert <eggert@cs.ucla.edu>
25447
25448 Rename primary_thread to main_thread
25449
25450 This avoids the confusion of using two different phrases "main thread"
25451 and "primary thread" internally to mean the same thing. See:
25452 http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg01142.html
25453 * src/thread.c (main_thread): Rename from primary_thread,
25454 since the new name no longer clashes with main_thread_id
25455 and Emacs internals normally call this the "main thread".
25456 (init_main_thread): Rename from init_primary_thread.
25457 (main_thread_p): Rename from primary_thread_p.
25458 All uses changed.
25459
254602016-12-30 Paul Eggert <eggert@cs.ucla.edu>
25461
25462 Rename main_thread to main_thread_id and simplify
25463
25464 * src/emacs-module.c: Include syssignal.h, for main_thread_id.
25465 [HAVE_PTHREAD]: Do not include pthread.h.
25466 (main_thread): Remove. All uses replaced by main_thread_id,
25467 or by dwMainThreadId on NT. Since the HAVE_PTHREAD code is now using
25468 the main_thread_id established by sysdep.c, there is no need for a
25469 separate copy of the main thread ID here.
25470 (module_init): Remove. All uses removed.
25471 * src/sysdep.c (main_thread_id) [HAVE_PTHREAD]:
25472 Rename from main_thread. All uses changed. Now extern.
25473
254742016-12-30 Michael Albinus <michael.albinus@gmx.de>
25475
25476 * src/gfilenotify.c (Fgfile_monitor_name): Return a symbol.
25477
254782016-12-30 Paul Eggert <eggert@cs.ucla.edu>
25479
25480 * src/sysdep.c (deliver_process_signal): Improve comment.
25481
254822016-12-30 Alan Mackenzie <acm@muc.de>
25483
25484 CC Mode: Fix the fontification of a spuriously recognised enum member.
25485
25486 The "enum" was in an argument list, but triggered the fontification of a
25487 following identifier in the function block as though it were in an enum
25488 declaration.
25489
25490 * lisp/progmodes/cc-fonts.el (c-font-lock-enum-body): New function.
25491 (c-basic-matchers-after): Replace the inline stanza for enum elements with a
25492 call to c-font-lock-enum-body.
25493
25494 * lisp/progmodes/cc-langs.el (c-enum-clause-introduction-re): New language
25495 variable.
25496
254972016-12-30 Nicolas Petton <nicolas@petton.fr>
25498
25499 Bump Emacs version to 25.1.91
25500
25501 * README:
25502 * configure.ac:
25503 * msdos/sed2v2.inp:
25504 * nt/README.W32: Bump Emacs version.
25505 * lisp/ldefs-boot.el: Update.
25506
255072016-12-30 Eli Zaretskii <eliz@gnu.org>
25508
25509 Attempt to fix crashes with threads in GTK builds
25510
25511 * src/xgselect.c (xg_select): Call pselect via thread_select, not
25512 directly, to avoid running Lisp (via unblock_input) when more than
25513 one thread could be running. (Bug#25247)
25514 * src/process.c (wait_reading_process_output) [HAVE_GLIB]: Call
25515 xg_select directly instead of through thread_select.
25516 * src/xgselect.h (xg_select): Last 2 arguments are no longer
25517 'const', for consistency with thread_select.
25518
255192016-12-30 Arash Esbati <arash.esbati@gmail.com>
25520
25521 Add entry for biblatex
25522
25523 * lisp/textmodes/reftex-vars.el (reftex-cite-format-builtin): Add
25524 entry for biblatex macros.
25525
255262016-12-30 Alan Mackenzie <acm@muc.de>
25527
25528 Backport: Remove an ambiguity from defvar's doc string. Fixes bug #25292.
25529
25530 The ambiguity was whether INITVALUE is evaluated when it's not going to be
25531 used to set SYMBOL's value.
25532
25533 * src/eval.c (defvar): Rewrite a paragraph of the doc string.
25534
25535 (cherry picked from commit 8295e97f18490a535d1188a3daf0b0fd1bf4fa0d)
25536
255372016-12-30 Tino Calancha <tino.calancha@gmail.com>
25538
25539 ffap-string-at-point: Limit max length of active region
25540
25541 Prevents that 'ffap-guesser' waste time checking large strings
25542 which are likely not valid candidates (Bug#25243).
25543 * lisp/ffap.el (ffap-max-region-length): New variable.
25544 (ffap-string-at-point): Use it.
25545 * test/lisp/ffap-tests.el: New test suite.
25546 (ffap-tests-25243): Add test for this bug.
25547
255482016-12-30 Thien-Thi Nguyen <ttn@gnu.org>
25549
25550 last-chance: Also ignore NEWS files + typo fixes
25551
25552 * admin/last-chance.el: Fix typo in copyright notice.
25553 (last-chance-uninteresting-regexps): Add entry to match NEWS files.
25554 (last-chance-cleanup): Fix typo in docstring.
25555
255562016-12-29 Mike Kupfer <mkupfer@alum.berkeley.edu>
25557
25558 * mh-e.el (mh-fetch-x-image-url): Fix a docstring typo.
25559
255602016-12-29 Alan Mackenzie <acm@muc.de>
25561
25562 Remove an ambiguity from defvar's doc string. Fixes bug #25292.
25563
25564 The ambiguity was whether INITVALUE is evaluated when it's not going to be
25565 used to set SYMBOL's value.
25566
25567 * src/eval.c (defvar): Rewrite a paragraph of the doc string.
25568
255692016-12-29 Michael Albinus <michael.albinus@gmx.de>
25570
25571 Improve filenotify-tests.el
25572
25573 * src/inotify.c (Finotify_valid_p):
25574 * src/kqueue.c (Fkqueue_valid_p):
25575 * src/w32notify.c (Fw32notify_valid_p):
25576 * src/gfilenotify.c (Fgfile_valid_p): Fix typo in docstring.
25577 (Fgfile_monitor_name): New defun.
25578 (syms_of_gfilenotify): Declare Sgfile_monitor_name.
25579
25580 * test/lisp/filenotify-tests.el (file-notify--test-read-event):
25581 New defun, derived from `file-notify--test-read-event-timeout'.
25582 Replace all calls of `read-event' by this.
25583 (file-notify--test-timeout): Fix docstring.
25584 (file-notify--test-monitor): New defun.
25585 (file-notify--deftest-remote): Do not bind
25586 `file-notify--test-read-event-timeout' anymore.
25587 (file-notify-test00-availability): Print also monitor, if existent.
25588 (file-notify--test-with-events): Add an additional
25589 `file-notify--test-read-event' call, in order to get it work
25590 after `file-notify-add-watch'. Remove special timeout for cygwin.
25591 (file-notify-test02-events): Make a better check for cygwin.
25592 (file-notify-test06-many-events): Improve event list for cygwin.
25593 (file-notify-test08-watched-file-in-watched-dir): Add cygwin case.
25594
255952016-12-29 Alan Mackenzie <acm@muc.de>
25596
25597 Partially correct fontification of "(b*3)", and the like, in C++ Mode
25598
25599 This problem is caused by the fundamental ambiguity in C++ between
25600 argument declarations and initialisation clauses.
25601
25602 * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): If we have an open
25603 paren preceded by an arithmetic operator, we give this the context nil, not
25604 'arglist.
25605
25606 * lisp/progmodes/cc-langs.el (c-arithmetic-operators, c-arithmetic-op-regexp):
25607 New lang consts and vars.
25608
256092016-12-29 Alan Mackenzie <acm@muc.de>
25610
25611 Initialize edebug-offset-indices to a cons, not nil. Fixes bug #16184.
25612
25613 This is because there are times when this variable is changed by setcar before
25614 an atom is pushed onto it by debug-enter. This happens, for example, whilst
25615 instrumenting c-font-lock-declarations in .../lisp/progmodes/cc-fonts.el.
25616
25617 * lisp/emacs-lisp/edebug.el (edebug-offset-indices): initialize to '(0).
25618
256192016-12-28 Stefan Monnier <monnier@iro.umontreal.ca>
25620
25621 * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)
25622
25623 (inline--dont-quote): Quote the function with #' when passing it to `apply'.
25624 Cherry picked from commit e6161f648903d821865b9610b3b6aa0f82a5dcb7.
25625
256262016-12-27 Michael Albinus <michael.albinus@gmx.de>
25627
25628 Release Tramp 2.3.1
25629
25630 * doc/misc/trampver.texi:
25631 * lisp/net/trampver.el: Change version to "2.3.1".
25632
25633 * lisp/net/tramp.el (tramp-eshell-directory-change): Add it to
25634 `eshell-mode-hook' but `eshell-first-time-mode-hook'.
25635
25636 * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p)
25637 (tramp-compat-file-name-quote)
25638 (tramp-compat-file-name-unquote): Embed them in `eval-and-compile'.
25639
256402016-12-27 Paul Eggert <eggert@cs.ucla.edu>
25641
25642 Simplify prog1 implementation
25643
25644 Inspired by a suggestion from Chris Gregory in:
25645 http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00965.html
25646 On my platform, this generates exactly the same machine insns.
25647 * src/eval.c (prog_ignore): Rename from unwind_body, since
25648 it’s more general than that. All callers changed.
25649 (Fprog1): Simplify by using prog_ignore.
25650 (Fwhile): Clarify by using prog_ignore.
25651
256522016-12-27 Stefan Monnier <monnier@iro.umontreal.ca>
25653
25654 * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)
25655
25656 (inline--dont-quote): Quote the function with #' when passing it to `apply'.
25657
256582016-12-27 Mark Oteiza <mvoteiza@udel.edu>
25659
25660 Remove a use of lexical-let
25661
25662 * lisp/gnus/message.el (message-completion-function): Just use let,
25663 since the file now uses lexical-binding.
25664
256652016-12-27 Ken Brown <kbrown@cornell.edu>
25666
25667 Improve filenotify-tests.el on Cygwin (Bug #21804)
25668
25669 * test/lisp/filenotify-tests.el [CYGWIN]
25670 (file-notify--test-read-event-timeout): Increase.
25671 (file-notify--test-with-events): Add delay before executing body.
25672 (file-notify-test02-events, file-notify-test04-file-validity):
25673 Adjust expected results.
25674
256752016-12-27 Eli Zaretskii <eliz@gnu.org>
25676
25677 Fix expand-file-name on DOS_NT systems when /: escaping is used
25678
25679 * src/fileio.c (Fexpand_file_name) [DOS_NT]: Don't expand "~" in
25680 file names escaped by "/:". Don't recursively expand
25681 default-directory escaped with "/:" which is not followed by a
25682 drive spec. (Bug#25183)
25683
256842016-12-27 Bake Timmons <65pandas@gmail.com>
25685
25686 Fix `mail-sources' value of `(group)' in Gnus manual (bug#25275)
25687
25688 * doc/misc/gnus.texi (Mail Source Specifiers):
25689 Replace wrong `mail-sources' value of `(group)' in Gnus manual with
25690 the correct `((group))' value. (bug#25275) (tiny change)
25691
256922016-12-27 Bake Timmons <65pandas@gmail.com>
25693
25694 Fix bug in customizing `mail-sources' variable (bug#25274)
25695
25696 * lisp/gnus/mail-source.el (mail-sources): Use list instead of cons
25697 for lone argument. (bug#25274) (tiny change)
25698
256992016-12-26 Philipp Stephani <phst@google.com>
25700
25701 Checkdoc: Don't require a space before an arg list
25702
25703 See Bug#24998.
25704
25705 * lisp/emacs-lisp/checkdoc.el (checkdoc-defun-regexp): Don't require a
25706 space before a argument list.
25707 * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--bug-24998):
25708 Add unit test.
25709
257102016-12-26 Eli Zaretskii <eliz@gnu.org>
25711
25712 Document 'default-toplevel-value' and 'set-default-toplevel-value'
25713
25714 * doc/lispref/variables.texi (Default Value): Document
25715 'default-toplevel-value' and 'set-default-toplevel-value'.
25716
257172016-12-25 Michihito Shigemura <m_shigemura@shigemk2.com> (tiny change)
25718
25719 Add zshrc and zshenv detection to sh-mode (bug#25217)
25720
25721 * lisp/progmodes/sh-script.el (sh-mode): Add zsh string-match
25722
257232016-12-25 Paul Eggert <eggert@cs.ucla.edu>
25724
25725 Fix typo in lisp.h reordering patch
25726
25727 * src/lisp.h (XUNTAG) [!USE_LSB_TAG]: Remove duplicate defn.
25728 Reported by Eli Zaretskii (Bug#25128#19).
25729
257302016-12-25 Paul Eggert <eggert@cs.ucla.edu>
25731
25732 regex.h now includes sys/types.h
25733
25734 * src/dired.c, src/emacs.c, src/search.c, src/syntax.c, src/thread.h:
25735 Do not include sys/types.h; no longer needed.
25736 * src/regex.h: Include <sys/types.h>, as that's what Gnulib and
25737 glibc regex.h does, and POSIX has blessed this since 2008.
25738
257392016-12-25 Paul Eggert <eggert@cs.ucla.edu>
25740
25741 Reorder lisp.h to declare types before using them
25742
25743 This puts basic functions for types to be after the corresponding
25744 type definitions. This is a more-common programming style in C,
25745 and will make it easier to port Emacs to gcc
25746 -fcheck-pointer-bounds, since the functions now have access to the
25747 corresponding types' sizes. This patch does not change the code;
25748 it just moves declarations and definitions and removes
25749 no-longer-needed forward declarations (Bug#25128).
25750 * src/buffer.c, src/data.c, src/image.c:
25751 Include process.h, for PROCESSP.
25752 * src/buffer.h (BUFFERP, CHECK_BUFFER, XBUFFER):
25753 * src/process.h (PROCESSP, CHECK_PROCESS, XPROCESS):
25754 * src/termhooks.h (TERMINALP, XTERMINAL):
25755 * src/window.h (WINDOWP, CHECK_WINDOW, XWINDOW):
25756 * src/thread.h (THREADP, CHECK_THREAD, XTHREAD, MUTEXP, CHECK_MUTEX)
25757 (XMUTEX, CONDVARP, CHECK_CONDVAR, XCONDVAR):
25758 Move here from lisp.h.
25759 * src/intervals.h: Include buffer.h, for BUFFERP.
25760 Include lisp.h, for Lisp_Object.
25761 * src/lisp.h: Reorder declarations and definitions as described
25762 above. Move thread includes to be later, so that they can use the
25763 reordered definitions. Move some symbols to other headers (noted
25764 elsewhere). Remove forward decls that are no longer needed.
25765 * src/thread.h: Include systhread.h here, not in lisp.h,
25766 since lisp.h itself does not need systhread.h.
25767
257682016-12-25 Leo Liu <sdl.web@gmail.com>
25769
25770 Don't modify minibuffer variables globally
25771
25772 * lisp/files.el (cd): Use setq-local instead. (Bug#25260)
25773
257742016-12-25 Dima Kogan <dima@secretsauce.net>
25775
25776 diff-mode auto-refines only after a successful motion
25777
25778 Prior to this patch (if enabled) auto-refinement would kick in after all
25779 hunk navigation commands, even if the motion failed. This would result
25780 in a situation where the hunk navigation would signal an error and beep,
25781 but yet still accomplish potentially useful work, by auto-refining.
25782 This patch moves the auto-refinement code to only run when a motion was
25783 successful
25784
25785 * lisp/vc/diff-mode.el (diff--internal-hunk-next,
25786 diff--internal-hunk-prev): Removed auto-refinement-triggering code
25787 * lisp/vc/diff-mode.el (diff--wrap-navigation): Added
25788 auto-refinement-triggering code
25789
257902016-12-25 Dima Kogan <dima@secretsauce.net>
25791
25792 diff-mode is able to better handle file headers
25793
25794 This fixes a regression introduced in
25795
25796 http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=commit;h=2c8a7e50d24daf19ea7d86f1cfeaa98a41c56085
25797
25798 This bug was filed in
25799
25800 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25105
25801
25802 Patches generated from a VCS such as git contain a patch message at the
25803 start, and diff-mode is now once-again able to properly able to ignore
25804 this message when issuing navigation commands around the message.
25805
25806 * lisp/vc/diff-mode.el (diff-beginning-of-file-and-junk): More
25807 thoroughly ignore the header when looking for a beginning of file
25808 diffs.
25809
258102016-12-25 Paul Eggert <eggert@cs.ucla.edu>
25811
25812 Use libpng-config --ldflags, not --libs
25813
25814 Problem reported by James K. Lowden (Bug#25268).
25815 * configure.ac (LIBPNG): Pass --ldflags, not --libs, to libpng-config.
25816
258172016-12-24 Eli Zaretskii <eliz@gnu.org>
25818
25819 Revert to pre-25.1 behavior in ffap
25820
25821 * lisp/ffap.el (ffap-lax-url): Change the default to t, to produce
25822 the same behavior as in Emacs 24.x. (Bug#25264)
25823 Explain the trade-offs of customizing this in the doc string.
25824
258252016-12-24 Noam Postavsky <npostavs@gmail.com>
25826
25827 * lisp/ffap.el: Fix obsolete comment referencing ffap-bug.
25828
258292016-12-24 Noam Postavsky <npostavs@gmail.com>
25830
25831 Remove redundant `save-match-data' in whitespace.el
25832
25833 * lisp/whitespace.el (whitespace-cleanup, whitespace-cleanup-region):
25834 (whitespace-report-region): Remove redundant `save-match-data' calls.
25835
258362016-12-24 Noam Postavsky <npostavs@gmail.com>
25837
25838 Fix whitespace eob cleanup
25839
25840 * lisp/whitespace.el (whitespace-empty-at-eob-regexp): Match any number
25841 of empty lines at end of buffer.
25842 * test/lisp/whitespace-tests.el (whitespace-cleanup-eob): New test.
25843 (whitespace-tests--cleanup-string): New helper function for tests.
25844
258452016-12-24 Hong Xu <hong@topbug.net>
25846
25847 Fix timezone detection of parse-iso8601-time-string
25848
25849 * parse-time.el (parse-iso8601-time-string): Fix timezone
25850 parsing. Add a doc string. (Bug#25086)
25851 * editfns.c (Fdecode-time): Doc fix.
25852 * emacs-mime.texi (time-date): Add an example for
25853 parse-iso8601-time-string.
25854 * parse-time-tests.el (parse-time-tests): Add tests for
25855 parse-iso8601-time-string.
25856
258572016-12-24 Paul Eggert <eggert@cs.ucla.edu>
25858
25859 Simplify exec_byte_code via moving decls etc.
25860
25861 * src/bytecode.c (exec_byte_code): Simplify, mostly by moving
25862 initializers into decls, and by omitting some unnecessary changes
25863 to ‘top’.
25864
258652016-12-24 Paul Eggert <eggert@cs.ucla.edu>
25866
25867 Remove interpreter’s byte stack
25868
25869 This improves performance overall on my benchmark on x86-64,
25870 since the interpreted program-counter resides in a machine
25871 register rather than in RAM.
25872 * etc/DEBUG, src/.gdbinit: Remove xbytecode GDB command, as there
25873 is no longer a byte stack to decode.
25874 * src/bytecode.c (struct byte_stack, byte_stack_list)
25875 (relocate_byte_stack): Remove. All uses removed.
25876 (FETCH): Simplify now that pc is now local (typically, in a
25877 register) and no longer needs to be relocated.
25878 (CHECK_RANGE): Remove. All uses now done inline, in a different way.
25879 (BYTE_CODE_QUIT): Remove; now done by op_relative_branch.
25880 (exec_byte_code): Allocate a copy of the function’s bytecode,
25881 so that there is no problem if GC moves it.
25882 * src/lisp.h (struct handler): Remove byte_stack member.
25883 All uses removed.
25884 * src/thread.c (unmark_threads): Remove. All uses removed.
25885 * src/thread.h (struct thread_state): Remove m_byte_stack_list member.
25886 All uses removed. m_stack_bottom is now the first non-Lisp field.
25887
258882016-12-24 Paul Eggert <eggert@cs.ucla.edu>
25889
25890 BYTE_CODE_SAFE typo fix
25891
25892 * src/bytecode.c (FETCH): Depend on the value of BYTE_CODE_SAFE,
25893 not on whether it is defined.
25894
258952016-12-24 Paul Eggert <eggert@cs.ucla.edu>
25896
25897 BYTE_CODE_SAFE cleanups
25898
25899 * src/bytecode.c (BYTE_MAINTAIN_TOP): Remove; no longer needed.
25900 (struct byte_stack) [BYTE_MAINTAIN_TOP]:
25901 Remove unused members ‘top’ and ‘bottom’.
25902 (exec_byte_code): Nest inside { } to avoid GCC warning about
25903 jumping over declaration when compiled with -DBYTE_CODE_SAFE.
25904
259052016-12-24 Thien-Thi Nguyen <ttn@gnu.org>
25906
25907 last-chance: new utility lib for dangling deterrence
25908
25909 * admin/last-chance.el: New file.
25910
259112016-12-24 Paul Eggert <eggert@cs.ucla.edu>
25912
25913 Use max_align_t instead of void *
25914
25915 * src/thread.c (run_thread): Don’t assume void * is aligned enough.
25916
259172016-12-23 Eli Zaretskii <eliz@gnu.org>
25918
25919 Attempt to fix 64-bit AIX build
25920
25921 * src/unexaix.c (make_hdr, copy_text_and_data, write_segment): Fix
25922 type-casts that assumed 32-bit pointers. (Bug#25141)
25923
259242016-12-23 Philipp Stephani <phst@google.com>
25925
25926 Clarify usage of 'ediff-cleanup-hook' (Bug#24675)
25927
25928 * doc/misc/ediff.texi (Hooks): Clarify usage of 'ediff-cleanup-hook'
25929
259302016-12-23 Philipp Stephani <phst@google.com>
25931
25932 Document that variable binding order is unspecified
25933
25934 * doc/lispref/variables.texi (Local Variables):
25935 * cl.texi (Modify Macros): Document that binding order in 'let' and
25936 'cl-letf' is unspecified.
25937
259382016-12-23 Eli Zaretskii <eliz@gnu.org>
25939
25940 Prevent infloops in redisplay due to truncate-lines and overlays
25941
25942 * src/xdisp.c (hscroll_window_tree): Avoid inflooping in
25943 redisplay_window when a screen line ends in an overlay string with
25944 a newline. (Bug#25246)
25945
259462016-12-23 Philipp Stephani <phst@google.com>
25947
25948 Treat incomplete integer literals as errors
25949
25950 See Bug#25120.
25951
25952 * src/lread.c (read_integer): Treat incomplete integer literals as errors.
25953 * test/src/lread-tests.el (lread-empty-int-literal): New unit test for
25954 incomplete integer literals.
25955
259562016-12-23 Eli Zaretskii <eliz@gnu.org>
25957
25958 * lisp/desktop.el (desktop-buffers-not-to-save): Doc fix.
25959
259602016-12-23 Stefan Monnier <monnier@IRO.UMontreal.CA>
25961
25962 Fix M-x hints on Mac port
25963
25964 * lisp/simple.el (execute-extended-command--shorter): Call
25965 input-pending-p to trigger input processing on some systems, such
25966 as Mac port. (Bug#23002)
25967
259682016-12-23 Michael Albinus <michael.albinus@gmx.de>
25969
25970 * test/lisp/net/tramp-tests.el (tramp--test-check-files): Make it robust.
25971
259722016-12-23 Eli Zaretskii <eliz@gnu.org>
25973
25974 Avoid aborts due to unaligned byte stack of threads
25975
25976 * src/thread.c (run_thread): Make sure the pointers to thread byte
25977 stack are properly aligned. (Bug#25247)
25978
259792016-12-22 Paul Eggert <eggert@cs.ucla.edu>
25980
25981 Pacify --enable-gcc-warnings
25982
25983 * src/charset.c (load_charset_map):
25984 * src/coding.c (decode_coding_object):
25985 * src/frame.c (make_frame):
25986 * src/window.c (Frecenter):
25987 Mark locals with UNINIT to silence false alarms from
25988 -Wmaybe-uninitialized.
25989 * src/lisp.h (SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD)
25990 (SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD):
25991 Check and assume that values are nonnull. This pacifies
25992 -Wmaybe-uninitialized in Fmake_variable_buffer_local and
25993 Fmake_local_variable.
25994
259952016-12-22 Eli Zaretskii <eliz@gnu.org>
25996
25997 Fix last change with thread marking under GC_CHECK_MARKED_OBJECTS
25998
25999 * src/thread.c (primary_thread_p): New function.
26000 * src/alloc.c (mark_object): Use 'primary_thread_p' to bypass tests
26001 meant for thread objects allocated dynamically.
26002 * src/thread.h (primary_thread_p): Add prototype.
26003
260042016-12-22 Martin Rudalics <rudalics@gmx.at>
26005
26006 Work around reporting a dpi change in apply_xft_settings
26007
26008 * src/xsettings.c (apply_xft_settings): Don't report a change
26009 when dpi settings do not differ substantially.
26010
260112016-12-22 Noam Postavsky <npostavs@gmail.com>
26012
26013 Use completion-at-point in verilog-mode
26014
26015 There were some functions in verilog-mode that implemented in-buffer
26016 completion, but this needlessly duplicates completion-at-point
26017 functionality, and the popup window management had problems
26018 (see Bug #23842). We need to keep them for backwards compatibility with
26019 older emacs versions, but use completion-at-point if available.
26020
26021 * lisp/progmodes/verilog-mode.el (verilog-toggle-completions): Mark as
26022 obsolete if completion-cycle-threshold is available.
26023 (verilog-mode-map, verilog-menu): Bind completion-at-point and
26024 completion-help-at-point in preference to verilog-complete-word and
26025 verilog-show-completions, respectively.
26026 (verilog-mode): Add verilog-completion-at-point to
26027 completion-at-point-functions.
26028 (verilog-completion-at-point): New function.
26029 (verilog-show-completions, verilog-complete-word): Use it to avoid code
26030 duplication.
26031
260322016-12-21 Reuben Thomas <rrt@sc3d.org>
26033
26034 Keep default CASECHARS/NOT-CASECHARS for ispell built-in dictionaries
26035
26036 * lisp/textmodes/ispell.el (ispell-set-spellchecker-params): Do not
26037 override CASECHARS and NOT-CASECHARS. The ispell dictionaries
26038 retain their hardwired values, and all other dictionaries are given
26039 sensible defaults.
26040
260412016-12-21 Stefan Monnier <monnier@iro.umontreal.ca>
26042
26043 * tex-mode.el (tex-compile-commands): Add luatex and xetex commands
26044
260452016-12-21 Eli Zaretskii <eliz@gnu.org>
26046
26047 Fix aborts in GC under GC_CHECK_MARKED_OBJECTS
26048
26049 * src/alloc.c (mark_object) [GC_CHECK_MARKED_OBJECTS]: Don't abort
26050 for thread objects. They are marked via the all_threads list, and
26051 therefore don't need to be inserted into the red-black tree, so
26052 mem_find will never find them. Reported by Daniel Colascione
26053 <dancol@dancol.org> in
26054 http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00817.html.
26055
260562016-12-21 Stefan Monnier <monnier@iro.umontreal.ca>
26057
26058 * src/data.c (Fmake_variable_frame_local): Remove
26059
26060 * src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'.
26061
26062 * src/data.c (swap_in_symval_forwarding, set_internal)
26063 (set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local)
26064 (Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
26065 Don't pay attention to ->frame_local any more.
26066 (syms_of_data): Remove Qtrapping_frame_local and don't defsubr
26067 Smake_variable_frame_local.
26068
26069 * etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal
26070 of make-variable-frame-local.
26071
26072 * lisp/help-fns.el (describe-variable): Don't handle the now impossible
26073 frame-local case.
26074
26075 * lisp/subr.el (make-variable-frame-local): Remove obsolescence data.
26076
26077 * src/frame.c (store_frame_param):
26078 * src/eval.c (specbind): Don't pay attention to ->frame_local any more.
26079
26080 * src/widget.c (first_frame_p): Remove, unused.
26081
260822016-12-21 Paul Eggert <eggert@cs.ucla.edu>
26083
26084 Port dumping better to WSL
26085
26086 Problem reported by Angelo Graziosi in:
26087 http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00822.html
26088 * src/sysdep.c (disable_address_randomization):
26089 Detect buggy platforms where 'personality' always returns 0.
26090
260912016-12-21 Michael Albinus <michael.albinus@gmx.de>
26092
26093 Remove gateway methods in Tramp
26094
26095 * doc/misc/tramp.texi (Top, Configuration): Remove section
26096 `Gateway methods', insert section `Firewalls' in menu.
26097 (History): Gateways are removed now.
26098 (Gateway methods): Remove section.
26099 (Multi-hops, Traces and Profiles): Don't reference to gateways anymore.
26100 (Firewalls): New section.
26101
26102 * etc/NEWS: Gateway methods in Tramp have been removed.
26103
26104 * lisp/net/tramp.el (tramp-methods): Adapt docstring.
26105 (tramp-file-name-port, tramp-accept-process-output): Simplify.
26106
26107 * lisp/net/tramp-gw.el: Remove.
26108
26109 * lisp/net/tramp-sh.el (tramp-gw-tunnel-method)
26110 (tramp-gw-socks-method): Remove declarations.
26111 (tramp-methods) <scp, scpx, ssh, sshx, telnet, nc, plink, pscp>:
26112 Remove `tramp-gw-args' and `tramp-default-port'. (Bug#18967)
26113 (tramp-do-copy-or-rename-file-out-of-band)
26114 (tramp-compute-multi-hops, tramp-maybe-open-connection):
26115 Remove gateway support.
26116
26117 * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
26118 Remove gateway tests.
26119
261202016-12-20 Alan Mackenzie <acm@muc.de>
26121
26122 Amend the version number of CC Mode 5.33 -> 5.32.99. Don't merge to trunk.
26123
26124 lisp/progmodes/cc-defs.el: Amend the version number.
26125 etc/NEWS: Add an item explaining the change.
26126
261272016-12-20 Tino Calancha <tino.calancha@gmail.com>
26128
26129 files-test-read-file-in-: Delete temporary dir on exit
26130
26131 * test/lisp/files-tests.el (files-test-read-file-in-~):
26132 Create subdir inside dir.
26133
261342016-12-20 Christopher Genovese <genovese@cmu.edu>
26135
26136 ibuffer: New filters and commands
26137
26138 Add several new filters and improve documentation.
26139 See discussion on:
26140 https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00399.html
26141 * lisp/ibuf-ext.el: Add paragraph to file commentary.
26142 (ibuffer-saved-filters, ibuffer-filtering-qualifiers)
26143 (ibuffer-filter-groups): Update doc string.
26144 (ibuffer-unary-operand): Add new function that transparently
26145 handles 'not' formats for compound filters.
26146 (ibuffer-included-in-filter-p): Handle 'not' fully; update doc string.
26147 (ibuffer-included-in-filter-p-1): Handle 'and' compound filters.
26148 (ibuffer-decompose-filter): Handle 'and' as well,
26149 and handle 'not' consistently with other uses.
26150 (ibuffer-and-filter): New defun analogous to 'ibuffer-or-filter'.
26151 (ibuffer--or-and-filter): New defun.
26152 (ibuffer-or-filter, ibuffer-and-filter): Use it.
26153 (ibuffer-format-qualifier): Handle 'and' filters as well.
26154 (ibuffer-filter-by-basename, ibuffer-filter-by-file-extension)
26155 (ibuffer-filter-by-directory, ibuffer-filter-by-starred-name)
26156 (ibuffer-filter-by-modified, ibuffer-filter-by-visiting-file):
26157 Add new pre-defined filters.
26158 (ibuffer-filter-chosen-by-completion): Add new interactive command
26159 for easily choosing a filter from the descriptions.
26160 * lisp/ibuffer.el (ibuffer-mode-map):
26161 Bind ibuffer-filter-by-basename, ibuffer-filter-by-file-extension,
26162 ibuffer-filter-by-starred-name, ibuffer-filter-by-modified,
26163 ibuffer-filter-by-visiting-file to '/b', '/.', '/*', '/i', '/v'
26164 respectively; bind 'ibuffer-or-filter', 'ibuffer-and-filter',
26165 'ibuffer-pop-filter' ,'ibuffer-pop-filter-group' and
26166 'ibuffer-filter-disable' to '/|', '/&', '/<up>', '/S-<up>'
26167 and '/ DEL' respectively.
26168 * test/lisp/ibuffer-tests.el (ibuffer-autoload): Add appropriate
26169 skip specification.
26170 Add menu entries for the new filters.
26171 (ibuffer-filter-inclusion-1, ibuffer-filter-inclusion-2
26172 ibuffer-filter-inclusion-3, ibuffer-filter-inclusion-4
26173 ibuffer-filter-inclusion-5, ibuffer-filter-inclusion-6
26174 ibuffer-filter-inclusion-7, ibuffer-filter-inclusion-8
26175 ibuffer-decompose-filter, ibuffer-and-filter
26176 ibuffer-or-filter): Add new tests; they are skipped unless
26177 ibuf-ext is loaded.
26178
261792016-12-20 Mark Oteiza <mvoteiza@udel.edu>
26180
26181 Update NEWS
26182
26183 * etc/NEWS (Image-Dired): New section.
26184
261852016-12-20 Mark Oteiza <mvoteiza@udel.edu>
26186
26187 Recognize graphicsmagick in image-dired
26188
26189 * lisp/image-dired.el (image-dired-cmd-create-thumbnail-program):
26190 (image-dired-cmd-create-thumbnail-options):
26191 (image-dired-cmd-create-temp-image-program):
26192 (image-dired-cmd-create-temp-image-options):
26193 (image-dired-cmd-create-standard-thumbnail-options):
26194 (image-dired-cmd-rotate-thumbnail-program):
26195 (image-dired-cmd-rotate-thumbnail-options): Account for existence of
26196 gm(1) executable.
26197
261982016-12-20 Noam Postavsky <npostavs@gmail.com>
26199
26200 Improve skeleton docstrings
26201
26202 * lisp/skeleton.el (skeleton-end-newline): Remove mention of
26203 `skeleton-end-hook', its default code was moved into `skeleton-insert'.
26204 (skeleton-insert): Mention `skeleton-end-newline' and move reference to
26205 `skeleton-end-hook' above the explanation of skeleton syntax.
26206
262072016-12-20 Mark Oteiza <mvoteiza@udel.edu>
26208
26209 Implement asynchronous thumbnail generation in image-dired
26210
26211 Additionally, all FOO-options defcustoms that were in fact shell command
26212 strings have been converted to argument lists. Another method for
26213 shrinking PNG thumbs with optipng(1) has been added.
26214 * lisp/image-dired.el: Remove TODO item in commentary.
26215 (image-dired-cmd-create-thumbnail-options):
26216 (image-dired-cmd-create-temp-image-options):
26217 (image-dired-cmd-rotate-thumbnail-options):
26218 (image-dired-cmd-rotate-original-options):
26219 (image-dired-cmd-write-exif-data-options):
26220 (image-dired-cmd-read-exif-data-options): Convert to argument lists.
26221 (image-dired-cmd-pngnq-program, image-dired-cmd-pngcrush-program):
26222 Change string type to file.
26223 (image-dired-cmd-create-standard-thumbnail-command): Remove.
26224 (image-dired-cmd-pngnq-options):
26225 (image-dired-cmd-create-standard-thumbnail-options):
26226 (image-dired-cmd-optipng-program, image-dired-cmd-optipng-options):
26227 New defcustoms.
26228 (image-dired-queue, image-dired-queue-active-jobs):
26229 (image-dired-queue-active-limit): New variables.
26230 (image-dired-pngnq-thumb, image-dired-pngcrush-thumb):
26231 (image-dired-optipng-thumb): New functions.
26232 (image-dired-create-thumb-1): Renamed from image-dired-create-thumb.
26233 Use start-process instead of call-process. Set file modes. Trigger
26234 PNG file optimization in process sentinel.
26235 (image-dired-thumb-queue-run, image-dired-create-thumb): New functions.
26236 (image-dired-display-thumbs):
26237 (image-dired-create-thumbs): Don't expect call-process return value.
26238 (image-dired-display-image, image-dired-rotate-thumbnail): Use
26239 start-process instead of call-process.
26240 (image-dired-rotate-original, image-dired-set-exif-data):
26241 (image-dired-get-exif-data): Adapt to arguments being an arg list.
26242
262432016-12-19 Andreas Schwab <schwab@linux-m68k.org>
26244
26245 Protect change of window's buffer in vertical-motion against unwinds (bug#25209)
26246
26247 * indent.c (restore_window_buffer): New function.
26248 (Fvertical_motion): Use it to restore window's buffer.
26249
262502016-12-19 Glenn Morris <rgm@gnu.org>
26251
26252 Improve default load-path for uninstalled CANNOT_DUMP builds
26253
26254 * src/lread.c (load_path_default) [CANNOT_DUMP]:
26255 Use build load-path if we seem to be running uninstalled. (Bug#24974)
26256 I think this became an issue several years ago when we stopped
26257 using EMACSLOADPATH in the Makefiles; however this change should
26258 improve the CANNOT_DUMP uninstalled case in general.
26259
262602016-12-19 Eli Zaretskii <eliz@gnu.org>
26261
26262 Improve documentation of 'w32-scroll-lock-modifier'
26263
26264 * doc/emacs/msdos.texi (Windows Keyboard): Document how to set up
26265 w32-scroll-lock-modifier so that Scroll Lock toggles the LED.
26266
26267 * src/w32fns.c (syms_of_w32fns) <w32-scroll-lock-modifier>: Doc
26268 fix. (Bug#25204)
26269
262702016-12-19 Eli Zaretskii <eliz@gnu.org>
26271
26272 Document 'describe-fontset'
26273
26274 * doc/emacs/mule.texi (Fontsets): Document 'describe-fontset'.
26275 (Bug#25216)
26276
262772016-12-19 Eli Zaretskii <eliz@gnu.org>
26278
26279 Document 'describe-fontset'
26280
26281 * doc/emacs/mule.texi (Fontsets): Document 'describe-fontset'.
26282 (Bug#25216)
26283
262842016-12-19 Eli Zaretskii <eliz@gnu.org>
26285
26286 Fix crashes upon C-g on Posix TTY frames
26287
26288 * src/thread.h (struct thread_state): New member not_holding_lock.
26289 (maybe_reacquire_global_lock): Add prototype.
26290 * src/thread.c: Include syssignal.h.
26291 (maybe_reacquire_global_lock): New function.
26292 (really_call_select): Set the not_holding_lock member of the
26293 thread state before releasing the lock, and rest it after
26294 re-acquiring the lock when the select function returns. Block
26295 SIGINT while doing this to make sure we are not interrupted on TTY
26296 frames.
26297 * src/sysdep.c (block_interrupt_signal, restore_signal_mask): New
26298 functions.
26299 * src/syssignal.h (block_interrupt_signal, restore_signal_mask):
26300 Add prototypes.
26301 * src/keyboard.c (read_char) [THREADS_ENABLED]: Call
26302 maybe_reacquire_global_lock. (Bug#25178)
26303
263042016-12-19 Sam Steingold <sds@gnu.org>
26305
26306 avoid Eager macro-expansion failure: (void-function string-to-list)
26307
26308 * loadup.el [ns]: "ucs-normalize" uses `string-to-list' which is defined
26309 in "mule-util", so we have to load "mule-util" before "ucs-normalize",
26310 otherwise I get "Eager macro-expansion failure" on "make bootstrap"
26311
263122016-12-19 Michael Albinus <michael.albinus@gmx.de>
26313
26314 Fix Bug#24980
26315
26316 * lisp/ido.el (ido-add-virtual-buffers-to-list):
26317 Suppress Tramp invocation. (Bug#24980)
26318
263192016-12-18 Philipp Stephani <phst@google.com>
26320
26321 Add a new compile error regexp for Clang includes
26322
26323 Clang uses a slight variation of GCC's include format, causing includes
26324 to be treated as warnings instead of informational messages. Use a new
26325 regular expression instead.
26326
26327 * lisp/progmodes/compile.el
26328 (compilation-error-regexp-alist-alist): New element
26329 `clang-include' for Clang-style "included from" lines.
26330 * test/lisp/progmodes/compile-tests.el
26331 (compile-tests--test-regexps-data): Add unit test.
26332
263332016-12-18 Alan Third <alan@idiocy.org>
26334
26335 Reinstate ispell character offset (bug#25219)
26336
26337 * lisp/textmodes/ispell.el (ispell-process-line): insert -1 where
26338 ispell-offset used to be.
26339
263402016-12-18 Mark Oteiza <mvoteiza@udel.edu>
26341
26342 Bind new image-mode scroll commands in image-dired
26343
26344 * lisp/image-dired.el (image-dired-display-image-mode-map): Add bindings
26345 to new image-mode commands.
26346
263472016-12-18 Noam Postavsky <npostavs@gmail.com>
26348
26349 Fix rx-any with range with ?\] and ?-
26350
26351 * lisp/emacs-lisp/rx.el: Make sure not to produce a circular
26352 list (Bug#25123).
26353 * test/lisp/emacs-lisp/rx-tests.el (rx-char-any): New test.
26354
263552016-12-18 Mark Oteiza <mvoteiza@udel.edu>
26356
26357 Use floor of mtime instead of rounding for thumb property
26358
26359 This seems to be the correct thing to do, at least more in line with
26360 what at least one other implementation does. Anything using
26361 gnome-desktop [0] effectively does the same, as
26362 gnome_desktop_thumbnail_is_valid applies atol(3) to mtime for
26363 comparison and time_t on GNU/Linux is a signed int.
26364 [0] https://git.gnome.org/browse/gnome-desktop/
26365 * lisp/image-dired.el (image-dired-create-thumb): Use floor here.
26366
263672016-12-17 Reuben Thomas <rrt@sc3d.org>
26368
26369 Fix spelling mistake in private defun name (Bug#25218)
26370
26371 lisp/textmodes/flyspell.el (flyspell-ajust-cursor-point): Rename to
26372 `flyspell-adjust-cursor-point'.
26373
263742016-12-17 Reuben Thomas <rrt@sc3d.org>
26375
26376 Remove XEmacs support from flyspell.el (Bug#25218)
26377
26378 lisp/textmodes/flyspell.el (flyspell-prog-mode, flyspell-mode-on):
26379 (flyspell-word, flyspell-delete-region-overlays):
26380 (flyspell-correct-word-before-point): Remove XEmacs support.
26381 (flyspell-xemacs-popup): Remove XEmacs-specific defun.
26382
263832016-12-17 Michael Albinus <michael.albinus@gmx.de>
26384
26385 More tests for Tramp
26386
26387 * lisp/net/tramp.el (tramp-drop-volume-letter): Handle quoted
26388 file names.
26389
26390 * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): Quote file
26391 name properly.
26392
26393 * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name):
26394 Mark quoted file name as absolute. (Bug#25183)
26395 (tramp--test-windows-nt-and-batch)
26396 (tramp--test-windows-nt-and-pscp-psftp-p): New defuns.
26397 (tramp--test-windows-nt-or-smb-p): Rename from
26398 `tramp--test-smb-windows-nt-p'. Adapt callees.
26399 (tramp--test-check-files): Improve checks for environment variables.
26400 (tramp-test33-special-characters)
26401 (tramp-test33-special-characters-with-stat)
26402 (tramp-test33-special-characters-with-perl)
26403 (tramp-test33-special-characters-with-ls, tramp-test34-utf8)
26404 (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
26405 (tramp-test34-utf8-with-ls): Add more checks for skip.
26406
264072016-12-17 Eli Zaretskii <eliz@gnu.org>
26408
26409 Fix comments
26410
26411 * src/thread.h (struct thread_state): Fix comments.
26412 * src/process.c (wait_reading_process_output): Fix a typo in
26413 commentary.
26414
264152016-12-17 Eli Zaretskii <eliz@gnu.org>
26416
26417 Repair desktop restoration on text terminals
26418
26419 * lisp/desktop.el (desktop-restoring-frameset-p): Test for the GUI
26420 frame here, instead of in desktop-restoring-frameset. That's
26421 because desktop-read wants to know whether frameset will actually
26422 be restored, and has fallback procedures up its sleeve when it
26423 won't be; these fallbacks need to be invoked when the frameset is
26424 not going to be restored. (Bug#24298)
26425
264262016-12-17 Eli Zaretskii <eliz@gnu.org>
26427
26428 Fix crashes on MS-Windows during dumping
26429
26430 * src/unexw32.c (get_section_info): Make extra_bss_size be the
26431 maximum of extra_bss_size and extra_bss_size_static. This avoids
26432 computing the size of the output file smaller than it actually
26433 needs to be, which then causes copy_executable_and_dump_data to
26434 write beyond the requested size of the file mapping, thus relying
26435 on the OS roundup to page boundary to save us from ourselves. See
26436 http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00642.html
26437 for the details.
26438
26439 * lib/stdio-impl.h: Revert the workaround fix of not including
26440 errno.h for MinGW.
26441
264422016-12-17 Dmitry Gutov <dgutov@yandex.ru>
26443
26444 Ignore forward-sexp-function in js-mode indentation code
26445
26446 * lisp/progmodes/js.el (js--multi-line-declaration-indentation)
26447 (js--maybe-goto-declaration-keyword-end):
26448 Bind forward-sexp-function to nil (bug#25215).
26449
264502016-12-16 Mark Oteiza <mvoteiza@udel.edu>
26451
26452 Be more selective clearing the image cache
26453
26454 * lisp/image-dired.el (image-dired-create-thumbs):
26455 (image-dired-rotate-thumbnail, image-dired-refresh-thumb): Only clear
26456 the current thumbnail file from the image cache.
26457
264582016-12-16 Eli Zaretskii <eliz@gnu.org>
26459
26460 Unbreak the MinGW build
26461
26462 * lib/stdio-impl.h [__MINGW32__]: Don't include errno.h. Without
26463 this, temacs crashes while dumping.
26464
264652016-12-16 Nicolas Petton <nicolas@petton.fr>
26466
26467 Make seq-into return the sequence when no conversion needed
26468
26469 * lisp/emacs-lisp/seq.el (seq-into): Do not convert the sequence when
26470 no conversion is needed.
26471 * test/lisp/emacs-lisp/seq-tests.el (test-seq-into-and-identity): Add
26472 a regression test checking for identity.
26473
264742016-12-16 Eli Zaretskii <eliz@gnu.org>
26475
26476 Improve documentation of 'define-coding-system'
26477
26478 * lisp/international/mule.el (define-coding-system): Warn against
26479 possible infinite recursion in pre-write-conversion and
26480 post-read-conversion functions. (Bug#25203)
26481
264822016-12-16 Mark Oteiza <mvoteiza@udel.edu>
26483
26484 New commands image-scroll-left and image-scroll-right
26485
26486 * etc/NEWS: Mention them.
26487 * lisp/image-mode.el (image-scroll-left, image-scroll-right): New
26488 functions.
26489
264902016-12-16 Mark Oteiza <mvoteiza@udel.edu>
26491
26492 More image-dired refactoring
26493
26494 * lisp/image-dired.el (image-dired-thumbnail-mode):
26495 (image-dired-display-image-mode): Add :group 'image-dired so
26496 customize-mode works.
26497 (image-dired-display-image): Rearrange.
26498 (image-dired-copy-with-exif-file-name): This map is for side effect.
26499 (image-dired-dired-edit-comment-and-tags): Just use #'identity.
26500
265012016-12-16 Mark Oteiza <mvoteiza@udel.edu>
26502
26503 * lisp/image-dired.el: Turn on lexical-binding.
26504
265052016-12-16 Mark Oteiza <mvoteiza@udel.edu>
26506
26507 Teach image-dired to also generate large thumbs
26508
26509 * lisp/image-dired.el (image-dired-thumbnail-storage): Add
26510 standard-large option.
26511 (image-dired-thumb-size): Add condition for standard-large storage.
26512 (image-dired-insert-thumbnail): Check for new option. Change
26513 thumbnail path conditionally.
26514 (image-dired-thumb-size): New function.
26515 (image-dired-create-thumb, image-dired-line-up-dynamic): Use it.
26516
265172016-12-15 Paul Eggert <eggert@cs.ucla.edu>
26518
26519 Merge from gnulib
26520
26521 This incorporates:
26522 2016-12-14 xalloc-oversized: check for PTRDIFF_MAX too
26523 2016-12-12 fpending: port to native Windows with MSVC
26524 * .gitignore: Do not ignore lib/stdio-impl.h.
26525 * lib/fpending.c, lib/xalloc-oversized.h, m4/fpending.m4:
26526 Copy from gnulib.
26527 * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
26528 * lib/stdio-impl.h:
26529 New file, copied from gnulib.
26530 * nt/gnulib.mk (EXTRA_DIST): Add stdio-impl.h.
26531
265322016-12-15 Paul Eggert <eggert@cs.ucla.edu>
26533
26534 * emacs-document.svg: Append newline.
26535
265362016-12-15 Mark Oteiza <mvoteiza@udel.edu>
26537
26538 Don't abuse princ and spam messages
26539
26540 * lisp/image-dired.el (image-dired-format-properties-string): Nix princ.
26541 (image-dired-display-thumb-properties):
26542 (image-dired-dired-display-properties): Nix princ. Bind
26543 message-log-max to nil.
26544
265452016-12-15 Mark Oteiza <mvoteiza@udel.edu>
26546
26547 Inherit things from special-mode and image-mode
26548
26549 * lisp/image-dired.el: Require image-mode library.
26550 (image-dired-thumbnail-mode-map): Remove superfluous binding.
26551 (image-dired-display-image-mode-map): Remove superfluous binding.
26552 Add movement remaps from image-mode-map.
26553 (image-dired-thumbnail-mode): Derive from special-mode.
26554 (image-dired-display-image-mode): Derive from special-mode. Call
26555 image-mode-setup-winprops.
26556
265572016-12-15 Mark Oteiza <mvoteiza@udel.edu>
26558
26559 Fix some image-dired customization types
26560
26561 * lisp/image-dired.el (image-dired): Add info link to defgroup.
26562 (image-dired-dir, image-dired-gallery-dir): Set type to directory.
26563 (image-dired-db-file, image-dired-temp-image-file):
26564 (image-dired-cmd-create-thumbnail-program):
26565 (image-dired-cmd-create-temp-image-program):
26566 (image-dired-cmd-rotate-thumbnail-program):
26567 (image-dired-cmd-rotate-original-program):
26568 (image-dired-temp-rotate-image-file):
26569 (image-dired-cmd-write-exif-data-program):
26570 (image-dired-cmd-read-exif-data-program): Set type to file.
26571 (image-dired-create-thumb, image-dired-line-up-dynamic): Check storage
26572 type at runtime, since setting image-dired-thumb-size does not
26573 automatically set image-dired-thumb-width and image-dired-thumb-height.
26574
265752016-12-15 Eli Zaretskii <eliz@gnu.org>
26576
26577 Prevent crashes in xg_select due to concurrency
26578
26579 * src/xgselect.c (xg_select): Don't call Glib functions that use
26580 'context' if we failed to acquire it. This means some other
26581 thread owns the context, in which case both using the context and
26582 calling block_input/unblock_input will step on that thread's toes
26583 and eventually lead to crashes. (Bug#25172)
26584
265852016-12-15 Nicolas Petton <nicolas@petton.fr>
26586
26587 Fix circular list handling in seq-mapn
26588
26589 * lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments.
26590 * test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists):
26591 Add a regression test.
26592
265932016-12-15 Michael Albinus <michael.albinus@gmx.de>
26594
26595 Check in tramp-tests.el, that environment variables are set correctly
26596
26597 * test/lisp/net/tramp-tests.el (tramp--test-check-files):
26598 Check also, that environment variables are set correctly.
26599
266002016-12-15 Dominique Quatravaux <dominique.quatravaux@epfl.ch> (tiny change)
26601
26602 Protect environment variables with double quotes in Tramp
26603
26604 * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
26605 Protect environment variables with double quotes.
26606
266072016-12-15 Tino Calancha <tino.calancha@gmail.com>
26608
26609 * lisp/ibuf-macs.el (define-ibuffer-filter): Wrap ,@body in a progn.
26610
266112016-12-15 Mark Oteiza <mvoteiza@udel.edu>
26612
26613 * lisp/image-dired.el (image-dired-create-thumb): Create parent directories.
26614
266152016-12-14 Mark Oteiza <mvoteiza@udel.edu>
26616
26617 * lisp/image-mode.el (image-mode-winprops-alist): Add docstring.
26618
266192016-12-14 Mark Oteiza <mvoteiza@udel.edu>
26620
26621 Recognize pngnq or pngnq-s9
26622
26623 * lisp/image-dired.el (image-dired-cmd-pngnq-program): Also consider
26624 pngnq-s9 as a possible executable.
26625
266262016-12-14 Mark Oteiza <mvoteiza@udel.edu>
26627
26628 Update standard image-dired thumbnail location
26629
26630 * lisp/image-dired.el (image-dired-thumb-name): Conform to the latest
26631 standard: consider XDG_CACHE_HOME, falling back on ~/.cache.
26632
266332016-12-14 Mark Oteiza <mvoteiza@udel.edu>
26634
26635 Reset window scroll when displaying an image
26636
26637 When viewing a large image full size and scrolling, for instance, to
26638 the lower right corner, then selecting a much smaller image in the
26639 thumbnail buffer, the window stays scrolled so the new image is out of
26640 the window. One must scroll back to the "origin" to view the new
26641 displayed image, or just kill the image-dired-display-image buffer and
26642 try again. This fixes the issue.
26643 * lisp/image-dired.el (image-dired-display-window-width):
26644 (image-dired-display-window-height): Operate on a window as argument.
26645 (image-dired-display-image): Bind (image-dired-display-window) and use
26646 it. Set window vscroll and hscroll to zero when refreshing the
26647 buffer's contents.
26648
266492016-12-14 Mark Oteiza <mvoteiza@udel.edu>
26650
26651 More image-dired polish
26652
26653 * lisp/image-dired.el (image-dired-file-name-at-point): New function.
26654 (image-dired-thumbnail-mode, image-dired-display-image-mode): Disable
26655 undo list. Add image-dired-file-name-at-point to
26656 file-name-at-point-functions to facilitate find-file and friends.
26657 (image-dired-thumbnail-display-external):
26658 (image-dired-dired-display-external): Use start-process instead, to
26659 avoid needlessly blocking and using a shell.
26660
266612016-12-13 Phillip Lord <phillip.lord@russet.org.uk>
26662
26663 Replace ldefs-boot with a much smaller file
26664
26665 * Makefile.in (bootstrap-build,generate-ldefs-boot): New targets.
26666 (bootstrap): Depend on bootstrap-build.
26667 * admin/ldefs-clean.el: New file.
26668 * lisp/Makefile.in (compile-first): Depend on loaddefs.el
26669 * lisp/ldefs-boot.el: Remove.
26670 * lisp/ldefs-boot-auto.el: New file.
26671 * lisp/ldefs-boot-manual.el: New file.
26672 * lisp/loadup.el: Load ldefs-boot-manual.el.
26673 * src/emacs.c (generating_ldefs_boot): New variable.
26674 (main): Check whether we are generating ldefs.
26675 * src/eval.c (autoload-do-load): Dump autoload forms to stderr when
26676 requested.
26677 * src/lisp.h (generating_ldefs_boot): New variable.
26678 * admin/gitmerge.el, admin/make-tarball.txt, admin/notes/copyright,
26679 lisp/Makefile.in, lisp/cus-dep.el, lisp/emacs-lisp/elint.el,
26680 lisp/finder.el, lisp/loadup.el, msdos/mainmake.v2: Update reference to
26681 ldefs-boot.
26682 * admin/update_autogen: Alter mechanism for ldefs-boot generation.
26683
266842016-12-13 Reuben Thomas <rrt@sc3d.org>
26685
26686 Remove support for aspell < 0.60 (from 2004)
26687
26688 lisp/textmodes/ispell.el (ispell-check-version): Require Aspell 0.60.
26689 (ispell-aspell-dictionary-alist): Remove check that we have Aspell 0.60.
26690
266912016-12-13 Reuben Thomas <rrt@sc3d.org>
26692
26693 Minor docstring and comment fixes to ispell.el
26694
26695 lisp/textmodes/ispell.el (ispell-aspell-dictionary-alist): Mention
26696 ispell-aspell-dictionary-alist, not ispell-dictionary-alist.
26697 (ispell-set-spellchecker-params): Change double-single quotes to
26698 single single quotes in comment.
26699
267002016-12-13 Reuben Thomas <rrt@sc3d.org>
26701
26702 Remove unused variable
26703
26704 * lisp/textmodes/ispell.el (current-ispell-directory): Remove.
26705
267062016-12-13 Reuben Thomas <rrt@sc3d.org>
26707
26708 Remove XEmacs-specific ispell-with-no-warnings
26709
26710 * lisp/textmodes/ispell.el (ispell-with-no-warnings): Remove this
26711 defmacro, needed only for XEmacs.
26712 (ispell-command-loop, ispell-message): Use with-no-warnings directly.
26713
267142016-12-13 Reuben Thomas <rrt@sc3d.org>
26715
26716 Remove meaningless defconst ispell-version
26717
26718 * lisp/textmodes/ispell.el (ispell-version): Since ispell.el is now
26719 firmly part of Emacs, and the version hasn’t changed since 2003, and
26720 isn’t used anywhere, remove it. 3rd-party code can better use the
26721 Emacs version, or feature or function checks.
26722 (ispell-check-version): No longer report ispell.el version.
26723
267242016-12-13 Reuben Thomas <rrt@sc3d.org>
26725
26726 Remove boundp test for always-bound symbol
26727
26728 * lisp/textmodes/ispell.el (ispell-message): mail-yank-prefix is
26729 defvar’d at the top of the file, so remove a test to see if it is
26730 bound.
26731
267322016-12-13 Reuben Thomas <rrt@sc3d.org>
26733
26734 Remove support for ispell < 3.1.12
26735
26736 * lisp/textmodes/ispell.el (ispell-offset): Remove.
26737 (ispell-check-version): Require ispell >= 3.1.12, released in 1994.
26738 (ispell-process-line): No longer use ispell-offset.
26739
267402016-12-13 Reuben Thomas <rrt@sc3d.org>
26741
26742 Remove unused constant
26743
26744 * lisp/textmodes/ispell.el (ispell-required-version): Remove.
26745
267462016-12-13 Reuben Thomas <rrt@sc3d.org>
26747
26748 Remove support for old versions of supercite and GNUS from ispell.el
26749
26750 * lisp/textmodes/ispell.el (ispell-message): Require supercite >= 3.0
26751 and GNUS >= 5. Not exactly the bleeding edge!
26752
267532016-12-13 Reuben Thomas <rrt@sc3d.org>
26754
26755 Remove remaining mentions of XEmacs from ispell.el
26756
26757 * lisp/textmodes/ispell.el (ispell-valid-dictionary-list):
26758 (ispell-add-per-file-word-list): Remove mentions of XEmacs from
26759 comments.
26760
267612016-12-13 Reuben Thomas <rrt@sc3d.org>
26762
26763 Remove XEmacs-specific minibuffer handling code from ispell.el
26764
26765 * lisp/textmodes/ispell.el (ispell-init-process): Assume we are not in
26766 XEmacs.
26767
267682016-12-13 Reuben Thomas <rrt@sc3d.org>
26769
26770 Remove XEmacs-specific horizontal scrollbar handling in ispell.el
26771
26772 * lisp/textmodes/ispell.el (ispell-command-loop): Remove
26773 XEmacs-specific code.
26774
267752016-12-13 Reuben Thomas <rrt@sc3d.org>
26776
26777 Remove XEmacs-specific code dealing with enable-multibyte-characters
26778
26779 * lisp/textmodes/ispell.el (ispell-decode-string):
26780 (ispell-init-process): Remove XEmacs-specific guard.
26781
267822016-12-13 Reuben Thomas <rrt@sc3d.org>
26783
26784 Remove XEmacs-specific code from ispell.el
26785
26786 * lisp/textmodes/ispell.el (ispell-menu-xemacs): Remove
26787 (ispell-menu-map-needed): Remove XEmacs-specific check.
26788 (ispell-word): Remove XEmacs-specific extent code.
26789 (ispell-init-process): Remove XEmacs workaround for local add-hook.
26790 Assume we have set-process-query-on-exit-flag.
26791 (ispell-kill-ispell, ispell-change-dictionary): Remove XEmacs
26792 workaround for called-interactively-p.
26793
267942016-12-13 Reuben Thomas <rrt@sc3d.org>
26795
26796 Remove some commented-out code
26797
26798 lisp/textmodes/ispell.el (ispell-process)
26799 ispell-valid-dictionary-list): Remove commented-out code.
26800
268012016-12-13 Reuben Thomas <rrt@sc3d.org>
26802
26803 Remove XEmacs and old Emacs highlighting code
26804
26805 * lisp/textmodes/ispell.el
26806 (ispell-highlight-spelling-error-xemacs): Remove.
26807 (ispell-highlight-spelling-error): Assume display-color-p exists.
26808
268092016-12-13 Reuben Thomas <rrt@sc3d.org>
26810
26811 Assume Emacs supports [:alpha:] in regexps
26812
26813 * lisp/textmodes/ispell.el (ispell-emacs-alpha-regexp): Remove.
26814 (ispell-set-spellchecker-params): Remove tests of
26815 ispell-emacs-alpha-regexp.
26816
268172016-12-13 Reuben Thomas <rrt@sc3d.org>
26818
26819 Remove some XEmacs-specific code from ispell.el
26820
26821 * lisp/textmodes/ispell.el: Remove XEmacs menubar setup.
26822 (ispell-int-char): Remove.
26823
268242016-12-13 Reuben Thomas <rrt@sc3d.org>
26825
26826 Generalise over-specific documentation
26827
26828 * lisp/textmodes/ispell.el (ispell-personal-dictionary): Rather than
26829 document precise personal wordlist filenames for only two supported
26830 spelling checkers, simply say that the default personal dictionary
26831 depends on the chosen spelling checker. The user can check the
26832 spelling checker’s documentation if necessary. This is simpler, and
26833 works for other supported (and future, or unknown) spelling checkers.
26834
268352016-12-13 Reuben Thomas <rrt@sc3d.org>
26836
26837 Remove tests for built-in functions
26838
26839 * lisp/textmodes/ispell.el (buffer-substring-no-properties): Remove
26840 back-up definition.
26841 (ispell-add-per-file-word-list): Remove tests for comment-padright and
26842 comment-normalize-vars.
26843
268442016-12-13 Reuben Thomas <rrt@sc3d.org>
26845
26846 Remove unused ispell-looking-back
26847
26848 * lisp/textmodes/ispell.el (ispell-looking-back): Remove unused alias.
26849
268502016-12-13 Reuben Thomas <rrt@sc3d.org>
26851
26852 Assume we have version<= for checking ispell version
26853
26854 * lisp/textmodes/ispell.el (ispell-check-minver): Remove.
26855 (ispell-check-version): Use version<= directly.
26856
268572016-12-13 Reuben Thomas <rrt@sc3d.org>
26858
26859 Remove ispell.el pre-GNU Emacs comments
26860
26861 * lisp/textmodes/ispell.el (Commentary): Remove original maintainer
26862 details, as Emacs version, bug report address and so forth should be
26863 used instead for this version. Remove in-line change history; use
26864 git instead.
26865
268662016-12-13 Mark Oteiza <mvoteiza@udel.edu>
26867
26868 More small fixes for image-dired
26869
26870 * lisp/image-dired.el: Fix commentary to refer to correct Emacs manual
26871 node.
26872 (image-dired--with-db-file): Add declare forms.
26873 (image-dired-hidden-p): Rewrite with cl-loop. It's not necessary to
26874 run through the whole list.
26875
268762016-12-13 Mark Oteiza <mvoteiza@udel.edu>
26877
26878 Remove image-dired-kill-buffer-and-window
26879
26880 This breaks window layout, especially when quitting a
26881 image-dired-display-image-mode buffer.
26882 * lisp/image-dired.el (image-dired-thumbnail-mode-map):
26883 (image-dired-display-image-mode-map): Replace in keymap and menu items
26884 bindings to image-dired-kill-buffer-and-window with quit-window.
26885 (image-dired-kill-buffer-and-window): Remove.
26886
268872016-12-13 Mark Oteiza <mvoteiza@udel.edu>
26888
26889 Replace image-dired-setup-dired-keybindings with a minor mode
26890
26891 * lisp/image-dired.el (image-dired-thumbnail-mode): Fix docstring to
26892 remove mention of nonexistent image-dired-dired and to refer to the
26893 new minor mode.
26894 (image-dired-minor-mode-map): New keymap assimilated from
26895 image-dired-setup-dired-keybindings. In the future, the keymap parent
26896 should be removed, and perhaps also the duplicate bindings that
26897 already exist in dired-mode-map.
26898 (image-dired-setup-dired-keybindings): Remove. Replace with an
26899 obsolete function alias.
26900 (image-dired-minor-mode): New minor mode, assuming the role of
26901 image-dired-setup-dired-keybindings.
26902
269032016-12-13 Paul Eggert <eggert@cs.ucla.edu>
26904
26905 * test/src/regex-resources/PTESTS: Convert to UTF-8.
26906
269072016-12-13 Noam Postavsky <npostavs@gmail.com>
26908
26909 Clarify thread-signal semantics
26910
26911 * doc/lispref/threads.texi (Basic Thread Functions): Explain that the
26912 thread will be signaled as soon as possible.
26913
269142016-12-13 Noam Postavsky <npostavs@gmail.com>
26915
26916 Clean up var watcher disabling on thread switching
26917
26918 * src/data.c (Fset_default): Move code into new C level function,
26919 `set_default_internal'.
26920 (set_default_internal): New function, like `Fset_default' but also takes
26921 additional bindflag parameter.
26922 (set_internal): Only call `notify_variable_watchers' if bindflag is not
26923 SET_INTERNAL_THREAD_SWITCH.
26924 * src/eval.c (do_specbind, do_one_unbind): Add bindflag parameter,
26925 passed on to set_internal and set_default_internal. Adjust callers.
26926 (rebind_for_thread_switch, unbind_for_thread_switch): Pass
26927 SET_INTERNAL_THREAD_SWITCH to do_specbind, do_one_unbind instead of
26928 temporarily adjusting symbol's trapped_write field.
26929
269302016-12-13 Glenn Morris <rgm@gnu.org>
26931
26932 Minor fix for define-derived-mode
26933
26934 * lisp/emacs-lisp/derived.el (define-derived-mode):
26935 Do not let eg eval-defun reset the values of syntax or abbrev tables,
26936 since they might have been defined externally. (Bug#16160)
26937
269382016-12-12 Paul Eggert <eggert@cs.ucla.edu>
26939
26940 * build-aux/git-hooks/pre-commit: Add whitespace comment.
26941
269422016-12-12 Clément Pit--Claudel <clement.pitclaudel@live.com>
26943
26944 Move backtrace to ELisp using a new mapbacktrace primitive
26945
26946 * src/eval.c (get_backtrace_starting_at, backtrace_frame_apply)
26947 (Fmapbacktrace, Fbacktrace_frame_internal): New functions.
26948 (get_backtrace_frame, Fbacktrace_debug): Use `get_backtrace_starting_at'.
26949
26950 * lisp/subr.el (backtrace--print-frame): New function.
26951 (backtrace): Reimplement using `backtrace--print-frame' and `mapbacktrace'.
26952 (backtrace-frame): Reimplement using `backtrace-frame--internal'.
26953
26954 * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Pass a base to
26955 `mapbacktrace' instead of searching for "(debug" in the output of
26956 `backtrace'.
26957
26958 * test/lisp/subr-tests.el (subr-test-backtrace-simple-tests)
26959 (subr-test-backtrace-integration-test): New tests.
26960
26961 * doc/lispref/debugging.texi (Internals of Debugger): Document
26962 `mapbacktrace' and missing argument BASE of `backtrace-frame'.
26963
269642016-12-12 Paul Eggert <eggert@cs.ucla.edu>
26965
26966 Use C99 syntax for font drivers
26967
26968 Problem reported by Daniel Colascione in:
26969 http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00515.html
26970 * src/ftcrfont.c (ftcrfont_driver):
26971 * src/ftfont.c (ftfont_driver):
26972 * src/ftxfont.c (ftxfont_driver):
26973 * src/macfont.m (macfont_driver):
26974 * src/nsfont.m (nsfont_driver):
26975 * src/xfont.c (xfont_driver):
26976 * src/xftfont.c (xftfont_driver):
26977 Use C99 syntax, not the old GNU C syntax.
26978
269792016-12-12 Glenn Morris <rgm@gnu.org>
26980
26981 Obsolete gs.el
26982
26983 * lisp/gs.el: Move to lisp/obsolete. (Bug#1524)
26984 * doc/lispref/display.texi (Image Formats): Remove postscript.
26985 (PostScript Images): Remove section.
26986 * doc/lispref/elisp.texi: Update menu.
26987
269882016-12-12 Glenn Morris <rgm@gnu.org>
26989
26990 Un-revert recent Ffset change
26991
26992 * src/data.c (Ffset): Reinstate the check for "nil".
26993
269942016-12-12 Glenn Morris <rgm@gnu.org>
26995
26996 Minor advice.el fix
26997
26998 * lisp/emacs-lisp/advice.el (ad-preactivate-advice):
26999 Avoid setting the function definition of nil.
27000 This was happening during bootstrap of org-compat.el,
27001 apparently due to eager macro expansion of code behind
27002 a (featurep 'xemacs) test.
27003
270042016-12-12 Eli Zaretskii <eliz@gnu.org>
27005
27006 Make etags-tests work in out-of-tree builds
27007
27008 * test/lisp/progmodes/etags-tests.el (etags-bug-158)
27009 (etags-bug-23164): Make them work in an out-of-tree build.
27010 Reported by Ken Brown <kbrown@cornell.edu>.
27011
270122016-12-12 Eli Zaretskii <eliz@gnu.org>
27013
27014 Avoid crashing if a new thread is signaled right away
27015
27016 * src/thread.c (post_acquire_global_lock): Don't raise the pending
27017 signal if the thread's handlers were not yet set up, as that will
27018 cause Emacs to exit with a fatal error. This can happen if a
27019 thread is signaled as soon as make-thread returns, before the new
27020 thread had an opportunity to acquire the global lock, set up the
27021 handlers, and call the thread function.
27022
27023 * test/src/thread-tests.el (thread-signal-early): New test.
27024
270252016-12-12 Eli Zaretskii <eliz@gnu.org>
27026
27027 Fix point motion in cloned buffers
27028
27029 * src/thread.c (post_acquire_global_lock): Call
27030 set_buffer_internal_2 instead of tricking set_buffer_internal_1
27031 into resetting the current buffer even if it didn't change. This
27032 avoids bug#25165, caused by failing to record the modified values
27033 of point and mark, because current_buffer was set to NULL. Also,
27034 don't bother re-setting the buffer if there was no thread switch,
27035 as that just wastes cycles.
27036 * src/buffer.c (set_buffer_internal_2): New function, with most of
27037 the body of set_buffer_internal_1, but without the test for B
27038 being identical to the current buffer.
27039 (set_buffer_internal_1): Call set_buffer_internal_2 if B is not
27040 identical to the current buffer.
27041 * src/buffer.h (set_buffer_internal_2): Add prototype.
27042
27043 * test/src/thread-tests.el (thread-sticky-point): New test.
27044
270452016-12-12 Michael Albinus <michael.albinus@gmx.de>
27046
27047 Further improvements in Tramp's file name unquoting
27048
27049 * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
27050 (tramp-adb-handle-write-region): Unquote localname.
27051 (tramp-adb-handle-copy-file): Implement direct copy on remote device.
27052 (tramp-adb-handle-rename-file): Quote arguments, add "-f" to force.
27053
27054 * lisp/net/tramp.el (tramp-file-name-unquote-localname): New defun.
27055 (tramp-handle-file-name-case-insensitive-p):
27056 * lisp/net/tramp-gvfs.el (tramp-gvfs-get-file-attributes)
27057 (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
27058 (tramp-gvfs-maybe-open-connection):
27059 * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
27060 * lisp/net/tramp-smb.el (tramp-smb-get-share)
27061 (tramp-smb-get-localname): Use it.
27062
27063 * test/lisp/net/tramp-tests.el (tramp--test-docker-p): New defun.
27064 (tramp--test-special-characters, tramp-test34-utf8)
27065 (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
27066 (tramp-test34-utf8-with-ls): Use it.
27067
270682016-12-12 Martin Rudalics <rudalics@gmx.at>
27069
27070 Strengthen conditions for resizing sibling windows (Bug#25169)
27071
27072 * lisp/window.el (window-resize, delete-window): Resize other siblings
27073 only if `window-combination-resize' equals t (Bug#25169).
27074
270752016-12-12 Noam Postavsky <npostavs@gmail.com>
27076
27077 Quote filenames containing '~' in prompts
27078
27079 When in a directory named '~', the default value given by
27080 `read-file-name' should be quoted by prepending '/:', in order to
27081 prevent it from being interpreted as referring to the $HOME
27082 directory (Bug#16984).
27083
27084 * lisp/minibuffer.el (minibuffer-maybe-quote-filename): New function.
27085 (completion--sifn-requote, read-file-name-default): Use it instead of
27086 `minibuffer--double-dollars'.
27087 * test/lisp/files-tests.el (files-test-read-file-in-~): Test it.
27088
270892016-12-11 Eli Zaretskii <eliz@gnu.org>
27090
27091 Undo part of last change
27092
27093 * src/thread.h:
27094 * src/keyboard.c:
27095 * src/keyboard.h: Undo part of last change:
27096 input_available_clear_time is again a global variable.
27097
270982016-12-11 Eli Zaretskii <eliz@gnu.org>
27099
27100 Avoid aborts when a thread signals an error
27101
27102 * src/thread.h (struct thread_state): Add members
27103 m_waiting_for_input and m_input_available_clear_time.
27104 (waiting_for_input, input_available_clear_time): New macros.
27105 * src/keyboard.c (waiting_for_input, input_available_clear_time):
27106 Remove; they are now macros that reference the current thread.
27107 (Bug#25171)
27108 * src/w32select.c: Don't include keyboard.h.
27109
27110 * test/src/thread-tests.el (thread-errors): New test.
27111
271122016-12-11 Philipp Stephani <phst@google.com>
27113
27114 Clean up compile-tests.el
27115
27116 Switch to lexical binding. Make checkdoc happy.
27117
27118 * test/lisp/progmodes/compile-tests.el (compile--test-error-line)
27119 (compile-test-error-regexps): Instead of checking a single Boolean
27120 value, use `should' for each attribute of the message to be compared.
27121 (compile-tests--test-regexps-data): Document sixth list element
27122 TYPE.
27123
271242016-12-11 Michael Albinus <michael.albinus@gmx.de>
27125
27126 Fix Bug#25162
27127
27128 * doc/emacs/files.texi (Reverting): Document
27129 auto-revert-remote-files and auto-revert-verbose.
27130
27131 * lisp/autorevert.el (auto-revert-verbose, auto-revert-mode)
27132 (auto-revert-tail-mode, global-auto-revert-mode): Fix docstring.
27133
271342016-12-11 Glenn Morris <rgm@gnu.org>
27135
27136 Fix a typo in define-abbrev-table
27137
27138 * lisp/abbrev.el (define-abbrev-table): Fix typo in docstring handling.
27139
271402016-12-11 Glenn Morris <rgm@gnu.org>
27141
27142 Improve previous cperl-mode change
27143
27144 * lisp/progmodes/cperl-mode.el (cperl-mode-abbrev-table):
27145 Improve previous change.
27146
271472016-12-11 Glenn Morris <rgm@gnu.org>
27148
27149 Mark default cperl abbrevs as system ones
27150
27151 * lisp/progmodes/cperl-mode.el (cperl-mode):
27152 Mark our abbrevs as system ones. (Bug#10934)
27153
271542016-12-11 Glenn Morris <rgm@gnu.org>
27155
27156 Revert earlier Ffset change
27157
27158 * src/data.c (Ffset): Allow nil again, since it caused
27159 eager macro-expansion failures.
27160
271612016-12-11 Glenn Morris <rgm@gnu.org>
27162
27163 Tweaks for message bogus address detection
27164
27165 * lisp/gnus/message.el (message-bogus-recipient-p):
27166 Do not require "@", since some mailers deliver to local addresses
27167 without one. (Bug#23054)
27168 Move "@.*@" from here...
27169 (message-bogus-addresses): ...to here, so it can be customized.
27170
271712016-12-11 Glenn Morris <rgm@gnu.org>
27172
27173 Do not allow nil to be defined as a function
27174
27175 * lisp/emacs-lisp/byte-run.el (defun):
27176 * src/data.c (Ffset): Do not allow "nil". (Bug#25110)
27177
271782016-12-11 Glenn Morris <rgm@gnu.org>
27179
27180 Bump makeinfo requirement from 4.7 to 4.13
27181
27182 * configure.ac: Bump makeinfo version requirement from 4.7 to 4.13.
27183 We need at least 4.8, and that may be buggy, so go for the last
27184 of the 4 series, which is 8 years old. (Bug#25108)
27185
271862016-12-11 Glenn Morris <rgm@gnu.org>
27187
27188 Fixes related to select-enable-clipboard
27189
27190 * lisp/menu-bar.el (clipboard-yank, clipboard-kill-ring-save)
27191 (clipboard-kill-region):
27192 * lisp/eshell/esh-io.el (eshell-virtual-targets)
27193 (eshell-clipboard-append):
27194 Replace option gui-select-enable-clipboard with
27195 select-enable-clipboard; renamed October 2014. (Bug#25145)
27196
271972016-12-11 Nicolas Richard <theonewiththeevillook@yahoo.fr>
27198
27199 Add some sanity checking of defun arglist
27200
27201 * lisp/emacs-lisp/byte-run.el (defun):
27202 Check for malformed argument lists. (Bug#15715)
27203
272042016-12-11 Matt Armstrong <marmstrong@google.com> (tiny change)
27205
27206 Minor shell-mode fix for zsh
27207
27208 * lisp/shell.el (shell-mode): Prevent shell-dirstack-query
27209 becoming confused by zsh abbreviations. (Bug#24632)
27210
272112016-12-10 Noam Postavsky <npostavs@gmail.com>
27212
27213 Define struct predicate before acccesors
27214
27215 The accessor functions use the predicate function, which causes problems
27216 when reloading after unload-feature: the compiler-macro property is
27217 still present on the predicate symbol, and the compiler fails to find
27218 the definition when trying to inline it into the accessor
27219 function (Bug#25088).
27220
27221 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Move predicate definition
27222 before field accessor definitions.
27223
272242016-12-10 Andreas Schwab <schwab@linux-m68k.org>
27225
27226 * Makefile.in (install-etc): Don't prepend $(DESTDIR) to commands in
27227 system unit file.
27228
272292016-12-10 Eli Zaretskii <eliz@gnu.org>
27230
27231 Support concurrency in Emacs Lisp
27232
27233 Merge branch 'test-concurrency'
27234
27235 * src/thread.c:
27236 * src/thread.h:
27237 * src/systhread.c:
27238 * src/systhread.h: New files.
27239 * src/xgselect.c (xg_select): Avoid using SAFE_NALLOCA and use
27240 xnmalloc unconditionally.
27241 * src/window.c (struct save_window_data): Rename current_buffer to
27242 f_current_buffer.
27243 * src/w32proc.c (sys_select): Change the function signature to
27244 closer fit 'pselect' on Posix hosts.
27245 * src/search.c:
27246 * src/regex.h: Convert some globals to macros that reference
27247 thread-specific values.
27248 * src/process.c (pset_thread, add_non_keyboard_read_fd)
27249 (add_process_read_fd, add_non_blocking_write_fd)
27250 (recompute_input_desc, compute_input_wait_mask)
27251 (compute_non_process_wait_mask, compute_non_keyboard_wait_mask)
27252 (compute_write_mask, clear_waiting_thread_info)
27253 (update_processes_for_thread_death, Fset_process_thread)
27254 (Fprocess_thread): New functions.
27255 (enum fd_bits): New enumeration.
27256 (fd_callback_data): Add 'thread' and 'waiting_thread', rename
27257 'condition' to 'flags'.
27258 (set_process_filter_masks, create_process, create_pty)
27259 (Fmake_serial_process, finish_after_tls_connection)
27260 (connect_network_socket, deactivate_process)
27261 (server_accept_connection, wait_reading_process_output)
27262 (Fcontinue_process, Fstop_process, keyboard_bit_set)
27263 (add_timer_wait_descriptor, add_keyboard_wait_descriptor)
27264 (delete_keyboard_wait_descriptor): Use the new functions instead
27265 of manipulating fd flags and masks directly.
27266 (syms_of_process): Defsubr the new primitives.
27267 * src/print.c (print_object): Print threads, mutexes, and
27268 conditional variables.
27269 * src/lisp.h (enum pvec_type): New values PVEC_THREAD, PVEC_MUTEX,
27270 and PVEC_CONDVAR.
27271 (XTHREAD, XMUTEX, XCONDVAR, THREADP, MUTEXP, CONDVARP)
27272 (CHECK_THREAD, CHECK_MUTEX, CHECK_CONDVAR): New inline functions.
27273 (XSETTHREAD, XSETMUTEX, XSETCONDVAR): New macros.
27274 (struct handler): Add back byte_stack. Rename lisp_eval_depth to
27275 f_lisp_eval_depth.
27276 * src/eval.c (specpdl_kind, specpdl_arg, do_specbind)
27277 (rebind_for_thread_switch, do_one_unbind)
27278 (unbind_for_thread_switch): New functions.
27279 (init_eval): 'handlerlist' is not malloc'ed.
27280 (specbind): Call do_specbind.
27281 (unbind_to): Call do_one_unbind.
27282 (mark_specpdl): Accept 2 arguments.
27283 (mark_specpdl): Mark the saved value in a let-binding.
27284 * src/emacs.c (main): Call init_threads_once, init_threads, and
27285 syms_of_threads.
27286 * src/data.c (Ftype_of): Support thread, mutex, and condvar
27287 objects.
27288 (Fthreadp, Fmutexp, Fcondition_variable_p): New functions.
27289 (syms_of_data): DEFSYM and defsubr new symbols and primitives.
27290 * src/bytecode.c (struct byte_stack, FETCH, CHECK_RANGE)
27291 (BYTE_CODE_QUIT): Add back.
27292 (exec_byte_code): Add back byte stack manipulation.
27293 * src/alloc.c (cleanup_vector): Handle threads, mutexes, and
27294 conditional variables.
27295 (mark_stack): Now extern; accept additional argument 'bottom'.
27296 (flush_stack_call_func): New function.
27297 (garbage_collect_1): Call mark_threads and unmark_threads. Don't
27298 mark handlers.
27299 * src/.gdbinit (xbytecode): Add back.
27300
27301 * test/src/thread-tests.el: New tests.
27302 * test/src/data-tests.el (binding-test-manual)
27303 (binding-test-setq-default, binding-test-makunbound)
27304 (binding-test-defvar-bool, binding-test-defvar-int)
27305 (binding-test-set-constant-t, binding-test-set-constant-nil)
27306 (binding-test-set-constant-keyword)
27307 (binding-test-set-constant-nil): New tests.
27308
27309 * doc/lispref/processes.texi (Processes and Threads): New
27310 subsection.
27311 * doc/lispref/threads.texi: New file
27312 * doc/lispref/elisp.texi (Top): Include it.
27313 * doc/lispref/objects.texi (Thread Type, Mutex Type)
27314 (Condition Variable Type): New subsections.
27315 (Type Predicates): Add thread-related predicates.
27316 * doc/lispref/objects.texi (Editing Types):
27317 * doc/lispref/elisp.texi (Top): Update higher-level menus.
27318
27319 * etc/NEWS: Mention concurrency features.
27320
273212016-12-10 Eli Zaretskii <eliz@gnu.org>
27322
27323 Fix error messages in thread.c
27324
27325 * src/thread.c (lisp_mutex_unlock, Fcondition_wait)
27326 (Fcondition_notify, Fthread_join): Fix error messages.
27327
273282016-12-10 Eli Zaretskii <eliz@gnu.org>
27329
27330 Improve doc strings in thread.c
27331
27332 * src/thread.c (Fmake_condition_variable, Fcondition_wait)
27333 (Fcondition_notify, Fcondition_mutex, Fcondition_name, Fmake_thread)
27334 (Fthread_join, Fall_threads): Doc fixes.
27335
273362016-12-10 Eli Zaretskii <eliz@gnu.org>
27337
27338 Fix building with check-lisp-object-type
27339
27340 * src/thread.c (mark_one_thread): Use NILP to compare with
27341 m_saved_last_thing_searched, which is a Lisp object. Reported by
27342 Andreas Politz <politza@hochschule-trier.de>.
27343
273442016-12-10 Eli Zaretskii <eliz@gnu.org>
27345
27346 Documentation and commentary improvements
27347
27348 * src/lisp.h:
27349 * src/regex.c:
27350 * src/xgselect.c (xg_select): Improve commentary and formatting.
27351
27352 * doc/lispref/objects.texi (Thread Type, Mutex Type)
27353 (Condition Variable Type): New subsections.
27354 (Type Predicates): Add thread-related predicates.
27355 * doc/lispref/objects.texi (Editing Types):
27356 * doc/lispref/elisp.texi (Top): Update higher-level menus.
27357
273582016-12-09 Michael Albinus <michael.albinus@gmx.de>
27359
27360 Fix further problems with quoted file names in Tramp
27361
27362 * lisp/net/tramp.el (tramp-quoted-name-p, tramp-quote-name)
27363 (tramp-unquote-name): Move defsubst ...
27364 * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p)
27365 (tramp-compat-file-name-quote)
27366 (tramp-compat-file-name-unquote): ... here. Adapt callees.
27367
27368 * lisp/net/tramp-cache.el (tramp-flush-file-property)
27369 (tramp-flush-directory-property):
27370 * lisp/net/tramp-gvfs.el (tramp-gvfs-url-file-name):
27371 * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
27372 * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
27373 (tramp-smb-handle-substitute-in-file-name)
27374 (tramp-smb-get-share, tramp-smb-get-localname): Handle quoted files.
27375
273762016-12-09 Eli Zaretskii <eliz@gnu.org>
27377
27378 *src/sysdep.c: Fix a comment.
27379
273802016-12-09 Eli Zaretskii <eliz@gnu.org>
27381
27382 Fix compilation error on Fedora 24
27383
27384 * src/sysdep.c [HAVE_H_ERRNO]: Remove declaration of h_errno.
27385 Reported by Paul Eggert <eggert@cs.ucla.edu>.
27386
273872016-12-09 Eli Zaretskii <eliz@gnu.org>
27388
27389 Fix compilation warnings due to prototype of thread_select
27390
27391 * src/thread.h <int select_func>: Make the 5th and 6th arguments
27392 be 'const'.
27393 * src/process.c [WINDOWSNT]:
27394 * src/w32proc.c: Make the 5th and 6th argument to sys_select be
27395 'const'.
27396
273972016-12-09 Eli Zaretskii <eliz@gnu.org>
27398
27399 Fix compilation on Debian GNU/Linux
27400
27401 * src/thread.h: Include sys/types.h, for ssize_t that regex.h
27402 uses. Reported by Robert Marshall <robert.marshall@codethink.co.uk>.
27403
274042016-12-09 Eli Zaretskii <eliz@gnu.org>
27405
27406 Fix subtle errors with let-binding of localized variables
27407
27408 * src/eval.c (do_specbind): Don't require a "symbol" that is
27409 actually a cons cell, in order to call set-default, as there are
27410 no longer such bindings. This makes do_specbind work like the
27411 pre-concurrency implementation in specbind for bindings of
27412 forwarded symbols. Use specpdl_kind to access the type of the
27413 binding.
27414 (specpdl_kind): New function.
27415
274162016-12-09 Michael Albinus <michael.albinus@gmx.de>
27417
27418 Document file-name-quote, file-name-unquote and file-name-quoted-p
27419
27420 * doc/lispref/files.texi (File Name Expansion):
27421 * etc/NEWS: Mention file-name-quote, file-name-unquote and
27422 file-name-quoted-p.
27423
27424 * lisp/files.el (file-name-non-special): Revert using
27425 file-name-quote, file-name-unquote and file-name-quoted-p.
27426
274272016-12-09 Noam Postavsky <npostavs@gmail.com>
27428
27429 Fix bad quoting of python-shell-interpreter
27430
27431 `python-shell-calculate-command' was using `shell-quote-argument' as if
27432 it was generating a shell command, but its callers don't pass the result
27433 to a shell, and they expect to parse it with `split-string-and-unquote'.
27434 This caused problems depending on the flavor of shell quoting in
27435 effect (Bug#25025).
27436
27437 * lisp/progmodes/python.el (python-shell-calculate-command): Use
27438 `combine-and-quote-strings' to quote the interpreter, so that it can be
27439 parsed by `python-shell-make-comint' successfully using
27440 `split-string-and-unquote'.
27441
274422016-12-09 Paul Eggert <eggert@cs.ucla.edu>
27443
27444 * src/lisp.h (struct terminal): Remove unnecessary forward decl.
27445
274462016-12-08 Paul Eggert <eggert@cs.ucla.edu>
27447
27448 Make read1 more reentrant
27449
27450 This is needed if ‘read’ is called soon after startup, before the
27451 Unicode tables have been set up, and it reads a \N escape and
27452 needs to look up a value the Unicode tables, a lookup that in turn
27453 calls read1 recursively. Although this change doesn’t make ‘read’
27454 fully reentrant, it’s good enough to handle this case.
27455 * src/lread.c (read_buffer_size, read_buffer): Remove static vars.
27456 (grow_read_buffer): Revamp to use locals, not statics, and to
27457 record memory allocation un the specpdl. All callers changed.
27458 (read1): Start with a stack-based buffer, and use the heap
27459 only if the stack buffer is too small. Use unbind_to to
27460 free any heap buffer allocated. Use bool for boolean.
27461 Redo symbol loop so that only one call to grow_read_buffer
27462 is needed.
27463 (init_obarray): Remove no-longer-needed initialization.
27464
274652016-12-08 Eli Zaretskii <eliz@gnu.org>
27466
27467 Fix compilation warnings
27468
27469 * src/thread.c (Fmake_thread): Call emacs_abort, to avoid
27470 compilation warning.
27471
274722016-12-08 Paul Eggert <eggert@cs.ucla.edu>
27473
27474 Fix unlikely substitute-command-keys memory leak
27475
27476 * src/doc.c (Fsubstitute_command_keys):
27477 Free buffer when unwinding.
27478
274792016-12-08 Michael Albinus <michael.albinus@gmx.de>
27480
27481 Add file-name-quoted-p, file-name-quote, file-name-unquote
27482
27483 * lisp/files.el (file-name-quoted-p, file-name-quote)
27484 (file-name-unquote): New defsubst.
27485 (find-file--read-only, find-file-noselect)
27486 (file-name-non-special): Use them.
27487
274882016-12-08 Eli Zaretskii <eliz@gnu.org>
27489
27490 Add a NEWS entry.
27491
274922016-12-08 Glenn Morris <rgm@gnu.org>
27493
27494 Minor fix for symbol-file
27495
27496 * lisp/subr.el (symbol-file): Avoid false matches with "require"
27497 elements in load-history. (Bug#25109)
27498
274992016-12-08 Glenn Morris <rgm@gnu.org>
27500
27501 Doc fix for vc-git
27502
27503 * lisp/vc/vc-git.el (vc-git-region-history): Add a doc string.
27504
275052016-12-08 Tino Calancha <tino.calancha@gmail.com>
27506
27507 Fix Bug#24962
27508
27509 * lisp/buff-menu.el (list-buffers--refresh):
27510 List buffers with name starting with " " if they visit a file.
27511 * test/lisp/buff-menu-tests.el (buff-menu-24962):
27512 Update test result as pass.
27513
275142016-12-08 Tino Calancha <tino.calancha@gmail.com>
27515
27516 ediff-fixup-patch-map: Improve prompt
27517
27518 * lisp/vc/ediff-ptch.el (ediff-fixup-patch-map):
27519 Make clear in the prompt when we are applying a multi patch.
27520
275212016-12-08 Glenn Morris <rgm@gnu.org>
27522
27523 Retain message logging in map-y-or-n-p
27524
27525 * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
27526 Stop disabling logging to Messages buffer. (Bug#13326)
27527
275282016-12-08 Glenn Morris <rgm@gnu.org>
27529
27530 Doc fix for recent change
27531
27532 * lisp/simple.el (region-modifiable-p): Doc fix.
27533
275342016-12-08 Glenn Morris <rgm@gnu.org>
27535
27536 Quieten make-dist default operation
27537
27538 * make-dist: Add --verbose option. Default to quieter operation.
27539
275402016-12-08 Glenn Morris <rgm@gnu.org>
27541
27542 Further improve make-dist checking
27543
27544 * make-dist: Print status messages when checking.
27545
275462016-12-08 Glenn Morris <rgm@gnu.org>
27547
27548 Improve previous make-dist change
27549
27550 * make-dist: Let make check the info files more thoroughly.
27551
275522016-12-08 Glenn Morris <rgm@gnu.org>
27553
27554 Make make-dist --snapshot do some sanity checks
27555
27556 * make-dist: Snapshot mode no longer disables checks.
27557 Checks now includes checks for freshness. (Bug#25084)
27558 Checks now exits with an error if problems were found.
27559
275602016-12-07 Tino Calancha <tino.calancha@gmail.com>
27561
27562 Fix regression introduced by commit 7b1e97f
27563
27564 * lisp/ibuf-ext.el (ibuffer-decompose-filter): Use cdr instead
27565 of cadr; required after commit 20f5a5b.
27566
275672016-12-07 Paul Eggert <eggert@cs.ucla.edu>
27568
27569 Put post-25 ChangeLog entries into ChangeLog.3
27570
27571 * ChangeLog.2: Copy from emacs-25 branch.
27572 * ChangeLog.3: New file, with changes only in master.
27573 * Makefile.in (CHANGELOG_HISTORY_INDEX_MAX): Bump from 2 to 3.
27574
275752016-12-07 Eli Zaretskii <eliz@gnu.org>
27576
27577 Fix network streams.
27578
27579 The original code messed up flags in fd_callback_data[], and also
27580 didn't call add_process_read_fd for process-related file descriptors.
27581
275822016-12-07 Eli Zaretskii <eliz@gnu.org>
27583
27584 Minimize spurious diffs from master.
27585
275862016-12-06 Eli Zaretskii <eliz@gnu.org>
27587
27588 Fix the test suite
27589
27590 * test/automated/bindings.el: Contents moved to
27591 test/src/data-tests.el.
27592 * test/automated/threads.el: Moved to test/src/thread-tests.el.
27593
275942016-12-06 Eli Zaretskii <eliz@gnu.org>
27595
27596 Fix a typo in bytecode.c.
27597
275982016-12-05 Eli Zaretskii <eliz@gnu.org>
27599
27600 Fix compilation problems.
27601
27602 Fix merged code in process.c and eval.c.
27603
276042016-12-04 Eli Zaretskii <eliz@gnu.org>
27605
27606 Merge branch 'concurrency'
27607
27608 Conflicts (resolved):
27609 configure.ac
27610 src/Makefile.in
27611 src/alloc.c
27612 src/bytecode.c
27613 src/emacs.c
27614 src/eval.c
27615 src/lisp.h
27616 src/process.c
27617 src/regex.c
27618 src/regex.h
27619
276202015-11-02 Eli Zaretskii <eliz@gnu.org>
27621
27622 Fix the MS-Windows build
27623
27624 * src/thread.h [WINDOWSNT]: Include sys/socket.h.
27625
27626 * src/sysselect.h: Don't define fd_set and FD_* macros for
27627 MS-Windows here.
27628 * src/w32.h: Define them here.
27629
27630 * src/process.h (sys_select): Declare prototype.
27631
27632 * src/sysdep.c:
27633 * src/process.c:
27634 * src/filelock.c:
27635 * src/emacs.c:
27636 * src/callproc.c: Move inclusion of sys/select.h after lisp.h.
27637 * nt/inc/socket.h: Include w32.h instead of sysselect.h
27638
276392015-11-01 Ken Raeburn <raeburn@raeburn.org>
27640
27641 merge from trunk
27642
276432013-10-19 Barry O'Reilly <gundaetiapo@gmail.com>
27644
27645 * src/eval.c (unbind_for_thread_switch): Fix iteration over the
27646 specpdl stack.
27647
276482013-10-18 Tom Tromey <tromey@redhat.com>
27649
27650 change condition-variablep to condition-variable-p
27651
276522013-09-01 Eli Zaretskii <eliz@gnu.org>
27653
27654 Fix crashes when unbind_for_thread_switch signals an error.
27655
27656 src/eval.c (unbind_for_thread_switch): Accept a 'struct
27657 thread_state *' argument and use specpdl_ptr and specpdl of that
27658 thread. Fixes crashes if find_symbol_value signals an error.
27659 src/thread.c (post_acquire_global_lock): Update current_thread
27660 before calling unbind_for_thread_switch. Pass the previous thread
27661 to unbind_for_thread_switch.
27662
276632013-08-31 Eli Zaretskii <eliz@gnu.org>
27664
27665 Improve MS-Windows implementation of threads.
27666
27667 src/systhread.c (sys_cond_init): Set the 'initialized' member to
27668 true only if initialization is successful. Initialize wait_count
27669 and wait_count_lock.
27670 (sys_cond_wait, sys_cond_signal, sys_cond_broadcast): If
27671 'initialized' is false, do nothing.
27672 (sys_cond_wait): Fix the implementation to avoid the "missed
27673 wakeup" bug: count the waiting threads, and reset the broadcast
27674 event once the last thread was released.
27675 (sys_cond_signal, sys_cond_broadcast): Use SetEvent instead of
27676 PulseEvent. Don't signal the event if no threads are waiting.
27677 (sys_cond_destroy): Only close non-NULL handles.
27678 (sys_thread_create): Return zero if unsuccessful, 1 if successful.
27679 src/systhread.h (w32thread_cond_t): New member 'initialized'.
27680 Rename waiters_count and waiters_count_lock to wait_count and
27681 wait_count_lock, respectively.
27682
276832013-08-30 Eli Zaretskii <eliz@gnu.org>
27684
27685 Enable thread support in the MS-Windows build.
27686
27687 src/systhread.h (w32thread_critsect, w32thread_cond_t, sys_mutex_t)
27688 (sys_cond_t, sys_thread_t) [WINDOWSNT]: New data types.
27689 src/systhread.c (sys_mutex_init, sys_mutex_lock, sys_mutex_unlock)
27690 (sys_mutex_destroy, sys_cond_init, sys_cond_wait)
27691 (sys_cond_signal, sys_cond_broadcast, sys_cond_destroy)
27692 (sys_thread_self, sys_thread_equal, w32_beginthread_wrapper)
27693 (sys_thread_create, sys_thread_yield) [WINDOWSNT]: New functions.
27694
27695 configure.ac (THREADS_ENABLED): Enable threads for MinGW, even
27696 if pthreads is not available.
27697
276982013-08-27 Tom Tromey <tromey@redhat.com>
27699
27700 use condition-notify in the docs, not condition-signal
27701
27702 zap until-condition docs
27703
27704 zap until-condition
27705
27706 rename thread-blocker to thread--blocker
27707
27708 remove binding_symbol
27709
27710 fix style of threadp, mutexp, and condition-variable-p
27711
27712 make thread_check_current_buffer return bool
27713
27714 add a comment before flush_stack_call_func
27715
27716 fix whitespace_regexp warning
27717
277182013-08-26 Eli Zaretskii <eliz@gnu.org>
27719
27720 Fix MS-Windows build.
27721
27722 src/callproc.c:
27723 src/emacs.c:
27724 src/filelock.c:
27725 src/process.c:
27726 src/sysdep.c:
27727 src/w32.c: Reshuffle Windows-specific headers to avoid errors with
27728 redefinition of fd_set etc.
27729 src/process.c: Don't use num_pending_connects when
27730 NON_BLOCKING_CONNECT is not defined.
27731 src/sysselect.h: Move definitions of FD_* macros and of SELECT_TYPE
27732 here from w32.h.
27733 src/w32proc.c (sys_select): Adjust the argument types to what
27734 thread.h expects.
27735
27736 nt/inc/sys/socket.h: Include stdint.h. Include sysselect.h instead
27737 of w32.h.
27738
277392013-08-26 Tom Tromey <tromey@redhat.com>
27740
27741 use record_unwind_protect_void, avoid warning
27742
27743 implement --enable-threads and a thread-less mode
27744
277452013-08-25 Tom Tromey <tromey@redhat.com>
27746
27747 merge from trunk
27748
277492013-08-20 Tom Tromey <tromey@redhat.com>
27750
27751 fix up some merge errors in process.c
27752
27753 remove a dead function
27754 clean up a fixme I added in create_pty during the merge
27755
277562013-08-20 Tom Tromey <tromey@redhat.com>
27757
27758 merge from trunk
27759
277602013-07-26 Tom Tromey <tromey@redhat.com>
27761
27762 merge from trunk
27763
277642013-07-13 Tom Tromey <tromey@redhat.com>
27765
27766 Merge from trunk
27767
277682013-07-12 Tom Tromey <tromey@redhat.com>
27769
27770 Use thread_alive_p in a couple more spots
27771
277722013-07-07 Tom Tromey <tromey@redhat.com>
27773
27774 fix xfree bug in run_thread
27775
27776 this fixes run_thread to account for the dummy slot
27777 in specpdl
27778
277792013-07-07 Tom Tromey <tromey@redhat.com>
27780
27781 merge from trunk
27782
27783 this merges frmo trunk and fixes various build issues.
27784 this needed a few ugly tweaks.
27785 this hangs in "make check" now
27786
277872013-07-06 Tom Tromey <tromey@redhat.com>
27788
27789 add assertion to flush_stack_call_func
27790
27791 functions called via flush_stack_call_func are assumed
27792 to return with the global lock held again, and with
27793 current_thread reset. this assertion verifies part of this
27794
277952013-07-06 Tom Tromey <tromey@redhat.com>
27796
27797 call init_primary_thread from init_threads
27798
277992013-07-05 Tom Tromey <tromey@redhat.com>
27800
27801 avoid SAFE_ALLOCA
27802
27803 avoid SAFE_ALLOCA in xgselect.c.
27804 in this code it is just as easy to always use malloc;
27805 and it avoids thread-switching problems, as the safe-alloca
27806 stuff implicitly refers to the current thread
27807
278082013-07-05 Tom Tromey <tromey@redhat.com>
27809
27810 avoid current_thread sometimes
27811
27812 this tweaks thread.c to use 'self' instead of current_thread
27813 in a couple spots. this is clearer and more robust
27814
278152013-07-05 Tom Tromey <tromey@redhat.com>
27816
27817 initialize saved_value
27818
27819 initialize the saved_value field in all needed cases
27820 also, add an assertion to do_one_unbind
27821
278222013-07-04 Tom Tromey <tromey@redhat.com>
27823
27824 fix buglet in test case
27825
278262013-07-04 Tom Tromey <tromey@redhat.com>
27827
27828 unlink thread later
27829
27830 unlink thread from global list later
27831 also remove some unnecessary destruction code
27832
278332013-07-04 Tom Tromey <tromey@redhat.com>
27834
27835 introduce thread_alive_p macro
27836
27837 This introduces the thread_alive_p macro and changes
27838 thread-alive-p to use it. This is a minor cleanup.
27839 It also changes all-threads to ignore dead threads.
27840
278412013-07-03 Tom Tromey <tromey@redhat.com>
27842
27843 Don't call unbind_for_thread_switch in run_thread
27844
27845 This removes the call to unbind_for_thread_switch from run_thread.
27846 This isn't necessary because acquire_global_lock does it properly.
27847
278482013-07-03 Tom Tromey <tromey@redhat.com>
27849
27850 remove unused field from struct thread_state
27851
27852 Fix a comment.
27853
278542013-06-13 Tom Tromey <tromey@redhat.com>
27855
27856 merge from trunk
27857
278582013-06-06 Tom Tromey <tromey@redhat.com>
27859
27860 fix a few latent issues in the thread patch
27861
27862 * we called unbind_for_thread_switch unconditionally, but this
27863 is wrong if the previous thread exited
27864 * likewise, exiting a thread should clear current_thread
27865 * redundant assignment in run_thread
27866 * clean up init_threads - no need to re-init the primary thread
27867
27868 This patch still sometimes causes weird hangs in "make check".
27869 However, I think that is a kernel bug, since Emacs enters the zombie
27870 state but its parent process hangs in wait. This shouldn't happen.
27871
278722013-06-04 Tom Tromey <tromey@redhat.com>
27873
27874 update eval.c to make it build again after the merge
27875
278762013-06-03 Tom Tromey <tromey@redhat.com>
27877
27878 merge from trunk; clean up some issues
27879
278802013-03-18 Tom Tromey <tromey@redhat.com>
27881
27882 don't let kill-buffer kill a buffer if it is current in any thread
27883
278842013-03-18 Tom Tromey <tromey@redhat.com>
27885
27886 fix process bugs
27887
27888 Fix some process-related bugs, mostly thinkos from the conversion to
27889 recording fd state as flags.
27890 This now passes the test suite without hanging.
27891
278922013-03-17 Tom Tromey <tromey@redhat.com>
27893
27894 merge from trunk
27895
278962013-03-08 Tom Tromey <tromey@redhat.com>
27897
27898 merge from trunk
27899
279002013-01-16 Tom Tromey <tromey@redhat.com>
27901
27902 merge from trunk
27903
279042013-01-06 Tom Tromey <tromey@redhat.com>
27905
27906 merge from trunk
27907
279082012-12-23 Tom Tromey <tromey@redhat.com>
27909
27910 mention let bindings and lack of other ways to rewind
27911
279122012-12-17 Tom Tromey <tromey@redhat.com>
27913
27914 Remove bit accidentally left over from the merge
27915
27916 merge from trunk
27917
279182012-09-04 Tom Tromey <tromey@redhat.com>
27919
27920 merge from trunk
27921
27922 link from thread docs to match data
27923
279242012-08-27 Tom Tromey <tromey@redhat.com>
27925
27926 cannot thread-join the current thread
27927
27928 fix test suite for condition-variable-p name change
27929
27930 add tests for variable bindings
27931
279322012-08-25 Tom Tromey <tromey@redhat.com>
27933
27934 minor update to thread-join docs
27935
279362012-08-24 Tom Tromey <tromey@redhat.com>
27937
27938 minor documentation updates
27939
279402012-08-23 Tom Tromey <tromey@redhat.com>
27941
27942 document until-condition
27943
27944 first draft of threads documentation
27945
27946 rename condition-variablep to condition-variable-p
27947
27948 document process-thread and set-process-thread
27949
279502012-08-20 Tom Tromey <tromey@redhat.com>
27951
27952 pass the thread name to the OS if possible
27953
27954 use prctl to pass the thread name to the OS, if possible
27955
279562012-08-20 Tom Tromey <tromey@redhat.com>
27957
27958 add convenience macros with-mutex and until-condition
27959
27960 with-mutex is a safe way to run some code with a mutex held.
27961 until-condition is a safe way to wait on a condition variable.
27962
279632012-08-20 Tom Tromey <tromey@redhat.com>
27964
27965 Merge from trunk
27966
279672012-08-19 Tom Tromey <tromey@redhat.com>
27968
27969 another docstring fixlet
27970
27971 minor docstring fixup
27972
27973 add condition-mutex and condition-name
27974
27975 ensure name of a thread is a string
27976
27977 ensure name of a mutex is a string
27978
27979 use NILP
27980
279812012-08-19 Tom Tromey <tromey@redhat.com>
27982
27983 condition variables
27984
27985 This implements condition variables for elisp.
27986 This needs more tests.
27987
279882012-08-19 Tom Tromey <tromey@redhat.com>
27989
27990 comment fixes
27991
279922012-08-19 Tom Tromey <tromey@redhat.com>
27993
27994 refactor systhread.h
27995
27996 This refactors systhread.h to move the notion of a "lisp mutex"
27997 into thread.c. This lets us make make the global lock and
27998 post_acquire_global_lock static.
27999
280002012-08-17 Tom Tromey <tromey@redhat.com>
28001
28002 write docstrings for the thread functions
28003
28004 declare unbind_for_thread_switch and rebind_for_thread_switch in lisp.h
28005
280062012-08-15 Tom Tromey <tromey@redhat.com>
28007
28008 add test case for I/O switching
28009
280102012-08-15 Tom Tromey <tromey@redhat.com>
28011
28012 process changes
28013
28014 This changes wait_reading_process_output to handle threads better. It
28015 introduces a wrapper for select that releases the global lock, and it
28016 ensures that only a single thread can select a given file descriptor
28017 at a time.
28018
28019 This also adds the thread-locking feature to processes. By default a
28020 process can only have its output accepted by the thread that created
28021 it. This can be changed using set-process-thread. (If the thread
28022 exits, the process is again available for waiting by any thread.)
28023
28024 Note that thread-signal will not currently interrupt a thread blocked
28025 on select. I'll fix this later.
28026
280272012-08-15 Tom Tromey <tromey@redhat.com>
28028
28029 Prepare process.c for threads by not having global select masks.
28030 The next step is to make it so selects can choose fds by thread.
28031
280322012-08-15 Tom Tromey <tromey@redhat.com>
28033
28034 fix a latent bug in process.c
28035
28036 * process.c (wait_reading_process_output): Check Writeok bits,
28037 not write_mask.
28038
280392012-08-15 Tom Tromey <tromey@redhat.com>
28040
28041 This adds thread-blocker, a function to examine what a thread is
28042 blocked on. I thought this would be another nice debugging addition.
28043
28044 This adds names to mutexes. This seemed like a nice debugging
28045 extension.
28046
28047 This adds some tests of the threading code.
28048
280492012-08-15 Tom Tromey <tromey@redhat.com>
28050
28051 This supplies the mutex implementation for Emacs Lisp.
28052
28053 A lisp mutex is implemented using a condition variable, so that we can
28054 interrupt a mutex-lock operation by calling thread-signal on the
28055 blocking thread. I did things this way because pthread_mutex_lock
28056 can't readily be interrupted.
28057
280582012-08-15 Tom Tromey <tromey@redhat.com>
28059
28060 This adds most of the thread features visible to emacs lisp.
28061
28062 I roughly followed the Bordeaux threads API:
28063
28064 http://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation
28065
28066 ... but not identically. In particular I chose not to implement
28067 interrupt-thread or destroy-thread, but instead a thread-signalling
28068 approach.
28069
28070 I'm still undecided about *default-special-bindings* (which I did not
28071 implement). I think it would be more emacs-like to capture the let
28072 bindings at make-thread time, but IIRC Stefan didn't like this idea
28073 the first time around.
28074
28075 There are one or two semantics issues pointed out in the patch where I
28076 could use some advice.
28077
280782012-08-15 Tom Tromey <tromey@redhat.com>
28079
28080 This turns thread_state into a pseudovector and updates various bits
28081 of Emacs to cope.
28082
280832012-08-15 Tom Tromey <tromey@redhat.com>
28084
28085 This introduces some new functions to handle the specpdl. The basic
28086 idea is that when a thread loses the interpreter lock, it will unbind
28087 the bindings it has put in place. Then when a thread acquires the
28088 lock, it will restore its bindings.
28089
28090 This code reuses an existing empty slot in struct specbinding to store
28091 the current value when the thread is "swapped out".
28092
28093 This approach performs worse than my previously planned approach.
28094 However, it was one I could implement with minimal time and
28095 brainpower. I hope that perhaps someone else could improve the code
28096 once it is in.
28097
280982012-08-15 Tom Tromey <tromey@redhat.com>
28099
28100 This introduces the low-level system threading support. It also adds
28101 the global lock. The low-level support is a bit over-eager, in that
28102 even at the end of the present series, it will not all be used. I
28103 think thiat is ok since I plan to use it all eventually -- in
28104 particular for the emacs lisp mutex implementation.
28105
28106 I've only implemented the pthreads-based version. I think it should
28107 be relatively clear how to port this to other systems, though.
28108
28109 I'd also like to do a "no threads" port that will turn most things
28110 into no-ops, and have thread-creation fail. I was thinking perhaps
28111 I'd make a future (provide 'threads) conditional on threads actually
28112 working.
28113
28114 One other minor enhancement available here is to make it possible to
28115 set the name of the new thread at the OS layer. That way gdb, e.g.,
28116 could display thread names.
28117
281182012-08-15 Tom Tromey <tromey@redhat.com>
28119
28120 This parameterizes the GC a bit to make it thread-ready.
28121
28122 The basic idea is that whenever a thread "exits lisp" -- that is,
28123 releases the global lock in favor of another thread -- it must save
28124 its stack boundaries in the thread object. This way the boundaries
28125 are always available for marking. This is the purpose of
28126 flush_stack_call_func.
28127
28128 I haven't tested this under all the possible GC configurations.
28129 There is a new FIXME in a spot that i didn't convert.
28130
28131 Arguably all_threads should go in the previous patch.
28132
281332012-08-15 Tom Tromey <tromey@redhat.com>
28134
28135 This introduces a thread-state object and moves various C globals
28136 there. It also introduces #defines for these globals to avoid a
28137 monster patch.
28138
28139 The #defines mean that this patch also has to rename a few fields
28140 whose names clash with the defines.
28141
28142 There is currently just a single "thread"; so this patch does not
28143 impact Emacs behavior in any significant way.
28144
12016-12-07 Paul Eggert <eggert@cs.ucla.edu> 281452016-12-07 Paul Eggert <eggert@cs.ucla.edu>
2 28146
3 Merge from origin/emacs-25 28147 Merge from origin/emacs-25
@@ -193,10 +28337,13 @@
193 28337
194 ibuffer: compare marks with EQ 28338 ibuffer: compare marks with EQ
195 28339
196 * lisp/ibuffer (ibuffer-update-title-and-summary, ibuffer-redisplay-current) 28340 * lisp/ibuffer.el:
28341 (ibuffer-update-title-and-summary)
28342 (ibuffer-redisplay-current)
197 (ibuffer-buffer-name-face, ibuffer-unmark-all) 28343 (ibuffer-buffer-name-face, ibuffer-unmark-all)
198 (ibuffer-count-deletion-lines, ibuffer-buffer-names-with-mark): 28344 (ibuffer-count-deletion-lines, ibuffer-buffer-names-with-mark):
199 Use 'eq' instead of 'char-equal' when comparing mark characters (Bug#25000). 28345 Use 'eq' instead of 'char-equal' when comparing mark characters
28346 (Bug#25000).
200 * test/lisp/ibuffer-tests.el (ibuffer-test-Bug25000): 28347 * test/lisp/ibuffer-tests.el (ibuffer-test-Bug25000):
201 Update test result as pass. 28348 Update test result as pass.
202 28349
@@ -341,7 +28488,7 @@
341 28488
342 Make TAB and M-TAB run widget-forward and widget-backward (bug#25091) 28489 Make TAB and M-TAB run widget-forward and widget-backward (bug#25091)
343 28490
344 * lisp/gnus/mm-decode (mm-convert-shr-links): Avoid `shr-next-link' 28491 * lisp/gnus/mm-decode.el (mm-convert-shr-links): Avoid `shr-next-link'
345 and `shr-previous-link' so TAB and M-TAB run `widget-forward' and 28492 and `shr-previous-link' so TAB and M-TAB run `widget-forward' and
346 `widget-backward' instead (bug#25091). 28493 `widget-backward' instead (bug#25091).
347 28494
@@ -1138,7 +29285,7 @@
1138 29285
1139 Allow user control of progress messages in cpp.el 29286 Allow user control of progress messages in cpp.el
1140 29287
1141 * progmodes/cpp.el (cpp-message-min-time-interval): New defcustom. 29288 * lisp/progmodes/cpp.el (cpp-message-min-time-interval): New defcustom.
1142 (cpp-progress-time): Use 'cpp-message-min-time-interval'. Improve 29289 (cpp-progress-time): Use 'cpp-message-min-time-interval'. Improve
1143 the doc string. 29290 the doc string.
1144 (cpp-highlight-buffer): Use 'cpp-progress-message' instead of 29291 (cpp-highlight-buffer): Use 'cpp-progress-message' instead of
@@ -1216,7 +29363,7 @@
1216 This option allows the user to specify where to place point after these 29363 This option allows the user to specify where to place point after these
1217 commands. 29364 commands.
1218 29365
1219 * comint.el (comint-move-point-for-matching-input): New user option. 29366 * lisp/comint.el (comint-move-point-for-matching-input): New user option.
1220 (comint-previous-matching-input-from-input): Use user option. 29367 (comint-previous-matching-input-from-input): Use user option.
1221 29368
12222016-11-22 Michael Albinus <michael.albinus@gmx.de> 293692016-11-22 Michael Albinus <michael.albinus@gmx.de>
@@ -1804,7 +29951,7 @@
1804 Check for header-line-format instead. 29951 Check for header-line-format instead.
1805 * lisp/emulation/viper.el (viper-load-custom-file): Reference 29952 * lisp/emulation/viper.el (viper-load-custom-file): Reference
1806 major-mode instead. 29953 major-mode instead.
1807 * lisp-mail-feedmail.el (feedmail-fill-to-cc-fill-column): Use 29954 * lisp/mail/feedmail.el (feedmail-fill-to-cc-fill-column): Use
1808 fill-column instead. 29955 fill-column instead.
1809 29956
18102016-11-15 Simen Heggestøyl <simenheg@gmail.com> 299572016-11-15 Simen Heggestøyl <simenheg@gmail.com>
@@ -1844,9 +29991,9 @@
1844 29991
1845 Update verilog-mode.el 29992 Update verilog-mode.el
1846 29993
1847 * verilog-mode.el (verilog-read-decls, verilog-calc-1): Fix 29994 * lisp/progmodes/verilog-mode.el (verilog-read-decls)
1848 "default clocking" indentation and preventing AUTOs from working, 29995 (verilog-calc-1): Fix "default clocking" indentation and
1849 bug1084. Reported by Alan Morgan. 29996 preventing AUTOs from working, bug1084. Reported by Alan Morgan.
1850 (verilog-diff-report): Fix `verilog-diff-report' 29997 (verilog-diff-report): Fix `verilog-diff-report'
1851 not returning bad status on differences, bug1087. Reported by 29998 not returning bad status on differences, bug1087. Reported by
1852 Eric Jackowski. 29999 Eric Jackowski.
@@ -1920,7 +30067,7 @@
1920 30067
1921 * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): 30068 * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
1922 * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): 30069 * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
1923 * lisp/net/lisp/net/tramp-sh.el (tramp-maybe-open-connection): 30070 * lisp/net/tramp-sh.el (tramp-maybe-open-connection):
1924 * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Use it. 30071 * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Use it.
1925 30072
1926 * test/lisp/files-x-tests.el: New file. 30073 * test/lisp/files-x-tests.el: New file.
@@ -1953,7 +30100,7 @@
1953 * lisp/international/mule.el (auto-coding-alist-lookup): 30100 * lisp/international/mule.el (auto-coding-alist-lookup):
1954 * lisp/files.el (file-truename): 30101 * lisp/files.el (file-truename):
1955 (abbreviate-file-name, set-auto-mode, file-relative-name): 30102 (abbreviate-file-name, set-auto-mode, file-relative-name):
1956 * package.el (package-untar-buffer): Use 30103 * lisp/emacs-lisp/package.el (package-untar-buffer): Use
1957 'file-name-case-insensitive-p' instead of 'system-type' to test 30104 'file-name-case-insensitive-p' instead of 'system-type' to test
1958 case-insensitivity. 30105 case-insensitivity.
1959 30106
@@ -2254,7 +30401,7 @@
2254 30401
2255 Fix references to long obsoleted functions/aliases 30402 Fix references to long obsoleted functions/aliases
2256 30403
2257 * doc/lispintro/emacs-list-intro.texi (Miscellaneous): 30404 * doc/lispintro/emacs-lisp-intro.texi (Miscellaneous):
2258 * doc/misc/cl.texi (Conditionals): 30405 * doc/misc/cl.texi (Conditionals):
2259 * doc/misc/speedbar.texi (Major Display Modes): Use string-to-number, 30406 * doc/misc/speedbar.texi (Major Display Modes): Use string-to-number,
2260 not string-to-int. 30407 not string-to-int.
@@ -3079,13 +31226,13 @@
3079 31226
3080 Only two of the commands there were autoloaded, one of which is an 31227 Only two of the commands there were autoloaded, one of which is an
3081 easter egg. 31228 easter egg.
3082 * lisp/miscl.el (copy-from-above-command): 31229 * lisp/misc.el (copy-from-above-command):
3083 * lisp/miscl.el (zap-up-to-char): 31230 * lisp/misc.el (zap-up-to-char):
3084 * lisp/miscl.el (mark-beginning-of-buffer): 31231 * lisp/misc.el (mark-beginning-of-buffer):
3085 * lisp/miscl.el (mark-end-of-buffer): 31232 * lisp/misc.el (mark-end-of-buffer):
3086 * lisp/miscl.el (upcase-char): 31233 * lisp/misc.el (upcase-char):
3087 * lisp/miscl.el (forward-to-word): 31234 * lisp/misc.el (forward-to-word):
3088 * lisp/miscl.el (backward-to-word): 31235 * lisp/misc.el (backward-to-word):
3089 Add autoload cookie. 31236 Add autoload cookie.
3090 31237
30912016-10-22 Martin Rudalics <rudalics@gmx.at> 312382016-10-22 Martin Rudalics <rudalics@gmx.at>
@@ -3157,7 +31304,7 @@
3157 31304
3158 See Bug#24747. 31305 See Bug#24747.
3159 31306
3160 * progmodes/cc-mode-tests.el: Rename from cc-mode.el; fix typo in 31307 * test/lisp/progmodes/cc-mode-tests.el: Rename from cc-mode.el; fix typo in
3161 file-local variable; add comments to make checkdoc happy. 31308 file-local variable; add comments to make checkdoc happy.
3162 31309
31632016-10-20 Michael Albinus <michael.albinus@gmx.de> 313102016-10-20 Michael Albinus <michael.albinus@gmx.de>
@@ -3330,14 +31477,14 @@
3330 31477
3331 use full time objects (lists) instead of floats when possible 31478 use full time objects (lists) instead of floats when possible
3332 31479
3333 * midnight.el (midnight-buffer-display-time): Remove 31480 * lisp/midnight.el (midnight-buffer-display-time): Remove
3334 (clean-buffer-list): Use float time only for time comparison 31481 (clean-buffer-list): Use float time only for time comparison
3335 31482
33362016-10-15 Sam Steingold <sds@gnu.org> 314832016-10-15 Sam Steingold <sds@gnu.org>
3337 31484
3338 Save and restore buffer-display-time 31485 Save and restore buffer-display-time
3339 31486
3340 * desktop.el (desktop-locals-to-save): Add `buffer-display-time' 31487 * lisp/desktop.el (desktop-locals-to-save): Add `buffer-display-time'
3341 (desktop-read): Set `desktop-file-modtime' before loading the desktop file 31488 (desktop-read): Set `desktop-file-modtime' before loading the desktop file
3342 (desktop-create-buffer): Adjust `buffer-display-time' for the downtime 31489 (desktop-create-buffer): Adjust `buffer-display-time' for the downtime
3343 31490
@@ -3351,7 +31498,7 @@
3351 bracketed paste for that buffer. If bracketed paste is inhiited for at 31498 bracketed paste for that buffer. If bracketed paste is inhiited for at
3352 least one buffer in a terminal, it is disabled for the whole terminal. 31499 least one buffer in a terminal, it is disabled for the whole terminal.
3353 31500
3354 * term/xterm.el (xterm-inhibit-bracketed-paste-mode): New mode to 31501 * lisp/term/xterm.el (xterm-inhibit-bracketed-paste-mode): New mode to
3355 inhibit XTerm bracketed paste per buffer. 31502 inhibit XTerm bracketed paste per buffer.
3356 (xterm--buffer-terminals, xterm--update-bracketed-paste) 31503 (xterm--buffer-terminals, xterm--update-bracketed-paste)
3357 (xterm--bracketed-paste-possible, xterm--is-xterm): New helper 31504 (xterm--bracketed-paste-possible, xterm--is-xterm): New helper
@@ -3361,7 +31508,7 @@
3361 (terminal-init-xterm): Update bracketed paste status when 31508 (terminal-init-xterm): Update bracketed paste status when
3362 initializing an XTerm and on window configuration change. 31509 initializing an XTerm and on window configuration change.
3363 31510
3364 * term.el (term-char-mode, term-line-mode): Inhibit XTerm 31511 * lisp/term.el (term-char-mode, term-line-mode): Inhibit XTerm
3365 bracketed paste in char mode. 31512 bracketed paste in char mode.
3366 31513
33672016-10-15 Dima Kogan <dima@secretsauce.net> 315142016-10-15 Dima Kogan <dima@secretsauce.net>
@@ -3437,7 +31584,7 @@
3437 31584
3438 Add test for Bug#24627 31585 Add test for Bug#24627
3439 31586
3440 * /test/lisp/thingatpt-tests.el (thing-at-point-bug24627): New test. 31587 * test/lisp/thingatpt-tests.el (thing-at-point-bug24627): New test.
3441 31588
34422016-10-12 Eli Zaretskii <eliz@gnu.org> 315892016-10-12 Eli Zaretskii <eliz@gnu.org>
3443 31590
@@ -3633,7 +31780,7 @@
3633 31780
36342016-10-05 Mark Oteiza <mvoteiza@udel.edu> 317812016-10-05 Mark Oteiza <mvoteiza@udel.edu>
3635 31782
3636 * lisp/url-url-parse.el (url-generic-parse-url): Unquote macro URL argument. 31783 * lisp/url/url-parse.el (url-generic-parse-url): Unquote macro URL argument.
3637 31784
36382016-10-05 Mark Oteiza <mvoteiza@udel.edu> 317852016-10-05 Mark Oteiza <mvoteiza@udel.edu>
3639 31786
@@ -5432,13 +33579,13 @@
5432 * lisp/net/tramp-adb.el (tramp-adb-parse-device-names) 33579 * lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
5433 (tramp-adb-maybe-open-connection): 33580 (tramp-adb-maybe-open-connection):
5434 * lisp/net/tramp-cache.el (tramp-get-connection-property): 33581 * lisp/net/tramp-cache.el (tramp-get-connection-property):
5435 * tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch): 33582 * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
5436 * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel) 33583 * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel)
5437 (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection): 33584 (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection):
5438 * tramp-sh.el (tramp-process-sentinel) 33585 * lisp/net/tramp-sh.el (tramp-process-sentinel)
5439 (tramp-sh-handle-file-notify-add-watch) 33586 (tramp-sh-handle-file-notify-add-watch)
5440 (tramp-maybe-open-connection): 33587 (tramp-maybe-open-connection):
5441 * lisp/net/lisp/net/lisp/net/tramp-smb.el (tramp-smb-action-with-tar) 33588 * lisp/net/tramp-smb.el (tramp-smb-action-with-tar)
5442 (tramp-smb-handle-copy-directory, tramp-smb-action-get-acl) 33589 (tramp-smb-handle-copy-directory, tramp-smb-action-get-acl)
5443 (tramp-smb-handle-process-file, tramp-smb-action-set-acl) 33590 (tramp-smb-handle-process-file, tramp-smb-action-set-acl)
5444 (tramp-smb-get-cifs-capabilities) 33591 (tramp-smb-get-cifs-capabilities)
@@ -6386,7 +34533,7 @@
6386 This can happen with `revert-buffer' or sometimes `find-file', when the file 34533 This can happen with `revert-buffer' or sometimes `find-file', when the file
6387 is already in a buffer, but the file has been changed outside of Emacs. 34534 is already in a buffer, but the file has been changed outside of Emacs.
6388 34535
6389 * lisp/progmodes/cc-mode (c-after-change): When we detect a missing 34536 * lisp/progmodes/cc-mode.el (c-after-change): When we detect a missing
6390 invocation of c-before-change-functions, we assume the changed region is the 34537 invocation of c-before-change-functions, we assume the changed region is the
6391 entire buffer, and call c-before-change explicitly before proceding. 34538 entire buffer, and call c-before-change explicitly before proceding.
6392 34539
@@ -6828,7 +34975,7 @@
6828 34975
6829 Widen in certain low level CC Mode functions. This fixes bug #24148. 34976 Widen in certain low level CC Mode functions. This fixes bug #24148.
6830 34977
6831 * lisp/progmodes/cc-engine (c-state-semi-pp-to-literal) 34978 * lisp/progmodes/cc-engine.el (c-state-semi-pp-to-literal)
6832 (c-state-full-pp-to-literal): Widen around the functionality. 34979 (c-state-full-pp-to-literal): Widen around the functionality.
6833 (c-parse-ps-state-below): Correct the order of save-excursion and 34980 (c-parse-ps-state-below): Correct the order of save-excursion and
6834 save-restriction. 34981 save-restriction.
@@ -7001,7 +35148,8 @@
7001 35148
70022016-08-02 Stefan Monnier <monnier@iro.umontreal.ca> 351492016-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
7003 35150
7004 * cl-generic.el: Fix problems introduced by new load-history format 35151 * lisp/emacs-lisp/cl-generic.el: Fix problems introduced by new
35152 load-history format
7005 35153
7006 * lisp/emacs-lisp/cl-generic.el (cl--generic-load-hist-format): New function. 35154 * lisp/emacs-lisp/cl-generic.el (cl--generic-load-hist-format): New function.
7007 (cl-generic-define-method, cl--generic-describe): Use it. 35155 (cl-generic-define-method, cl--generic-describe): Use it.
@@ -7128,7 +35276,7 @@
7128 35276
7129 Don’t (require 'cl) 35277 Don’t (require 'cl)
7130 35278
7131 * test/src/regex-test.el: Don’t (require 'cl). 35279 * test/src/regex-tests.el: Don’t (require 'cl).
7132 (regex-tests-PCRE): s/loop/cl-loop/ 35280 (regex-tests-PCRE): s/loop/cl-loop/
7133 35281
71342016-08-02 Michal Nazarewicz <mina86@mina86.com> 352822016-08-02 Michal Nazarewicz <mina86@mina86.com>
@@ -7292,8 +35440,8 @@
7292 prompt the user to save it, so the customization is not lost on 35440 prompt the user to save it, so the customization is not lost on
7293 restart. 35441 restart.
7294 35442
7295 * gnus-srvr.el (gnus-server-toggle-cloud-method-server): Prompt to 35443 * lisp/gnus/gnus-srvr.el (gnus-server-toggle-cloud-method-server):
7296 save the customization of `gnus-cloud-method'. 35444 Prompt to save the customization of `gnus-cloud-method'.
7297 35445
72982016-07-27 Ken Brown <kbrown@cornell.edu> 354462016-07-27 Ken Brown <kbrown@cornell.edu>
7299 35447
@@ -7344,7 +35492,8 @@
7344 35492
73452016-07-25 Ted Zlatanov <tzz@lifelogs.com> 354932016-07-25 Ted Zlatanov <tzz@lifelogs.com>
7346 35494
7347 * gnus-cloud.el (gnus-cloud-encode-data): Fix 'base64-gzip encoding. 35495 * lisp/gnus/gnus-cloud.el (gnus-cloud-encode-data): Fix
35496 'base64-gzip encoding.
7348 35497
73492016-07-25 Andrew Hyatt <ahyatt@gmail.com> 354982016-07-25 Andrew Hyatt <ahyatt@gmail.com>
7350 35499
@@ -7940,7 +36089,7 @@
7940 36089
79412016-07-12 Stefan Monnier <monnier@iro.umontreal.ca> 360902016-07-12 Stefan Monnier <monnier@iro.umontreal.ca>
7942 36091
7943 * cl-generic.el (cl-defmethod): Make docstring dynamic 36092 * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Make docstring dynamic
7944 36093
7945 * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Make docstring dynamic. 36094 * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Make docstring dynamic.
7946 (cl--generic-make-defmethod-docstring): New function for that. 36095 (cl--generic-make-defmethod-docstring): New function for that.
@@ -7999,7 +36148,7 @@
7999 * src/gtkutil.c (xg_hide_tip): New function. 36148 * src/gtkutil.c (xg_hide_tip): New function.
8000 (xg_hide_tooltip): Adjust to cancel GTK event loop timeout if needed. 36149 (xg_hide_tooltip): Adjust to cancel GTK event loop timeout if needed.
8001 * src/menu.c (Fx_popup_menu): Adjust call to Fx_hide_tip. 36150 * src/menu.c (Fx_popup_menu): Adjust call to Fx_hide_tip.
8002 * src/nsfns.c (toplevel): Remove 'tip_frame' leftover. 36151 * src/nsfns.m (toplevel): Remove 'tip_frame' leftover.
8003 * src/w32fns.c (unwind_create_tip_frame): Remove. 36152 * src/w32fns.c (unwind_create_tip_frame): Remove.
8004 (w32_display_monitor_attributes_list) 36153 (w32_display_monitor_attributes_list)
8005 (w32_display_monitor_attributes_list_fallback): Use FRAME_TOOLTIP_P. 36154 (w32_display_monitor_attributes_list_fallback): Use FRAME_TOOLTIP_P.
@@ -8086,7 +36235,7 @@
8086 36235
8087 Dired always read file system 36236 Dired always read file system
8088 36237
8089 * dired.el (dired-always-read-filesystem): Add new option. 36238 * lisp/dired.el (dired-always-read-filesystem): Add new option.
8090 (dired-mark-files-containing-regexp): Use it (Bug#22694). 36239 (dired-mark-files-containing-regexp): Use it (Bug#22694).
8091 * doc/emacs/dired.texi: Mention it in the manual. 36240 * doc/emacs/dired.texi: Mention it in the manual.
8092 * test/lisp/dired-tests.el (dired-test-bug22694): Add test. 36241 * test/lisp/dired-tests.el (dired-test-bug22694): Add test.
@@ -8289,8 +36438,8 @@
8289 36438
8290 Copy buffer names to kill ring 36439 Copy buffer names to kill ring
8291 36440
8292 * ibuf-ext.el (ibuffer-copy-buffername-as-kill): New command. 36441 * lisp/ibuf-ext.el (ibuffer-copy-buffername-as-kill): New command.
8293 * lisp/ibuffer (ibuffer-mode-map): Bound it to 'B'. 36442 * lisp/ibuffer.el (ibuffer-mode-map): Bound it to 'B'.
8294 ;* etc/NEWS: Add entry for this new feature. 36443 ;* etc/NEWS: Add entry for this new feature.
8295 36444
82962016-07-07 Tino Calancha <tino.calancha@gmail.com> 364452016-07-07 Tino Calancha <tino.calancha@gmail.com>
@@ -8313,8 +36462,8 @@
8313 36462
8314 Prevent NS event loop being re-entered (bug#11049) 36463 Prevent NS event loop being re-entered (bug#11049)
8315 36464
8316 * nsterm.m (ns_read_socket, ns_select): Return -1 if already in event 36465 * src/nsterm.m (ns_read_socket, ns_select): Return -1 if already
8317 loop instead of aborting. 36466 in event loop instead of aborting.
8318 36467
83192016-07-07 Alan Third <alan@idiocy.org> 364682016-07-07 Alan Third <alan@idiocy.org>
8320 36469
@@ -8519,11 +36668,11 @@
8519 * configure.ac [USE_X_TOOLKIT]: Define X_TOOLKIT_EDITRES if 36668 * configure.ac [USE_X_TOOLKIT]: Define X_TOOLKIT_EDITRES if
8520 _XEditResCheckMessages is declared in X11/Xmu/Editres.h and may be 36669 _XEditResCheckMessages is declared in X11/Xmu/Editres.h and may be
8521 linked with -lXmu. This should work with any non-ancient Xmu library. 36670 linked with -lXmu. This should work with any non-ancient Xmu library.
8522 * xfns.c (toplevel): Remove old cruft. 36671 * src/xfns.c (toplevel): Remove old cruft.
8523 (x_window) [USE_X_TOOLKIT]: Use X_TOOLKIT_EDITRES. 36672 (x_window) [USE_X_TOOLKIT]: Use X_TOOLKIT_EDITRES.
8524 * xterm.c (toplevel): Remove old cruft. 36673 * src/xterm.c (toplevel): Remove old cruft.
8525 (handle_one_xevent): Use X_TOOLKIT_EDITRES. 36674 (handle_one_xevent): Use X_TOOLKIT_EDITRES.
8526 * xterm.h (toplevel): Include X11/Xmu/Editres.h if X_TOOLKIT_EDITRES. 36675 * src/xterm.h (toplevel): Include X11/Xmu/Editres.h if X_TOOLKIT_EDITRES.
8527 36676
85282016-07-04 Michael Albinus <michael.albinus@gmx.de> 366772016-07-04 Michael Albinus <michael.albinus@gmx.de>
8529 36678
@@ -9661,7 +37810,8 @@
9661 37810
96622016-06-15 Ted Zlatanov <tzz@lifelogs.com> 378112016-06-15 Ted Zlatanov <tzz@lifelogs.com>
9663 37812
9664 * generic-x.el (ansible-inventory-generic-mode): Warn if value is missing 37813 * lisp/generic-x.el (ansible-inventory-generic-mode): Warn if
37814 value is missing
9665 37815
96662016-06-15 Tim Chambers <tbc@alum.mit.edu> (tiny change) 378162016-06-15 Tim Chambers <tbc@alum.mit.edu> (tiny change)
9667 37817
@@ -10333,7 +38483,7 @@
10333 38483
10334 Fix incomplete handling of translation table in a coding system. 38484 Fix incomplete handling of translation table in a coding system.
10335 38485
10336 * coding.c (get_translation): New arg NCHARS. Even if TRANS 38486 * src/coding.c (get_translation): New arg NCHARS. Even if TRANS
10337 is an alist, return a character or a vector of character. 38487 is an alist, return a character or a vector of character.
10338 (produce_chars): Adjust for the above change. 38488 (produce_chars): Adjust for the above change.
10339 (consume_chars): Likewise. 38489 (consume_chars): Likewise.
@@ -11721,8 +39871,8 @@
11721 39871
11722 Fixes bug #16759 and bug #23476. 39872 Fixes bug #16759 and bug #23476.
11723 39873
11724 * .dir-locals: Put the c-noise-macros-with-paren-names setting back into the C 39874 * .dir-locals.el: Put the c-noise-macros-with-paren-names setting
11725 Mode value. 39875 back into the C Mode value.
11726 39876
11727 * lisp/progmodes/cc-mode.el: (c-basic-common-init): Remove the call to 39877 * lisp/progmodes/cc-mode.el: (c-basic-common-init): Remove the call to
11728 c-make-macro-with-semi-re. 39878 c-make-macro-with-semi-re.
@@ -12100,8 +40250,7 @@
12100 40250
121012016-05-04 Stefan Monnier <monnier@iro.umontreal.ca> 402512016-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
12102 40252
12103 * lisp/emulation/viper(-cmd)?.el: Use lexical-binding. 40253 * lisp/emulation/viper.el:
12104
12105 * lisp/emulation/viper-cmd.el: Use lexical-binding. 40254 * lisp/emulation/viper-cmd.el: Use lexical-binding.
12106 (viper-change-state-to-vi, viper-change-state-to-emacs): Allow dummy 40255 (viper-change-state-to-vi, viper-change-state-to-emacs): Allow dummy
12107 args, for use in advice-add. 40256 args, for use in advice-add.
@@ -12346,8 +40495,9 @@
12346 40495
12347 gitmerge: Add cherry pick to gitmerge-skip-regexp 40496 gitmerge: Add cherry pick to gitmerge-skip-regexp
12348 40497
12349 * gitmerge.el (gitmerge-skip-regexp): Add "cherry picked from commit", 40498 * admin/gitmerge.el (gitmerge-skip-regexp): Add "cherry picked
12350 which is the string appended by 'git cherry-pick -x'. 40499 from commit", which is the string appended by 'git cherry-pick
40500 -x'.
12351 40501
123522016-05-01 Lars Ingebrigtsen <larsi@gnus.org> 405022016-05-01 Lars Ingebrigtsen <larsi@gnus.org>
12353 40503
@@ -12642,7 +40792,8 @@
12642 40792
126432016-04-30 Alan Mackenzie <acm@muc.de> 407932016-04-30 Alan Mackenzie <acm@muc.de>
12644 40794
12645 * .dir-locals: Amend for correct fontification of *.[ch] containing "IF_LINT" 40795 * .dir-locals.el: Amend for correct fontification of *.[ch]
40796 containing "IF_LINT"
12646 40797
126472016-04-30 Lars Ingebrigtsen <larsi@gnus.org> 407982016-04-30 Lars Ingebrigtsen <larsi@gnus.org>
12648 40799
@@ -12669,7 +40820,7 @@
12669 40820
12670 CC Mode: Recognize a noise macro with parens after a declarator's identifier 40821 CC Mode: Recognize a noise macro with parens after a declarator's identifier
12671 40822
12672 * lisp/progmodes/cc-engine (c-forward-decl-or-cast-1): In the while loop 40823 * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): In the while loop
12673 following comment "Skip over type decl suffix operators." insert code also 40824 following comment "Skip over type decl suffix operators." insert code also
12674 to check for noise macros with parentheses. 40825 to check for noise macros with parentheses.
12675 40826
@@ -13173,9 +41324,10 @@
13173 41324
13174 Add a number of Python 3 exceptions 41325 Add a number of Python 3 exceptions
13175 41326
13176 * lisp/progmoes/python.el (python-font-lock-keywords): Clean up the exception 41327 * lisp/progmodes/python.el (python-font-lock-keywords): Clean up
13177 list, adding a number of new Python 3 exceptions and moving some exceptions 41328 the exception list, adding a number of new Python 3 exceptions and
13178 to the Python 2 and 3 list as Python 2.7 includes them. 41329 moving some exceptions to the Python 2 and 3 list as Python 2.7
41330 includes them.
13179 41331
131802016-04-26 Anders Lindgren <andlind@gmail.com> 413322016-04-26 Anders Lindgren <andlind@gmail.com>
13181 41333
@@ -13475,12 +41627,12 @@
13475 41627
13476 Compute User-Agent dynamically in url-http 41628 Compute User-Agent dynamically in url-http
13477 41629
13478 * url-http.el (url-http-user-agent-string): Compute User-Agent 41630 * lisp/url/url-http.el (url-http-user-agent-string): Compute
13479 string dynamically. 41631 User-Agent string dynamically.
13480 (url-http--user-agent-default-string): New function. 41632 (url-http--user-agent-default-string): New function.
13481 41633
13482 * url-vars.el (url-privacy-level): Allow `emacs' in list of 41634 * lisp/url/url-vars.el (url-privacy-level): Allow `emacs' in list
13483 information not to send. 41635 of information not to send.
13484 (url-user-agent): Add nil and `default' options; do not 41636 (url-user-agent): Add nil and `default' options; do not
13485 pre-compute value. 41637 pre-compute value.
13486 41638
@@ -13581,7 +41733,7 @@
13581 41733
13582 Use 'ucs-names' for character name escapes 41734 Use 'ucs-names' for character name escapes
13583 41735
13584 * lread.c (invalid_character_name, check_scalar_value) 41736 * src/lread.c (invalid_character_name, check_scalar_value)
13585 (parse_code_after_prefix, character_name_to_code): New helper 41737 (parse_code_after_prefix, character_name_to_code): New helper
13586 functions that use 'ucs-names' and parsing for CJK ideographs. 41738 functions that use 'ucs-names' and parsing for CJK ideographs.
13587 (read_escape): Use helper functions. 41739 (read_escape): Use helper functions.
@@ -13605,7 +41757,7 @@
13605 41757
13606 Implement named character escapes, similar to Perl 41758 Implement named character escapes, similar to Perl
13607 41759
13608 * lread.c (init_character_names): New function. 41760 * src/lread.c (init_character_names): New function.
13609 (read_escape): Read Perl-style named character escape sequences. 41761 (read_escape): Read Perl-style named character escape sequences.
13610 (syms_of_lread): Initialize new variable 'character_names'. 41762 (syms_of_lread): Initialize new variable 'character_names'.
13611 * test/src/lread-tests.el (lread-char-empty-name): Add test file 41763 * test/src/lread-tests.el (lread-char-empty-name): Add test file
@@ -13652,13 +41804,13 @@
13652 41804
13653 Prevent bootstrap autoload backup files 41805 Prevent bootstrap autoload backup files
13654 41806
13655 * lisp/emacs-lisp/autoload (autoload-find-generated-file): Suppress 41807 * lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Suppress
13656 backups in newly created file. 41808 backups in newly created file.
13657 41809
13658 (autoload-ensure-default-file): Function split into two. 41810 (autoload-ensure-default-file): Function split into two.
13659 (autoload-ensure-file-writeable): New function from split. 41811 (autoload-ensure-file-writeable): New function from split.
13660 41812
13661 (Bug#23203) 41813 (Bug#23203)
13662 41814
136632016-04-20 Paul Eggert <eggert@penguin.cs.ucla.edu> 418152016-04-20 Paul Eggert <eggert@penguin.cs.ucla.edu>
13664 41816
@@ -14955,8 +43107,8 @@
14955 * lisp/progmodes/cc-engine.el (c-back-over-member-initializers): Check 43107 * lisp/progmodes/cc-engine.el (c-back-over-member-initializers): Check
14956 more robustly for ":" token when searching backwards for it. 43108 more robustly for ":" token when searching backwards for it.
14957 43109
14958 * lisp/progmodes/cc-langs (c-:$-multichar-token-regexp): New language 43110 * lisp/progmodes/cc-langs.el (c-:$-multichar-token-regexp): New
14959 variable. 43111 language variable.
14960 43112
14961 [This reapplies commit 9e5452f7166e3634f2d8e943815ed722e1672714, 43113 [This reapplies commit 9e5452f7166e3634f2d8e943815ed722e1672714,
14962 which was inadvertently lost by merge commit 43114 which was inadvertently lost by merge commit
@@ -15159,15 +43311,15 @@
15159 43311
15160 Add a Catalan language environment 43312 Add a Catalan language environment
15161 43313
15162 * international/mule-cmds.el (locale-language-names): Map locale 43314 * lisp/international/mule-cmds.el (locale-language-names): Map locale
15163 language name `ca' to language environment `Catalan'. 43315 language name `ca' to language environment `Catalan'.
15164 43316
15165 * language/european.el: Add definition of language environment for 43317 * lisp/language/european.el: Add definition of language
15166 the Catalan language. 43318 environment for the Catalan language.
15167 43319
15168 * leim/quail/latin-pre.el: Add quail rule to the `catalan-prefix' 43320 * lisp/leim/quail/latin-pre.el: Add quail rule to the
15169 input method to support input of middle dot characters through 43321 `catalan-prefix' input method to support input of middle dot
15170 composition (bug#18279). 43322 characters through composition (bug#18279).
15171 43323
151722016-03-19 Paul Eggert <eggert@cs.ucla.edu> 433242016-03-19 Paul Eggert <eggert@cs.ucla.edu>
15173 43325
@@ -15820,7 +43972,7 @@
15820 43972
15821 This is possible in all functions where we catch signals anyway. 43973 This is possible in all functions where we catch signals anyway.
15822 43974
15823 * emacs-module.c (module_make_global_ref, module_funcall) 43975 * src/emacs-module.c (module_make_global_ref, module_funcall)
15824 (module_copy_string_contents, module_make_string): Use xsignal0 43976 (module_copy_string_contents, module_make_string): Use xsignal0
15825 and CHECK macros for argument checks. 43977 and CHECK macros for argument checks.
15826 43978
@@ -15832,7 +43984,7 @@
15832 and negate its sense. Use it via AC_SUBST, not AC_DEFINE, 43984 and negate its sense. Use it via AC_SUBST, not AC_DEFINE,
15833 and have its value be either empty or --no-build-details. 43985 and have its value be either empty or --no-build-details.
15834 All uses changed. Change option to --disable-build-details. 43986 All uses changed. Change option to --disable-build-details.
15835 * doc/lispref/cmdargs.texi (Initial Options): 43987 * doc/emacs/cmdargs.texi (Initial Options):
15836 Document --no-build-details. 43988 Document --no-build-details.
15837 * doc/lispref/internals.texi (Building Emacs): 43989 * doc/lispref/internals.texi (Building Emacs):
15838 * etc/NEWS: 43990 * etc/NEWS:
@@ -16335,9 +44487,9 @@
16335 44487
16336 Make checkdoc warn about variables described as "True" 44488 Make checkdoc warn about variables described as "True"
16337 44489
16338 * checkdoc.el (checkdoc-this-string-valid-engine): Docstrings for 44490 * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
16339 variables "True...", and functions "Return true...", should usually be 44491 Docstrings for variables "True...", and functions "Return
16340 "non-nil" (bug#15506). 44492 true...", should usually be "non-nil" (bug#15506).
16341 44493
163422016-02-24 Lars Ingebrigtsen <larsi@gnus.org> 444942016-02-24 Lars Ingebrigtsen <larsi@gnus.org>
16343 44495
@@ -16738,7 +44890,7 @@
16738 44890
16739 Test message-strip-subject-trailing-was 44891 Test message-strip-subject-trailing-was
16740 44892
16741 * test/lisp/gnus/message-test.el (message-strip-subject-trailing-was): 44893 * test/lisp/gnus/message-tests.el (message-strip-subject-trailing-was):
16742 New test (bug#22632). 44894 New test (bug#22632).
16743 44895
167442016-02-22 Michal Nazarewicz <mina86@mina86.com> 448962016-02-22 Michal Nazarewicz <mina86@mina86.com>
@@ -16775,7 +44927,7 @@
16775 * lisp/gnus/gnus-rfc1843.el: New file for Gnus/rfc1843 44927 * lisp/gnus/gnus-rfc1843.el: New file for Gnus/rfc1843
16776 interface functions. 44928 interface functions.
16777 44929
16778 * lisp/gnus/rfc1843.el: Move all Gnus-specifig functions to 44930 * lisp/gnus/gnus-rfc1843.el: Move all Gnus-specifig functions to
16779 gnus-rfc1843. 44931 gnus-rfc1843.
16780 44932
167812016-02-22 Lars Ingebrigtsen <larsi@gnus.org> 449332016-02-22 Lars Ingebrigtsen <larsi@gnus.org>
@@ -16791,7 +44943,7 @@
16791 44943
16792 Don't require mm-util 44944 Don't require mm-util
16793 44945
16794 * lisp/gnus/ietf-drums.el (mm-util): Don't require. 44946 * lisp/mail/ietf-drums.el (mm-util): Don't require.
16795 44947
167962016-02-22 Lars Ingebrigtsen <larsi@gnus.org> 449482016-02-22 Lars Ingebrigtsen <larsi@gnus.org>
16797 44949
@@ -17435,7 +45587,7 @@
17435 45587
17436 * lisp/gnus/pop3.el: Ditto. 45588 * lisp/gnus/pop3.el: Ditto.
17437 45589
17438 * lisp/gnus/sieve-manage.el: Ditto. 45590 * lisp/net/sieve-manage.el: Ditto.
17439 45591
17440 * lisp/net/network-stream.el (open-protocol-stream): Make obsolete. 45592 * lisp/net/network-stream.el (open-protocol-stream): Make obsolete.
17441 45593
@@ -17460,7 +45612,7 @@
17460 45612
17461 Remove compat functions from starttls.el 45613 Remove compat functions from starttls.el
17462 45614
17463 * lisp/gnus/starttls.el 45615 * lisp/net/starttls.el
17464 (starttls-set-process-query-on-exit-flag): Remove. 45616 (starttls-set-process-query-on-exit-flag): Remove.
17465 45617
174662016-02-13 Lars Ingebrigtsen <larsi@gnus.org> 456182016-02-13 Lars Ingebrigtsen <larsi@gnus.org>
@@ -17480,7 +45632,7 @@
17480 45632
17481 Remove compat code from rfc2047 45633 Remove compat code from rfc2047
17482 45634
17483 * lisp/gnus/rfc2047.el (rfc2047-encode-message-header): Remove 45635 * lisp/mail/rfc2047.el (rfc2047-encode-message-header): Remove
17484 compat code. 45636 compat code.
17485 (rfc2047-decode-string): Ditto. 45637 (rfc2047-decode-string): Ditto.
17486 45638
@@ -17817,9 +45969,9 @@
17817 45969
17818 Fix encoding problem introduced by previous patch series 45970 Fix encoding problem introduced by previous patch series
17819 45971
17820 * lisp/gnus/rfc2047.el: Ditto (bug#22648). 45972 * lisp/mail/rfc2047.el: Ditto (bug#22648).
17821 45973
17822 * lisp/gnus/rfc2231.el: Fix problem created by the 45974 * lisp/mail/rfc2231.el: Fix problem created by the
17823 mm-replace-in-string conversion. 45975 mm-replace-in-string conversion.
17824 45976
178252016-02-12 Lars Ingebrigtsen <larsi@gnus.org> 459772016-02-12 Lars Ingebrigtsen <larsi@gnus.org>
@@ -17915,7 +46067,7 @@
17915 46067
17916 Make sieve-manage require sasl 46068 Make sieve-manage require sasl
17917 46069
17918 * lisp/gnus/sieve-manage.el: Fix compilation warning by 46070 * lisp/net/sieve-manage.el: Fix compilation warning by
17919 requiring sasl. 46071 requiring sasl.
17920 46072
179212016-02-11 Lars Ingebrigtsen <larsi@gnus.org> 460732016-02-11 Lars Ingebrigtsen <larsi@gnus.org>
@@ -18021,7 +46173,7 @@
18021 46173
18022 Don't use mm-with-unibyte-buffer in utf7 46174 Don't use mm-with-unibyte-buffer in utf7
18023 46175
18024 * lisp/gnus/utf7.el (utf7-fragment-encode): Don't use 46176 * lisp/international/utf7.el (utf7-fragment-encode): Don't use
18025 mm-with-unibyte-buffer. 46177 mm-with-unibyte-buffer.
18026 46178
180272016-02-11 Lars Ingebrigtsen <larsi@gnus.org> 461792016-02-11 Lars Ingebrigtsen <larsi@gnus.org>
@@ -18102,7 +46254,7 @@
18102 46254
18103 Remove XEmacs compat code from ietf-drums.el 46255 Remove XEmacs compat code from ietf-drums.el
18104 46256
18105 * lisp/gnus/ietf-drums.el (ietf-drums-syntax-table): Drop 46257 * lisp/mail/ietf-drums.el (ietf-drums-syntax-table): Drop
18106 XEmacs compat. 46258 XEmacs compat.
18107 46259
181082016-02-10 Lars Ingebrigtsen <larsi@gnus.org> 462602016-02-10 Lars Ingebrigtsen <larsi@gnus.org>
@@ -18295,7 +46447,7 @@
18295 46447
18296 Remove compat code from compface.el 46448 Remove compat code from compface.el
18297 46449
18298 * lisp/gnus/compface.el: Remove XEmacs compat code throughout. 46450 * lisp/image/compface.el: Remove XEmacs compat code throughout.
18299 46451
183002016-02-09 Lars Ingebrigtsen <larsi@gnus.org> 464522016-02-09 Lars Ingebrigtsen <larsi@gnus.org>
18301 46453
@@ -18526,7 +46678,7 @@
18526 46678
18527 Make `message-beginning-of-line' aware of folded headers 46679 Make `message-beginning-of-line' aware of folded headers
18528 46680
18529 * lisp/gnus/message.pl (message-beginning-of-header): New function which 46681 * lisp/gnus/message.el (message-beginning-of-header): New function which
18530 moves point to the beginning of a mail header. The function is aware of 46682 moves point to the beginning of a mail header. The function is aware of
18531 folded headers and with non-nil argument looks for the true beginning of 46683 folded headers and with non-nil argument looks for the true beginning of
18532 a header while with nil argument moves to the indented text of header's 46684 a header while with nil argument moves to the indented text of header's
@@ -19209,7 +47361,7 @@
19209 47361
19210 Build fix for --enable-check-lisp-object-type 47362 Build fix for --enable-check-lisp-object-type
19211 47363
19212 * process.c (check_for_dns): Type fix reported by YAMAMOTO 47364 * src/process.c (check_for_dns): Type fix reported by YAMAMOTO
19213 Mitsuharu. 47365 Mitsuharu.
19214 47366
192152016-02-01 Glenn Morris <rgm@gnu.org> 473672016-02-01 Glenn Morris <rgm@gnu.org>
@@ -19225,7 +47377,7 @@
19225 47377
19226 Boot parameter check fix 47378 Boot parameter check fix
19227 47379
19228 * process.c (send_process): Fix test for boot parameters noted 47380 * src/process.c (send_process): Fix test for boot parameters noted
19229 by Andy Moreton. 47381 by Andy Moreton.
19230 47382
192312016-02-01 Paul Eggert <eggert@cs.ucla.edu> 473832016-02-01 Paul Eggert <eggert@cs.ucla.edu>
@@ -19251,7 +47403,7 @@
19251 47403
19252 Return the correct server port number 47404 Return the correct server port number
19253 47405
19254 * process.c (connect_network_socket): Return the correct 47406 * src/process.c (connect_network_socket): Return the correct
19255 server port number. 47407 server port number.
19256 47408
192572016-01-31 Lars Ingebrigtsen <larsi@gnus.org> 474092016-01-31 Lars Ingebrigtsen <larsi@gnus.org>
@@ -19264,7 +47416,7 @@
19264 47416
19265 Better async error reporting 47417 Better async error reporting
19266 47418
19267 * process.c (connect_network_socket): Mark failed processes 47419 * src/process.c (connect_network_socket): Mark failed processes
19268 with a better error message. 47420 with a better error message.
19269 (check_for_dns): Ditto. 47421 (check_for_dns): Ditto.
19270 47422
@@ -19314,7 +47466,7 @@
19314 47466
19315 Windows build fix 47467 Windows build fix
19316 47468
19317 * process.c (Fmake_network_process): Build fix for systems 47469 * src/process.c (Fmake_network_process): Build fix for systems
19318 without local sockets. 47470 without local sockets.
19319 47471
193202016-01-31 Lars Ingebrigtsen <larsi@gnus.org> 474722016-01-31 Lars Ingebrigtsen <larsi@gnus.org>
@@ -19325,21 +47477,21 @@
19325 47477
19326 Fix GC problem in async TLS connection 47478 Fix GC problem in async TLS connection
19327 47479
19328 * process.h: All Lisp_Object slots have to come first, 47480 * src/process.h: All Lisp_Object slots have to come first,
19329 otherwise they won't be protected from gc. 47481 otherwise they won't be protected from gc.
19330 47482
193312016-01-31 Lars Ingebrigtsen <larsi@gnus.org> 474832016-01-31 Lars Ingebrigtsen <larsi@gnus.org>
19332 47484
19333 Further TLS async work 47485 Further TLS async work
19334 47486
19335 * gnutls.c (boot_error): New function to either signal an 47487 * src/gnutls.c (boot_error): New function to either signal an
19336 error or return an error code. 47488 error or return an error code.
19337 (Fgnutls_boot): Don't signal errors when running asynchronously. 47489 (Fgnutls_boot): Don't signal errors when running asynchronously.
19338 47490
19339 * process.h (pset_status): Move here from process.c to be 47491 * src/process.h (pset_status): Move here from process.c to be
19340 able to use from gnutls.c. 47492 able to use from gnutls.c.
19341 47493
19342 * process.c (connect_network_socket): Do the TLS boot here 47494 * src/process.c (connect_network_socket): Do the TLS boot here
19343 when running asynchronously. 47495 when running asynchronously.
19344 (wait_reading_process_output): Rework the dns_processes 47496 (wait_reading_process_output): Rework the dns_processes
19345 handling for more safety. 47497 handling for more safety.
@@ -19456,7 +47608,7 @@
19456 47608
19457 Fix segfault from double free 47609 Fix segfault from double free
19458 47610
19459 * process.c (check_for_dns): Protect against double free 47611 * src/process.c (check_for_dns): Protect against double free
19460 issues. 47612 issues.
19461 47613
194622016-01-30 Lars Ingebrigtsen <larsi@gnus.org> 476142016-01-30 Lars Ingebrigtsen <larsi@gnus.org>
@@ -19744,7 +47896,7 @@
19744 47896
19745 Re-enable checks in member, memql, delete to complain about non-lists 47897 Re-enable checks in member, memql, delete to complain about non-lists
19746 47898
19747 * fns.c (Fmember, Fmemql, Fdelete): Revert 2007-10-16 change. 47899 * src/fns.c (Fmember, Fmemql, Fdelete): Revert 2007-10-16 change.
19748 47900
197492016-01-30 Lars Ingebrigtsen <larsi@gnus.org> 479012016-01-30 Lars Ingebrigtsen <larsi@gnus.org>
19750 47902
@@ -19754,7 +47906,7 @@
19754 47906
19755 Make async resolution more efficient 47907 Make async resolution more efficient
19756 47908
19757 * process.c (wait_reading_process_output): Use a list of 47909 * src/process.c (wait_reading_process_output): Use a list of
19758 process objects instead of looping through an array to check 47910 process objects instead of looping through an array to check
19759 for name resolution. This should be much faster. 47911 for name resolution. This should be much faster.
19760 47912
@@ -19768,66 +47920,66 @@
19768 47920
19769 Compilation for for systems with getaddrinfo_a 47921 Compilation for for systems with getaddrinfo_a
19770 47922
19771 * process.c (Fmake_network_process): Make stuff work again on 47923 * src/process.c (Fmake_network_process): Make stuff work again on
19772 systems with getaddrinfo_a. 47924 systems with getaddrinfo_a.
19773 47925
197742016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479262016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19775 47927
19776 Save correct server data 47928 Save correct server data
19777 47929
19778 * process.c (connect_network_socket): Save the correct contact 47930 * src/process.c (connect_network_socket): Save the correct contact
19779 info for servers. 47931 info for servers.
19780 47932
197812016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479332016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19782 47934
19783 Compilation for for non-GNU systems 47935 Compilation for for non-GNU systems
19784 47936
19785 * process.c (Fmake_network_process): Make compilation work 47937 * src/process.c (Fmake_network_process): Make compilation work
19786 again on hosts that don't have getaddrinfo_a. 47938 again on hosts that don't have getaddrinfo_a.
19787 47939
197882016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479402016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19789 47941
19790 Avoid memory leaks in async DNS 47942 Avoid memory leaks in async DNS
19791 47943
19792 * process.c (check_for_dns): Free async DNS resources after 47944 * src/process.c (check_for_dns): Free async DNS resources after
19793 they've been used. 47945 they've been used.
19794 47946
197952016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479472016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19796 47948
19797 * process.c (check_for_dns): Free the result data. 47949 * src/process.c (check_for_dns): Free the result data.
19798 47950
197992016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479512016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19800 47952
19801 Fix server connections 47953 Fix server connections
19802 47954
19803 * process.c (Fmake_network_process): Make creating server 47955 * src/process.c (Fmake_network_process): Make creating server
19804 listening ports work again. 47956 listening ports work again.
19805 47957
198062016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479582016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19807 47959
19808 Further make_network_process clean up 47960 Further make_network_process clean up
19809 47961
19810 * process.c (Fmake_network_process): Remove setting of unused 47962 * src/process.c (Fmake_network_process): Remove setting of unused
19811 family variable. 47963 family variable.
19812 47964
198132016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479652016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19814 47966
19815 Clean up GETADDRINFO usage in make-network-process 47967 Clean up GETADDRINFO usage in make-network-process
19816 47968
19817 * process.c (Fmake_network_process): Clean up the GETADDRINFO 47969 * src/process.c (Fmake_network_process): Clean up the GETADDRINFO
19818 handling. 47970 handling.
19819 47971
198202016-01-29 Lars Ingebrigtsen <larsi@gnus.org> 479722016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
19821 47973
19822 Implement asynchronous name resolution 47974 Implement asynchronous name resolution
19823 47975
19824 * process.c (Fmake_network_process): Do asynchronous DNS 47976 * src/process.c (Fmake_network_process): Do asynchronous DNS
19825 lookups if we have getaddrinfo_a and the user requests :nowait. 47977 lookups if we have getaddrinfo_a and the user requests :nowait.
19826 (check_for_dns): New function. 47978 (check_for_dns): New function.
19827 (wait_reading_process_output): Check for pending name 47979 (wait_reading_process_output): Check for pending name
19828 resolution in the idle loop. 47980 resolution in the idle loop.
19829 47981
19830 * process.h: Add structure for async DNS. 47982 * src/process.h: Add structure for async DNS.
19831 47983
198322016-01-28 Glenn Morris <rgm@gnu.org> 479842016-01-28 Glenn Morris <rgm@gnu.org>
19833 47985
@@ -19841,7 +47993,7 @@
19841 47993
19842 Fix memory leak 47994 Fix memory leak
19843 47995
19844 * process.c (connect_network_socket): Free previous sockaddr 47996 * src/process.c (connect_network_socket): Free previous sockaddr
19845 before allocating a new one. 47997 before allocating a new one.
19846 47998
198472016-01-28 Lars Ingebrigtsen <larsi@gnus.org> 479992016-01-28 Lars Ingebrigtsen <larsi@gnus.org>
@@ -19877,7 +48029,7 @@
19877 48029
198782016-01-27 Glenn Morris <rgm@gnu.org> 480302016-01-27 Glenn Morris <rgm@gnu.org>
19879 48031
19880 * test/lisp/vc/vc-hg.el: Move from test/automated/. 48032 * test/lisp/vc/vc-hg-tests.el: Move from test/automated/.
19881 48033
198822016-01-25 Stefan Monnier <monnier@iro.umontreal.ca> 480342016-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
19883 48035
@@ -20144,7 +48296,7 @@
20144 48296
201452016-01-17 Bill Wohler <wohler@newt.com> 482972016-01-17 Bill Wohler <wohler@newt.com>
20146 48298
20147 * mh-e.el (mh-version): Add +git to version. 48299 * lisp/mh-e/mh-e.el (mh-version): Add +git to version.
20148 48300
201492016-01-16 Stefan Monnier <monnier@iro.umontreal.ca> 483012016-01-16 Stefan Monnier <monnier@iro.umontreal.ca>
20150 48302
@@ -20186,7 +48338,8 @@
20186 48338
201872016-01-16 Stefan Monnier <monnier@iro.umontreal.ca> 483392016-01-16 Stefan Monnier <monnier@iro.umontreal.ca>
20188 48340
20189 * elisp-mode.el (elisp--font-lock-flush-elisp-buffers): Fix comment 48341 * lisp/progmodes/elisp-mode.el
48342 (elisp--font-lock-flush-elisp-buffers): Fix comment
20190 48343
201912016-01-16 Stefan Monnier <monnier@iro.umontreal.ca> 483442016-01-16 Stefan Monnier <monnier@iro.umontreal.ca>
20192 48345
@@ -20231,7 +48384,8 @@
20231 48384
202322016-01-15 Stefan Monnier <monnier@iro.umontreal.ca> 483852016-01-15 Stefan Monnier <monnier@iro.umontreal.ca>
20233 48386
20234 * xmltok.el: Mark the "sole --" rather than the comment opener 48387 * lisp/nxml/xmltok.el: Mark the "sole --" rather than the comment
48388 opener.
20235 48389
20236 * lisp/nxml/xmltok.el (xmltok-scan-after-comment-open): Put the error 48390 * lisp/nxml/xmltok.el (xmltok-scan-after-comment-open): Put the error
20237 marker on the "sole --" rather than on the comment opener. 48391 marker on the "sole --" rather than on the comment opener.
@@ -20805,12 +48959,12 @@
20805 free to format differently a really empty cell, ie. containing nil, 48959 free to format differently a really empty cell, ie. containing nil,
20806 from a cell containing an empty string "". 48960 from a cell containing an empty string "".
20807 48961
20808 * ses.el (ses-call-printer): Replace `(or value "")' by just `value' 48962 * lisp/ses.el (ses-call-printer): Replace `(or value "")' by just
20809 in the case of a lambda expression printer function. 48963 `value' in the case of a lambda expression printer function.
20810 48964
20811 * ses.texi (Printer functions): Add example and description about 48965 * doc/misc/ses.texi (Printer functions): Add example and
20812 lambda expression printer function handling all the possible values, 48966 description about lambda expression printer function handling all
20813 including unexpected ones. 48967 the possible values, including unexpected ones.
20814 48968
208152015-12-30 Vincent Belaïche <vincentb1@users.sourceforge.net> 489692015-12-30 Vincent Belaïche <vincentb1@users.sourceforge.net>
20816 48970
@@ -20821,7 +48975,7 @@
20821 removed the (setq ses--curcell t) setting in the ses-command-hook 48975 removed the (setq ses--curcell t) setting in the ses-command-hook
20822 function. 48976 function.
20823 48977
20824 * ses.el (ses-check-curcell): replace `(eq ses--curcell t)' by just `t' as 48978 * lisp/ses.el (ses-check-curcell): replace `(eq ses--curcell t)' by just `t' as
20825 a condition to call function `ses-set-curcell'. Comment this as a quick 48979 a condition to call function `ses-set-curcell'. Comment this as a quick
20826 temporary hack to make it work, as I don't know yet whether a definite 48980 temporary hack to make it work, as I don't know yet whether a definite
20827 correction would be to make the ses-set-curcell at every ses-check-curcell, 48981 correction would be to make the ses-set-curcell at every ses-check-curcell,
@@ -20863,14 +49017,14 @@
20863 49017
20864 Further Unicode restrictive fixups 49018 Further Unicode restrictive fixups
20865 49019
20866 * puny.el (puny-highly-restrictive-p): Include the extra 49020 * lisp/net/puny.el (puny-highly-restrictive-p): Include the extra
20867 identifier characters from table 3. 49021 identifier characters from table 3.
20868 49022
208692015-12-29 Lars Ingebrigtsen <larsi@gnus.org> 490232015-12-29 Lars Ingebrigtsen <larsi@gnus.org>
20870 49024
20871 Add a new function to say whether a string is restrictive 49025 Add a new function to say whether a string is restrictive
20872 49026
20873 * puny.el (puny-highly-restrictive-p): New function. 49027 * lisp/net/puny.el (puny-highly-restrictive-p): New function.
20874 49028
208752015-12-28 Lars Ingebrigtsen <larsi@gnus.org> 490292015-12-28 Lars Ingebrigtsen <larsi@gnus.org>
20876 49030
@@ -20891,7 +49045,7 @@
20891 49045
20892 IDNA-encode all domain names in `open-network-stream' 49046 IDNA-encode all domain names in `open-network-stream'
20893 49047
20894 * network-stream.el (open-network-stream) 49048 * lisp/net/network-stream.el (open-network-stream)
20895 (network-stream-open-plain, network-stream-open-starttls): 49049 (network-stream-open-plain, network-stream-open-starttls):
20896 IDNA-encode all domain names, if needed. 49050 IDNA-encode all domain names, if needed.
20897 49051
@@ -20899,13 +49053,14 @@
20899 49053
20900 Fix puny-encoding all-non-ASCII domains 49054 Fix puny-encoding all-non-ASCII domains
20901 49055
20902 * puny.el (puny-encode-string): Fix the all-non-ASCII encoding case. 49056 * lisp/net/puny.el (puny-encode-string): Fix the all-non-ASCII
49057 encoding case.
20903 49058
209042015-12-28 Lars Ingebrigtsen <larsi@gnus.org> 490592015-12-28 Lars Ingebrigtsen <larsi@gnus.org>
20905 49060
20906 shr link traversal fixup 49061 shr link traversal fixup
20907 49062
20908 * shr.el (shr-next-link): Don't bug out on adjacent links. 49063 * lisp/net/shr.el (shr-next-link): Don't bug out on adjacent links.
20909 49064
209102015-12-28 Lars Ingebrigtsen <larsi@gnus.org> 490652015-12-28 Lars Ingebrigtsen <larsi@gnus.org>
20911 49066
@@ -20918,19 +49073,19 @@
20918 49073
20919 Fix punycode short circuit logic 49074 Fix punycode short circuit logic
20920 49075
20921 * puny.el (puny-encode-domain): Fix short-circuit logic. 49076 * lisp/net//puny.el (puny-encode-domain): Fix short-circuit logic.
20922 49077
209232015-12-28 Lars Ingebrigtsen <larsi@gnus.org> 490782015-12-28 Lars Ingebrigtsen <larsi@gnus.org>
20924 49079
20925 IDNA speed up 49080 IDNA speed up
20926 49081
20927 * puny.el (puny-encode-domain): Make the common non-IDNA case faster 49082 * lisp/net/puny.el (puny-encode-domain): Make the common non-IDNA case faster
20928 49083
209292015-12-28 Lars Ingebrigtsen <larsi@gnus.org> 490842015-12-28 Lars Ingebrigtsen <larsi@gnus.org>
20930 49085
20931 Add IDNA domain encode/decode functions 49086 Add IDNA domain encode/decode functions
20932 49087
20933 * puny.el (puny-decode-domain): New function. 49088 * lisp/net/puny.el (puny-decode-domain): New function.
20934 (puny-encode-domain): Ditto. 49089 (puny-encode-domain): Ditto.
20935 (puny-decode-digit): Fix digit decoding error. 49090 (puny-decode-digit): Fix digit decoding error.
20936 49091
@@ -20938,7 +49093,7 @@
20938 49093
20939 Rename idna.el to puny.el 49094 Rename idna.el to puny.el
20940 49095
20941 * puny.el: Renamed from idna.el to avoid name collisions with 49096 * lisp/net/puny.el: Renamed from idna.el to avoid name collisions with
20942 the external idna.el library. 49097 the external idna.el library.
20943 49098
209442015-12-27 Katsumi Yamaoka <yamaoka@jpl.org> 490992015-12-27 Katsumi Yamaoka <yamaoka@jpl.org>
@@ -20950,7 +49105,8 @@
20950 49105
209512015-12-27 Lars Ingebrigtsen <larsi@gnus.org> 491062015-12-27 Lars Ingebrigtsen <larsi@gnus.org>
20952 49107
20953 * idna.el (idna-decode-string-internal): Implement decoding. 49108 * lisp/net/idna.el (idna-decode-string-internal): Implement
49109 decoding.
20954 49110
209552015-12-27 Lars Ingebrigtsen <larsi@gnus.org> 491112015-12-27 Lars Ingebrigtsen <larsi@gnus.org>
20956 49112
@@ -21276,7 +49432,7 @@
21276 49432
21277 * lisp/dired.el: Remove autoloads. 49433 * lisp/dired.el: Remove autoloads.
21278 * lisp/Makefile.in: Add dired to autogenel. 49434 * lisp/Makefile.in: Add dired to autogenel.
21279 * lisp/dired-aux.el,lisp/dired-x.el: Update file local. 49435 * lisp/dired-aux.el, lisp/dired-x.el: Update file local.
21280 * test/lisp/dired-tests.el: Add new test. 49436 * test/lisp/dired-tests.el: Add new test.
21281 49437
212822015-12-17 Phillip Lord <phillip.lord@russet.org.uk> 494382015-12-17 Phillip Lord <phillip.lord@russet.org.uk>
@@ -21284,9 +49440,9 @@
21284 eieio generate autoloads to non-versioned file. 49440 eieio generate autoloads to non-versioned file.
21285 49441
21286 * lisp/Makefile.in: eieio-loaddefs add to autogenel. 49442 * lisp/Makefile.in: eieio-loaddefs add to autogenel.
21287 * lisp/emacs-lisp/eieio.el,lisp/emacs-lisp/eieio-core.el: 49443 * lisp/emacs-lisp/eieio.el, lisp/emacs-lisp/eieio-core.el:
21288 Remove autoloads. 49444 Remove autoloads.
21289 * lisp/emacs-lisp/eieio-compat.el,lisp/emacs-lisp/eieio-custom.el, 49445 * lisp/emacs-lisp/eieio-compat.el, lisp/emacs-lisp/eieio-custom.el,
21290 lisp/emacs-lisp/eieio-opt.el: Update file local. 49446 lisp/emacs-lisp/eieio-opt.el: Update file local.
21291 * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: New test. 49447 * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: New test.
21292 49448
@@ -21314,10 +49470,10 @@
21314 49470
21315 * lisp/Makefile.in: Add rmail-loaddefs.el to autogenel. 49471 * lisp/Makefile.in: Add rmail-loaddefs.el to autogenel.
21316 * lisp/mail/rmail.el: Remove autoloads, add require. 49472 * lisp/mail/rmail.el: Remove autoloads, add require.
21317 * lisp/mail/rmailedit.el,lisp/mail/rmailkwd.el, 49473 * lisp/mail/rmailedit.el, lisp/mail/rmailkwd.el:
21318 lisp/mail/rmailmm.el,lisp/mail/rmailmsc.el, 49474 * lisp/mail/rmailmm.el, lisp/mail/rmailmsc.el:
21319 lisp/mail/rmailsort.el,lisp/mail/rmailsum.el, 49475 * lisp/mail/rmailsort.el, lisp/mail/rmailsum.el:
21320 lisp/mail/undigest.el: Update file-local. 49476 * lisp/mail/undigest.el: Update file-local.
21321 * test/lisp/mail/rmail-tests.el: 49477 * test/lisp/mail/rmail-tests.el:
21322 49478
213232015-12-17 Phillip Lord <phillip.lord@russet.org.uk> 494792015-12-17 Phillip Lord <phillip.lord@russet.org.uk>
@@ -21341,11 +49497,11 @@
21341 49497
21342 * lisp/Makefile.in: Add reftex-loaddefs to autogen files 49498 * lisp/Makefile.in: Add reftex-loaddefs to autogen files
21343 * lisp/textmodes/reftex.el: Remove autoloads. 49499 * lisp/textmodes/reftex.el: Remove autoloads.
21344 * lisp/textmodes/reftex-auc.el,lisp/textmodes/reftex-cite.el, 49500 * lisp/textmodes/reftex-auc.el, lisp/textmodes/reftex-cite.el:
21345 lisp/textmodes/reftex-dcr.el,lisp/textmodes/reftex-global.el, 49501 * lisp/textmodes/reftex-dcr.el, lisp/textmodes/reftex-global.el:
21346 lisp/textmodes/reftex-index.el,lisp/textmodes/reftex-parse.el, 49502 * lisp/textmodes/reftex-index.el, lisp/textmodes/reftex-parse.el:
21347 lisp/textmodes/reftex-ref.el,lisp/textmodes/reftex-sel.el, 49503 * lisp/textmodes/reftex-ref.el, lisp/textmodes/reftex-sel.el:
21348 lisp/textmodes/reftex-toc.el: Update autoload file-local. 49504 * lisp/textmodes/reftex-toc.el: Update autoload file-local.
21349 * test/lisp/textmodes/reftex-tests.el: Add test of an autoloaded 49505 * test/lisp/textmodes/reftex-tests.el: Add test of an autoloaded
21350 function. 49506 function.
21351 49507
@@ -21933,262 +50089,263 @@
21933 50089
21934 Rename all test files to reflect source layout. 50090 Rename all test files to reflect source layout.
21935 50091
21936 * CONTRIBUTE,Makefile.in,configure.ac: Update to reflect 50092 * CONTRIBUTE, Makefile.in, configure.ac: Update to reflect
21937 test directory moves. 50093 test directory moves.
21938 * test/file-organisation.org: New file. 50094 * test/file-organisation.org: New file.
21939 * test/automated/Makefile.in 50095 * test/automated/Makefile.in:
21940 test/automated/data/decompress/foo.gz 50096 * test/automated/data/decompress/foo.gz:
21941 test/automated/data/epg/pubkey.asc 50097 * test/automated/data/epg/pubkey.asc:
21942 test/automated/data/epg/seckey.asc 50098 * test/automated/data/epg/seckey.asc:
21943 test/automated/data/files-bug18141.el.gz 50099 * test/automated/data/files-bug18141.el.gz:
21944 test/automated/data/flymake/test.c 50100 * test/automated/data/flymake/test.c:
21945 test/automated/data/flymake/test.pl 50101 * test/automated/data/flymake/test.pl:
21946 test/automated/data/package/archive-contents 50102 * test/automated/data/package/archive-contents:
21947 test/automated/data/package/key.pub 50103 * test/automated/data/package/key.pub:
21948 test/automated/data/package/key.sec 50104 * test/automated/data/package/key.sec:
21949 test/automated/data/package/multi-file-0.2.3.tar 50105 * test/automated/data/package/multi-file-0.2.3.tar:
21950 test/automated/data/package/multi-file-readme.txt 50106 * test/automated/data/package/multi-file-readme.txt:
21951 test/automated/data/package/newer-versions/archive-contents 50107 * test/automated/data/package/newer-versions/archive-contents:
21952 test/automated/data/package/newer-versions/new-pkg-1.0.el 50108 * test/automated/data/package/newer-versions/new-pkg-1.0.el:
21953 test/automated/data/package/newer-versions/simple-single-1.4.el 50109 * test/automated/data/package/newer-versions/simple-single-1.4.el:
21954 test/automated/data/package/package-test-server.py 50110 * test/automated/data/package/package-test-server.py:
21955 test/automated/data/package/signed/archive-contents 50111 * test/automated/data/package/signed/archive-contents:
21956 test/automated/data/package/signed/archive-contents.sig 50112 * test/automated/data/package/signed/archive-contents.sig:
21957 test/automated/data/package/signed/signed-bad-1.0.el 50113 * test/automated/data/package/signed/signed-bad-1.0.el:
21958 test/automated/data/package/signed/signed-bad-1.0.el.sig 50114 * test/automated/data/package/signed/signed-bad-1.0.el.sig:
21959 test/automated/data/package/signed/signed-good-1.0.el 50115 * test/automated/data/package/signed/signed-good-1.0.el:
21960 test/automated/data/package/signed/signed-good-1.0.el.sig 50116 * test/automated/data/package/signed/signed-good-1.0.el.sig:
21961 test/automated/data/package/simple-depend-1.0.el 50117 * test/automated/data/package/simple-depend-1.0.el:
21962 test/automated/data/package/simple-single-1.3.el 50118 * test/automated/data/package/simple-single-1.3.el:
21963 test/automated/data/package/simple-single-readme.txt 50119 * test/automated/data/package/simple-single-readme.txt:
21964 test/automated/data/package/simple-two-depend-1.1.el 50120 * test/automated/data/package/simple-two-depend-1.1.el:
21965 test/automated/abbrev-tests.el 50121 * test/automated/abbrev-tests.el:
21966 test/automated/auto-revert-tests.el 50122 * test/automated/auto-revert-tests.el:
21967 test/automated/calc-tests.el 50123 * test/automated/calc-tests.el:
21968 test/automated/icalendar-tests.el 50124 * test/automated/icalendar-tests.el:
21969 test/automated/character-fold-tests.el 50125 * test/automated/character-fold-tests.el:
21970 test/automated/comint-testsuite.el 50126 * test/automated/comint-testsuite.el:
21971 test/automated/descr-text-test.el 50127 * test/automated/descr-text-test.el:
21972 test/automated/electric-tests.el 50128 * test/automated/electric-tests.el:
21973 test/automated/cl-generic-tests.el 50129 * test/automated/cl-generic-tests.el:
21974 test/automated/cl-lib-tests.el 50130 * test/automated/cl-lib-tests.el:
21975 test/automated/eieio-test-methodinvoke.el 50131 * test/automated/eieio-test-methodinvoke.el:
21976 test/automated/eieio-test-persist.el 50132 * test/automated/eieio-test-persist.el:
21977 test/automated/eieio-tests.el 50133 * test/automated/eieio-tests.el:
21978 test/automated/ert-tests.el 50134 * test/automated/ert-tests.el:
21979 test/automated/ert-x-tests.el 50135 * test/automated/ert-x-tests.el:
21980 test/automated/generator-tests.el 50136 * test/automated/generator-tests.el:
21981 test/automated/let-alist.el 50137 * test/automated/let-alist.el:
21982 test/automated/map-tests.el 50138 * test/automated/map-tests.el:
21983 test/automated/advice-tests.el 50139 * test/automated/advice-tests.el:
21984 test/automated/package-test.el 50140 * test/automated/package-test.el:
21985 test/automated/pcase-tests.el 50141 * test/automated/pcase-tests.el:
21986 test/automated/regexp-tests.el 50142 * test/automated/regexp-tests.el:
21987 test/automated/seq-tests.el 50143 * test/automated/seq-tests.el:
21988 test/automated/subr-x-tests.el 50144 * test/automated/subr-x-tests.el:
21989 test/automated/tabulated-list-test.el 50145 * test/automated/tabulated-list-test.el:
21990 test/automated/thunk-tests.el 50146 * test/automated/thunk-tests.el:
21991 test/automated/timer-tests.el 50147 * test/automated/timer-tests.el:
21992 test/automated/epg-tests.el 50148 * test/automated/epg-tests.el:
21993 test/automated/eshell.el 50149 * test/automated/eshell.el:
21994 test/automated/faces-tests.el 50150 * test/automated/faces-tests.el:
21995 test/automated/file-notify-tests.el 50151 * test/automated/file-notify-tests.el:
21996 test/automated/auth-source-tests.el 50152 * test/automated/auth-source-tests.el:
21997 test/automated/gnus-tests.el 50153 * test/automated/gnus-tests.el:
21998 test/automated/message-mode-tests.el 50154 * test/automated/message-mode-tests.el:
21999 test/automated/help-fns.el 50155 * test/automated/help-fns.el:
22000 test/automated/imenu-test.el 50156 * test/automated/imenu-test.el:
22001 test/automated/info-xref.el 50157 * test/automated/info-xref.el:
22002 test/automated/mule-util.el 50158 * test/automated/mule-util.el:
22003 test/automated/isearch-tests.el 50159 * test/automated/isearch-tests.el:
22004 test/automated/json-tests.el 50160 * test/automated/json-tests.el:
22005 test/automated/bytecomp-tests.el 50161 * test/automated/bytecomp-tests.el:
22006 test/automated/coding-tests.el 50162 * test/automated/coding-tests.el:
22007 test/automated/core-elisp-tests.el 50163 * test/automated/core-elisp-tests.el:
22008 test/automated/decoder-tests.el 50164 * test/automated/decoder-tests.el:
22009 test/automated/files.el 50165 * test/automated/files.el:
22010 test/automated/font-parse-tests.el 50166 * test/automated/font-parse-tests.el:
22011 test/automated/lexbind-tests.el 50167 * test/automated/lexbind-tests.el:
22012 test/automated/occur-tests.el 50168 * test/automated/occur-tests.el:
22013 test/automated/process-tests.el 50169 * test/automated/process-tests.el:
22014 test/automated/syntax-tests.el 50170 * test/automated/syntax-tests.el:
22015 test/automated/textprop-tests.el 50171 * test/automated/textprop-tests.el:
22016 test/automated/undo-tests.el 50172 * test/automated/undo-tests.el:
22017 test/automated/man-tests.el 50173 * test/automated/man-tests.el:
22018 test/automated/completion-tests.el 50174 * test/automated/completion-tests.el:
22019 test/automated/dbus-tests.el 50175 * test/automated/dbus-tests.el:
22020 test/automated/newsticker-tests.el 50176 * test/automated/newsticker-tests.el:
22021 test/automated/sasl-scram-rfc-tests.el 50177 * test/automated/sasl-scram-rfc-tests.el:
22022 test/automated/tramp-tests.el 50178 * test/automated/tramp-tests.el:
22023 test/automated/obarray-tests.el 50179 * test/automated/obarray-tests.el:
22024 test/automated/compile-tests.el 50180 * test/automated/compile-tests.el:
22025 test/automated/elisp-mode-tests.el 50181 * test/automated/elisp-mode-tests.el:
22026 test/automated/f90.el 50182 * test/automated/f90.el:
22027 test/automated/flymake-tests.el 50183 * test/automated/flymake-tests.el:
22028 test/automated/python-tests.el 50184 * test/automated/python-tests.el:
22029 test/automated/ruby-mode-tests.el 50185 * test/automated/ruby-mode-tests.el:
22030 test/automated/subword-tests.el 50186 * test/automated/subword-tests.el:
22031 test/automated/replace-tests.el 50187 * test/automated/replace-tests.el:
22032 test/automated/simple-test.el 50188 * test/automated/simple-test.el:
22033 test/automated/sort-tests.el 50189 * test/automated/sort-tests.el:
22034 test/automated/subr-tests.el 50190 * test/automated/subr-tests.el:
22035 test/automated/reftex-tests.el 50191 * test/automated/reftex-tests.el:
22036 test/automated/sgml-mode-tests.el 50192 * test/automated/sgml-mode-tests.el:
22037 test/automated/tildify-tests.el 50193 * test/automated/tildify-tests.el:
22038 test/automated/thingatpt.el 50194 * test/automated/thingatpt.el:
22039 test/automated/url-future-tests.el 50195 * test/automated/url-future-tests.el:
22040 test/automated/url-util-tests.el 50196 * test/automated/url-util-tests.el:
22041 test/automated/add-log-tests.el 50197 * test/automated/add-log-tests.el:
22042 test/automated/vc-bzr.el 50198 * test/automated/vc-bzr.el:
22043 test/automated/vc-tests.el 50199 * test/automated/vc-tests.el:
22044 test/automated/xml-parse-tests.el 50200 * test/automated/xml-parse-tests.el:
22045 test/BidiCharacterTest.txt 50201 * test/BidiCharacterTest.txt:
22046 test/biditest.el 50202 * test/biditest.el:
22047 test/cedet/cedet-utests.el 50203 * test/cedet/cedet-utests.el:
22048 test/cedet/ede-tests.el 50204 * test/cedet/ede-tests.el:
22049 test/cedet/semantic-ia-utest.el 50205 * test/cedet/semantic-ia-utest.el:
22050 test/cedet/semantic-tests.el 50206 * test/cedet/semantic-tests.el:
22051 test/cedet/semantic-utest-c.el 50207 * test/cedet/semantic-utest-c.el:
22052 test/cedet/semantic-utest.el 50208 * test/cedet/semantic-utest.el:
22053 test/cedet/srecode-tests.el 50209 * test/cedet/srecode-tests.el:
22054 test/cedet/tests/test.c 50210 * test/cedet/tests/test.c:
22055 test/cedet/tests/test.el 50211 * test/cedet/tests/test.el:
22056 test/cedet/tests/test.make 50212 * test/cedet/tests/test.make:
22057 test/cedet/tests/testdoublens.cpp 50213 * test/cedet/tests/testdoublens.cpp:
22058 test/cedet/tests/testdoublens.hpp 50214 * test/cedet/tests/testdoublens.hpp:
22059 test/cedet/tests/testfriends.cpp 50215 * test/cedet/tests/testfriends.cpp:
22060 test/cedet/tests/testjavacomp.java 50216 * test/cedet/tests/testjavacomp.java:
22061 test/cedet/tests/testnsp.cpp 50217 * test/cedet/tests/testnsp.cpp:
22062 test/cedet/tests/testpolymorph.cpp 50218 * test/cedet/tests/testpolymorph.cpp:
22063 test/cedet/tests/testspp.c 50219 * test/cedet/tests/testspp.c:
22064 test/cedet/tests/testsppcomplete.c 50220 * test/cedet/tests/testsppcomplete.c:
22065 test/cedet/tests/testsppreplace.c 50221 * test/cedet/tests/testsppreplace.c:
22066 test/cedet/tests/testsppreplaced.c 50222 * test/cedet/tests/testsppreplaced.c:
22067 test/cedet/tests/testsubclass.cpp 50223 * test/cedet/tests/testsubclass.cpp:
22068 test/cedet/tests/testsubclass.hh 50224 * test/cedet/tests/testsubclass.hh:
22069 test/cedet/tests/testtypedefs.cpp 50225 * test/cedet/tests/testtypedefs.cpp:
22070 test/cedet/tests/testvarnames.c 50226 * test/cedet/tests/testvarnames.c:
22071 test/etags/CTAGS.good 50227 * test/etags/CTAGS.good:
22072 test/etags/ETAGS.good_1 50228 * test/etags/ETAGS.good_1:
22073 test/etags/ETAGS.good_2 50229 * test/etags/ETAGS.good_2:
22074 test/etags/ETAGS.good_3 50230 * test/etags/ETAGS.good_3:
22075 test/etags/ETAGS.good_4 50231 * test/etags/ETAGS.good_4:
22076 test/etags/ETAGS.good_5 50232 * test/etags/ETAGS.good_5:
22077 test/etags/ETAGS.good_6 50233 * test/etags/ETAGS.good_6:
22078 test/etags/a-src/empty.zz 50234 * test/etags/a-src/empty.zz:
22079 test/etags/a-src/empty.zz.gz 50235 * test/etags/a-src/empty.zz.gz:
22080 test/etags/ada-src/2ataspri.adb 50236 * test/etags/ada-src/2ataspri.adb:
22081 test/etags/ada-src/2ataspri.ads 50237 * test/etags/ada-src/2ataspri.ads:
22082 test/etags/ada-src/etags-test-for.ada 50238 * test/etags/ada-src/etags-test-for.ada:
22083 test/etags/ada-src/waroquiers.ada 50239 * test/etags/ada-src/waroquiers.ada:
22084 test/etags/c-src/a/b/b.c 50240 * test/etags/c-src/a/b/b.c:
22085 test/etags/c-src/abbrev.c 50241 * test/etags/c-src/abbrev.c:
22086 test/etags/c-src/c.c 50242 * test/etags/c-src/c.c:
22087 test/etags/c-src/dostorture.c 50243 * test/etags/c-src/dostorture.c:
22088 test/etags/c-src/emacs/src/gmalloc.c 50244 * test/etags/c-src/emacs/src/gmalloc.c:
22089 test/etags/c-src/emacs/src/keyboard.c 50245 * test/etags/c-src/emacs/src/keyboard.c:
22090 test/etags/c-src/emacs/src/lisp.h 50246 * test/etags/c-src/emacs/src/lisp.h:
22091 test/etags/c-src/emacs/src/regex.h 50247 * test/etags/c-src/emacs/src/regex.h:
22092 test/etags/c-src/etags.c 50248 * test/etags/c-src/etags.c:
22093 test/etags/c-src/exit.c 50249 * test/etags/c-src/exit.c:
22094 test/etags/c-src/exit.strange_suffix 50250 * test/etags/c-src/exit.strange_suffix:
22095 test/etags/c-src/fail.c 50251 * test/etags/c-src/fail.c:
22096 test/etags/c-src/getopt.h 50252 * test/etags/c-src/getopt.h:
22097 test/etags/c-src/h.h 50253 * test/etags/c-src/h.h:
22098 test/etags/c-src/machsyscalls.c 50254 * test/etags/c-src/machsyscalls.c:
22099 test/etags/c-src/machsyscalls.h 50255 * test/etags/c-src/machsyscalls.h:
22100 test/etags/c-src/sysdep.h 50256 * test/etags/c-src/sysdep.h:
22101 test/etags/c-src/tab.c 50257 * test/etags/c-src/tab.c:
22102 test/etags/c-src/torture.c 50258 * test/etags/c-src/torture.c:
22103 test/etags/cp-src/MDiagArray2.h 50259 * test/etags/cp-src/MDiagArray2.h:
22104 test/etags/cp-src/Range.h 50260 * test/etags/cp-src/Range.h:
22105 test/etags/cp-src/burton.cpp 50261 * test/etags/cp-src/burton.cpp:
22106 test/etags/cp-src/c.C 50262 * test/etags/cp-src/c.C:
22107 test/etags/cp-src/clheir.cpp.gz 50263 * test/etags/cp-src/clheir.cpp.gz:
22108 test/etags/cp-src/clheir.hpp 50264 * test/etags/cp-src/clheir.hpp:
22109 test/etags/cp-src/conway.cpp 50265 * test/etags/cp-src/conway.cpp:
22110 test/etags/cp-src/conway.hpp 50266 * test/etags/cp-src/conway.hpp:
22111 test/etags/cp-src/fail.C 50267 * test/etags/cp-src/fail.C:
22112 test/etags/cp-src/functions.cpp 50268 * test/etags/cp-src/functions.cpp:
22113 test/etags/cp-src/screen.cpp 50269 * test/etags/cp-src/screen.cpp:
22114 test/etags/cp-src/screen.hpp 50270 * test/etags/cp-src/screen.hpp:
22115 test/etags/cp-src/x.cc 50271 * test/etags/cp-src/x.cc:
22116 test/etags/el-src/TAGTEST.EL 50272 * test/etags/el-src/TAGTEST.EL:
22117 test/etags/el-src/emacs/lisp/progmodes/etags.el 50273 * test/etags/el-src/emacs/lisp/progmodes/etags.el:
22118 test/etags/erl-src/gs_dialog.erl 50274 * test/etags/erl-src/gs_dialog.erl:
22119 test/etags/f-src/entry.for 50275 * test/etags/f-src/entry.for:
22120 test/etags/f-src/entry.strange.gz 50276 * test/etags/f-src/entry.strange.gz:
22121 test/etags/f-src/entry.strange_suffix 50277 * test/etags/f-src/entry.strange_suffix:
22122 test/etags/forth-src/test-forth.fth 50278 * test/etags/forth-src/test-forth.fth:
22123 test/etags/html-src/algrthms.html 50279 * test/etags/html-src/algrthms.html:
22124 test/etags/html-src/index.shtml 50280 * test/etags/html-src/index.shtml:
22125 test/etags/html-src/software.html 50281 * test/etags/html-src/software.html:
22126 test/etags/html-src/softwarelibero.html 50282 * test/etags/html-src/softwarelibero.html:
22127 test/etags/lua-src/allegro.lua 50283 * test/etags/lua-src/allegro.lua:
22128 test/etags/objc-src/PackInsp.h 50284 * test/etags/objc-src/PackInsp.h:
22129 test/etags/objc-src/PackInsp.m 50285 * test/etags/objc-src/PackInsp.m:
22130 test/etags/objc-src/Subprocess.h 50286 * test/etags/objc-src/Subprocess.h:
22131 test/etags/objc-src/Subprocess.m 50287 * test/etags/objc-src/Subprocess.m:
22132 test/etags/objcpp-src/SimpleCalc.H 50288 * test/etags/objcpp-src/SimpleCalc.H:
22133 test/etags/objcpp-src/SimpleCalc.M 50289 * test/etags/objcpp-src/SimpleCalc.M:
22134 test/etags/pas-src/common.pas 50290 * test/etags/pas-src/common.pas:
22135 test/etags/perl-src/htlmify-cystic 50291 * test/etags/perl-src/htlmify-cystic:
22136 test/etags/perl-src/kai-test.pl 50292 * test/etags/perl-src/kai-test.pl:
22137 test/etags/perl-src/yagrip.pl 50293 * test/etags/perl-src/yagrip.pl:
22138 test/etags/php-src/lce_functions.php 50294 * test/etags/php-src/lce_functions.php:
22139 test/etags/php-src/ptest.php 50295 * test/etags/php-src/ptest.php:
22140 test/etags/php-src/sendmail.php 50296 * test/etags/php-src/sendmail.php:
22141 test/etags/prol-src/natded.prolog 50297 * test/etags/prol-src/natded.prolog:
22142 test/etags/prol-src/ordsets.prolog 50298 * test/etags/prol-src/ordsets.prolog:
22143 test/etags/ps-src/rfc1245.ps 50299 * test/etags/ps-src/rfc1245.ps:
22144 test/etags/pyt-src/server.py 50300 * test/etags/pyt-src/server.py:
22145 test/etags/tex-src/gzip.texi 50301 * test/etags/tex-src/gzip.texi:
22146 test/etags/tex-src/nonewline.tex 50302 * test/etags/tex-src/nonewline.tex:
22147 test/etags/tex-src/testenv.tex 50303 * test/etags/tex-src/testenv.tex:
22148 test/etags/tex-src/texinfo.tex 50304 * test/etags/tex-src/texinfo.tex:
22149 test/etags/y-src/atest.y 50305 * test/etags/y-src/atest.y:
22150 test/etags/y-src/cccp.c 50306 * test/etags/y-src/cccp.c:
22151 test/etags/y-src/cccp.y 50307 * test/etags/y-src/cccp.y:
22152 test/etags/y-src/parse.c 50308 * test/etags/y-src/parse.c:
22153 test/etags/y-src/parse.y 50309 * test/etags/y-src/parse.y:
22154 test/indent/css-mode.css 50310 * test/indent/css-mode.css:
22155 test/indent/js-indent-init-dynamic.js 50311 * test/indent/js-indent-init-dynamic.js:
22156 test/indent/js-indent-init-t.js 50312 * test/indent/js-indent-init-t.js:
22157 test/indent/js-jsx.js 50313 * test/indent/js-jsx.js:
22158 test/indent/js.js 50314 * test/indent/js.js:
22159 test/indent/latex-mode.tex 50315 * test/indent/latex-mode.tex:
22160 test/indent/modula2.mod 50316 * test/indent/modula2.mod:
22161 test/indent/nxml.xml 50317 * test/indent/nxml.xml:
22162 test/indent/octave.m 50318 * test/indent/octave.m:
22163 test/indent/pascal.pas 50319 * test/indent/pascal.pas:
22164 test/indent/perl.perl 50320 * test/indent/perl.perl:
22165 test/indent/prolog.prolog 50321 * test/indent/prolog.prolog:
22166 test/indent/ps-mode.ps 50322 * test/indent/ps-mode.ps:
22167 test/indent/ruby.rb 50323 * test/indent/ruby.rb:
22168 test/indent/scheme.scm 50324 * test/indent/scheme.scm:
22169 test/indent/scss-mode.scss 50325 * test/indent/scss-mode.scss:
22170 test/indent/sgml-mode-attribute.html 50326 * test/indent/sgml-mode-attribute.html:
22171 test/indent/shell.rc 50327 * test/indent/shell.rc:
22172 test/indent/shell.sh 50328 * test/indent/shell.sh:
22173 test/redisplay-testsuite.el 50329 * test/redisplay-testsuite.el:
22174 test/rmailmm.el 50330 * test/rmailmm.el:
22175 test/automated/buffer-tests.el 50331 * test/automated/buffer-tests.el:
22176 test/automated/cmds-tests.el 50332 * test/automated/cmds-tests.el:
22177 test/automated/data-tests.el 50333 * test/automated/data-tests.el:
22178 test/automated/finalizer-tests.el 50334 * test/automated/finalizer-tests.el:
22179 test/automated/fns-tests.el 50335 * test/automated/fns-tests.el:
22180 test/automated/inotify-test.el 50336 * test/automated/inotify-test.el:
22181 test/automated/keymap-tests.el 50337 * test/automated/keymap-tests.el:
22182 test/automated/print-tests.el 50338 * test/automated/print-tests.el:
22183 test/automated/libxml-tests.el 50339 * test/automated/libxml-tests.el:
22184 test/automated/zlib-tests.el: Files Moved. 50340 * test/automated/zlib-tests.el: Files Moved.
22185 50341
221862015-11-21 Wilson Snyder <wsnyder@wsnyder.org> 503422015-11-21 Wilson Snyder <wsnyder@wsnyder.org>
22187 50343
22188 verilog-mode.el: Commentary and fix pre-Emacs 21 behavior. 50344 verilog-mode.el: Commentary and fix pre-Emacs 21 behavior.
22189 50345
22190 * verilog-mode.el (verilog-save-font-no-change-functions): 50346 * lisp/progmodes/verilog-mode.el
22191 Commentary and fix pre-Emacs 21 behavior. 50347 (verilog-save-font-no-change-functions): Commentary and fix
50348 pre-Emacs 21 behavior.
22192 50349
221932015-11-20 Michael Albinus <michael.albinus@gmx.de> 503502015-11-20 Michael Albinus <michael.albinus@gmx.de>
22194 50351
@@ -22324,8 +50481,8 @@
22324 50481
22325 Minor fix to comment indentation and typo in last commit 50482 Minor fix to comment indentation and typo in last commit
22326 50483
22327 * linum.el (linum-update-window): Fix comment indentation and a 50484 * lisp/linum.el (linum-update-window): Fix comment indentation and
22328 typo. 50485 a typo.
22329 50486
223302015-11-17 João Távora <joaotavora@gmail.com> 504872015-11-17 João Távora <joaotavora@gmail.com>
22331 50488
@@ -22342,7 +50499,7 @@
22342 A similar fix was commited to nlinum.el in ELPA.git's 50499 A similar fix was commited to nlinum.el in ELPA.git's
22343 e7f5f549fbfb740b911fb7f33b42381ecece56d8 50500 e7f5f549fbfb740b911fb7f33b42381ecece56d8
22344 50501
22345 * linum.el (linum-delete-overlays): Restore margins more 50502 * lisp/linum.el (linum-delete-overlays): Restore margins more
22346 criteriously. 50503 criteriously.
22347 (linum-update-window): Set margins more criteriously. 50504 (linum-update-window): Set margins more criteriously.
22348 50505
@@ -22518,7 +50675,7 @@
22518 50675
22519 Update verilog-mode.el to 2015-11-09-b121d60-vpo. 50676 Update verilog-mode.el to 2015-11-09-b121d60-vpo.
22520 50677
22521 * verilog-mode.el (verilog-auto, verilog-delete-auto) 50678 * lisp/progmodes/verilog-mode.el (verilog-auto, verilog-delete-auto)
22522 (verilog-modi-cache-results, verilog-save-buffer-state) 50679 (verilog-modi-cache-results, verilog-save-buffer-state)
22523 (verilog-save-font-no-change-functions): When internally suppressing change 50680 (verilog-save-font-no-change-functions): When internally suppressing change
22524 functions, use `inhibit-modification-hooks' and call 50681 functions, use `inhibit-modification-hooks' and call
@@ -22597,7 +50754,7 @@
22597 50754
22598This file records repository revisions from 50755This file records repository revisions from
22599commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to 50756commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
22600commit f15f6b53078ac2176f8d2c05d99d3d9b4d32986b (inclusive). 50757commit 82d2a05a74c120480dc1b68243430c9417bfc523 (inclusive).
22601See ChangeLog.1 for earlier changes. 50758See ChangeLog.1 for earlier changes.
22602 50759
22603;; Local Variables: 50760;; Local Variables:
diff --git a/INSTALL b/INSTALL
index e76e843ce29..e93b3064fcb 100644
--- a/INSTALL
+++ b/INSTALL
@@ -273,8 +273,10 @@ a POP3 server by default. Versions of the POP protocol older than
273POP3 are not supported. While POP3 support is typically enabled, 273POP3 are not supported. While POP3 support is typically enabled,
274whether Emacs actually uses POP3 is controlled by individual users; 274whether Emacs actually uses POP3 is controlled by individual users;
275see the Rmail chapter of the Emacs manual. Unless --with-mailutils is 275see the Rmail chapter of the Emacs manual. Unless --with-mailutils is
276in effect, it is a good idea to configure --without-pop so that users 276in effect, it is a good idea to configure without POP3 support so that
277are less likely to inadvertently read email via insecure channels. 277users are less likely to inadvertently read email via insecure
278channels. On native MS-Windows, --with-pop is the default; on other
279platforms, --without-pop is the default.
278 280
279For image support you may have to download, build, and install the 281For image support you may have to download, build, and install the
280appropriate image support libraries for image types other than XBM and 282appropriate image support libraries for image types other than XBM and
diff --git a/Makefile.in b/Makefile.in
index b882da19287..8ad3f99a249 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1115,7 +1115,7 @@ ChangeLog:
1115 ./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX) 1115 ./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
1116 1116
1117# Check that we are in a good state for changing history. 1117# Check that we are in a good state for changing history.
1118PREFERRED_BRANCH = master 1118PREFERRED_BRANCH = emacs-26
1119preferred-branch-is-current: 1119preferred-branch-is-current:
1120 git branch | grep -q '^\* $(PREFERRED_BRANCH)$$' 1120 git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
1121unchanged-history-files: 1121unchanged-history-files:
diff --git a/admin/authors.el b/admin/authors.el
index c69ca9405c7..5638efbc34c 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -1,3 +1,4 @@
1
1;;; authors.el --- utility for maintaining Emacs's AUTHORS file 2;;; authors.el --- utility for maintaining Emacs's AUTHORS file
2 3
3;; Copyright (C) 2000-2017 Free Software Foundation, Inc. 4;; Copyright (C) 2000-2017 Free Software Foundation, Inc.
@@ -391,7 +392,7 @@ Changes to files matching one of the regexps in this list are not listed.")
391 "vms" "mac" "url" "tree-widget" 392 "vms" "mac" "url" "tree-widget"
392 "info/dir" 393 "info/dir"
393 ;; Not in gnulib anymore 394 ;; Not in gnulib anymore
394 "lib/qset-acl.c" "lib/qcopy-acl.c" "lib/file-has-acl.c" 395 "lib/qset-acl.c" "lib/qcopy-acl.c" "lib/file-has-acl.c" "lib/secure_getenv.c"
395 ;; files from old MS Windows build procedures 396 ;; files from old MS Windows build procedures
396 "nt/gnulib-modules-to-delete.cfg" 397 "nt/gnulib-modules-to-delete.cfg"
397 "makefile.w32-in" 398 "makefile.w32-in"
@@ -736,6 +737,8 @@ Changes to files in this list are not listed.")
736 "org-exp-blocks.el" ; maybe this is ob-exp now? dunno 737 "org-exp-blocks.el" ; maybe this is ob-exp now? dunno
737 "org-lparse.el" 738 "org-lparse.el"
738 "org-special-blocks.el" "org-taskjuggler.el" 739 "org-special-blocks.el" "org-taskjuggler.el"
740 "ob-sh.el"
741 "ob-scala.el"
739 "progmodes/cap-words.el" 742 "progmodes/cap-words.el"
740 "w32-common-fns.el" 743 "w32-common-fns.el"
741 ;; gnus 744 ;; gnus
@@ -751,7 +754,7 @@ Changes to files in this list are not listed.")
751 "format-spec.el" "gnus-move.el" "gnus-sync.el" 754 "format-spec.el" "gnus-move.el" "gnus-sync.el"
752 "auth-source.el" "ecomplete.el" "gravatar.el" "mailcap.el" "plstore.el" 755 "auth-source.el" "ecomplete.el" "gravatar.el" "mailcap.el" "plstore.el"
753 "pop3.el" "qp.el" "registry.el" "rfc2231.el" "rtree.el" 756 "pop3.el" "qp.el" "registry.el" "rfc2231.el" "rtree.el"
754 "sieve.el" "sieve-mode.el" 757 "sieve.el" "sieve-mode.el" "gnus-ems.el"
755 ;; doc 758 ;; doc
756 "getopt.c" "texindex.c" "news.texi" "vc.texi" "vc2-xtra.texi" 759 "getopt.c" "texindex.c" "news.texi" "vc.texi" "vc2-xtra.texi"
757 "back.texi" "vol1.texi" "vol2.texi" "elisp-covers.texi" "two.el" 760 "back.texi" "vol1.texi" "vol2.texi" "elisp-covers.texi" "two.el"
@@ -801,7 +804,12 @@ Changes to files in this list are not listed.")
801 "cedet-utests.el" "ede-tests.el" "semantic-ia-utest.el" 804 "cedet-utests.el" "ede-tests.el" "semantic-ia-utest.el"
802 "semantic-tests.el" "semantic-utest-c.el" "semantic-utest.el" 805 "semantic-tests.el" "semantic-utest-c.el" "semantic-utest.el"
803 "srecode-tests.el" "make-test-deps.emacs-lisp" 806 "srecode-tests.el" "make-test-deps.emacs-lisp"
804 ) 807 "nxml-uchnm.el"
808 "decoder-tests.el"
809 "obsolete/scribe.el"
810 "cp51932.el"
811 "eucjp-ms.el"
812 "lisp.mk")
805 "File names which are valid, but no longer exist (or cannot be found) 813 "File names which are valid, but no longer exist (or cannot be found)
806in the repository.") 814in the repository.")
807 815
@@ -906,6 +914,8 @@ in the repository.")
906 ("patcomp.el" . "patcomp.el") 914 ("patcomp.el" . "patcomp.el")
907 ("emulation/ws-mode.el" . "ws-mode.el") 915 ("emulation/ws-mode.el" . "ws-mode.el")
908 ("vc/vc-arch.el" . "vc-arch.el") 916 ("vc/vc-arch.el" . "vc-arch.el")
917 ("lisp/gnus/messcompat.el" . "messcompat.el")
918 ("html2text.el" . "html2text.el")
909 ;; From lisp to etc/forms. 919 ;; From lisp to etc/forms.
910 ("forms-d2.el" . "forms-d2.el") 920 ("forms-d2.el" . "forms-d2.el")
911 ("forms-pass.el" . "forms-pass.el") 921 ("forms-pass.el" . "forms-pass.el")
@@ -950,9 +960,17 @@ in the repository.")
950 ;; Moved from lisp/gnus/ to lisp/mail/ 960 ;; Moved from lisp/gnus/ to lisp/mail/
951 ("binhex.el" . "mail/binhex.el") 961 ("binhex.el" . "mail/binhex.el")
952 ("uudecode.el" . "mail/uudecode.el") 962 ("uudecode.el" . "mail/uudecode.el")
963 ("mail-parse.el" . "mail/mail-parse.el")
964 ("yenc.el" . "mail/yenc.el")
965 ("flow-fill.el" . "mail/flow-fill.el")
966 ("ietf-drums.el" . "mail/ietf-drums.el")
967 ("sieve-manage.el" . "mail/sieve-manage.el")
968 ;; Moved from lisp/gnus/ to lisp/image/
969 ("compface.el" . "image/compface.el")
953 ;; Moved from lisp/gnus/ to lisp/net/ 970 ;; Moved from lisp/gnus/ to lisp/net/
954 ("imap.el" . "net/imap.el") 971 ("imap.el" . "net/imap.el")
955 ("rfc2104.el" . "net/rfc2104.el") 972 ("rfc2104.el" . "net/rfc2104.el")
973 ("starttls.el" . "net/starttls.el")
956 ;; And from emacs/ to misc/ and back again. 974 ;; And from emacs/ to misc/ and back again.
957 ("ns-emacs.texi" . "macos.texi") 975 ("ns-emacs.texi" . "macos.texi")
958 ("overrides.texi" . "gnus-overrides.texi") 976 ("overrides.texi" . "gnus-overrides.texi")
@@ -993,6 +1011,7 @@ in the repository.")
993 ("edt-user.doc" . "edt.texi") 1011 ("edt-user.doc" . "edt.texi")
994 ("DEV-NOTES" . "nextstep") 1012 ("DEV-NOTES" . "nextstep")
995 ("org/COPYRIGHT-AND-LICENSE" . "org/README") 1013 ("org/COPYRIGHT-AND-LICENSE" . "org/README")
1014 ("lisp/net/idna.el" . "puny.el")
996 ;; Moved to different directories. 1015 ;; Moved to different directories.
997 ("ctags.1" . "ctags.1") 1016 ("ctags.1" . "ctags.1")
998 ("etags.1" . "etags.1") 1017 ("etags.1" . "etags.1")
@@ -1021,6 +1040,8 @@ in the repository.")
1021 ;; module.* moved to emacs-module.* 1040 ;; module.* moved to emacs-module.*
1022 ("src/module.h" . "src/emacs-module.h") 1041 ("src/module.h" . "src/emacs-module.h")
1023 ("src/module.c" . "src/emacs-module.c") 1042 ("src/module.c" . "src/emacs-module.c")
1043 ;; gnulib
1044 ("lib/strftime.c" . "lib/nstrftime.c")
1024 ) 1045 )
1025 "Alist of files which have been renamed during their lifetime. 1046 "Alist of files which have been renamed during their lifetime.
1026Elements are (OLDNAME . NEWNAME).") 1047Elements are (OLDNAME . NEWNAME).")
diff --git a/configure.ac b/configure.ac
index eba95e2fb84..627a392a5ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,9 +232,9 @@ AC_DEFUN([OPTION_DEFAULT_ON], [dnl
232 m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=$with_features])dnl 232 m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=$with_features])dnl
233])dnl 233])dnl
234 234
235# FIXME: The default options '--without-mailutils --with-pop' result 235# For retrieving mail, unencrypted network connections are the default
236# in a movemail implementation that supports only unencrypted POP3 236# only on native MS-Windows platforms. (FIXME: These platforms should
237# connections. Encrypted connections should be the default. 237# also be secure by default.)
238 238
239AC_ARG_WITH([mailutils], 239AC_ARG_WITH([mailutils],
240 [AS_HELP_STRING([--with-mailutils], 240 [AS_HELP_STRING([--with-mailutils],
@@ -251,9 +251,16 @@ if test "$with_mailutils" = no; then
251fi 251fi
252AC_SUBST([with_mailutils]) 252AC_SUBST([with_mailutils])
253 253
254OPTION_DEFAULT_ON([pop], 254AC_ARG_WITH([pop],
255 [don't support POP mail retrieval with movemail (--without-pop or 255 [AS_HELP_STRING([--with-pop],
256 --with-mailutils is recommended, as movemail POP is insecure)]) 256 [Support POP mail retrieval if Emacs movemail is used (not recommended,
257 as Emacs movemail POP is insecure). This is the default only on
258 native MS-Windows.])],
259 [],
260 [case $host in
261 *-mingw*) with_pop=yes;;
262 *) with_pop=no-by-default;;
263 esac])
257if test "$with_pop" = yes; then 264if test "$with_pop" = yes; then
258 AC_DEFINE(MAIL_USE_POP) 265 AC_DEFINE(MAIL_USE_POP)
259fi 266fi
@@ -1313,7 +1320,7 @@ dnl For a long time, -znocombreloc was added to LDFLAGS rather than
1313dnl LD_SWITCH_SYSTEM_TEMACS. That is: 1320dnl LD_SWITCH_SYSTEM_TEMACS. That is:
1314dnl * inappropriate, as LDFLAGS is a user option but this is essential. 1321dnl * inappropriate, as LDFLAGS is a user option but this is essential.
1315dnl Eg "make LDFLAGS=... all" could run into problems, 1322dnl Eg "make LDFLAGS=... all" could run into problems,
1316dnl http://bugs.debian.org/684788 1323dnl https://bugs.debian.org/684788
1317dnl * unnecessary, since temacs is the only thing that actually needs it. 1324dnl * unnecessary, since temacs is the only thing that actually needs it.
1318dnl Indeed this is where it was originally, prior to: 1325dnl Indeed this is where it was originally, prior to:
1319dnl https://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html 1326dnl https://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html
@@ -1392,10 +1399,6 @@ case "$opsys" in
1392 # The resulting binary has a complete symbol table, and is better 1399 # The resulting binary has a complete symbol table, and is better
1393 # for debugging and other observability tools (debuggers, pstack, etc). 1400 # for debugging and other observability tools (debuggers, pstack, etc).
1394 # 1401 #
1395 # If you encounter a problem using dldump(), please consider sending
1396 # a message to the OpenSolaris tools-linking mailing list:
1397 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
1398 #
1399 # It is likely that dldump() works with older Solaris too, but this has 1402 # It is likely that dldump() works with older Solaris too, but this has
1400 # not been tested, so for now this change is for Solaris 10 or newer. 1403 # not been tested, so for now this change is for Solaris 10 or newer.
1401 UNEXEC_OBJ=unexsol.o 1404 UNEXEC_OBJ=unexsol.o
@@ -2644,7 +2647,7 @@ if test x"$pkg_check_gtk" = xyes; then
2644 closing open displays. This is no problem if you just use 2647 closing open displays. This is no problem if you just use
2645 one display, but if you use more than one and close one of them 2648 one display, but if you use more than one and close one of them
2646 Emacs may crash. 2649 Emacs may crash.
2647 See http://bugzilla.gnome.org/show_bug.cgi?id=85715]]) 2650 See https://bugzilla.gnome.org/show_bug.cgi?id=85715]])
2648 fi 2651 fi
2649 2652
2650fi 2653fi
@@ -4457,7 +4460,6 @@ emacs_broken_SIGIO=no
4457 4460
4458case $opsys in 4461case $opsys in
4459 dnl SIGIO exists, but the feature doesn't work in the way Emacs needs. 4462 dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
4460 dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
4461 hpux* | nacl | openbsd | sol2* | unixware ) 4463 hpux* | nacl | openbsd | sol2* | unixware )
4462 emacs_broken_SIGIO=yes 4464 emacs_broken_SIGIO=yes
4463 ;; 4465 ;;
@@ -5568,6 +5570,12 @@ if test ! "$with_mailutils"; then
5568 AC_MSG_WARN([This configuration installs a 'movemail' program 5570 AC_MSG_WARN([This configuration installs a 'movemail' program
5569that retrieves POP3 email via only insecure channels. 5571that retrieves POP3 email via only insecure channels.
5570To omit insecure POP3, you can use '$0 --without-pop'.]) 5572To omit insecure POP3, you can use '$0 --without-pop'.])
5573 elif test "$with_pop" = no-by-default; then
5574 AC_MSG_WARN([This configuration installs a 'movemail' program
5575that does not retrieve POP3 email. By default, Emacs 25 and earlier
5576installed a 'movemail' program that retrieved POP3 email via only
5577insecure channels, a practice that is no longer recommended but that
5578you can continue to support by using '$0 --with-pop'.])
5571 fi 5579 fi
5572 5580
5573 case $opsys in 5581 case $opsys in
@@ -5579,7 +5587,7 @@ To omit insecure POP3, you can use '$0 --without-pop'.])
5579 case `(movemail --version) 2>/dev/null` in 5587 case `(movemail --version) 2>/dev/null` in
5580 *Mailutils*) ;; 5588 *Mailutils*) ;;
5581 *) emacs_fix_movemail="install GNU Mailutils 5589 *) emacs_fix_movemail="install GNU Mailutils
5582<http://mailutils.org> and $emacs_fix_movemail";; 5590<https://mailutils.org> and $emacs_fix_movemail";;
5583 esac 5591 esac
5584 AC_MSG_NOTICE([You might want to $emacs_fix_movemail.]);; 5592 AC_MSG_NOTICE([You might want to $emacs_fix_movemail.]);;
5585 esac 5593 esac
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index dd004927caf..09c3bdf71f6 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -812,15 +812,19 @@ formatting feature described here; they differ from @code{format-message} only
812in how they use the result of formatting. 812in how they use the result of formatting.
813 813
814@defun format string &rest objects 814@defun format string &rest objects
815This function returns a new string that is made by copying 815This function returns a string equal to @var{string}, replacing any format
816@var{string} and then replacing any format specification 816specifications with encodings of the corresponding @var{objects}. The
817in the copy with encodings of the corresponding @var{objects}. The
818arguments @var{objects} are the computed values to be formatted. 817arguments @var{objects} are the computed values to be formatted.
819 818
820The characters in @var{string}, other than the format specifications, 819The characters in @var{string}, other than the format specifications,
821are copied directly into the output, including their text properties, 820are copied directly into the output, including their text properties,
822if any. Any text properties of the format specifications are copied 821if any. Any text properties of the format specifications are copied
823to the produced string representations of the argument @var{objects}. 822to the produced string representations of the argument @var{objects}.
823
824The output string need not be newly-allocated. For example, if
825@code{x} is the string @code{"foo"}, the expressions @code{(eq x
826(format x))} and @code{(eq x (format "%s" x))} might both yield
827@code{t}.
824@end defun 828@end defun
825 829
826@defun format-message string &rest objects 830@defun format-message string &rest objects
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 1bc416fd02e..5ff5537d048 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -4,7 +4,7 @@
4@set VERSION 0.3 4@set VERSION 0.3
5@set UPDATED April 2004 5@set UPDATED April 2004
6@settitle GNU Flymake @value{VERSION} 6@settitle GNU Flymake @value{VERSION}
7@include docstyle.texi 7@include ../emacs/docstyle.texi
8@syncodeindex pg cp 8@syncodeindex pg cp
9@comment %**end of header 9@comment %**end of header
10 10
@@ -35,7 +35,7 @@ modify this GNU manual.''
35@titlepage 35@titlepage
36@title GNU Flymake 36@title GNU Flymake
37@subtitle for version @value{VERSION}, @value{UPDATED} 37@subtitle for version @value{VERSION}, @value{UPDATED}
38@author Pavel Kobiakov(@email{pk_at_work@@yahoo.com}) 38@author Pavel Kobiakov(@email{pk_at_work@@yahoo.com}) and João Távora.
39@page 39@page
40@vskip 0pt plus 1filll 40@vskip 0pt plus 1filll
41@insertcopying 41@insertcopying
@@ -53,8 +53,8 @@ modify this GNU manual.''
53* Overview of Flymake:: 53* Overview of Flymake::
54* Installing Flymake:: 54* Installing Flymake::
55* Using Flymake:: 55* Using Flymake::
56* Configuring Flymake:: 56* Extending Flymake::
57* Flymake Implementation:: 57* The legacy Proc backend::
58* GNU Free Documentation License:: 58* GNU Free Documentation License::
59* Index:: 59* Index::
60@end menu 60@end menu
@@ -63,67 +63,56 @@ modify this GNU manual.''
63@chapter Overview 63@chapter Overview
64@cindex Overview of Flymake 64@cindex Overview of Flymake
65 65
66Flymake is a universal on-the-fly syntax checker implemented as an 66Flymake is a universal on-the-fly buffer checker implemented as an
67Emacs minor mode. Flymake runs the pre-configured syntax check tool 67Emacs minor mode. When enabled, Flymake visually annotates the buffer
68(compiler for C++ files, @code{perl} for perl files, etc.)@: in the 68with diagnostic information coming from one or more different sources,
69background, passing it a temporary copy of the current buffer, and 69or @emph{backends}.
70parses the output for known error/warning message patterns. Flymake 70
71then highlights erroneous lines (i.e., lines for which at least one 71Historically, Flymake used to accept diagnostics from a single, albeit
72error or warning has been reported by the syntax check tool), and 72reasonably flexible, backend.
73displays an overall buffer status in the mode line. Status information 73
74displayed by Flymake contains total number of errors and warnings 74This backend isn't (yet) obsolete and so is still available as a
75reported for the buffer during the last syntax check. 75fallback and active by default(@pxref{The legacy Proc backend}). It works by
76 76selecting a syntax check tool from a preconfigured list (compiler for
77@code{flymake-goto-next-error} and @code{flymake-goto-prev-error} 77C++ files, @code{perl} for perl files, etc.), and executing it in the
78functions allow for easy navigation to the next/previous erroneous 78background, passing it a temporary file which is a copy of the current
79line, respectively. 79buffer, and parsing the output for known error/warning message
80 80patterns.
81Calling @code{flymake-display-err-menu-for-current-line} will popup a 81
82menu containing error messages reported by the syntax check tool for 82Flymake annotates the buffer by highlighting problematic buffer
83the current line. Errors/warnings belonging to another file, such as a 83regions with a special space. It also displays an overall buffer
84@code{.h} header file included by a @code{.c} file, are shown in the 84status in the mode line. Status information displayed by Flymake
85current buffer as belonging to the first line. Menu items for such 85contains totals for different types of diagnostics.
86messages also contain a filename and a line number. Selecting such a 86
87menu item will automatically open the file and jump to the line with 87@code{flymake-goto-next-error} and @code{flymake-goto-prev-error} are
88error. 88commands that allow easy navigation to the next/previous erroneous
89line, respectively. If might be a good idea to map them to @kbd{M-n}
90and @kbd{M-p} in @code{flymake-mode}, by adding to your init file:
91
92@lisp
93(define-key flymake-mode-map (kbd "M-n") 'flymake-goto-next-error)
94(define-key flymake-mode-map (kbd "M-p") 'flymake-goto-prev-error)
95@end lisp
89 96
90Syntax check is done ``on-the-fly''. It is started whenever 97Syntax check is done ``on-the-fly''. It is started whenever
91 98
92@itemize @bullet 99@itemize @bullet
93@item buffer is loaded 100@item @code{flymake-mode} is started;
94@item a newline character is added to the buffer 101@item a newline character is added to the buffer;
95@item some changes were made to the buffer more than @code{0.5} seconds ago (the 102@item some changes were made to the buffer more than @code{0.5} seconds ago (the
96delay is configurable). 103delay is configurable).
97@end itemize 104@end itemize
98 105
99Flymake is a universal syntax checker in the sense that it's easily 106Flymake is a universal syntax checker in the sense that it's easily
100extended to support new syntax check tools and error message 107extended to support new backends. @xref{Customizable variables}.
101patterns. @xref{Configuring Flymake}.
102 108
103@node Installing Flymake 109@node Installing Flymake
104@chapter Installing 110@chapter Installing
105@cindex Installing Flymake 111@cindex Installing Flymake
106 112
107 113Flymake is included with Emacs and its main commands, like
108Flymake is packaged in a single file, @code{flymake.el}. 114@code{flymake-mode}, are autoloaded. This means there is usually
109 115nothing to do by way of installation.
110To install/update Flymake, place @code{flymake.el} to a directory
111somewhere on Emacs load path. You might also want to byte-compile
112@code{flymake.el} to improve performance.
113
114Also, place the following line in the @code{.emacs} file.
115
116@lisp
117(require 'flymake)
118@end lisp
119
120You might also map the most frequently used Flymake functions, such as
121@code{flymake-goto-next-error}, to some keyboard shortcuts:
122
123@lisp
124(global-set-key [f3] 'flymake-display-err-menu-for-current-line)
125(global-set-key [f4] 'flymake-goto-next-error)
126@end lisp
127 116
128@node Using Flymake 117@node Using Flymake
129@chapter Using Flymake 118@chapter Using Flymake
@@ -132,10 +121,10 @@ You might also map the most frequently used Flymake functions, such as
132@menu 121@menu
133* Flymake mode:: 122* Flymake mode::
134* Running the syntax check:: 123* Running the syntax check::
135* Navigating to error lines:: 124* Navigating to error lines:: @c * Viewing error messages::
136* Viewing error messages::
137* Syntax check statuses:: 125* Syntax check statuses::
138* Troubleshooting:: 126* Troubleshooting::
127* Customizable variables::
139@end menu 128@end menu
140 129
141@node Flymake mode 130@node Flymake mode
@@ -161,10 +150,8 @@ line in @code{.emacs}:
161 150
162When @code{flymake-mode} is active, syntax check is started 151When @code{flymake-mode} is active, syntax check is started
163automatically on any of the three conditions mentioned above. Syntax 152automatically on any of the three conditions mentioned above. Syntax
164check can also be started manually by using the 153check can also be started manually by using the @code{flymake-start}
165@code{flymake-start-syntax-check-for-current-buffer} function. This 154function.
166can be used, for example, when changes were made to some other buffer
167affecting the current buffer.
168 155
169@node Navigating to error lines 156@node Navigating to error lines
170@section Navigating to error lines 157@section Navigating to error lines
@@ -185,69 +172,37 @@ navigate the highlighted lines.
185 172
186@end multitable 173@end multitable
187 174
188These functions treat erroneous lines as a linked list. Therefore, 175If the user option @code{flymake-wrap-around} is active
189@code{flymake-goto-next-error} will go to the first erroneous line 176(@pxref{Customizable variables}), these functions treat diagnostics
190when invoked in the end of the buffer. 177as a linked list. Therefore, @code{flymake-goto-next-error} will go
191 178to the first diagnostic when invoked in the end of the buffer.
192@node Viewing error messages
193@section Viewing error messages
194@cindex Viewing error messages
195
196To view error messages belonging to the current line, use the
197@code{flymake-display-err-menu-for-current-line} function. If there's
198at least one error or warning reported for the current line, this
199function will display a popup menu with error/warning texts.
200Selecting the menu item whose error belongs to another file brings
201forward that file with the help of the
202@code{flymake-goto-file-and-line} function.
203 179
204@node Syntax check statuses 180@node Syntax check statuses
205@section Syntax check statuses 181@section Syntax check statuses
206@cindex Syntax check statuses 182@cindex Syntax check statuses
207 183
208After syntax check is finished, its status is displayed in the mode line. 184After syntax check is finished, its status is displayed in the mode line.
209The following statuses are defined. 185The following statuses are defined:
210
211@multitable @columnfractions 0.25 0.75
212@item Flymake* or Flymake:E/W*
213@tab Flymake is currently running. For the second case, E/W contains the
214error and warning count for the previous run.
215
216@item Flymake
217@tab Syntax check is not running. Usually this means syntax check was
218successfully passed (no errors, no warnings). Other possibilities are:
219syntax check was killed as a result of executing
220@code{flymake-compile}, or syntax check cannot start as compilation
221is currently in progress.
222
223@item Flymake:E/W
224@tab Number of errors/warnings found by the syntax check process.
225
226@item Flymake:!
227@tab Flymake was unable to find master file for the current buffer.
228@end multitable
229
230The following errors cause a warning message and switch flymake mode
231OFF for the buffer.
232 186
233@multitable @columnfractions 0.25 0.75 187@multitable @columnfractions 0.25 0.75
234@item CFGERR 188@item @code{Wait}
235@tab Syntax check process returned nonzero exit code, but no 189@tab Some flymake backends haven't reported since the last time they
236errors/warnings were reported. This indicates a possible configuration 190where questioned.
237error (for example, no suitable error message patterns for the 191
238syntax check tool). 192@item @code{!}
239 193@tab All the configured Flymake backends have disabled themselves.
240@item NOMASTER 194Left-clicking the ``Flymake'' mode line indicator beings the user
241@tab Flymake was unable to find master file for the current buffer. 195@code{*Flymake log*} buffer where these situations may be investigated
242 196
243@item NOMK 197@item @code{?}
244@tab Flymake was unable to find a suitable buildfile for the current buffer. 198@tab There are no configured Flymake backends in
245 199@code{flymake-diagnostic-functions}.
246@item PROCERR 200
247@tab Flymake was unable to launch a syntax check process. 201@item @emph{[nerrors nwarnings]}
202@tab Normal operation, number of errors/warnings found by the syntax
203check process.
248@end multitable 204@end multitable
249 205
250
251@node Troubleshooting 206@node Troubleshooting
252@section Troubleshooting 207@section Troubleshooting
253@cindex Logging 208@cindex Logging
@@ -255,70 +210,20 @@ syntax check tool).
255 210
256Flymake uses a simple logging facility for indicating important points 211Flymake uses a simple logging facility for indicating important points
257in the control flow. The logging facility sends logging messages to 212in the control flow. The logging facility sends logging messages to
258the @file{*Messages*} buffer. The information logged can be used for 213the @file{*Flymake log*} buffer. The information logged can be used for
259resolving various problems related to Flymake. 214resolving various problems related to Flymake.
260 215
261Logging output is controlled by the @code{flymake-log-level} 216Logging output is controlled by the Emacs @code{warning-minimum-log-level}
262variable. @code{3} is the most verbose level, and @code{-1} switches 217and @code{warning-minimum-level} variables.
263logging off.
264
265@node Configuring Flymake
266@chapter Configuring and Extending Flymake
267@cindex Configuring and Extending Flymake
268
269@menu
270* Customizable variables::
271* Adding support for a new syntax check tool::
272@end menu
273
274Flymake was designed to be easily extended for supporting new syntax
275check tools and error message patterns.
276 218
277@node Customizable variables 219@node Customizable variables
278@section Customizable variables 220@section Customizable variables
279@cindex Customizable variables 221@cindex Customizable variables
280 222
281This section summarizes variables used for Flymake 223This section summarizes variables used for the configuration of the
282configuration. 224Flymake user interface.
283 225
284@table @code 226@table @code
285@item flymake-log-level
286Controls logging output, see @ref{Troubleshooting}.
287
288@item flymake-allowed-file-name-masks
289A list of @code{(filename-regexp, init-function, cleanup-function
290getfname-function)} for configuring syntax check tools. @xref{Adding
291support for a new syntax check tool}.
292
293@ignore
294@item flymake-buildfile-dirs
295A list of directories (relative paths) for searching a
296buildfile. @xref{Locating the buildfile}.
297@end ignore
298
299@item flymake-master-file-dirs
300A list of directories for searching a master file. @xref{Locating a
301master file}.
302
303@item flymake-get-project-include-dirs-function
304A function used for obtaining a list of project include dirs (C/C++
305specific). @xref{Getting the include directories}.
306
307@item flymake-master-file-count-limit
308@itemx flymake-check-file-limit
309Used when looking for a master file. @xref{Locating a master file}.
310
311@item flymake-err-line-patterns
312Patterns for error/warning messages in the form @code{(regexp file-idx
313line-idx col-idx err-text-idx)}. @xref{Parsing the output}.
314
315@item flymake-warning-predicate
316Predicate to classify error text as warning. @xref{Parsing the output}.
317
318@item flymake-compilation-prevents-syntax-check
319A flag indicating whether compilation and syntax check of the same
320file cannot be run simultaneously.
321
322@item flymake-no-changes-timeout 227@item flymake-no-changes-timeout
323If any changes are made to the buffer, syntax check is automatically 228If any changes are made to the buffer, syntax check is automatically
324started after @code{flymake-no-changes-timeout} seconds. 229started after @code{flymake-no-changes-timeout} seconds.
@@ -327,13 +232,17 @@ started after @code{flymake-no-changes-timeout} seconds.
327A boolean flag indicating whether to start syntax check after a 232A boolean flag indicating whether to start syntax check after a
328newline character is added to the buffer. 233newline character is added to the buffer.
329 234
330@item flymake-errline 235@item flymake-error
331A custom face for highlighting lines for which at least one error has 236A custom face for highlighting regions for which an error has been
332been reported. 237reported.
238
239@item flymake-warning
240A custom face for highlighting regions for which a warning has been
241reported.
333 242
334@item flymake-warnline 243@item flymake-note
335A custom face for highlighting lines for which at least one warning 244A custom face for highlighting regions for which a note has been
336and no errors have been reported. 245reported.
337 246
338@item flymake-error-bitmap 247@item flymake-error-bitmap
339A bitmap used in the fringe to mark lines for which an error has 248A bitmap used in the fringe to mark lines for which an error has
@@ -346,6 +255,76 @@ been reported.
346@item flymake-fringe-indicator-position 255@item flymake-fringe-indicator-position
347Which fringe (if any) should show the warning/error bitmaps. 256Which fringe (if any) should show the warning/error bitmaps.
348 257
258@item flymake-wrap-around
259If non-nil, moving to errors with @code{flymake-goto-next-error} and
260@code{flymake-goto-prev-error} wraps around buffer boundaries.
261
262@end table
263
264@node Extending Flymake
265@chapter Extending Flymake
266@cindex Extending Flymake
267
268@node The legacy Proc backend
269@chapter The legacy ``Proc'' backend
270@cindex The legacy Proc backend
271
272@menu
273* Proc customization variables::
274* Adding support for a new syntax check tool::
275* Implementation overview::
276* Making a temporary copy::
277* Locating a master file::
278* Getting the include directories::
279* Locating the buildfile::
280* Starting the syntax check process::
281* Parsing the output::
282* Interaction with other modes::
283@end menu
284
285The backend @code{flymake-proc-legacy-backend} was originally designed
286to be extended for supporting new syntax check tools and error message
287patterns. It is also controlled by its own set of customization variables
288
289@node Proc customization variables
290@section Customization variables for the Proc backend
291@cindex Proc customization variables
292
293@table @code
294@item flymake-proc-allowed-file-name-masks
295A list of @code{(filename-regexp, init-function, cleanup-function
296getfname-function)} for configuring syntax check tools. @xref{Adding
297support for a new syntax check tool}.
298
299@item flymake-proc-master-file-dirs
300A list of directories for searching a master file. @xref{Locating a
301master file}.
302
303@item flymake-proc-get-project-include-dirs-function
304A function used for obtaining a list of project include dirs (C/C++
305specific). @xref{Getting the include directories}.
306
307@item flymake-proc-master-file-count-limit
308@itemx flymake-proc-check-file-limit
309Used when looking for a master file. @xref{Locating a master file}.
310
311@item flymake-proc-err-line-patterns
312Patterns for error/warning messages in the form @code{(regexp file-idx
313line-idx col-idx err-text-idx)}. @xref{Parsing the output}.
314
315@item flymake-proc-diagnostic-type-pred
316A function to classify a diagnostic text as particular type of
317error. Should be a function taking an error text and returning one of
318the symbols indexing @code{flymake-diagnostic-types-alist}. If non-nil
319is returned but there is no such symbol in that table, a warning is
320assumed. If nil is returned, an error is assumed. Can also be a
321regular expression that should match only warnings. This variable
322replaces the old @code{flymake-warning-re} and
323@code{flymake-warning-predicate}.
324
325@item flymake-proc-compilation-prevents-syntax-check
326A flag indicating whether compilation and syntax check of the same
327file cannot be run simultaneously.
349@end table 328@end table
350 329
351@node Adding support for a new syntax check tool 330@node Adding support for a new syntax check tool
@@ -358,7 +337,7 @@ Which fringe (if any) should show the warning/error bitmaps.
358@end menu 337@end menu
359 338
360Syntax check tools are configured using the 339Syntax check tools are configured using the
361@code{flymake-allowed-file-name-masks} list. Each item of this list 340@code{flymake-proc-allowed-file-name-masks} list. Each item of this list
362has the following format: 341has the following format:
363 342
364@lisp 343@lisp
@@ -369,15 +348,15 @@ has the following format:
369@item filename-regexp 348@item filename-regexp
370This field is used as a key for locating init/cleanup/getfname 349This field is used as a key for locating init/cleanup/getfname
371functions for the buffer. Items in 350functions for the buffer. Items in
372@code{flymake-allowed-file-name-masks} are searched sequentially. The 351@code{flymake-proc-allowed-file-name-masks} are searched sequentially.
373first item with @code{filename-regexp} matching buffer filename is 352The first item with @code{filename-regexp} matching buffer filename is
374selected. If no match is found, @code{flymake-mode} is switched off. 353selected. If no match is found, @code{flymake-mode} is switched off.
375 354
376@item init-function 355@item init-function
377@code{init-function} is required to initialize the syntax check, 356@code{init-function} is required to initialize the syntax check,
378usually by creating a temporary copy of the buffer contents. The 357usually by creating a temporary copy of the buffer contents. The
379function must return @code{(list cmd-name arg-list)}. If 358function must return @code{(list cmd-name arg-list)}. If
380@code{init-function} returns null, syntax check is aborted, by 359@code{init-function} returns null, syntax check is aborted, but
381@code{flymake-mode} is not switched off. 360@code{flymake-mode} is not switched off.
382 361
383@item cleanup-function 362@item cleanup-function
@@ -390,16 +369,16 @@ This function is used for translating filenames reported by the syntax
390check tool into ``real'' filenames. Filenames reported by the tool 369check tool into ``real'' filenames. Filenames reported by the tool
391will be different from the real ones, as actually the tool works with 370will be different from the real ones, as actually the tool works with
392the temporary copy. In most cases, the default implementation 371the temporary copy. In most cases, the default implementation
393provided by Flymake, @code{flymake-get-real-file-name}, can be used as 372provided by Flymake, @code{flymake-proc-get-real-file-name}, can be
394@code{getfname-function}. 373used as @code{getfname-function}.
395 374
396@end table 375@end table
397 376
398To add support for a new syntax check tool, write corresponding 377To add support for a new syntax check tool, write corresponding
399@code{init-function}, and, optionally @code{cleanup-function} and 378@code{init-function} and, optionally, @code{cleanup-function} and
400@code{getfname-function}. If the format of error messages reported by 379@code{getfname-function}. If the format of error messages reported by
401the new tool is not yet supported by Flymake, add a new entry to 380the new tool is not yet supported by Flymake, add a new entry to
402the @code{flymake-err-line-patterns} list. 381the @code{flymake-proc-err-line-patterns} list.
403 382
404The following sections contain some examples of configuring Flymake 383The following sections contain some examples of configuring Flymake
405support for various syntax check tools. 384support for various syntax check tools.
@@ -415,42 +394,42 @@ checking.
415First, we write the @code{init-function}: 394First, we write the @code{init-function}:
416 395
417@lisp 396@lisp
418(defun flymake-perl-init () 397(defun flymake-proc-perl-init ()
419 (let* ((temp-file (flymake-init-create-temp-buffer-copy 398 (let* ((temp-file (flymake-proc-init-create-temp-buffer-copy
420 'flymake-create-temp-inplace)) 399 'flymake-proc-create-temp-inplace))
421 (local-file (file-relative-name 400 (local-file (file-relative-name
422 temp-file 401 temp-file
423 (file-name-directory buffer-file-name)))) 402 (file-name-directory buffer-file-name))))
424 (list "perl" (list "-wc " local-file)))) 403 (list "perl" (list "-wc " local-file))))
425@end lisp 404@end lisp
426 405
427@code{flymake-perl-init} creates a temporary copy of the buffer 406@code{flymake-proc-perl-init} creates a temporary copy of the buffer
428contents with the help of 407contents with the help of
429@code{flymake-init-create-temp-buffer-copy}, and builds an appropriate 408@code{flymake-proc-init-create-temp-buffer-copy}, and builds an appropriate
430command line. 409command line.
431 410
432Next, we add a new entry to the 411Next, we add a new entry to the
433@code{flymake-allowed-file-name-masks}: 412@code{flymake-proc-allowed-file-name-masks}:
434 413
435@lisp 414@lisp
436(setq flymake-allowed-file-name-masks 415(setq flymake-proc-allowed-file-name-masks
437 (cons '(".+\\.pl$" 416 (cons '(".+\\.pl$"
438 flymake-perl-init 417 flymake-proc-perl-init
439 flymake-simple-cleanup 418 flymake-proc-simple-cleanup
440 flymake-get-real-file-name) 419 flymake-proc-get-real-file-name)
441 flymake-allowed-file-name-masks)) 420 flymake-proc-allowed-file-name-masks))
442@end lisp 421@end lisp
443 422
444Note that we use standard @code{cleanup-function} and 423Note that we use standard @code{cleanup-function} and
445@code{getfname-function}. 424@code{getfname-function}.
446 425
447Finally, we add an entry to @code{flymake-err-line-patterns}: 426Finally, we add an entry to @code{flymake-proc-err-line-patterns}:
448 427
449@lisp 428@lisp
450(setq flymake-err-line-patterns 429(setq flymake-proc-err-line-patterns
451 (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 430 (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]"
452 2 3 nil 1) 431 2 3 nil 1)
453 flymake-err-line-patterns)) 432 flymake-proc-err-line-patterns))
454@end lisp 433@end lisp
455 434
456@node Example---Configuring a tool called via make 435@node Example---Configuring a tool called via make
@@ -462,18 +441,18 @@ In this example we will add support for C files syntax checked by
462 441
463We're not required to write any new functions, as Flymake already has 442We're not required to write any new functions, as Flymake already has
464functions for @command{make}. We just add a new entry to the 443functions for @command{make}. We just add a new entry to the
465@code{flymake-allowed-file-name-masks}: 444@code{flymake-proc-allowed-file-name-masks}:
466 445
467@lisp 446@lisp
468(setq flymake-allowed-file-name-masks 447(setq flymake-proc-allowed-file-name-masks
469 (cons '(".+\\.c$" 448 (cons '(".+\\.c$"
470 flymake-simple-make-init 449 flymake-proc-simple-make-init
471 flymake-simple-cleanup 450 flymake-proc-simple-cleanup
472 flymake-get-real-file-name) 451 flymake-proc-get-real-file-name)
473 flymake-allowed-file-name-masks)) 452 flymake-proc-allowed-file-name-masks))
474@end lisp 453@end lisp
475 454
476@code{flymake-simple-make-init} builds the following @command{make} 455@code{flymake-proc-simple-make-init} builds the following @command{make}
477command line: 456command line:
478 457
479@lisp 458@lisp
@@ -492,7 +471,7 @@ our case this target might look like this:
492 471
493@verbatim 472@verbatim
494check-syntax: 473check-syntax:
495 gcc -o /dev/null -S ${CHK_SOURCES} 474 gcc -o /dev/null -S ${CHK_SOURCES} || true
496@end verbatim 475@end verbatim
497 476
498@noindent 477@noindent
@@ -504,42 +483,25 @@ Automake variable @code{COMPILE}:
504 483
505@verbatim 484@verbatim
506check-syntax: 485check-syntax:
507 $(COMPILE) -o /dev/null -S ${CHK_SOURCES} 486 $(COMPILE) -o /dev/null -S ${CHK_SOURCES} || true
508@end verbatim 487@end verbatim
509 488
510@node Flymake Implementation 489@node Implementation overview
511@chapter Flymake Implementation 490@section Implementation overview
512@cindex Implementation details
513
514@menu
515* Determining whether syntax check is possible::
516* Making a temporary copy::
517* Locating a master file::
518* Getting the include directories::
519* Locating the buildfile::
520* Starting the syntax check process::
521* Parsing the output::
522* Highlighting erroneous lines::
523* Interaction with other modes::
524@end menu
525
526Syntax check is started by calling @code{flymake-start-syntax-check-for-current-buffer}.
527Flymake first determines whether it is able to do syntax
528check. It then saves a copy of the buffer in a temporary file in the
529buffer's directory (or in the system temp directory, for java
530files), creates a syntax check command and launches a process with
531this command. The output is parsed using a list of error message patterns,
532and error information (file name, line number, type and text) is
533saved. After the process has finished, Flymake highlights erroneous
534lines in the buffer using the accumulated error information.
535
536@node Determining whether syntax check is possible
537@section Determining whether syntax check is possible
538@cindex Syntax check models 491@cindex Syntax check models
539@cindex Master file 492@cindex Master file
540 493
494@code{flymake-proc-legacy-backend} saves a copy of the buffer in a
495temporary file in the buffer's directory (or in the system temp
496directory, for Java files), creates a syntax check command and
497launches a process with this command. The output is parsed using a
498list of error message patterns, and error information (file name, line
499number, type and text) is saved. After the process has finished,
500Flymake highlights erroneous lines in the buffer using the accumulated
501error information.
502
541Syntax check is considered possible if there's an entry in 503Syntax check is considered possible if there's an entry in
542@code{flymake-allowed-file-name-masks} matching buffer's filename and 504@code{flymake-proc-allowed-file-name-masks} matching buffer's filename and
543its @code{init-function} returns non-@code{nil} value. 505its @code{init-function} returns non-@code{nil} value.
544 506
545Two syntax check modes are distinguished: 507Two syntax check modes are distinguished:
@@ -564,10 +526,10 @@ will also check syntax in the current file. Examples are C/C++ (.h,
564These modes are handled inside init/cleanup/getfname functions, see 526These modes are handled inside init/cleanup/getfname functions, see
565@ref{Adding support for a new syntax check tool}. 527@ref{Adding support for a new syntax check tool}.
566 528
567Flymake contains implementations of all functionality required to 529The Proc backend contains implementations of all functionality
568support different syntax check modes described above (making temporary 530required to support different syntax check modes described above
569copies, finding master files, etc.), as well as some tool-specific 531(making temporary copies, finding master files, etc.), as well as some
570(routines for Make, Ant, etc.)@: code. 532tool-specific (routines for Make, Ant, etc.)@: code.
571 533
572 534
573@node Making a temporary copy 535@node Making a temporary copy
@@ -609,15 +571,16 @@ Master file is located in two steps.
609 571
610First, a list of possible master files is built. A simple name 572First, a list of possible master files is built. A simple name
611matching is used to find the files. For a C++ header @code{file.h}, 573matching is used to find the files. For a C++ header @code{file.h},
612Flymake searches for all @code{.cpp} files in the directories whose relative paths are 574the Proc backend searches for all @code{.cpp} files in the directories
613stored in a customizable variable @code{flymake-master-file-dirs}, which 575whose relative paths are stored in a customizable variable
614usually contains something like @code{("." "./src")}. No more than 576@code{flymake-proc-master-file-dirs}, which usually contains something
615@code{flymake-master-file-count-limit} entries is added to the master file 577like @code{("." "./src")}. No more than
616list. The list is then sorted to move files with names @code{file.cpp} to 578@code{flymake-proc-master-file-count-limit} entries is added to the
617the top. 579master file list. The list is then sorted to move files with names
580@code{file.cpp} to the top.
618 581
619Next, each master file in a list is checked to contain the appropriate 582Next, each master file in a list is checked to contain the appropriate
620include directives. No more than @code{flymake-check-file-limit} of each 583include directives. No more than @code{flymake-proc-check-file-limit} of each
621file are parsed. 584file are parsed.
622 585
623For @code{file.h}, the include directives to look for are 586For @code{file.h}, the include directives to look for are
@@ -639,10 +602,10 @@ and project include directories. The former is just the contents of the
639@code{INCLUDE} environment variable. The latter is not so easy to obtain, 602@code{INCLUDE} environment variable. The latter is not so easy to obtain,
640and the way it can be obtained can vary greatly for different projects. 603and the way it can be obtained can vary greatly for different projects.
641Therefore, a customizable variable 604Therefore, a customizable variable
642@code{flymake-get-project-include-dirs-function} is used to provide the 605@code{flymake-proc-get-project-include-dirs-function} is used to provide the
643way to implement the desired behavior. 606way to implement the desired behavior.
644 607
645The default implementation, @code{flymake-get-project-include-dirs-imp}, 608The default implementation, @code{flymake-proc-get-project-include-dirs-imp},
646uses a @command{make} call. This requires a correct base directory, that is, a 609uses a @command{make} call. This requires a correct base directory, that is, a
647directory containing a correct @file{Makefile}, to be determined. 610directory containing a correct @file{Makefile}, to be determined.
648 611
@@ -656,27 +619,27 @@ of every syntax check attempt.
656@cindex buildfile, locating 619@cindex buildfile, locating
657@cindex Makefile, locating 620@cindex Makefile, locating
658 621
659Flymake can be configured to use different tools for performing syntax 622The Proc backend can be configured to use different tools for
660checks. For example, it can use direct compiler call to syntax check a perl 623performing syntax checks. For example, it can use direct compiler
661script or a call to @command{make} for a more complicated case of a 624call to syntax check a perl script or a call to @command{make} for a
662@code{C/C++} source. The general idea is that simple files, like perl 625more complicated case of a @code{C/C++} source. The general idea is
663scripts and html pages, can be checked by directly invoking a 626that simple files, like perl scripts and html pages, can be checked by
664corresponding tool. Files that are usually more complex and generally 627directly invoking a corresponding tool. Files that are usually more
665used as part of larger projects, might require non-trivial options to 628complex and generally used as part of larger projects, might require
666be passed to the syntax check tool, like include directories for 629non-trivial options to be passed to the syntax check tool, like
667C++. The latter files are syntax checked using some build tool, like 630include directories for C++. The latter files are syntax checked
668Make or Ant. 631using some build tool, like Make or Ant.
669 632
670All Make configuration data is usually stored in a file called 633All Make configuration data is usually stored in a file called
671@code{Makefile}. To allow for future extensions, flymake uses a notion of 634@code{Makefile}. To allow for future extensions, Flymake uses a notion of
672buildfile to reference the 'project configuration' file. 635buildfile to reference the 'project configuration' file.
673 636
674Special function, @code{flymake-find-buildfile} is provided for locating buildfiles. 637Special function, @code{flymake-proc-find-buildfile} is provided for locating buildfiles.
675Searching for a buildfile is done in a manner similar to that of searching 638Searching for a buildfile is done in a manner similar to that of searching
676for possible master files. 639for possible master files.
677@ignore 640@ignore
678A customizable variable 641A customizable variable
679@code{flymake-buildfile-dirs} holds a list of relative paths to the 642@code{flymake-proc-buildfile-dirs} holds a list of relative paths to the
680buildfile. They are checked sequentially until a buildfile is found. 643buildfile. They are checked sequentially until a buildfile is found.
681@end ignore 644@end ignore
682In case there's no build file, syntax check is aborted. 645In case there's no build file, syntax check is aborted.
@@ -687,12 +650,12 @@ Buildfile values are also cached.
687@section Starting the syntax check process 650@section Starting the syntax check process
688@cindex Syntax check process 651@cindex Syntax check process
689 652
690The command line (command name and the list of arguments) for launching a process is returned by the 653The command line (command name and the list of arguments) for
691initialization function. Flymake then just calls @code{start-process} 654launching a process is returned by the initialization function. The
692to start an asynchronous process and configures a process filter and 655Proc backend then just starts an asynchronous process and configures a
693sentinel, which are used for processing the output of the syntax check 656process filter and sentinel, which are used for processing the output
694tool. When exiting Emacs, running Flymake processes will be killed 657of the syntax check tool. When exiting Emacs, running processes will
695without prompting the user. 658be killed without prompting the user.
696 659
697@node Parsing the output 660@node Parsing the output
698@section Parsing the output 661@section Parsing the output
@@ -700,7 +663,7 @@ without prompting the user.
700 663
701The output generated by the syntax check tool is parsed in the process 664The output generated by the syntax check tool is parsed in the process
702filter/sentinel using the error message patterns stored in the 665filter/sentinel using the error message patterns stored in the
703@code{flymake-err-line-patterns} variable. This variable contains a 666@code{flymake-proc-err-line-patterns} variable. This variable contains a
704list of items of the form @code{(regexp file-idx line-idx 667list of items of the form @code{(regexp file-idx line-idx
705err-text-idx)}, used to determine whether a particular line is an 668err-text-idx)}, used to determine whether a particular line is an
706error message and extract file name, line number and error text, 669error message and extract file name, line number and error text,
@@ -709,66 +672,39 @@ error text with the '@code{^[wW]arning}' pattern. Anything that was not
709classified as a warning is considered an error. Type is then used to 672classified as a warning is considered an error. Type is then used to
710sort error menu items, which shows error messages first. 673sort error menu items, which shows error messages first.
711 674
712Flymake is also able to interpret error message patterns missing err-text-idx 675The Proc backend is also able to interpret error message patterns
713information. This is done by merely taking the rest of the matched line 676missing err-text-idx information. This is done by merely taking the
714(@code{(substring line (match-end 0))}) as error text. This trick allows 677rest of the matched line (@code{(substring line (match-end 0))}) as
715making use of a huge collection of error message line patterns from 678error text. This trick allows making use of a huge collection of
716@code{compile.el}. All these error patterns are appended to 679error message line patterns from @code{compile.el}. All these error
717the end of @code{flymake-err-line-patterns}. 680patterns are appended to the end of
681@code{flymake-proc-err-line-patterns}.
718 682
719The error information obtained is saved in a buffer local 683The error information obtained is saved in a buffer local
720variable. The buffer for which the process output belongs is 684variable. The buffer for which the process output belongs is
721determined from the process-id@w{}->@w{}buffer mapping updated 685determined from the process-id@w{}->@w{}buffer mapping updated
722after every process launch/exit. 686after every process launch/exit.
723 687
724@node Highlighting erroneous lines
725@section Highlighting erroneous lines
726@cindex Erroneous lines, faces
727
728Highlighting is implemented with overlays and happens in the process
729sentinel, after calling the cleanup function. Two customizable faces
730are used: @code{flymake-errline} and
731@code{flymake-warnline}. Errors belonging outside the current
732buffer are considered to belong to line 1 of the current buffer.
733
734@c This manual does not use vindex.
735@c @vindex flymake-fringe-indicator-position
736@c @vindex flymake-error-bitmap
737@c @vindex flymake-warning-bitmap
738If the option @code{flymake-fringe-indicator-position} is non-@code{nil},
739errors and warnings are also highlighted in the left or right fringe,
740using the bitmaps specified by @code{flymake-error-bitmap}
741and @code{flymake-warning-bitmap}.
742
743@node Interaction with other modes 688@node Interaction with other modes
744@section Interaction with other modes 689@section Interaction with other modes
745@cindex Interaction with other modes 690@cindex Interaction with other modes
746@cindex Interaction with compile mode 691@cindex Interaction with compile mode
747 692
748The only mode flymake currently knows about is @code{compile}. 693The only mode the Proc backend currently knows about is
694@code{compile}.
749 695
750Flymake can be configured to not start syntax check if it thinks the 696The Proc backend can be configured to not start syntax check if it
751compilation is in progress. The check is made by the 697thinks the compilation is in progress, by testing the
752@code{flymake-compilation-is-running}, which tests the
753@code{compilation-in-progress} variable. The reason why this might be 698@code{compilation-in-progress} variable. The reason why this might be
754useful is saving CPU time in case both syntax check and compilation 699useful is saving CPU time in case both syntax check and compilation
755are very CPU intensive. The original reason for adding this feature, 700are very CPU intensive. The original reason for adding this feature,
756though, was working around a locking problem with MS Visual C++ 701though, was working around a locking problem with MS Visual C++
757compiler. 702compiler. The variable in question is
703@code{flymake-proc-compilation-prevents-syntax-check}.
758 704
759Flymake also provides an alternative command for starting compilation, 705The Proc backend also provides an alternative command for starting
760@code{flymake-compile}: 706compilation, @code{flymake-proc-compile}. It just kills all the active
761 707syntax check processes before calling @code{compile}.
762@lisp
763(defun flymake-compile ()
764 "Kill all flymake syntax checks then start compilation."
765 (interactive)
766 (flymake-stop-all-syntax-checks)
767 (call-interactively 'compile))
768@end lisp
769
770It just kills all the active syntax check processes before calling
771@code{compile}.
772 708
773@node GNU Free Documentation License 709@node GNU Free Documentation License
774@appendix GNU Free Documentation License 710@appendix GNU Free Documentation License
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index b6a4fa23557..72fbbade59e 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -4,7 +4,7 @@
4@settitle The Org Manual 4@settitle The Org Manual
5@include docstyle.texi 5@include docstyle.texi
6 6
7@set VERSION 9.1.1 7@set VERSION 9.1.2
8@set DATE 2017-09-17 8@set DATE 2017-09-17
9 9
10@c Version and Contact Info 10@c Version and Contact Info
@@ -1257,13 +1257,8 @@ Org uses just two commands, bound to @key{TAB} and
1257@end example 1257@end example
1258 1258
1259@vindex org-cycle-emulate-tab 1259@vindex org-cycle-emulate-tab
1260@vindex org-cycle-global-at-bob
1261The cursor must be on a headline for this to work@footnote{see, however, 1260The cursor must be on a headline for this to work@footnote{see, however,
1262the option @code{org-cycle-emulate-tab}.}. When the cursor is at the 1261the option @code{org-cycle-emulate-tab}.}.
1263beginning of the buffer and the first line is not a headline, then
1264@key{TAB} actually runs global cycling (see below)@footnote{see the
1265option @code{org-cycle-global-at-bob}.}. Also when called with a prefix
1266argument (@kbd{C-u @key{TAB}}), global cycling is invoked.
1267 1262
1268@cindex global visibility states 1263@cindex global visibility states
1269@cindex global cycling 1264@cindex global cycling
@@ -1283,6 +1278,11 @@ When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, the
1283CONTENTS view up to headlines of level N will be shown. Note that inside 1278CONTENTS view up to headlines of level N will be shown. Note that inside
1284tables, @kbd{S-@key{TAB}} jumps to the previous field. 1279tables, @kbd{S-@key{TAB}} jumps to the previous field.
1285 1280
1281@vindex org-cycle-global-at-bob
1282You can run global cycling using @key{TAB} only if point is at the very
1283beginning of the buffer, but not on a headline, and
1284@code{org-cycle-global-at-bob} is set to a non-@code{nil} value.
1285
1286@cindex set startup visibility, command 1286@cindex set startup visibility, command
1287@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} 1287@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
1288Switch back to the startup visibility of the buffer (@pxref{Initial visibility}). 1288Switch back to the startup visibility of the buffer (@pxref{Initial visibility}).
@@ -1659,11 +1659,9 @@ line. In particular, if an ordered list reaches number @samp{10.}, then the
1659list. An item ends before the next line that is less or equally indented 1659list. An item ends before the next line that is less or equally indented
1660than its bullet/number. 1660than its bullet/number.
1661 1661
1662@vindex org-list-empty-line-terminates-plain-lists
1663A list ends whenever every item has ended, which means before any line less 1662A list ends whenever every item has ended, which means before any line less
1664or equally indented than items at top level. It also ends before two blank 1663or equally indented than items at top level. It also ends before two blank
1665lines@footnote{See also @code{org-list-empty-line-terminates-plain-lists}.}. 1664lines. In that case, all items are closed. Here is an example:
1666In that case, all items are closed. Here is an example:
1667 1665
1668@example 1666@example
1669@group 1667@group
@@ -14991,6 +14989,7 @@ directory on the local machine.
14991 '(("org" 14989 '(("org"
14992 :base-directory "~/org/" 14990 :base-directory "~/org/"
14993 :publishing-directory "~/public_html" 14991 :publishing-directory "~/public_html"
14992 :publishing-function org-html-publish-to-html
14994 :section-numbers nil 14993 :section-numbers nil
14995 :with-toc nil 14994 :with-toc nil
14996 :html-head "<link rel=\"stylesheet\" 14995 :html-head "<link rel=\"stylesheet\"
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index b734e8dd19c..7f89ef92ec4 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -35,8 +35,9 @@ GNU Mailutils to retrieve email. It is recommended, and is the
35default if GNU Mailutils is installed. When --with-mailutils is not 35default if GNU Mailutils is installed. When --with-mailutils is not
36in effect, the Emacs build procedure by default continues to build and 36in effect, the Emacs build procedure by default continues to build and
37install a limited 'movemail' substitute that retrieves POP3 email only 37install a limited 'movemail' substitute that retrieves POP3 email only
38via insecure channels; to avoid this problem, use either 38via insecure channels. To avoid this problem, use either
39--with-mailutils or --without-pop when configuring. 39--with-mailutils or --without-pop when configuring; --without-pop
40is the default on platforms other than native MS-Windows.
40 41
41** The new option 'configure --enable-gcc-warnings=warn-only' causes 42** The new option 'configure --enable-gcc-warnings=warn-only' causes
42GCC to issue warnings without stopping the build. This behavior is 43GCC to issue warnings without stopping the build. This behavior is
@@ -1111,7 +1112,7 @@ See the 'vc-faces' customization group.
1111*** 'vc-dir-mode' now binds 'vc-log-outgoing' to 'O'; and has various 1112*** 'vc-dir-mode' now binds 'vc-log-outgoing' to 'O'; and has various
1112branch-related commands on a keymap bound to 'B'. 1113branch-related commands on a keymap bound to 'B'.
1113 1114
1114--- 1115+++
1115*** 'vc-region-history' is now bound to 'C-x v h', replacing the older 1116*** 'vc-region-history' is now bound to 'C-x v h', replacing the older
1116'vc-insert-headers' binding. 1117'vc-insert-headers' binding.
1117 1118
@@ -1555,6 +1556,13 @@ Emacs integers with %e, %f, or %g conversions. For example, on these
1555hosts (eql N (string-to-number (format "%.0f" N))) now returns t for 1556hosts (eql N (string-to-number (format "%.0f" N))) now returns t for
1556all Emacs integers N. 1557all Emacs integers N.
1557 1558
1559+++
1560** 'format' is no longer documented to return a newly-allocated string.
1561This documentation was not correct, as (eq x (format x)) returned t
1562when x was the empty string. 'format' now takes advantage of the doc
1563change to avoid making copies of strings in common cases like (format
1564"foo") and (format "%s" "foo").
1565
1558--- 1566---
1559** Calls that accept floating-point integers (for use on hosts with 1567** Calls that accept floating-point integers (for use on hosts with
1560limited integer range) now signal an error if arguments are not 1568limited integer range) now signal an error if arguments are not
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 2da99324b5f..4db97ffd74c 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -2029,6 +2029,19 @@ Definitions" to make them defined.
2029We list bugs in current versions here. See also the section on legacy 2029We list bugs in current versions here. See also the section on legacy
2030systems. 2030systems.
2031 2031
2032*** On Solaris 10, Emacs crashes during the build process.
2033This was reported for Emacs 25.2 on i386-pc-solaris2.10 with Sun
2034Studio 12 (Sun C 5.9) and with Oracle Developer Studio 12.6 (Sun C
20355.15), and intermittently for sparc-sun-solaris2.10 with Oracle
2036Developer Studio 12.5 (Sun C 5.14). Disabling compiler optimization
2037seems to fix the bug, as does upgrading the Solaris 10 operating
2038system to Update 11. The cause of the bug is unknown: it may be that
2039Emacs's archaic memory-allocation scheme is not compatible with
2040slightly-older versions of Solaris and/or Oracle Studio, or it may be
2041something else. Since the cause is not known, possibly the bug is
2042still present in newer versions of Emacs, Oracle Studio, and/or
2043Solaris. See Bug#26638.
2044
2032*** On Solaris, C-x doesn't get through to Emacs when you use the console. 2045*** On Solaris, C-x doesn't get through to Emacs when you use the console.
2033 2046
2034This is a Solaris feature (at least on Intel x86 cpus). Type C-r 2047This is a Solaris feature (at least on Intel x86 cpus). Type C-r
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index 0880841a945..99f90b8d31c 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
1% Reference Card for Org Mode 1% Reference Card for Org Mode
2\def\orgversionnumber{9.1.1} 2\def\orgversionnumber{9.1.2}
3\def\versionyear{2017} % latest update 3\def\versionyear{2017} % latest update
4\input emacsver.tex 4\input emacsver.tex
5 5
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 1b42961f1a4..590db570c56 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1183,7 +1183,29 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
1183 (compilation-forget-errors) 1183 (compilation-forget-errors)
1184 pt)))) 1184 pt))))
1185 1185
1186(defvar byte-compile-log-warning-function
1187 #'byte-compile--log-warning-for-byte-compile
1188 "Function called when encountering a warning or error.
1189Called with arguments (STRING POSITION FILL LEVEL). STRING is a
1190message describing the problem. POSITION is a buffer position
1191where the problem was detected. FILL is a prefix as in
1192`warning-fill-prefix'. LEVEL is the level of the
1193problem (`:warning' or `:error'). POSITION, FILL and LEVEL may be
1194nil.")
1195
1186(defun byte-compile-log-warning (string &optional fill level) 1196(defun byte-compile-log-warning (string &optional fill level)
1197 "Log a byte-compilation warning.
1198STRING, FILL and LEVEL are as described in
1199`byte-compile-log-warning-function', which see."
1200 (funcall byte-compile-log-warning-function
1201 string byte-compile-last-position
1202 fill
1203 level))
1204
1205(defun byte-compile--log-warning-for-byte-compile (string &optional
1206 _position
1207 fill
1208 level)
1187 "Log a message STRING in `byte-compile-log-buffer'. 1209 "Log a message STRING in `byte-compile-log-buffer'.
1188Also log the current function and file if not already done. If 1210Also log the current function and file if not already done. If
1189FILL is non-nil, set `warning-fill-prefix' to four spaces. LEVEL 1211FILL is non-nil, set `warning-fill-prefix' to four spaces. LEVEL
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 7997ba6014c..72f82f26f6f 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1147,14 +1147,27 @@ Prefix argument is the same as for `checkdoc-defun'"
1147;; features and behaviors, so we need some ways of specifying 1147;; features and behaviors, so we need some ways of specifying
1148;; them, and making them easier to use in the wacked-out interfaces 1148;; them, and making them easier to use in the wacked-out interfaces
1149;; people are requesting 1149;; people are requesting
1150(defun checkdoc-create-error (text start end &optional unfixable) 1150(defvar checkdoc-create-error-function #'checkdoc--create-error-for-checkdoc
1151 "Used to create the return error text returned from all engines. 1151 "Function called when Checkdoc encounters an error.
1152Should accept as arguments (TEXT START END &optional UNFIXABLE).
1153
1152TEXT is the descriptive text of the error. START and END define the region 1154TEXT is the descriptive text of the error. START and END define the region
1153it is sensible to highlight when describing the problem. 1155it is sensible to highlight when describing the problem.
1154Optional argument UNFIXABLE means that the error has no auto-fix available. 1156Optional argument UNFIXABLE means that the error has no auto-fix available.
1155 1157
1156A list of the form (TEXT START END UNFIXABLE) is returned if we are not 1158A list of the form (TEXT START END UNFIXABLE) is returned if we are not
1157generating a buffered list of errors." 1159generating a buffered list of errors.")
1160
1161(defun checkdoc-create-error (text start end &optional unfixable)
1162 "Used to create the return error text returned from all engines.
1163TEXT, START, END and UNFIXABLE conform to
1164`checkdoc-create-error-function', which see."
1165 (funcall checkdoc-create-error-function text start end unfixable))
1166
1167(defun checkdoc--create-error-for-checkdoc (text start end &optional unfixable)
1168 "Create an error for Checkdoc.
1169TEXT, START, END and UNFIXABLE conform to
1170`checkdoc-create-error-function', which see."
1158 (if checkdoc-generate-compile-warnings-flag 1171 (if checkdoc-generate-compile-warnings-flag
1159 (progn (checkdoc-error start text) 1172 (progn (checkdoc-error start text)
1160 nil) 1173 nil)
diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el
index 87c03280f77..4fc178c29aa 100644
--- a/lisp/emacs-lisp/cl-print.el
+++ b/lisp/emacs-lisp/cl-print.el
@@ -268,7 +268,7 @@ into a button whose action shows the function's disassembly.")
268Output is further controlled by the variables 268Output is further controlled by the variables
269`cl-print-readably', `cl-print-compiled', along with output 269`cl-print-readably', `cl-print-compiled', along with output
270variables for the standard printing functions. See Info 270variables for the standard printing functions. See Info
271node `(elisp)Output Variables'. " 271node `(elisp)Output Variables'."
272 (cond 272 (cond
273 (cl-print-readably (prin1 object stream)) 273 (cl-print-readably (prin1 object stream))
274 ((not print-circle) (cl-print-object object stream)) 274 ((not print-circle) (cl-print-object object stream))
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index f3597cc387d..3e9885900cf 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -142,8 +142,7 @@ the CPS state machinery.
142 `(let ((,dynamic-var ,static-var)) 142 `(let ((,dynamic-var ,static-var))
143 (unwind-protect ; Update the static shadow after evaluation is done 143 (unwind-protect ; Update the static shadow after evaluation is done
144 ,form 144 ,form
145 (setf ,static-var ,dynamic-var)) 145 (setf ,static-var ,dynamic-var)))))
146 ,form)))
147 146
148(defmacro cps--with-dynamic-binding (dynamic-var static-var &rest body) 147(defmacro cps--with-dynamic-binding (dynamic-var static-var &rest body)
149 "Evaluate BODY such that generated atomic evaluations run with 148 "Evaluate BODY such that generated atomic evaluations run with
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index e940588db7b..d1d7c0a8042 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -329,6 +329,8 @@ Check the current row, the previous one and the next row."
329 (string-width (if (stringp nt) nt (car nt))))) 329 (string-width (if (stringp nt) nt (car nt)))))
330 tabulated-list--near-rows))) 330 tabulated-list--near-rows)))
331 331
332(defvar tabulated-list-entry-lnum-width nil)
333
332(defun tabulated-list-print (&optional remember-pos update) 334(defun tabulated-list-print (&optional remember-pos update)
333 "Populate the current Tabulated List mode buffer. 335 "Populate the current Tabulated List mode buffer.
334This sorts the `tabulated-list-entries' list if sorting is 336This sorts the `tabulated-list-entries' list if sorting is
@@ -371,6 +373,7 @@ changing `tabulated-list-sort-key'."
371 (unless tabulated-list-use-header-line 373 (unless tabulated-list-use-header-line
372 (tabulated-list-print-fake-header))) 374 (tabulated-list-print-fake-header)))
373 ;; Finally, print the resulting list. 375 ;; Finally, print the resulting list.
376 (setq tabulated-list-entry-lnum-width (tabulated-list-line-number-width))
374 (while entries 377 (while entries
375 (let* ((elt (car entries)) 378 (let* ((elt (car entries))
376 (tabulated-list--near-rows 379 (tabulated-list--near-rows
@@ -383,7 +386,7 @@ changing `tabulated-list-sort-key'."
383 (equal entry-id id) 386 (equal entry-id id)
384 (setq entry-id nil 387 (setq entry-id nil
385 saved-pt (point))) 388 saved-pt (point)))
386 ;; If the buffer this empty, simply print each elt. 389 ;; If the buffer is empty, simply print each elt.
387 (if (or (not update) (eobp)) 390 (if (or (not update) (eobp))
388 (apply tabulated-list-printer elt) 391 (apply tabulated-list-printer elt)
389 (while (let ((local-id (tabulated-list-get-id))) 392 (while (let ((local-id (tabulated-list-get-id)))
@@ -424,12 +427,10 @@ of column descriptors."
424 (let ((beg (point)) 427 (let ((beg (point))
425 (x (max tabulated-list-padding 0)) 428 (x (max tabulated-list-padding 0))
426 (ncols (length tabulated-list-format)) 429 (ncols (length tabulated-list-format))
427 (lnum-width (tabulated-list-line-number-width))
428 (inhibit-read-only t)) 430 (inhibit-read-only t))
429 (if display-line-numbers 431 (setq x (+ x tabulated-list-entry-lnum-width))
430 (setq x (+ x lnum-width)))
431 (if (> tabulated-list-padding 0) 432 (if (> tabulated-list-padding 0)
432 (insert (make-string (- x lnum-width) ?\s))) 433 (insert (make-string (- x tabulated-list-entry-lnum-width) ?\s)))
433 (let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506). 434 (let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506).
434 (or (bound-and-true-p tabulated-list--near-rows) 435 (or (bound-and-true-p tabulated-list--near-rows)
435 (list (or (tabulated-list-get-entry (point-at-bol 0)) 436 (list (or (tabulated-list-get-entry (point-at-bol 0))
diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3
index 0d4b268f169..c2e4846442a 100644
--- a/lisp/gnus/ChangeLog.3
+++ b/lisp/gnus/ChangeLog.3
@@ -9303,7 +9303,7 @@
9303 * mail-source.el, message.el, mm-bodies.el, mm-decode.el, mm-extern.el: 9303 * mail-source.el, message.el, mm-bodies.el, mm-decode.el, mm-extern.el:
9304 * mm-util.el, mm-view.el, mml-smime.el, mml.el, mml1991.el, mml2015.el: 9304 * mm-util.el, mm-view.el, mml-smime.el, mml.el, mml1991.el, mml2015.el:
9305 * nnfolder.el, nnheader.el, nnmail.el, nnmaildir.el, nnrss.el, nntp.el: 9305 * nnfolder.el, nnheader.el, nnmail.el, nnmaildir.el, nnrss.el, nntp.el:
9306 * rfc1843.el, sieve-manage.el, smime.el, spam.el: 9306 * gnus-rfc1843.el, sieve-manage.el, smime.el, spam.el:
9307 Fix comment for declare-function. 9307 Fix comment for declare-function.
9308 9308
93092010-10-11 Lars Magne Ingebrigtsen <larsi@gnus.org> 93092010-10-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -10470,7 +10470,7 @@
10470 10470
104712010-09-25 Julien Danjou <julien@danjou.info> 104712010-09-25 Julien Danjou <julien@danjou.info>
10472 10472
10473 * rfc1843.el: Remove useless rfc1843-old-gnus-decode-header-function 10473 * gnus-rfc1843.el: Remove useless rfc1843-old-gnus-decode-header-function
10474 variables. 10474 variables.
10475 10475
10476 * nnheader.el: Remove useless variables news-reply-yank-from and 10476 * nnheader.el: Remove useless variables news-reply-yank-from and
@@ -14716,14 +14716,14 @@
14716 * mml2015.el (gnus-buffer-live-p, gnus-get-buffer-create): 14716 * mml2015.el (gnus-buffer-live-p, gnus-get-buffer-create):
14717 * nnfolder.el (gnus-request-group): 14717 * nnfolder.el (gnus-request-group):
14718 * nnheader.el (ietf-drums-unfold-fws): 14718 * nnheader.el (ietf-drums-unfold-fws):
14719 * rfc1843.el (mail-header-parse-content-type, message-narrow-to-head): 14719 * gnus-rfc1843.el (mail-header-parse-content-type, message-narrow-to-head):
14720 * smime.el (gnus-run-mode-hooks): 14720 * smime.el (gnus-run-mode-hooks):
14721 * spam-stat.el (gnus-message): Autoload. 14721 * spam-stat.el (gnus-message): Autoload.
14722 14722
14723 * gnus-cache.el, gnus-fun.el, gnus-group.el, gnus.el, mail-source.el: 14723 * gnus-cache.el, gnus-fun.el, gnus-group.el, gnus.el, mail-source.el:
14724 * mm-bodies.el, mm-decode.el, mm-extern.el, mm-util.el: 14724 * mm-bodies.el, mm-decode.el, mm-extern.el, mm-util.el:
14725 * mml-smime.el, mml.el, mml1991.el, mml2015.el, nndb.el, nnfolder.el: 14725 * mml-smime.el, mml.el, mml1991.el, mml2015.el, nndb.el, nnfolder.el:
14726 * nnmail.el, nnmaildir.el, nnrss.el, rfc1843.el, spam.el: 14726 * nnmail.el, nnmaildir.el, nnrss.el, gnus-rfc1843.el, spam.el:
14727 Add declare-function compatibility definition. 14727 Add declare-function compatibility definition.
14728 14728
14729 * gnus-cache.el (nnvirtual-find-group-art): 14729 * gnus-cache.el (nnvirtual-find-group-art):
@@ -14753,7 +14753,7 @@
14753 * nnmail.el (gnus-activate-group, gnus-group-mark-article-read): 14753 * nnmail.el (gnus-activate-group, gnus-group-mark-article-read):
14754 * nnmaildir.el (gnus-group-mark-article-read): 14754 * nnmaildir.el (gnus-group-mark-article-read):
14755 * nnrss.el (w3-parse-buffer, gnus-group-make-rss-group): 14755 * nnrss.el (w3-parse-buffer, gnus-group-make-rss-group):
14756 * rfc1843.el (message-fetch-field): 14756 * gnus-rfc1843.el (message-fetch-field):
14757 * spam.el (gnus-extract-address-components): 14757 * spam.el (gnus-extract-address-components):
14758 Declare as functions. 14758 Declare as functions.
14759 14759
@@ -19139,7 +19139,7 @@
19139 (mml-insert-parameter): Fold lines properly even if a parameter is 19139 (mml-insert-parameter): Fold lines properly even if a parameter is
19140 segmented into two or more lines; change the max column to 76. 19140 segmented into two or more lines; change the max column to 76.
19141 19141
19142 * rfc1843.el (rfc1843-decode-article-body): Don't use 19142 * gnus-rfc1843.el (rfc1843-decode-article-body): Don't use
19143 ignore-errors when calling mail-header-parse-content-type. 19143 ignore-errors when calling mail-header-parse-content-type.
19144 19144
19145 * rfc2231.el (rfc2231-parse-string): Return at least type if 19145 * rfc2231.el (rfc2231-parse-string): Return at least type if
@@ -20525,7 +20525,7 @@
20525 * mml1991.el (mc-pgp-always-sign): 20525 * mml1991.el (mc-pgp-always-sign):
20526 * mml2015.el (mc-pgp-always-sign): 20526 * mml2015.el (mc-pgp-always-sign):
20527 * nnheader.el (nnmail-extra-headers): 20527 * nnheader.el (nnmail-extra-headers):
20528 * rfc1843.el (gnus-decode-encoded-word-function) 20528 * gnus-rfc1843.el (gnus-decode-encoded-word-function)
20529 (gnus-decode-header-function, gnus-newsgroup-name): 20529 (gnus-decode-header-function, gnus-newsgroup-name):
20530 * spam-stat.el (gnus-original-article-buffer): Add defvars. 20530 * spam-stat.el (gnus-original-article-buffer): Add defvars.
20531 20531
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index e2c211e0e29..0dea176ab64 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -13080,23 +13080,7 @@ to get the effect of a C-q.
13080;;; Generated autoloads from progmodes/flymake.el 13080;;; Generated autoloads from progmodes/flymake.el
13081(push (purecopy '(flymake 0 3)) package--builtin-versions) 13081(push (purecopy '(flymake 0 3)) package--builtin-versions)
13082 13082
13083;;;*** 13083(autoload 'flymake-mode "flymake" "\
13084
13085;;;### (autoloads nil "flymake-proc" "progmodes/flymake-proc.el"
13086;;;;;; (0 0 0 0))
13087;;; Generated autoloads from progmodes/flymake-proc.el
13088(push (purecopy '(flymake-proc 0 3)) package--builtin-versions)
13089
13090(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flymake-proc" '("flymake-")))
13091
13092;;;***
13093
13094;;;### (autoloads nil "flymake-ui" "progmodes/flymake-ui.el" (0 0
13095;;;;;; 0 0))
13096;;; Generated autoloads from progmodes/flymake-ui.el
13097(push (purecopy '(flymake-ui 0 3)) package--builtin-versions)
13098
13099(autoload 'flymake-mode "flymake-ui" "\
13100Toggle Flymake mode on or off. 13084Toggle Flymake mode on or off.
13101With a prefix argument ARG, enable Flymake mode if ARG is 13085With a prefix argument ARG, enable Flymake mode if ARG is
13102positive, and disable it otherwise. If called from Lisp, enable 13086positive, and disable it otherwise. If called from Lisp, enable
@@ -13105,22 +13089,22 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
13105 13089
13106\(fn &optional ARG)" t nil) 13090\(fn &optional ARG)" t nil)
13107 13091
13108(autoload 'flymake-mode-on "flymake-ui" "\ 13092(autoload 'flymake-mode-on "flymake" "\
13109Turn flymake mode on. 13093Turn flymake mode on.
13110 13094
13111\(fn)" nil nil) 13095\(fn)" nil nil)
13112 13096
13113(autoload 'flymake-mode-off "flymake-ui" "\ 13097(autoload 'flymake-mode-off "flymake" "\
13114Turn flymake mode off. 13098Turn flymake mode off.
13115 13099
13116\(fn)" nil nil) 13100\(fn)" nil nil)
13117 13101
13118(autoload 'flymake-find-file-hook "flymake-ui" "\ 13102(autoload 'flymake-find-file-hook "flymake" "\
13119 13103
13120 13104
13121\(fn)" nil nil) 13105\(fn)" nil nil)
13122 13106
13123(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flymake-ui" '("flymake-"))) 13107(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flymake" '("flymake-")))
13124 13108
13125;;;*** 13109;;;***
13126 13110
@@ -33735,7 +33719,7 @@ Return a string giving the duration of the Emacs initialization.
33735 33719
33736\(fn)" t nil) 33720\(fn)" t nil)
33737 33721
33738(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "time" '("display-time-" "legacy-style-world-list" "zoneinfo-style-world-list"))) 33722(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "time" '("display-time-" "time--display-world-list" "legacy-style-world-list" "zoneinfo-style-world-list")))
33739 33723
33740;;;*** 33724;;;***
33741 33725
@@ -34451,7 +34435,7 @@ Reenable Ange-FTP, when Tramp is unloaded.
34451 34435
34452;;;### (autoloads nil "trampver" "net/trampver.el" (0 0 0 0)) 34436;;;### (autoloads nil "trampver" "net/trampver.el" (0 0 0 0))
34453;;; Generated autoloads from net/trampver.el 34437;;; Generated autoloads from net/trampver.el
34454(push (purecopy '(tramp 2 3 3 -1)) package--builtin-versions) 34438(push (purecopy '(tramp 2 3 3 26 1)) package--builtin-versions)
34455 34439
34456(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "trampver" '("tramp-"))) 34440(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "trampver" '("tramp-")))
34457 34441
@@ -38524,53 +38508,44 @@ Zone out, completely.
38524;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el" 38508;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
38525;;;;;; "eshell/em-xtra.el" "facemenu.el" "faces.el" "files.el" "font-core.el" 38509;;;;;; "eshell/em-xtra.el" "facemenu.el" "faces.el" "files.el" "font-core.el"
38526;;;;;; "font-lock.el" "format.el" "frame.el" "help.el" "hfy-cmap.el" 38510;;;;;; "font-lock.el" "format.el" "frame.el" "help.el" "hfy-cmap.el"
38527;;;;;; "ibuf-ext.el" "indent.el" "international/characters.el" "international/charprop.el" 38511;;;;;; "ibuf-ext.el" "indent.el" "international/characters.el" "international/charscript.el"
38528;;;;;; "international/charscript.el" "international/cp51932.el" 38512;;;;;; "international/cp51932.el" "international/eucjp-ms.el" "international/mule-cmds.el"
38529;;;;;; "international/eucjp-ms.el" "international/mule-cmds.el" 38513;;;;;; "international/mule-conf.el" "international/mule.el" "isearch.el"
38530;;;;;; "international/mule-conf.el" "international/mule.el" "international/uni-bidi.el" 38514;;;;;; "jit-lock.el" "jka-cmpr-hook.el" "language/burmese.el" "language/cham.el"
38531;;;;;; "international/uni-brackets.el" "international/uni-category.el" 38515;;;;;; "language/chinese.el" "language/cyrillic.el" "language/czech.el"
38532;;;;;; "international/uni-combining.el" "international/uni-comment.el" 38516;;;;;; "language/english.el" "language/ethiopic.el" "language/european.el"
38533;;;;;; "international/uni-decimal.el" "international/uni-decomposition.el" 38517;;;;;; "language/georgian.el" "language/greek.el" "language/hebrew.el"
38534;;;;;; "international/uni-digit.el" "international/uni-lowercase.el" 38518;;;;;; "language/indian.el" "language/japanese.el" "language/khmer.el"
38535;;;;;; "international/uni-mirrored.el" "international/uni-name.el" 38519;;;;;; "language/korean.el" "language/lao.el" "language/misc-lang.el"
38536;;;;;; "international/uni-numeric.el" "international/uni-old-name.el" 38520;;;;;; "language/romanian.el" "language/sinhala.el" "language/slovak.el"
38537;;;;;; "international/uni-titlecase.el" "international/uni-uppercase.el" 38521;;;;;; "language/tai-viet.el" "language/thai.el" "language/tibetan.el"
38538;;;;;; "isearch.el" "jit-lock.el" "jka-cmpr-hook.el" "language/burmese.el" 38522;;;;;; "language/utf-8-lang.el" "language/vietnamese.el" "ldefs-boot.el"
38539;;;;;; "language/cham.el" "language/chinese.el" "language/cyrillic.el" 38523;;;;;; "leim/ja-dic/ja-dic.el" "leim/leim-list.el" "leim/quail/4Corner.el"
38540;;;;;; "language/czech.el" "language/english.el" "language/ethiopic.el" 38524;;;;;; "leim/quail/ARRAY30.el" "leim/quail/CCDOSPY.el" "leim/quail/CTLau-b5.el"
38541;;;;;; "language/european.el" "language/georgian.el" "language/greek.el" 38525;;;;;; "leim/quail/CTLau.el" "leim/quail/ECDICT.el" "leim/quail/ETZY.el"
38542;;;;;; "language/hebrew.el" "language/indian.el" "language/japanese.el" 38526;;;;;; "leim/quail/PY-b5.el" "leim/quail/PY.el" "leim/quail/Punct-b5.el"
38543;;;;;; "language/khmer.el" "language/korean.el" "language/lao.el" 38527;;;;;; "leim/quail/Punct.el" "leim/quail/QJ-b5.el" "leim/quail/QJ.el"
38544;;;;;; "language/misc-lang.el" "language/romanian.el" "language/sinhala.el" 38528;;;;;; "leim/quail/SW.el" "leim/quail/TONEPY.el" "leim/quail/ZIRANMA.el"
38545;;;;;; "language/slovak.el" "language/tai-viet.el" "language/thai.el" 38529;;;;;; "leim/quail/ZOZY.el" "leim/quail/arabic.el" "leim/quail/croatian.el"
38546;;;;;; "language/tibetan.el" "language/utf-8-lang.el" "language/vietnamese.el" 38530;;;;;; "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el" "leim/quail/czech.el"
38547;;;;;; "ldefs-boot.el" "leim/ja-dic/ja-dic.el" "leim/leim-list.el" 38531;;;;;; "leim/quail/georgian.el" "leim/quail/greek.el" "leim/quail/hanja-jis.el"
38548;;;;;; "leim/quail/4Corner.el" "leim/quail/ARRAY30.el" "leim/quail/CCDOSPY.el" 38532;;;;;; "leim/quail/hanja.el" "leim/quail/hanja3.el" "leim/quail/hebrew.el"
38549;;;;;; "leim/quail/CTLau-b5.el" "leim/quail/CTLau.el" "leim/quail/ECDICT.el" 38533;;;;;; "leim/quail/ipa-praat.el" "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el"
38550;;;;;; "leim/quail/ETZY.el" "leim/quail/PY-b5.el" "leim/quail/PY.el" 38534;;;;;; "leim/quail/latin-post.el" "leim/quail/latin-pre.el" "leim/quail/persian.el"
38551;;;;;; "leim/quail/Punct-b5.el" "leim/quail/Punct.el" "leim/quail/QJ-b5.el" 38535;;;;;; "leim/quail/programmer-dvorak.el" "leim/quail/py-punct.el"
38552;;;;;; "leim/quail/QJ.el" "leim/quail/SW.el" "leim/quail/TONEPY.el" 38536;;;;;; "leim/quail/pypunct-b5.el" "leim/quail/quick-b5.el" "leim/quail/quick-cns.el"
38553;;;;;; "leim/quail/ZIRANMA.el" "leim/quail/ZOZY.el" "leim/quail/arabic.el" 38537;;;;;; "leim/quail/rfc1345.el" "leim/quail/sgml-input.el" "leim/quail/slovak.el"
38554;;;;;; "leim/quail/croatian.el" "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el" 38538;;;;;; "leim/quail/symbol-ksc.el" "leim/quail/tamil-dvorak.el" "leim/quail/tsang-b5.el"
38555;;;;;; "leim/quail/czech.el" "leim/quail/georgian.el" "leim/quail/greek.el" 38539;;;;;; "leim/quail/tsang-cns.el" "leim/quail/vntelex.el" "leim/quail/vnvni.el"
38556;;;;;; "leim/quail/hanja-jis.el" "leim/quail/hanja.el" "leim/quail/hanja3.el" 38540;;;;;; "leim/quail/welsh.el" "loadup.el" "mail/blessmail.el" "mail/rmailedit.el"
38557;;;;;; "leim/quail/hebrew.el" "leim/quail/ipa-praat.el" "leim/quail/latin-alt.el" 38541;;;;;; "mail/rmailkwd.el" "mail/rmailmm.el" "mail/rmailmsc.el" "mail/rmailsort.el"
38558;;;;;; "leim/quail/latin-ltx.el" "leim/quail/latin-post.el" "leim/quail/latin-pre.el" 38542;;;;;; "mail/rmailsum.el" "mail/undigest.el" "menu-bar.el" "mh-e/mh-gnus.el"
38559;;;;;; "leim/quail/persian.el" "leim/quail/programmer-dvorak.el" 38543;;;;;; "mh-e/mh-loaddefs.el" "minibuffer.el" "mouse.el" "net/tramp-loaddefs.el"
38560;;;;;; "leim/quail/py-punct.el" "leim/quail/pypunct-b5.el" "leim/quail/quick-b5.el" 38544;;;;;; "newcomment.el" "obarray.el" "org/ob-core.el" "org/ob-keys.el"
38561;;;;;; "leim/quail/quick-cns.el" "leim/quail/rfc1345.el" "leim/quail/sgml-input.el" 38545;;;;;; "org/ob-lob.el" "org/ob-matlab.el" "org/ob-tangle.el" "org/ob.el"
38562;;;;;; "leim/quail/slovak.el" "leim/quail/symbol-ksc.el" "leim/quail/tamil-dvorak.el" 38546;;;;;; "org/org-archive.el" "org/org-attach.el" "org/org-bbdb.el"
38563;;;;;; "leim/quail/tsang-b5.el" "leim/quail/tsang-cns.el" "leim/quail/vntelex.el" 38547;;;;;; "org/org-clock.el" "org/org-datetree.el" "org/org-element.el"
38564;;;;;; "leim/quail/vnvni.el" "leim/quail/welsh.el" "loadup.el" "mail/blessmail.el" 38548;;;;;; "org/org-feed.el" "org/org-footnote.el" "org/org-id.el" "org/org-indent.el"
38565;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el"
38566;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el"
38567;;;;;; "mail/undigest.el" "menu-bar.el" "mh-e/mh-gnus.el" "mh-e/mh-loaddefs.el"
38568;;;;;; "minibuffer.el" "mouse.el" "net/tramp-loaddefs.el" "newcomment.el"
38569;;;;;; "obarray.el" "org/ob-core.el" "org/ob-keys.el" "org/ob-lob.el"
38570;;;;;; "org/ob-matlab.el" "org/ob-tangle.el" "org/ob.el" "org/org-archive.el"
38571;;;;;; "org/org-attach.el" "org/org-bbdb.el" "org/org-clock.el"
38572;;;;;; "org/org-datetree.el" "org/org-element.el" "org/org-feed.el"
38573;;;;;; "org/org-footnote.el" "org/org-id.el" "org/org-indent.el"
38574;;;;;; "org/org-install.el" "org/org-irc.el" "org/org-mobile.el" 38549;;;;;; "org/org-install.el" "org/org-irc.el" "org/org-mobile.el"
38575;;;;;; "org/org-plot.el" "org/org-table.el" "org/org-timer.el" "org/ox-ascii.el" 38550;;;;;; "org/org-plot.el" "org/org-table.el" "org/org-timer.el" "org/ox-ascii.el"
38576;;;;;; "org/ox-beamer.el" "org/ox-html.el" "org/ox-icalendar.el" 38551;;;;;; "org/ox-beamer.el" "org/ox-html.el" "org/ox-icalendar.el"
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 7af6148e473..260ada54222 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -470,6 +470,18 @@ size, and full-buffer size."
470 (shr-insert sub) 470 (shr-insert sub)
471 (shr-descend sub)))) 471 (shr-descend sub))))
472 472
473(defun shr-indirect-call (tag-name dom &rest args)
474 (let ((function (intern (concat "shr-tag-" (symbol-name tag-name)) obarray))
475 ;; Allow other packages to override (or provide) rendering
476 ;; of elements.
477 (external (cdr (assq tag-name shr-external-rendering-functions))))
478 (cond (external
479 (apply external dom args))
480 ((fboundp function)
481 (apply function dom args))
482 (t
483 (apply 'shr-generic dom args)))))
484
473(defun shr-descend (dom) 485(defun shr-descend (dom)
474 (let ((function 486 (let ((function
475 (intern (concat "shr-tag-" (symbol-name (dom-tag dom))) obarray)) 487 (intern (concat "shr-tag-" (symbol-name (dom-tag dom))) obarray))
@@ -490,6 +502,11 @@ size, and full-buffer size."
490 (setq style nil))) 502 (setq style nil)))
491 ;; If we have a display:none, then just ignore this part of the DOM. 503 ;; If we have a display:none, then just ignore this part of the DOM.
492 (unless (equal (cdr (assq 'display shr-stylesheet)) "none") 504 (unless (equal (cdr (assq 'display shr-stylesheet)) "none")
505 ;; We don't use shr-indirect-call here, since shr-descend is
506 ;; the central bit of shr.el, and should be as fast as
507 ;; possible. Having one more level of indirection with its
508 ;; negative effect on performance is deemed unjustified in
509 ;; this case.
493 (cond (external 510 (cond (external
494 (funcall external dom)) 511 (funcall external dom))
495 ((fboundp function) 512 ((fboundp function)
@@ -1404,7 +1421,7 @@ ones, in case fg and bg are nil."
1404 (when url 1421 (when url
1405 (cond 1422 (cond
1406 (image 1423 (image
1407 (shr-tag-img dom url) 1424 (shr-indirect-call 'img dom url)
1408 (setq dom nil)) 1425 (setq dom nil))
1409 (multimedia 1426 (multimedia
1410 (shr-insert " [multimedia] ") 1427 (shr-insert " [multimedia] ")
@@ -1469,7 +1486,7 @@ The preference is a float determined from `shr-prefer-media-type'."
1469 (unless url 1486 (unless url
1470 (setq url (car (shr--extract-best-source dom)))) 1487 (setq url (car (shr--extract-best-source dom))))
1471 (if (> (length image) 0) 1488 (if (> (length image) 0)
1472 (shr-tag-img nil image) 1489 (shr-indirect-call 'img nil image)
1473 (shr-insert " [video] ")) 1490 (shr-insert " [video] "))
1474 (shr-urlify start (shr-expand-url url)))) 1491 (shr-urlify start (shr-expand-url url))))
1475 1492
@@ -1964,9 +1981,9 @@ flags that control whether to collect or render objects."
1964 do (setq tag (dom-tag child)) and 1981 do (setq tag (dom-tag child)) and
1965 unless (memq tag '(comment style)) 1982 unless (memq tag '(comment style))
1966 if (eq tag 'img) 1983 if (eq tag 'img)
1967 do (shr-tag-img child) 1984 do (shr-indirect-call 'img child)
1968 else if (eq tag 'object) 1985 else if (eq tag 'object)
1969 do (shr-tag-object child) 1986 do (shr-indirect-call 'object child)
1970 else 1987 else
1971 do (setq recurse t) and 1988 do (setq recurse t) and
1972 if (eq tag 'tr) 1989 if (eq tag 'tr)
@@ -1980,7 +1997,7 @@ flags that control whether to collect or render objects."
1980 do (setq flags nil) 1997 do (setq flags nil)
1981 else if (car flags) 1998 else if (car flags)
1982 do (setq recurse nil) 1999 do (setq recurse nil)
1983 (shr-tag-table child) 2000 (shr-indirect-call 'table child)
1984 end end end end end end end end end end 2001 end end end end end end end end end end
1985 when recurse 2002 when recurse
1986 append (shr-collect-extra-strings-in-table child flags))) 2003 append (shr-collect-extra-strings-in-table child flags)))
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 760d020f672..5268e80a33d 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -139,6 +139,7 @@ It is used for TCP/IP devices."
139 (file-remote-p . tramp-handle-file-remote-p) 139 (file-remote-p . tramp-handle-file-remote-p)
140 (file-selinux-context . ignore) 140 (file-selinux-context . ignore)
141 (file-symlink-p . tramp-handle-file-symlink-p) 141 (file-symlink-p . tramp-handle-file-symlink-p)
142 (file-system-info . tramp-adb-handle-file-system-info)
142 (file-truename . tramp-adb-handle-file-truename) 143 (file-truename . tramp-adb-handle-file-truename)
143 (file-writable-p . tramp-adb-handle-file-writable-p) 144 (file-writable-p . tramp-adb-handle-file-writable-p)
144 (find-backup-file-name . tramp-handle-find-backup-file-name) 145 (find-backup-file-name . tramp-handle-find-backup-file-name)
@@ -255,6 +256,30 @@ pass to the OPERATION."
255 (file-attributes (file-truename filename))) 256 (file-attributes (file-truename filename)))
256 t)) 257 t))
257 258
259(defun tramp-adb-handle-file-system-info (filename)
260 "Like `file-system-info' for Tramp files."
261 (ignore-errors
262 (with-parsed-tramp-file-name (expand-file-name filename) nil
263 (tramp-message v 5 "file system info: %s" localname)
264 (tramp-adb-send-command
265 v (format "df -k %s" (tramp-shell-quote-argument localname)))
266 (with-current-buffer (tramp-get-connection-buffer v)
267 (goto-char (point-min))
268 (forward-line)
269 (when (looking-at
270 (concat "[[:space:]]*[^[:space:]]+"
271 "[[:space:]]+\\([[:digit:]]+\\)"
272 "[[:space:]]+\\([[:digit:]]+\\)"
273 "[[:space:]]+\\([[:digit:]]+\\)"))
274 ;; The values are given as 1k numbers, so we must change
275 ;; them to number of bytes.
276 (list (* 1024 (string-to-number (concat (match-string 1) "e0")))
277 ;; The second value is the used size. We need the
278 ;; free size.
279 (* 1024 (- (string-to-number (concat (match-string 1) "e0"))
280 (string-to-number (concat (match-string 2) "e0"))))
281 (* 1024 (string-to-number (concat (match-string 3) "e0")))))))))
282
258;; This is derived from `tramp-sh-handle-file-truename'. Maybe the 283;; This is derived from `tramp-sh-handle-file-truename'. Maybe the
259;; code could be shared? 284;; code could be shared?
260(defun tramp-adb-handle-file-truename (filename) 285(defun tramp-adb-handle-file-truename (filename)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index e55dd1178d2..237d6896e2a 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -448,6 +448,18 @@ Every entry is a list (NAME ADDRESS).")
448 ":[[:blank:]]+\\(.*\\)$") 448 ":[[:blank:]]+\\(.*\\)$")
449 "Regexp to parse GVFS file attributes with `gvfs-info'.") 449 "Regexp to parse GVFS file attributes with `gvfs-info'.")
450 450
451(defconst tramp-gvfs-file-system-attributes
452 '("filesystem::free"
453 "filesystem::size"
454 "filesystem::used")
455 "GVFS file system attributes.")
456
457(defconst tramp-gvfs-file-system-attributes-regexp
458 (concat "^[[:blank:]]*"
459 (regexp-opt tramp-gvfs-file-system-attributes t)
460 ":[[:blank:]]+\\(.*\\)$")
461 "Regexp to parse GVFS file system attributes with `gvfs-info'.")
462
451 463
452;; New handlers should be added here. 464;; New handlers should be added here.
453;;;###tramp-autoload 465;;;###tramp-autoload
@@ -494,6 +506,7 @@ Every entry is a list (NAME ADDRESS).")
494 (file-remote-p . tramp-handle-file-remote-p) 506 (file-remote-p . tramp-handle-file-remote-p)
495 (file-selinux-context . ignore) 507 (file-selinux-context . ignore)
496 (file-symlink-p . tramp-handle-file-symlink-p) 508 (file-symlink-p . tramp-handle-file-symlink-p)
509 (file-system-info . tramp-gvfs-handle-file-system-info)
497 (file-truename . tramp-handle-file-truename) 510 (file-truename . tramp-handle-file-truename)
498 (file-writable-p . tramp-gvfs-handle-file-writable-p) 511 (file-writable-p . tramp-gvfs-handle-file-writable-p)
499 (find-backup-file-name . tramp-handle-find-backup-file-name) 512 (find-backup-file-name . tramp-handle-find-backup-file-name)
@@ -825,7 +838,7 @@ file names."
825 (let ((last-coding-system-used last-coding-system-used) 838 (let ((last-coding-system-used last-coding-system-used)
826 result) 839 result)
827 (with-parsed-tramp-file-name directory nil 840 (with-parsed-tramp-file-name directory nil
828 (with-tramp-file-property v localname "directory-gvfs-attributes" 841 (with-tramp-file-property v localname "directory-attributes"
829 (tramp-message v 5 "directory gvfs attributes: %s" localname) 842 (tramp-message v 5 "directory gvfs attributes: %s" localname)
830 ;; Send command. 843 ;; Send command.
831 (tramp-gvfs-send-command 844 (tramp-gvfs-send-command
@@ -860,23 +873,34 @@ file names."
860 (forward-line))) 873 (forward-line)))
861 result))))) 874 result)))))
862 875
863(defun tramp-gvfs-get-root-attributes (filename) 876(defun tramp-gvfs-get-root-attributes (filename &optional file-system)
864 "Return GVFS attributes association list of FILENAME." 877 "Return GVFS attributes association list of FILENAME.
878If FILE-SYSTEM is non-nil, return file system attributes."
865 (ignore-errors 879 (ignore-errors
866 ;; Don't modify `last-coding-system-used' by accident. 880 ;; Don't modify `last-coding-system-used' by accident.
867 (let ((last-coding-system-used last-coding-system-used) 881 (let ((last-coding-system-used last-coding-system-used)
868 result) 882 result)
869 (with-parsed-tramp-file-name filename nil 883 (with-parsed-tramp-file-name filename nil
870 (with-tramp-file-property v localname "file-gvfs-attributes" 884 (with-tramp-file-property
871 (tramp-message v 5 "file gvfs attributes: %s" localname) 885 v localname
886 (if file-system "file-system-attributes" "file-attributes")
887 (tramp-message
888 v 5 "file%s gvfs attributes: %s"
889 (if file-system " system" "") localname)
872 ;; Send command. 890 ;; Send command.
873 (tramp-gvfs-send-command 891 (if file-system
874 v "gvfs-info" (tramp-gvfs-url-file-name filename)) 892 (tramp-gvfs-send-command
893 v "gvfs-info" "--filesystem" (tramp-gvfs-url-file-name filename))
894 (tramp-gvfs-send-command
895 v "gvfs-info" (tramp-gvfs-url-file-name filename)))
875 ;; Parse output. 896 ;; Parse output.
876 (with-current-buffer (tramp-get-connection-buffer v) 897 (with-current-buffer (tramp-get-connection-buffer v)
877 (goto-char (point-min)) 898 (goto-char (point-min))
878 (while (re-search-forward 899 (while (re-search-forward
879 tramp-gvfs-file-attributes-with-gvfs-info-regexp nil t) 900 (if file-system
901 tramp-gvfs-file-system-attributes-regexp
902 tramp-gvfs-file-attributes-with-gvfs-info-regexp)
903 nil t)
880 (push (cons (match-string 1) (match-string 2)) result)) 904 (push (cons (match-string 1) (match-string 2)) result))
881 result)))))) 905 result))))))
882 906
@@ -1127,6 +1151,22 @@ file-notify events."
1127 (with-tramp-file-property v localname "file-readable-p" 1151 (with-tramp-file-property v localname "file-readable-p"
1128 (tramp-check-cached-permissions v ?r)))) 1152 (tramp-check-cached-permissions v ?r))))
1129 1153
1154(defun tramp-gvfs-handle-file-system-info (filename)
1155 "Like `file-system-info' for Tramp files."
1156 (setq filename (directory-file-name (expand-file-name filename)))
1157 (with-parsed-tramp-file-name filename nil
1158 ;; We don't use cached values.
1159 (tramp-set-file-property v localname "file-system-attributes" 'undef)
1160 (let* ((attr (tramp-gvfs-get-root-attributes filename 'file-system))
1161 (size (cdr (assoc "filesystem::size" attr)))
1162 (used (cdr (assoc "filesystem::used" attr)))
1163 (free (cdr (assoc "filesystem::free" attr))))
1164 (when (and (stringp size) (stringp used) (stringp free))
1165 (list (string-to-number (concat size "e0"))
1166 (- (string-to-number (concat size "e0"))
1167 (string-to-number (concat used "e0")))
1168 (string-to-number (concat free "e0")))))))
1169
1130(defun tramp-gvfs-handle-file-writable-p (filename) 1170(defun tramp-gvfs-handle-file-writable-p (filename)
1131 "Like `file-writable-p' for Tramp files." 1171 "Like `file-writable-p' for Tramp files."
1132 (with-parsed-tramp-file-name filename nil 1172 (with-parsed-tramp-file-name filename nil
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index a744a53ca42..bdb7a132408 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1020,6 +1020,7 @@ of command line.")
1020 (file-remote-p . tramp-handle-file-remote-p) 1020 (file-remote-p . tramp-handle-file-remote-p)
1021 (file-selinux-context . tramp-sh-handle-file-selinux-context) 1021 (file-selinux-context . tramp-sh-handle-file-selinux-context)
1022 (file-symlink-p . tramp-handle-file-symlink-p) 1022 (file-symlink-p . tramp-handle-file-symlink-p)
1023 (file-system-info . tramp-sh-handle-file-system-info)
1023 (file-truename . tramp-sh-handle-file-truename) 1024 (file-truename . tramp-sh-handle-file-truename)
1024 (file-writable-p . tramp-sh-handle-file-writable-p) 1025 (file-writable-p . tramp-sh-handle-file-writable-p)
1025 (find-backup-file-name . tramp-handle-find-backup-file-name) 1026 (find-backup-file-name . tramp-handle-find-backup-file-name)
@@ -2739,6 +2740,17 @@ The method used must be an out-of-band method."
2739 beg 'noerror) 2740 beg 'noerror)
2740 (replace-match (file-relative-name filename) t)) 2741 (replace-match (file-relative-name filename) t))
2741 2742
2743 ;; Try to insert the amount of free space.
2744 (goto-char (point-min))
2745 ;; First find the line to put it on.
2746 (when (re-search-forward "^\\([[:space:]]*total\\)" nil t)
2747 (let ((available (get-free-disk-space ".")))
2748 (when available
2749 ;; Replace "total" with "total used", to avoid confusion.
2750 (replace-match "\\1 used in directory")
2751 (end-of-line)
2752 (insert " available " available))))
2753
2742 (goto-char (point-max))))))) 2754 (goto-char (point-max)))))))
2743 2755
2744;; Canonicalization of file names. 2756;; Canonicalization of file names.
@@ -3701,6 +3713,30 @@ file-notify events."
3701 'file-notify-handle-event 3713 'file-notify-handle-event
3702 `(file-notify ,object file-notify-callback))))))) 3714 `(file-notify ,object file-notify-callback)))))))
3703 3715
3716(defun tramp-sh-handle-file-system-info (filename)
3717 "Like `file-system-info' for Tramp files."
3718 (ignore-errors
3719 (with-parsed-tramp-file-name (expand-file-name filename) nil
3720 (when (tramp-get-remote-df v)
3721 (tramp-message v 5 "file system info: %s" localname)
3722 (tramp-send-command
3723 v (format
3724 "%s --block-size=1 --output=size,used,avail %s"
3725 (tramp-get-remote-df v) (tramp-shell-quote-argument localname)))
3726 (with-current-buffer (tramp-get-connection-buffer v)
3727 (goto-char (point-min))
3728 (forward-line)
3729 (when (looking-at
3730 (concat "[[:space:]]*\\([[:digit:]]+\\)"
3731 "[[:space:]]+\\([[:digit:]]+\\)"
3732 "[[:space:]]+\\([[:digit:]]+\\)"))
3733 (list (string-to-number (concat (match-string 1) "e0"))
3734 ;; The second value is the used size. We need the
3735 ;; free size.
3736 (- (string-to-number (concat (match-string 1) "e0"))
3737 (string-to-number (concat (match-string 2) "e0")))
3738 (string-to-number (concat (match-string 3) "e0")))))))))
3739
3704;;; Internal Functions: 3740;;; Internal Functions:
3705 3741
3706(defun tramp-maybe-send-script (vec script name) 3742(defun tramp-maybe-send-script (vec script name)
@@ -5404,6 +5440,17 @@ This command is returned only if `delete-by-moving-to-trash' is non-nil."
5404 (delete-file tmpfile)) 5440 (delete-file tmpfile))
5405 result))) 5441 result)))
5406 5442
5443(defun tramp-get-remote-df (vec)
5444 "Determine remote `df' command."
5445 (with-tramp-connection-property vec "df"
5446 (tramp-message vec 5 "Finding a suitable `df' command")
5447 (let ((result (tramp-find-executable vec "df" (tramp-get-remote-path vec))))
5448 (and
5449 result
5450 (tramp-send-command-and-check
5451 vec (format "%s --block-size=1 --output=size,used,avail /" result))
5452 result))))
5453
5407(defun tramp-get-remote-gvfs-monitor-dir (vec) 5454(defun tramp-get-remote-gvfs-monitor-dir (vec)
5408 "Determine remote `gvfs-monitor-dir' command." 5455 "Determine remote `gvfs-monitor-dir' command."
5409 (with-tramp-connection-property vec "gvfs-monitor-dir" 5456 (with-tramp-connection-property vec "gvfs-monitor-dir"
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 35aa8110946..620c93828da 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -255,6 +255,7 @@ See `tramp-actions-before-shell' for more info.")
255 (file-remote-p . tramp-handle-file-remote-p) 255 (file-remote-p . tramp-handle-file-remote-p)
256 ;; `file-selinux-context' performed by default handler. 256 ;; `file-selinux-context' performed by default handler.
257 (file-symlink-p . tramp-handle-file-symlink-p) 257 (file-symlink-p . tramp-handle-file-symlink-p)
258 (file-system-info . tramp-smb-handle-file-system-info)
258 (file-truename . tramp-handle-file-truename) 259 (file-truename . tramp-handle-file-truename)
259 (file-writable-p . tramp-smb-handle-file-writable-p) 260 (file-writable-p . tramp-smb-handle-file-writable-p)
260 (find-backup-file-name . tramp-handle-find-backup-file-name) 261 (find-backup-file-name . tramp-handle-find-backup-file-name)
@@ -954,6 +955,38 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
954 (nth 0 x)))) 955 (nth 0 x))))
955 (tramp-smb-get-file-entries directory)))))))) 956 (tramp-smb-get-file-entries directory))))))))
956 957
958(defun tramp-smb-handle-file-system-info (filename)
959 "Like `file-system-info' for Tramp files."
960 (ignore-errors
961 (unless (file-directory-p filename)
962 (setq filename (file-name-directory filename)))
963 (with-parsed-tramp-file-name (expand-file-name filename) nil
964 (tramp-message v 5 "file system info: %s" localname)
965 (tramp-smb-send-command v (format "du %s/*" (tramp-smb-get-localname v)))
966 (with-current-buffer (tramp-get-connection-buffer v)
967 (let (total avail blocksize)
968 (goto-char (point-min))
969 (forward-line)
970 (when (looking-at
971 (concat "[[:space:]]*\\([[:digit:]]+\\)"
972 " blocks of size \\([[:digit:]]+\\)"
973 "\\. \\([[:digit:]]+\\) blocks available"))
974 (setq blocksize (string-to-number (concat (match-string 2) "e0"))
975 total (* blocksize
976 (string-to-number (concat (match-string 1) "e0")))
977 avail (* blocksize
978 (string-to-number (concat (match-string 3) "e0")))))
979 (forward-line)
980 (when (looking-at "Total number of bytes: \\([[:digit:]]+\\)")
981 ;; The used number of bytes is not part of the result. As
982 ;; side effect, we store it as file property.
983 (tramp-set-file-property
984 v localname "used-bytes"
985 (string-to-number (concat (match-string 1) "e0"))))
986 ;; Result.
987 (when (and total avail)
988 (list total (- total avail) avail)))))))
989
957(defun tramp-smb-handle-file-writable-p (filename) 990(defun tramp-smb-handle-file-writable-p (filename)
958 "Like `file-writable-p' for Tramp files." 991 "Like `file-writable-p' for Tramp files."
959 (if (file-exists-p filename) 992 (if (file-exists-p filename)
@@ -984,7 +1017,14 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
984 ;; We should not destroy the cache entry. 1017 ;; We should not destroy the cache entry.
985 (entries (copy-sequence 1018 (entries (copy-sequence
986 (tramp-smb-get-file-entries 1019 (tramp-smb-get-file-entries
987 (file-name-directory filename))))) 1020 (file-name-directory filename))))
1021 (avail (get-free-disk-space filename))
1022 ;; `get-free-disk-space' calls `file-system-info', which
1023 ;; sets file property "used-bytes" as side effect.
1024 (used
1025 (format
1026 "%.0f"
1027 (/ (tramp-get-file-property v localname "used-bytes" 0) 1024))))
988 1028
989 (when wildcard 1029 (when wildcard
990 (string-match "\\." base) 1030 (string-match "\\." base)
@@ -1032,6 +1072,12 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
1032 (setcar x (concat (car x) "*")))))) 1072 (setcar x (concat (car x) "*"))))))
1033 entries)) 1073 entries))
1034 1074
1075 ;; Insert size information.
1076 (insert
1077 (if avail
1078 (format "total used in directory %s available %s\n" used avail)
1079 (format "total %s\n" used)))
1080
1035 ;; Print entries. 1081 ;; Print entries.
1036 (mapc 1082 (mapc
1037 (lambda (x) 1083 (lambda (x)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e253db0883c..c8b6e68f719 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1269,14 +1269,14 @@ entry does not exist, return nil."
1269;;;###tramp-autoload 1269;;;###tramp-autoload
1270(defun tramp-tramp-file-p (name) 1270(defun tramp-tramp-file-p (name)
1271 "Return t if NAME is a string with Tramp file name syntax." 1271 "Return t if NAME is a string with Tramp file name syntax."
1272 (save-match-data 1272 (and (stringp name)
1273 (and (stringp name) 1273 ;; No "/:" and "/c:". This is not covered by `tramp-file-name-regexp'.
1274 ;; No "/:" and "/c:". This is not covered by `tramp-file-name-regexp'. 1274 (not (string-match-p
1275 (not (string-match 1275 (if (memq system-type '(cygwin windows-nt))
1276 (if (memq system-type '(cygwin windows-nt)) 1276 "^/[[:alpha:]]?:" "^/:")
1277 "^/[[:alpha:]]?:" "^/:") 1277 name))
1278 name)) 1278 (string-match-p tramp-file-name-regexp name)
1279 (string-match tramp-file-name-regexp name)))) 1279 t))
1280 1280
1281(defun tramp-find-method (method user host) 1281(defun tramp-find-method (method user host)
1282 "Return the right method string to use. 1282 "Return the right method string to use.
@@ -2079,7 +2079,9 @@ ARGS are the arguments OPERATION has been called with."
2079 substitute-in-file-name unhandled-file-name-directory 2079 substitute-in-file-name unhandled-file-name-directory
2080 vc-registered 2080 vc-registered
2081 ;; Emacs 26+ only. 2081 ;; Emacs 26+ only.
2082 file-name-case-insensitive-p)) 2082 file-name-case-insensitive-p
2083 ;; Emacs 27+ only.
2084 file-system-info))
2083 (if (file-name-absolute-p (nth 0 args)) 2085 (if (file-name-absolute-p (nth 0 args))
2084 (nth 0 args) 2086 (nth 0 args)
2085 default-directory)) 2087 default-directory))
diff --git a/lisp/org/ob-hledger.el b/lisp/org/ob-hledger.el
index 86276aad810..57ab8af4f30 100644
--- a/lisp/org/ob-hledger.el
+++ b/lisp/org/ob-hledger.el
@@ -1,4 +1,4 @@
1;; ob-ledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*- 1;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2010-2017 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
4 4
diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el
index 8a52b57e52a..13f728f37f6 100644
--- a/lisp/org/ob-lob.el
+++ b/lisp/org/ob-lob.el
@@ -53,11 +53,15 @@ should not be inherited from a source block.")
53 (let* ((info (org-babel-get-src-block-info 'light)) 53 (let* ((info (org-babel-get-src-block-info 'light))
54 (source-name (nth 4 info))) 54 (source-name (nth 4 info)))
55 (when source-name 55 (when source-name
56 (setq source-name (intern source-name) 56 (setf (nth 1 info)
57 org-babel-library-of-babel 57 (if (org-babel-noweb-p (nth 2 info) :eval)
58 (cons (cons source-name info) 58 (org-babel-expand-noweb-references info)
59 (assq-delete-all source-name org-babel-library-of-babel)) 59 (nth 1 info)))
60 lob-ingest-count (1+ lob-ingest-count))))) 60 (let ((source (intern source-name)))
61 (setq org-babel-library-of-babel
62 (cons (cons source info)
63 (assq-delete-all source org-babel-library-of-babel))))
64 (cl-incf lob-ingest-count))))
61 (message "%d src block%s added to Library of Babel" 65 (message "%d src block%s added to Library of Babel"
62 lob-ingest-count (if (> lob-ingest-count 1) "s" "")) 66 lob-ingest-count (if (> lob-ingest-count 1) "s" ""))
63 lob-ingest-count)) 67 lob-ingest-count))
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 2eec817735a..9dc501500b1 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -2984,6 +2984,7 @@ The details of what will be saved are regulated by the variable
2984 2984
2985;; Local variables: 2985;; Local variables:
2986;; generated-autoload-file: "org-loaddefs.el" 2986;; generated-autoload-file: "org-loaddefs.el"
2987;; coding: utf-8
2987;; End: 2988;; End:
2988 2989
2989;;; org-clock.el ends here 2990;;; org-clock.el ends here
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el
index 242bdc26550..eac29c50f65 100644
--- a/lisp/org/org-colview.el
+++ b/lisp/org/org-colview.el
@@ -464,7 +464,8 @@ for the duration of the command.")
464 (kill-local-variable 'org-previous-header-line-format) 464 (kill-local-variable 'org-previous-header-line-format)
465 (remove-hook 'post-command-hook 'org-columns-hscroll-title 'local)) 465 (remove-hook 'post-command-hook 'org-columns-hscroll-title 'local))
466 (set-marker org-columns-begin-marker nil) 466 (set-marker org-columns-begin-marker nil)
467 (set-marker org-columns-top-level-marker nil) 467 (when (markerp org-columns-top-level-marker)
468 (set-marker org-columns-top-level-marker nil))
468 (org-with-silent-modifications 469 (org-with-silent-modifications
469 (mapc #'delete-overlay org-columns-overlays) 470 (mapc #'delete-overlay org-columns-overlays)
470 (setq org-columns-overlays nil) 471 (setq org-columns-overlays nil)
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 66907e2cd9c..8dc648eaecd 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -1646,12 +1646,14 @@ In particular, this does handle wide and invisible characters."
1646 (if (not (org-at-table-p)) 1646 (if (not (org-at-table-p))
1647 (user-error "Not at a table")) 1647 (user-error "Not at a table"))
1648 (let ((col (current-column)) 1648 (let ((col (current-column))
1649 (dline (org-table-current-dline))) 1649 (dline (and (not (org-match-line org-table-hline-regexp))
1650 (org-table-current-dline))))
1650 (kill-region (point-at-bol) (min (1+ (point-at-eol)) (point-max))) 1651 (kill-region (point-at-bol) (min (1+ (point-at-eol)) (point-max)))
1651 (if (not (org-at-table-p)) (beginning-of-line 0)) 1652 (if (not (org-at-table-p)) (beginning-of-line 0))
1652 (org-move-to-column col) 1653 (org-move-to-column col)
1653 (when (or (not org-table-fix-formulas-confirm) 1654 (when (and dline
1654 (funcall org-table-fix-formulas-confirm "Fix formulas? ")) 1655 (or (not org-table-fix-formulas-confirm)
1656 (funcall org-table-fix-formulas-confirm "Fix formulas? ")))
1655 (org-table-fix-formulas "@" (list (cons (number-to-string dline) "INVALID")) 1657 (org-table-fix-formulas "@" (list (cons (number-to-string dline) "INVALID"))
1656 dline -1 dline)))) 1658 dline -1 dline))))
1657 1659
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 523afd1ad33..30318ba92c8 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
5(defun org-release () 5(defun org-release ()
6 "The release version of Org. 6 "The release version of Org.
7Inserted by installing Org mode or when a release is made." 7Inserted by installing Org mode or when a release is made."
8 (let ((org-release "9.1.1")) 8 (let ((org-release "9.1.2"))
9 org-release)) 9 org-release))
10;;;###autoload 10;;;###autoload
11(defun org-git-version () 11(defun org-git-version ()
12 "The Git version of org-mode. 12 "The Git version of org-mode.
13Inserted by installing Org or when a release is made." 13Inserted by installing Org or when a release is made."
14 (let ((org-git-version "release_9.1.1-37-gb1e8b5")) 14 (let ((org-git-version "release_9.1.2-40-g6ca906"))
15 org-git-version)) 15 org-git-version))
16 16
17(provide 'org-version) 17(provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index c5759cb537b..35405b4bf81 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -16071,7 +16071,9 @@ automatically performed, such drawers will be silently ignored."
16071 (when (memq (org-element-type element) '(keyword node-property)) 16071 (when (memq (org-element-type element) '(keyword node-property))
16072 (let ((value (org-element-property :value element)) 16072 (let ((value (org-element-property :value element))
16073 (start 0)) 16073 (start 0))
16074 (while (string-match "%[0-9]*\\(\\S-+\\)" value start) 16074 (while (string-match "%[0-9]*\\([[:alnum:]_-]+\\)\\(([^)]+)\\)?\
16075\\(?:{[^}]+}\\)?"
16076 value start)
16075 (setq start (match-end 0)) 16077 (setq start (match-end 0))
16076 (let ((p (match-string-no-properties 1 value))) 16078 (let ((p (match-string-no-properties 1 value)))
16077 (unless (member-ignore-case p org-special-properties) 16079 (unless (member-ignore-case p org-special-properties)
@@ -19481,7 +19483,6 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
19481 19483
19482(org-defkey org-mode-map [(shift return)] 'org-table-copy-down) 19484(org-defkey org-mode-map [(shift return)] 'org-table-copy-down)
19483(org-defkey org-mode-map [(meta shift return)] 'org-insert-todo-heading) 19485(org-defkey org-mode-map [(meta shift return)] 'org-insert-todo-heading)
19484(org-defkey org-mode-map [(meta return)] 'org-meta-return)
19485(org-defkey org-mode-map (kbd "M-RET") #'org-meta-return) 19486(org-defkey org-mode-map (kbd "M-RET") #'org-meta-return)
19486 19487
19487;; Cursor keys with modifiers 19488;; Cursor keys with modifiers
@@ -24204,16 +24205,25 @@ convenience:
24204 24205
24205 - On an affiliated keyword, jump to the first one. 24206 - On an affiliated keyword, jump to the first one.
24206 - On a table or a property drawer, move to its beginning. 24207 - On a table or a property drawer, move to its beginning.
24207 - On a verse or source block, stop before blank lines." 24208 - On comment, example, export, src and verse blocks, stop
24209 before blank lines."
24208 (interactive) 24210 (interactive)
24209 (unless (bobp) 24211 (unless (bobp)
24210 (let* ((deactivate-mark nil) 24212 (let* ((deactivate-mark nil)
24211 (element (org-element-at-point)) 24213 (element (org-element-at-point))
24212 (type (org-element-type element)) 24214 (type (org-element-type element))
24213 (contents-begin (org-element-property :contents-begin element))
24214 (contents-end (org-element-property :contents-end element)) 24215 (contents-end (org-element-property :contents-end element))
24215 (post-affiliated (org-element-property :post-affiliated element)) 24216 (post-affiliated (org-element-property :post-affiliated element))
24216 (begin (org-element-property :begin element))) 24217 (begin (org-element-property :begin element))
24218 (special? ;blocks handled specially
24219 (memq type '(comment-block example-block export-block src-block
24220 verse-block)))
24221 (contents-begin
24222 (if special?
24223 ;; These types have no proper contents. Fake line
24224 ;; below the block opening line as contents beginning.
24225 (save-excursion (goto-char begin) (line-beginning-position 2))
24226 (org-element-property :contents-begin element))))
24217 (cond 24227 (cond
24218 ((not element) (goto-char (point-min))) 24228 ((not element) (goto-char (point-min)))
24219 ((= (point) begin) 24229 ((= (point) begin)
@@ -24224,11 +24234,8 @@ convenience:
24224 (goto-char (org-element-property 24234 (goto-char (org-element-property
24225 :post-affiliated (org-element-property :parent element)))) 24235 :post-affiliated (org-element-property :parent element))))
24226 ((memq type '(property-drawer table)) (goto-char begin)) 24236 ((memq type '(property-drawer table)) (goto-char begin))
24227 ((memq type '(src-block verse-block)) 24237 (special?
24228 (when (eq type 'src-block) 24238 (if (<= (point) contents-begin) (goto-char post-affiliated)
24229 (setq contents-begin
24230 (save-excursion (goto-char begin) (forward-line) (point))))
24231 (if (= (point) contents-begin) (goto-char post-affiliated)
24232 ;; Inside a verse block, see blank lines as paragraph 24239 ;; Inside a verse block, see blank lines as paragraph
24233 ;; separators. 24240 ;; separators.
24234 (let ((origin (point))) 24241 (let ((origin (point)))
@@ -24237,7 +24244,6 @@ convenience:
24237 (skip-chars-forward " \r\t\n" origin) 24244 (skip-chars-forward " \r\t\n" origin)
24238 (if (= (point) origin) (goto-char contents-begin) 24245 (if (= (point) origin) (goto-char contents-begin)
24239 (beginning-of-line)))))) 24246 (beginning-of-line))))))
24240 ((not contents-begin) (goto-char (or post-affiliated begin)))
24241 ((eq type 'paragraph) 24247 ((eq type 'paragraph)
24242 (goto-char contents-begin) 24248 (goto-char contents-begin)
24243 ;; When at first paragraph in an item or a footnote definition, 24249 ;; When at first paragraph in an item or a footnote definition,
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index fb8c61334f5..8ce4fb6adcd 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -174,7 +174,6 @@
174 (:html-klipsify-src nil nil org-html-klipsify-src) 174 (:html-klipsify-src nil nil org-html-klipsify-src)
175 (:html-klipse-css nil nil org-html-klipse-css) 175 (:html-klipse-css nil nil org-html-klipse-css)
176 (:html-klipse-js nil nil org-html-klipse-js) 176 (:html-klipse-js nil nil org-html-klipse-js)
177 (:html-klipse-keep-old-src nil nil org-html-keep-old-src)
178 (:html-klipse-selection-script nil nil org-html-klipse-selection-script) 177 (:html-klipse-selection-script nil nil org-html-klipse-selection-script)
179 (:infojs-opt "INFOJS_OPT" nil nil) 178 (:infojs-opt "INFOJS_OPT" nil nil)
180 ;; Redefine regular options. 179 ;; Redefine regular options.
@@ -1572,12 +1571,6 @@ https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag"
1572 :package-version '(Org . "9.1") 1571 :package-version '(Org . "9.1")
1573 :type 'string) 1572 :type 'string)
1574 1573
1575(defcustom org-html-keep-old-src nil
1576 "When non-nil, use <pre class=\"\"> instead of <pre><code class=\"\">."
1577 :group 'org-export-html
1578 :package-version '(Org . "9.1")
1579 :type 'boolean)
1580
1581 1574
1582;;;; Todos 1575;;;; Todos
1583 1576
@@ -3402,12 +3395,16 @@ contextual information."
3402 listing-number 3395 listing-number
3403 (org-trim (org-export-data caption info)))))) 3396 (org-trim (org-export-data caption info))))))
3404 ;; Contents. 3397 ;; Contents.
3405 (let ((open (if org-html-keep-old-src "<pre" "<pre><code")) 3398 (if klipsify
3406 (close (if org-html-keep-old-src "</pre>" "</code></pre>"))) 3399 (format "<pre><code class=\"src src-%s\"%s%s>%s</code></pre>"
3407 (format "%s class=\"src src-%s\"%s%s>%s%s" 3400 lang
3408 open lang label (if (and klipsify (string= lang "html")) 3401 label
3409 " data-editor-type=\"html\"" "") 3402 (if (string= lang "html")
3410 code close))))))) 3403 " data-editor-type=\"html\""
3404 "")
3405 code)
3406 (format "<pre class=\"src src-%s\"%s>%s</pre>"
3407 lang label code)))))))
3411 3408
3412;;;; Statistics Cookie 3409;;;; Statistics Cookie
3413 3410
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el
index a975abc4871..957b0da7c59 100644
--- a/lisp/org/ox-publish.el
+++ b/lisp/org/ox-publish.el
@@ -435,8 +435,8 @@ This splices all the components into the list."
435 (let* ((base-dir (file-name-as-directory 435 (let* ((base-dir (file-name-as-directory
436 (org-publish-property :base-directory project))) 436 (org-publish-property :base-directory project)))
437 (extension (or (org-publish-property :base-extension project) "org")) 437 (extension (or (org-publish-property :base-extension project) "org"))
438 (match (and (not (eq extension 'any)) 438 (match (if (eq extension 'any) ""
439 (concat "^[^\\.].*\\.\\(" extension "\\)$"))) 439 (format "^[^\\.].*\\.\\(%s\\)$" extension)))
440 (base-files 440 (base-files
441 (cl-remove-if #'file-directory-p 441 (cl-remove-if #'file-directory-p
442 (if (org-publish-property :recursive project) 442 (if (org-publish-property :recursive project)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 05b391a3d38..37928357526 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -132,7 +132,7 @@
132;; 132;;
133;; 'c-not-decl 133;; 'c-not-decl
134;; Put on the brace which introduces a brace list and on the commas 134;; Put on the brace which introduces a brace list and on the commas
135;; which separate the element within it. 135;; which separate the elements within it.
136;; 136;;
137;; 'c-awk-NL-prop 137;; 'c-awk-NL-prop
138;; Used in AWK mode to mark the various kinds of newlines. See 138;; Used in AWK mode to mark the various kinds of newlines. See
@@ -5403,15 +5403,14 @@ comment at the start of cc-engine.el for more info."
5403 (min c-bs-cache-limit pos))) 5403 (min c-bs-cache-limit pos)))
5404 5404
5405(defun c-update-brace-stack (stack from to) 5405(defun c-update-brace-stack (stack from to)
5406 ;; Give a brace-stack which has the value STACK at position FROM, update it 5406 ;; Given a brace-stack which has the value STACK at position FROM, update it
5407 ;; to it's value at position TO, where TO is after (or equal to) FROM. 5407 ;; to its value at position TO, where TO is after (or equal to) FROM.
5408 ;; Return a cons of either TO (if it is outside a literal) and this new 5408 ;; Return a cons of either TO (if it is outside a literal) and this new
5409 ;; value, or of the next position after TO outside a literal and the new 5409 ;; value, or of the next position after TO outside a literal and the new
5410 ;; value. 5410 ;; value.
5411 (let (match kwd-sym (prev-match-pos 1) 5411 (let (match kwd-sym (prev-match-pos 1)
5412 (s (cdr stack)) 5412 (s (cdr stack))
5413 (bound-<> (car stack)) 5413 (bound-<> (car stack)))
5414 )
5415 (save-excursion 5414 (save-excursion
5416 (cond 5415 (cond
5417 ((and bound-<> (<= to bound-<>)) 5416 ((and bound-<> (<= to bound-<>))
@@ -5472,6 +5471,9 @@ comment at the start of cc-engine.el for more info."
5472 (setq s (cdr s)))) 5471 (setq s (cdr s))))
5473 ((c-keyword-member kwd-sym 'c-flat-decl-block-kwds) 5472 ((c-keyword-member kwd-sym 'c-flat-decl-block-kwds)
5474 (push 0 s)))) 5473 (push 0 s))))
5474 ;; The failing `c-syntactic-re-search-forward' may have left us in the
5475 ;; middle of a token, which might be a significant token. Fix this!
5476 (c-beginning-of-current-token)
5475 (cons (point) 5477 (cons (point)
5476 (cons bound-<> s))))) 5478 (cons bound-<> s)))))
5477 5479
@@ -5647,11 +5649,13 @@ comment at the start of cc-engine.el for more info."
5647 ;; Call CFD-FUN for each possible spot for a declaration, cast or 5649 ;; Call CFD-FUN for each possible spot for a declaration, cast or
5648 ;; label from the point to CFD-LIMIT. 5650 ;; label from the point to CFD-LIMIT.
5649 ;; 5651 ;;
5650 ;; CFD-FUN is called with point at the start of the spot. It's passed two 5652 ;; CFD-FUN is called with point at the start of the spot. It's passed three
5651 ;; arguments: The first is the end position of the token preceding the spot, 5653 ;; arguments: The first is the end position of the token preceding the spot,
5652 ;; or 0 for the implicit match at bob. The second is a flag that is t when 5654 ;; or 0 for the implicit match at bob. The second is a flag that is t when
5653 ;; the match is inside a macro. Point should be moved forward by at least 5655 ;; the match is inside a macro. The third is a flag that is t when the
5654 ;; one token. 5656 ;; match is at "top level", i.e. outside any brace block, or directly inside
5657 ;; a class or namespace, etc. Point should be moved forward by at least one
5658 ;; token.
5655 ;; 5659 ;;
5656 ;; If CFD-FUN adds `c-decl-end' properties somewhere below the current spot, 5660 ;; If CFD-FUN adds `c-decl-end' properties somewhere below the current spot,
5657 ;; it should return non-nil to ensure that the next search will find them. 5661 ;; it should return non-nil to ensure that the next search will find them.
@@ -6038,6 +6042,8 @@ comment at the start of cc-engine.el for more info."
6038 (setq cfd-macro-end 0) 6042 (setq cfd-macro-end 0)
6039 nil)))) ; end of when condition 6043 nil)))) ; end of when condition
6040 6044
6045 (when (> cfd-macro-end 0)
6046 (setq cfd-top-level nil)) ; In a macro is "never" at top level.
6041 (c-debug-put-decl-spot-faces cfd-match-pos (point)) 6047 (c-debug-put-decl-spot-faces cfd-match-pos (point))
6042 (if (funcall cfd-fun cfd-match-pos (/= cfd-macro-end 0) cfd-top-level) 6048 (if (funcall cfd-fun cfd-match-pos (/= cfd-macro-end 0) cfd-top-level)
6043 (setq cfd-prop-match nil)) 6049 (setq cfd-prop-match nil))
@@ -8575,7 +8581,13 @@ comment at the start of cc-engine.el for more info."
8575 (looking-at c-noise-macro-with-parens-name-re)) 8581 (looking-at c-noise-macro-with-parens-name-re))
8576 (c-forward-noise-clause)) 8582 (c-forward-noise-clause))
8577 8583
8578 ((looking-at c-type-decl-suffix-key) 8584 ((and (looking-at c-type-decl-suffix-key)
8585 ;; We avoid recognizing foo(bar) or foo() at top level as a
8586 ;; construct here in C, since we want to recognize this as a
8587 ;; typeless function declaration.
8588 (not (and (c-major-mode-is 'c-mode)
8589 (eq context 'top)
8590 (eq (char-after) ?\)))))
8579 (if (eq (char-after) ?\)) 8591 (if (eq (char-after) ?\))
8580 (when (> paren-depth 0) 8592 (when (> paren-depth 0)
8581 (setq paren-depth (1- paren-depth)) 8593 (setq paren-depth (1- paren-depth))
@@ -8618,7 +8630,12 @@ comment at the start of cc-engine.el for more info."
8618 (save-excursion 8630 (save-excursion
8619 (goto-char after-paren-pos) 8631 (goto-char after-paren-pos)
8620 (c-forward-syntactic-ws) 8632 (c-forward-syntactic-ws)
8621 (c-forward-type))))) 8633 (or (c-forward-type)
8634 ;; Recognize a top-level typeless
8635 ;; function declaration in C.
8636 (and (c-major-mode-is 'c-mode)
8637 (eq context 'top)
8638 (eq (char-after) ?\))))))))
8622 (setq pos (c-up-list-forward (point))) 8639 (setq pos (c-up-list-forward (point)))
8623 (eq (char-before pos) ?\))) 8640 (eq (char-before pos) ?\)))
8624 (c-fdoc-shift-type-backward) 8641 (c-fdoc-shift-type-backward)
@@ -9035,9 +9052,12 @@ comment at the start of cc-engine.el for more info."
9035 ;; (in at least C++) that anything that can be parsed as a declaration 9052 ;; (in at least C++) that anything that can be parsed as a declaration
9036 ;; is a declaration. Now we're being more defensive and prefer to 9053 ;; is a declaration. Now we're being more defensive and prefer to
9037 ;; highlight things like "foo (bar);" as a declaration only if we're 9054 ;; highlight things like "foo (bar);" as a declaration only if we're
9038 ;; inside an arglist that contains declarations. 9055 ;; inside an arglist that contains declarations. Update (2017-09): We
9039 ;; CASE 19 9056 ;; now recognize a top-level "foo(bar);" as a declaration in C.
9040 (eq context 'decl)))) 9057 ;; CASE 19
9058 (or (eq context 'decl)
9059 (and (c-major-mode-is 'c-mode)
9060 (eq context 'top))))))
9041 9061
9042 ;; The point is now after the type decl expression. 9062 ;; The point is now after the type decl expression.
9043 9063
@@ -9545,6 +9565,7 @@ Note that this function might do hidden buffer changes. See the
9545comment at the start of cc-engine.el for more info." 9565comment at the start of cc-engine.el for more info."
9546 ;; Note to maintainers: this function consumes a great mass of CPU cycles. 9566 ;; Note to maintainers: this function consumes a great mass of CPU cycles.
9547 ;; Its use should thus be minimized as far as possible. 9567 ;; Its use should thus be minimized as far as possible.
9568 ;; Consider instead using `c-bs-at-toplevel-p'.
9548 (let ((paren-state (c-parse-state))) 9569 (let ((paren-state (c-parse-state)))
9549 (or (not (c-most-enclosing-brace paren-state)) 9570 (or (not (c-most-enclosing-brace paren-state))
9550 (c-search-uplist-for-classkey paren-state)))) 9571 (c-search-uplist-for-classkey paren-state))))
@@ -9574,8 +9595,15 @@ comment at the start of cc-engine.el for more info."
9574 (not (and (c-major-mode-is 'objc-mode) 9595 (not (and (c-major-mode-is 'objc-mode)
9575 (c-forward-objc-directive))) 9596 (c-forward-objc-directive)))
9576 9597
9598 ;; Don't confuse #if .... defined(foo) for a function arglist.
9599 (not (and (looking-at c-cpp-expr-functions-key)
9600 (save-excursion
9601 (save-restriction
9602 (widen)
9603 (c-beginning-of-macro lim)))))
9577 (setq id-start 9604 (setq id-start
9578 (car-safe (c-forward-decl-or-cast-1 (c-point 'bosws) 'top nil))) 9605 (car-safe (c-forward-decl-or-cast-1 (c-point 'bosws) 'top nil)))
9606 (numberp id-start)
9579 (< id-start beg) 9607 (< id-start beg)
9580 9608
9581 ;; There should not be a '=' or ',' between beg and the 9609 ;; There should not be a '=' or ',' between beg and the
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 9495d602e09..227b3e16485 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -952,6 +952,11 @@ expression, or nil if there aren't any in the language."
952 '("defined")) 952 '("defined"))
953 pike '("defined" "efun" "constant")) 953 pike '("defined" "efun" "constant"))
954 954
955(c-lang-defconst c-cpp-expr-functions-key
956 ;; Matches a function in a cpp expression.
957 t (c-make-keywords-re t (c-lang-const c-cpp-expr-functions)))
958(c-lang-defvar c-cpp-expr-functions-key (c-lang-const c-cpp-expr-functions-key))
959
955(c-lang-defconst c-assignment-operators 960(c-lang-defconst c-assignment-operators
956 "List of all assignment operators." 961 "List of all assignment operators."
957 t '("=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|=") 962 t '("=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|=")
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 8867453e85c..b0e5fe47a7c 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1571,6 +1571,8 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1571 (and (c-beginning-of-macro) 1571 (and (c-beginning-of-macro)
1572 (progn (c-end-of-macro) (point)))))) 1572 (progn (c-end-of-macro) (point))))))
1573 (when (and (c-forward-declarator lim) 1573 (when (and (c-forward-declarator lim)
1574 (or (not (eq (char-after) ?\())
1575 (c-go-list-forward nil lim))
1574 (eq (c-forward-token-2 1 nil lim) 0)) 1576 (eq (c-forward-token-2 1 nil lim) 0))
1575 (c-backward-syntactic-ws) 1577 (c-backward-syntactic-ws)
1576 (point)))))) 1578 (point))))))
@@ -1589,7 +1591,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1589 (or (c-fl-decl-start c-new-BEG) (c-point 'bol c-new-BEG)) 1591 (or (c-fl-decl-start c-new-BEG) (c-point 'bol c-new-BEG))
1590 c-new-END 1592 c-new-END
1591 (or (c-fl-decl-end c-new-END) 1593 (or (c-fl-decl-end c-new-END)
1592 (c-point 'bonl (max (1- c-new-END) (point-min))))))) 1594 (c-point 'bonl c-new-END)))))
1593 1595
1594(defun c-context-expand-fl-region (beg end) 1596(defun c-context-expand-fl-region (beg end)
1595 ;; Return a cons (NEW-BEG . NEW-END), where NEW-BEG is the beginning of a 1597 ;; Return a cons (NEW-BEG . NEW-END), where NEW-BEG is the beginning of a
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 2f8e081a295..3690f673832 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -243,7 +243,9 @@ Blank lines separate paragraphs. Semicolons start comments.
243 (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) 243 (add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
244 (setq-local project-vc-external-roots-function #'elisp-load-path-roots) 244 (setq-local project-vc-external-roots-function #'elisp-load-path-roots)
245 (add-hook 'completion-at-point-functions 245 (add-hook 'completion-at-point-functions
246 #'elisp-completion-at-point nil 'local)) 246 #'elisp-completion-at-point nil 'local)
247 (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t)
248 (add-hook 'flymake-diagnostic-functions #'elisp-flymake-byte-compile nil t))
247 249
248;; Font-locking support. 250;; Font-locking support.
249 251
@@ -810,7 +812,7 @@ non-nil result supercedes the xrefs produced by
810 (apply #'nconc 812 (apply #'nconc
811 (let (lst) 813 (let (lst)
812 (dolist (sym (apropos-internal regexp)) 814 (dolist (sym (apropos-internal regexp))
813 (push (elisp--xref-find-definitions sym) lst)) 815 (push (elisp--xref-find-definitions sym) lst))
814 (nreverse lst)))) 816 (nreverse lst))))
815 817
816(defvar elisp--xref-identifier-completion-table 818(defvar elisp--xref-identifier-completion-table
@@ -1109,7 +1111,7 @@ If CHAR is not a character, return nil."
1109 ;; interactive call would use it. 1111 ;; interactive call would use it.
1110 ;; FIXME: Is it really the right place for this? 1112 ;; FIXME: Is it really the right place for this?
1111 (when (eq (car-safe expr) 'interactive) 1113 (when (eq (car-safe expr) 'interactive)
1112 (setq expr 1114 (setq expr
1113 `(call-interactively 1115 `(call-interactively
1114 (lambda (&rest args) ,expr args)))) 1116 (lambda (&rest args) ,expr args))))
1115 expr))))) 1117 expr)))))
@@ -1174,7 +1176,7 @@ POS specifies the starting position where EXP was found and defaults to point."
1174 (and (not (special-variable-p var)) 1176 (and (not (special-variable-p var))
1175 (save-excursion 1177 (save-excursion
1176 (zerop (car (syntax-ppss (match-beginning 0))))) 1178 (zerop (car (syntax-ppss (match-beginning 0)))))
1177 (push var vars)))) 1179 (push var vars))))
1178 `(progn ,@(mapcar (lambda (v) `(defvar ,v)) vars) ,exp))))) 1180 `(progn ,@(mapcar (lambda (v) `(defvar ,v)) vars) ,exp)))))
1179 1181
1180(defun eval-last-sexp (eval-last-sexp-arg-internal) 1182(defun eval-last-sexp (eval-last-sexp-arg-internal)
@@ -1379,7 +1381,7 @@ or elsewhere, return a 1-line docstring."
1379 (t (help-function-arglist sym))))) 1381 (t (help-function-arglist sym)))))
1380 ;; Stringify, and store before highlighting, downcasing, etc. 1382 ;; Stringify, and store before highlighting, downcasing, etc.
1381 (elisp--last-data-store sym (elisp-function-argstring args) 1383 (elisp--last-data-store sym (elisp-function-argstring args)
1382 'function)))))) 1384 'function))))))
1383 ;; Highlight, truncate. 1385 ;; Highlight, truncate.
1384 (if argstring 1386 (if argstring
1385 (elisp--highlight-function-argument 1387 (elisp--highlight-function-argument
@@ -1588,5 +1590,164 @@ ARGLIST is either a string, or a list of strings or symbols."
1588 (replace-match "(" t t str) 1590 (replace-match "(" t t str)
1589 str))) 1591 str)))
1590 1592
1593;;; Flymake support
1594
1595;; Don't require checkdoc, but forward declare these checkdoc special
1596;; variables. Autoloading them on `checkdoc-current-buffer' is too
1597;; late, they won't be bound dynamically.
1598(defvar checkdoc-create-error-function)
1599(defvar checkdoc-autofix-flag)
1600(defvar checkdoc-generate-compile-warnings-flag)
1601(defvar checkdoc-diagnostic-buffer)
1602(defun elisp-flymake--checkdoc-1 ()
1603 "Do actual work for `elisp-flymake-checkdoc'."
1604 (let (collected)
1605 (let* ((checkdoc-create-error-function
1606 (lambda (text start end &optional unfixable)
1607 (push (list text start end unfixable) collected)
1608 nil))
1609 (checkdoc-autofix-flag nil)
1610 (checkdoc-generate-compile-warnings-flag nil)
1611 (buf (generate-new-buffer " *checkdoc-temp*"))
1612 (checkdoc-diagnostic-buffer buf))
1613 (unwind-protect
1614 (save-excursion
1615 (checkdoc-current-buffer t))
1616 (kill-buffer buf)))
1617 collected))
1618
1619;;;###autoload
1620(defun elisp-flymake-checkdoc (report-fn &rest _args)
1621 "A Flymake backend for `checkdoc'.
1622Calls REPORT-FN directly."
1623 (unless (derived-mode-p 'emacs-lisp-mode)
1624 (error "Can only work on `emacs-lisp-mode' buffers"))
1625 (funcall report-fn
1626 (cl-loop for (text start end _unfixable) in
1627 (elisp-flymake--checkdoc-1)
1628 collect
1629 (flymake-make-diagnostic
1630 (current-buffer)
1631 start end :note text))))
1632
1633(defun elisp-flymake--byte-compile-done (report-fn
1634 origin-buffer
1635 output-buffer
1636 temp-file)
1637 (unwind-protect
1638 (with-current-buffer
1639 origin-buffer
1640 (save-excursion
1641 (save-restriction
1642 (widen)
1643 (funcall
1644 report-fn
1645 (cl-loop with data =
1646 (with-current-buffer output-buffer
1647 (goto-char (point-min))
1648 (search-forward ":elisp-flymake-output-start")
1649 (read (point-marker)))
1650 for (string pos _fill level) in data
1651 do (goto-char pos)
1652 for beg = (if (< (point) (point-max))
1653 (point)
1654 (line-beginning-position))
1655 for end = (min
1656 (line-end-position)
1657 (or (cdr
1658 (bounds-of-thing-at-point 'sexp))
1659 (point-max)))
1660 collect (flymake-make-diagnostic
1661 (current-buffer)
1662 (if (= beg end) (1- beg) beg)
1663 end
1664 level
1665 string))))))
1666 (kill-buffer output-buffer)
1667 (ignore-errors (delete-file temp-file))))
1668
1669(defvar-local elisp-flymake--byte-compile-process nil
1670 "Buffer-local process started for byte-compiling the buffer.")
1671
1672;;;###autoload
1673(defun elisp-flymake-byte-compile (report-fn &rest _args)
1674 "A Flymake backend for elisp byte compilation.
1675Spawn an Emacs process that byte-compiles a file representing the
1676current buffer state and calls REPORT-FN when done."
1677 (interactive (list (lambda (stuff)
1678 (message "aha %s" stuff))))
1679 (unless (derived-mode-p 'emacs-lisp-mode)
1680 (error "Can only work on `emacs-lisp-mode' buffers"))
1681 (when elisp-flymake--byte-compile-process
1682 (process-put elisp-flymake--byte-compile-process 'elisp-flymake--obsolete t)
1683 (when (process-live-p elisp-flymake--byte-compile-process)
1684 (kill-process elisp-flymake--byte-compile-process)))
1685 (let ((temp-file (make-temp-file "elisp-flymake-byte-compile"))
1686 (origin-buffer (current-buffer)))
1687 (save-restriction
1688 (widen)
1689 (write-region (point-min) (point-max) temp-file nil 'nomessage))
1690 (let* ((output-buffer (generate-new-buffer " *elisp-flymake-byte-compile*")))
1691 (setq
1692 elisp-flymake--byte-compile-process
1693 (make-process
1694 :name "elisp-flymake-byte-compile"
1695 :buffer output-buffer
1696 :command (list (expand-file-name invocation-name invocation-directory)
1697 "-Q"
1698 "--batch"
1699 ;; "--eval" "(setq load-prefer-newer t)" ; for testing
1700 "-L" default-directory
1701 "-f" "elisp-flymake--batch-compile-for-flymake"
1702 temp-file)
1703 :connection-type 'pipe
1704 :sentinel
1705 (lambda (proc _event)
1706 (unless (process-live-p proc)
1707 (unwind-protect
1708 (cond
1709 ((zerop (process-exit-status proc))
1710 (elisp-flymake--byte-compile-done report-fn
1711 origin-buffer
1712 output-buffer
1713 temp-file))
1714 ((process-get proc 'elisp-flymake--obsolete)
1715 (flymake-log :warning "byte-compile process %s obsolete" proc))
1716 (t
1717 (funcall report-fn
1718 :panic
1719 :explanation
1720 (format "byte-compile process %s died" proc)))))))))
1721 :stderr null-device
1722 :noquery t)))
1723
1724(defun elisp-flymake--batch-compile-for-flymake (&optional file)
1725 "Helper for `elisp-flymake-byte-compile'.
1726Runs in a batch-mode Emacs. Interactively use variable
1727`buffer-file-name' for FILE."
1728 (interactive (list buffer-file-name))
1729 (let* ((file (or file
1730 (car command-line-args-left)))
1731 (dummy-elc-file)
1732 (byte-compile-log-buffer
1733 (generate-new-buffer " *dummy-byte-compile-log-buffer*"))
1734 (byte-compile-dest-file-function
1735 (lambda (source)
1736 (setq dummy-elc-file (make-temp-file (file-name-nondirectory source)))))
1737 (collected)
1738 (byte-compile-log-warning-function
1739 (lambda (string &optional position fill level)
1740 (push (list string position fill level)
1741 collected)
1742 t)))
1743 (unwind-protect
1744 (byte-compile-file file)
1745 (ignore-errors
1746 (delete-file dummy-elc-file)
1747 (kill-buffer byte-compile-log-buffer)))
1748 (prin1 :elisp-flymake-output-start)
1749 (terpri)
1750 (pp collected)))
1751
1591(provide 'elisp-mode) 1752(provide 'elisp-mode)
1592;;; elisp-mode.el ends here 1753;;; elisp-mode.el ends here
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index df1a0750cfb..52cb1985327 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -1,4 +1,4 @@
1;;; flymake-proc.el --- Flymake for external syntax checker processes -*- lexical-binding: t; -*- 1;;; flymake-proc.el --- Flymake backend for external tools -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2003-2017 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
4 4
@@ -20,15 +20,19 @@
20;; GNU General Public License for more details. 20;; GNU General Public License for more details.
21 21
22;; You should have received a copy of the GNU General Public License 22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. 23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 24
25;;; Commentary: 25;;; Commentary:
26;; 26;;
27;; Flymake is a minor Emacs mode performing on-the-fly syntax checks. 27;; Flymake is a minor Emacs mode performing on-the-fly syntax checks.
28;; 28;;
29;; This file contains the most original implementation of flymake's 29;; This file contains a significant part of the original flymake's
30;; main source of on-the-fly diagnostic info, the external syntax 30;; implementation, a buffer-checking mechanism that parses the output
31;; checker backend. 31;; of an external syntax check tool with regular expressions.
32;;
33;; That work has been adapted into a flymake "backend" function,
34;; `flymake-proc-legacy-flymake' suitable for adding to the
35;; `flymake-diagnostic-functions' variable.
32;; 36;;
33;;; Bugs/todo: 37;;; Bugs/todo:
34 38
@@ -37,42 +41,45 @@
37 41
38;;; Code: 42;;; Code:
39 43
40(require 'flymake-ui) 44(require 'flymake)
41 45
42(defcustom flymake-compilation-prevents-syntax-check t 46(defcustom flymake-proc-compilation-prevents-syntax-check t
43 "If non-nil, don't start syntax check if compilation is running." 47 "If non-nil, don't start syntax check if compilation is running."
44 :group 'flymake 48 :group 'flymake
45 :type 'boolean) 49 :type 'boolean)
46 50
47(defcustom flymake-xml-program 51(defcustom flymake-proc-xml-program
48 (if (executable-find "xmlstarlet") "xmlstarlet" "xml") 52 (if (executable-find "xmlstarlet") "xmlstarlet" "xml")
49 "Program to use for XML validation." 53 "Program to use for XML validation."
50 :type 'file 54 :type 'file
51 :group 'flymake 55 :group 'flymake
52 :version "24.4") 56 :version "24.4")
53 57
54(defcustom flymake-master-file-dirs '("." "./src" "./UnitTest") 58(defcustom flymake-proc-master-file-dirs '("." "./src" "./UnitTest")
55 "Dirs where to look for master files." 59 "Dirs where to look for master files."
56 :group 'flymake 60 :group 'flymake
57 :type '(repeat (string))) 61 :type '(repeat (string)))
58 62
59(defcustom flymake-master-file-count-limit 32 63(defcustom flymake-proc-master-file-count-limit 32
60 "Max number of master files to check." 64 "Max number of master files to check."
61 :group 'flymake 65 :group 'flymake
62 :type 'integer) 66 :type 'integer)
63 67
64(defcustom flymake-allowed-file-name-masks 68(defcustom flymake-proc-allowed-file-name-masks
65 '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init) 69 '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'"
66 ("\\.xml\\'" flymake-xml-init) 70 flymake-proc-simple-make-init
67 ("\\.html?\\'" flymake-xml-init) 71 nil
68 ("\\.cs\\'" flymake-simple-make-init) 72 flymake-proc-real-file-name-considering-includes)
69 ("\\.p[ml]\\'" flymake-perl-init) 73 ("\\.xml\\'" flymake-proc-xml-init)
70 ("\\.php[345]?\\'" flymake-php-init) 74 ("\\.html?\\'" flymake-proc-xml-init)
71 ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup) 75 ("\\.cs\\'" flymake-proc-simple-make-init)
72 ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup) 76 ("\\.p[ml]\\'" flymake-proc-perl-init)
73 ("[0-9]+\\.tex\\'" flymake-master-tex-init flymake-master-cleanup) 77 ("\\.php[345]?\\'" flymake-proc-php-init)
74 ("\\.tex\\'" flymake-simple-tex-init) 78 ("\\.h\\'" flymake-proc-master-make-header-init flymake-proc-master-cleanup)
75 ("\\.idl\\'" flymake-simple-make-init) 79 ("\\.java\\'" flymake-proc-simple-make-java-init flymake-proc-simple-java-cleanup)
80 ("[0-9]+\\.tex\\'" flymake-proc-master-tex-init flymake-proc-master-cleanup)
81 ("\\.tex\\'" flymake-proc-simple-tex-init)
82 ("\\.idl\\'" flymake-proc-simple-make-init)
76 ;; ("\\.cpp\\'" 1) 83 ;; ("\\.cpp\\'" 1)
77 ;; ("\\.java\\'" 3) 84 ;; ("\\.java\\'" 3)
78 ;; ("\\.h\\'" 2 ("\\.cpp\\'" "\\.c\\'") 85 ;; ("\\.h\\'" 2 ("\\.cpp\\'" "\\.c\\'")
@@ -85,98 +92,161 @@
85 ) 92 )
86 "Files syntax checking is allowed for. 93 "Files syntax checking is allowed for.
87This is an alist with elements of the form: 94This is an alist with elements of the form:
88 REGEXP [INIT [CLEANUP [NAME]]] 95 REGEXP INIT [CLEANUP [NAME]]
89REGEXP is a regular expression that matches a file name. 96REGEXP is a regular expression that matches a file name.
90INIT is the init function to use, missing means disable `flymake-mode'. 97INIT is the init function to use.
91CLEANUP is the cleanup function to use, default `flymake-simple-cleanup'. 98CLEANUP is the cleanup function to use, default `flymake-proc-simple-cleanup'.
92NAME is the file name function to use, default `flymake-get-real-file-name'." 99NAME is the file name function to use, default `flymake-proc-get-real-file-name'."
93 :group 'flymake 100 :group 'flymake
94 :type '(alist :key-type (regexp :tag "File regexp") 101 :type '(alist :key-type (regexp :tag "File regexp")
95 :value-type 102 :value-type
96 (list :tag "Handler functions" 103 (list :tag "Handler functions"
97 (choice :tag "Init function" 104 (function :tag "Init function")
98 (const :tag "disable" nil)
99 function)
100 (choice :tag "Cleanup function" 105 (choice :tag "Cleanup function"
101 (const :tag "flymake-simple-cleanup" nil) 106 (const :tag "flymake-proc-simple-cleanup" nil)
102 function) 107 function)
103 (choice :tag "Name function" 108 (choice :tag "Name function"
104 (const :tag "flymake-get-real-file-name" nil) 109 (const :tag "flymake-proc-get-real-file-name" nil)
105 function)))) 110 function))))
106 111
107(defvar flymake-processes nil 112(defvar-local flymake-proc--current-process nil
108 "List of currently active flymake processes.") 113 "Currently active Flymake process for a buffer, if any.")
114
115(defvar flymake-proc--report-fn nil
116 "If bound, function used to report back to Flymake's UI.")
117
118(defun flymake-proc-reformat-err-line-patterns-from-compile-el (original-list)
119 "Grab error line patterns from ORIGINAL-LIST in compile.el format.
120Convert it to Flymake internal format."
121 (let* ((converted-list '()))
122 (dolist (item original-list)
123 (setq item (cdr item))
124 (let ((regexp (nth 0 item))
125 (file (nth 1 item))
126 (line (nth 2 item))
127 (col (nth 3 item)))
128 (if (consp file) (setq file (car file)))
129 (if (consp line) (setq line (car line)))
130 (if (consp col) (setq col (car col)))
109 131
110(defvar-local flymake-output-residual nil) 132 (when (not (functionp line))
133 (setq converted-list (cons (list regexp file line col) converted-list)))))
134 converted-list))
111 135
112(defun flymake-get-file-name-mode-and-masks (file-name) 136(defvar flymake-proc-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text
113 "Return the corresponding entry from `flymake-allowed-file-name-masks'." 137 (append
138 '(
139 ;; MS Visual C++ 6.0
140 ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) : \\(\\(error\\|warning\\|fatal error\\) \\(C[0-9]+\\):[ \t\n]*\\(.+\\)\\)"
141 1 3 nil 4)
142 ;; jikes
143 ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:[0-9]+: \\(\\(Error\\|Warning\\|Caution\\|Semantic Error\\):[ \t\n]*\\(.+\\)\\)"
144 1 3 nil 4)
145 ;; MS midl
146 ("midl[ ]*:[ ]*\\(command line error .*\\)"
147 nil nil nil 1)
148 ;; MS C#
149 ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\),[0-9]+): \\(\\(error\\|warning\\|fatal error\\) \\(CS[0-9]+\\):[ \t\n]*\\(.+\\)\\)"
150 1 3 nil 4)
151 ;; perl
152 ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1)
153 ;; PHP
154 ("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1)
155 ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1)
156 ;; ant/javac. Note this also matches gcc warnings!
157 (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?:[ \t\n]*\\(.+\\)"
158 2 4 5 6))
159 ;; compilation-error-regexp-alist)
160 (flymake-proc-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
161 "Patterns for matching error/warning lines. Each pattern has the form
162\(REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX).
163Use `flymake-proc-reformat-err-line-patterns-from-compile-el' to add patterns
164from compile.el")
165
166(define-obsolete-variable-alias 'flymake-warning-re 'flymake-proc-diagnostic-type-pred "26.1")
167(defvar flymake-proc-diagnostic-type-pred
168 'flymake-proc-default-guess
169 "Predicate matching against diagnostic text to detect its type.
170Takes a single argument, the diagnostic's text and should return
171a value suitable for indexing
172`flymake-diagnostic-types-alist' (which see). If the returned
173value is nil, a type of `:error' is assumed. For some backward
174compatibility, if a non-nil value is returned that that doesn't
175index that alist, a type of `:warning' is assumed.
176
177Instead of a function, it can also be a string, a regular
178expression. A match indicates `:warning' type, otherwise
179`:error'")
180
181(defun flymake-proc-default-guess (text)
182 "Guess if TEXT means a warning, a note or an error."
183 (cond ((string-match "^[wW]arning" text)
184 :warning)
185 ((string-match "^[nN]ote" text)
186 :note)
187 (t
188 :error)))
189
190(defun flymake-proc--get-file-name-mode-and-masks (file-name)
191 "Return the corresponding entry from `flymake-proc-allowed-file-name-masks'."
114 (unless (stringp file-name) 192 (unless (stringp file-name)
115 (error "Invalid file-name")) 193 (error "Invalid file-name"))
116 (let ((fnm flymake-allowed-file-name-masks) 194 (let ((fnm flymake-proc-allowed-file-name-masks)
117 (mode-and-masks nil)) 195 (mode-and-masks nil))
118 (while (and (not mode-and-masks) fnm) 196 (while (and (not mode-and-masks) fnm)
119 (let ((item (pop fnm))) 197 (if (string-match (car (car fnm)) file-name)
120 (when (string-match (car item) file-name) 198 (setq mode-and-masks (cdr (car fnm))))
121 (setq mode-and-masks item)))) ; (cdr item) may be nil 199 (setq fnm (cdr fnm)))
122 (setq mode-and-masks (cdr mode-and-masks))
123 (flymake-log 3 "file %s, init=%s" file-name (car mode-and-masks)) 200 (flymake-log 3 "file %s, init=%s" file-name (car mode-and-masks))
124 mode-and-masks)) 201 mode-and-masks))
125 202
126(defun flymake-proc-can-syntax-check-buffer () 203(defun flymake-proc--get-init-function (file-name)
127 "Determine whether we can syntax check current buffer.
128Return nil if we cannot, non-nil if
129we can."
130 (and buffer-file-name
131 (if (flymake-get-init-function buffer-file-name) t nil)))
132
133(defun flymake-get-init-function (file-name)
134 "Return init function to be used for the file." 204 "Return init function to be used for the file."
135 (let* ((init-f (nth 0 (flymake-get-file-name-mode-and-masks file-name)))) 205 (let* ((init-f (nth 0 (flymake-proc--get-file-name-mode-and-masks file-name))))
136 ;;(flymake-log 0 "calling %s" init-f) 206 ;;(flymake-log 0 "calling %s" init-f)
137 ;;(funcall init-f (current-buffer)) 207 ;;(funcall init-f (current-buffer))
138 init-f)) 208 init-f))
139 209
140(defun flymake-get-cleanup-function (file-name) 210(defun flymake-proc--get-cleanup-function (file-name)
141 "Return cleanup function to be used for the file." 211 "Return cleanup function to be used for the file."
142 (or (nth 1 (flymake-get-file-name-mode-and-masks file-name)) 212 (or (nth 1 (flymake-proc--get-file-name-mode-and-masks file-name))
143 'flymake-simple-cleanup)) 213 'flymake-proc-simple-cleanup))
144 214
145(defun flymake-get-real-file-name-function (file-name) 215(defun flymake-proc--get-real-file-name-function (file-name)
146 (or (nth 2 (flymake-get-file-name-mode-and-masks file-name)) 216 (or (nth 2 (flymake-proc--get-file-name-mode-and-masks file-name))
147 'flymake-get-real-file-name)) 217 'flymake-proc-get-real-file-name))
148 218
149(defvar flymake-find-buildfile-cache (make-hash-table :test #'equal)) 219(defvar flymake-proc--find-buildfile-cache (make-hash-table :test #'equal))
150 220
151(defun flymake-get-buildfile-from-cache (dir-name) 221(defun flymake-proc--get-buildfile-from-cache (dir-name)
152 "Look up DIR-NAME in cache and return its associated value. 222 "Look up DIR-NAME in cache and return its associated value.
153If DIR-NAME is not found, return nil." 223If DIR-NAME is not found, return nil."
154 (gethash dir-name flymake-find-buildfile-cache)) 224 (gethash dir-name flymake-proc--find-buildfile-cache))
155 225
156(defun flymake-add-buildfile-to-cache (dir-name buildfile) 226(defun flymake-proc--add-buildfile-to-cache (dir-name buildfile)
157 "Associate DIR-NAME with BUILDFILE in the buildfile cache." 227 "Associate DIR-NAME with BUILDFILE in the buildfile cache."
158 (puthash dir-name buildfile flymake-find-buildfile-cache)) 228 (puthash dir-name buildfile flymake-proc--find-buildfile-cache))
159 229
160(defun flymake-clear-buildfile-cache () 230(defun flymake-proc--clear-buildfile-cache ()
161 "Clear the buildfile cache." 231 "Clear the buildfile cache."
162 (clrhash flymake-find-buildfile-cache)) 232 (clrhash flymake-proc--find-buildfile-cache))
163 233
164(defun flymake-find-buildfile (buildfile-name source-dir-name) 234(defun flymake-proc--find-buildfile (buildfile-name source-dir-name)
165 "Find buildfile starting from current directory. 235 "Find buildfile starting from current directory.
166Buildfile includes Makefile, build.xml etc. 236Buildfile includes Makefile, build.xml etc.
167Return its file name if found, or nil if not found." 237Return its file name if found, or nil if not found."
168 (or (flymake-get-buildfile-from-cache source-dir-name) 238 (or (flymake-proc--get-buildfile-from-cache source-dir-name)
169 (let* ((file (locate-dominating-file source-dir-name buildfile-name))) 239 (let* ((file (locate-dominating-file source-dir-name buildfile-name)))
170 (if file 240 (if file
171 (progn 241 (progn
172 (flymake-log 3 "found buildfile at %s" file) 242 (flymake-log 3 "found buildfile at %s" file)
173 (flymake-add-buildfile-to-cache source-dir-name file) 243 (flymake-proc--add-buildfile-to-cache source-dir-name file)
174 file) 244 file)
175 (progn 245 (progn
176 (flymake-log 3 "buildfile for %s not found" source-dir-name) 246 (flymake-log 3 "buildfile for %s not found" source-dir-name)
177 nil))))) 247 nil)))))
178 248
179(defun flymake-fix-file-name (name) 249(defun flymake-proc--fix-file-name (name)
180 "Replace all occurrences of `\\' with `/'." 250 "Replace all occurrences of `\\' with `/'."
181 (when name 251 (when name
182 (setq name (expand-file-name name)) 252 (setq name (expand-file-name name))
@@ -184,18 +254,17 @@ Return its file name if found, or nil if not found."
184 (setq name (directory-file-name name)) 254 (setq name (directory-file-name name))
185 name)) 255 name))
186 256
187(defun flymake-same-files (file-name-one file-name-two) 257(defun flymake-proc--same-files (file-name-one file-name-two)
188 "Check if FILE-NAME-ONE and FILE-NAME-TWO point to same file. 258 "Check if FILE-NAME-ONE and FILE-NAME-TWO point to same file.
189Return t if so, nil if not." 259Return t if so, nil if not."
190 (equal (flymake-fix-file-name file-name-one) 260 (equal (flymake-proc--fix-file-name file-name-one)
191 (flymake-fix-file-name file-name-two))) 261 (flymake-proc--fix-file-name file-name-two)))
192 262
193;; This is bound dynamically to pass a parameter to a sort predicate below 263;; This is bound dynamically to pass a parameter to a sort predicate below
194(defvar flymake-included-file-name) 264(defvar flymake-proc--included-file-name)
195 265
196(defun flymake-find-possible-master-files (file-name master-file-dirs masks) 266(defun flymake-proc--find-possible-master-files (file-name master-file-dirs masks)
197 "Find (by name and location) all possible master files. 267 "Find (by name and location) all possible master files.
198
199Name is specified by FILE-NAME and location is specified by 268Name is specified by FILE-NAME and location is specified by
200MASTER-FILE-DIRS. Master files include .cpp and .c for .h. 269MASTER-FILE-DIRS. Master files include .cpp and .c for .h.
201Files are searched for starting from the .h directory and max 270Files are searched for starting from the .h directory and max
@@ -216,35 +285,35 @@ max-level parent dirs. File contents are not checked."
216 (while (and (not done) dir-files) 285 (while (and (not done) dir-files)
217 (when (not (file-directory-p (car dir-files))) 286 (when (not (file-directory-p (car dir-files)))
218 (setq files (cons (car dir-files) files)) 287 (setq files (cons (car dir-files) files))
219 (when (>= (length files) flymake-master-file-count-limit) 288 (when (>= (length files) flymake-proc-master-file-count-limit)
220 (flymake-log 3 "master file count limit (%d) reached" flymake-master-file-count-limit) 289 (flymake-log 3 "master file count limit (%d) reached" flymake-proc-master-file-count-limit)
221 (setq done t))) 290 (setq done t)))
222 (setq dir-files (cdr dir-files)))) 291 (setq dir-files (cdr dir-files))))
223 (setq masks (cdr masks)))) 292 (setq masks (cdr masks))))
224 (setq dirs (cdr dirs))) 293 (setq dirs (cdr dirs)))
225 (when files 294 (when files
226 (let ((flymake-included-file-name (file-name-nondirectory file-name))) 295 (let ((flymake-proc--included-file-name (file-name-nondirectory file-name)))
227 (setq files (sort files 'flymake-master-file-compare)))) 296 (setq files (sort files 'flymake-proc--master-file-compare))))
228 (flymake-log 3 "found %d possible master file(s)" (length files)) 297 (flymake-log 3 "found %d possible master file(s)" (length files))
229 files)) 298 files))
230 299
231(defun flymake-master-file-compare (file-one file-two) 300(defun flymake-proc--master-file-compare (file-one file-two)
232 "Compare two files specified by FILE-ONE and FILE-TWO. 301 "Compare two files specified by FILE-ONE and FILE-TWO.
233This function is used in sort to move most possible file names 302This function is used in sort to move most possible file names
234to the beginning of the list (File.h -> File.cpp moved to top)." 303to the beginning of the list (File.h -> File.cpp moved to top)."
235 (and (equal (file-name-sans-extension flymake-included-file-name) 304 (and (equal (file-name-sans-extension flymake-proc--included-file-name)
236 (file-name-base file-one)) 305 (file-name-base file-one))
237 (not (equal file-one file-two)))) 306 (not (equal file-one file-two))))
238 307
239(defvar flymake-check-file-limit 8192 308(defvar flymake-proc-check-file-limit 8192
240 "Maximum number of chars to look at when checking possible master file. 309 "Maximum number of chars to look at when checking possible master file.
241Nil means search the entire file.") 310Nil means search the entire file.")
242 311
243(defun flymake-check-patch-master-file-buffer 312(defun flymake-proc--check-patch-master-file-buffer
244 (master-file-temp-buffer 313 (master-file-temp-buffer
245 master-file-name patched-master-file-name 314 master-file-name patched-master-file-name
246 source-file-name patched-source-file-name 315 source-file-name patched-source-file-name
247 include-dirs regexp) 316 include-dirs regexp)
248 "Check if MASTER-FILE-NAME is a master file for SOURCE-FILE-NAME. 317 "Check if MASTER-FILE-NAME is a master file for SOURCE-FILE-NAME.
249If yes, patch a copy of MASTER-FILE-NAME to include PATCHED-SOURCE-FILE-NAME 318If yes, patch a copy of MASTER-FILE-NAME to include PATCHED-SOURCE-FILE-NAME
250instead of SOURCE-FILE-NAME. 319instead of SOURCE-FILE-NAME.
@@ -258,7 +327,7 @@ instead of reading master file from disk."
258 (source-file-nonext (file-name-sans-extension source-file-nondir)) 327 (source-file-nonext (file-name-sans-extension source-file-nondir))
259 (found nil) 328 (found nil)
260 (inc-name nil) 329 (inc-name nil)
261 (search-limit flymake-check-file-limit)) 330 (search-limit flymake-proc-check-file-limit))
262 (setq regexp 331 (setq regexp
263 (format regexp ; "[ \t]*#[ \t]*include[ \t]*\"\\(.*%s\\)\"" 332 (format regexp ; "[ \t]*#[ \t]*include[ \t]*\"\\(.*%s\\)\""
264 ;; Hack for tex files, where \include often excludes .tex. 333 ;; Hack for tex files, where \include often excludes .tex.
@@ -294,18 +363,18 @@ instead of reading master file from disk."
294 inc-name (- (length inc-name) 363 inc-name (- (length inc-name)
295 (length source-file-nondir)) nil)) 364 (length source-file-nondir)) nil))
296 (flymake-log 3 "inc-name=%s" inc-name) 365 (flymake-log 3 "inc-name=%s" inc-name)
297 (when (flymake-check-include source-file-name inc-name 366 (when (flymake-proc--check-include source-file-name inc-name
298 include-dirs) 367 include-dirs)
299 (setq found t) 368 (setq found t)
300 ;; replace-match is not used here as it fails in 369 ;; replace-match is not used here as it fails in
301 ;; XEmacs with 'last match not a buffer' error as 370 ;; XEmacs with 'last match not a buffer' error as
302 ;; check-includes calls replace-in-string 371 ;; check-includes calls replace-in-string
303 (flymake-replace-region 372 (flymake-proc--replace-region
304 match-beg match-end 373 match-beg match-end
305 (file-name-nondirectory patched-source-file-name)))) 374 (file-name-nondirectory patched-source-file-name))))
306 (forward-line 1))) 375 (forward-line 1)))
307 (when found 376 (when found
308 (flymake-save-buffer-in-file patched-master-file-name))) 377 (flymake-proc--save-buffer-in-file patched-master-file-name)))
309 ;;+(flymake-log 3 "killing buffer %s" 378 ;;+(flymake-log 3 "killing buffer %s"
310 ;; (buffer-name master-file-temp-buffer)) 379 ;; (buffer-name master-file-temp-buffer))
311 (kill-buffer master-file-temp-buffer)) 380 (kill-buffer master-file-temp-buffer))
@@ -315,7 +384,7 @@ instead of reading master file from disk."
315 found)) 384 found))
316 385
317;;; XXX: remove 386;;; XXX: remove
318(defun flymake-replace-region (beg end rep) 387(defun flymake-proc--replace-region (beg end rep)
319 "Replace text in BUFFER in region (BEG END) with REP." 388 "Replace text in BUFFER in region (BEG END) with REP."
320 (save-excursion 389 (save-excursion
321 (goto-char end) 390 (goto-char end)
@@ -323,14 +392,14 @@ instead of reading master file from disk."
323 (insert rep) 392 (insert rep)
324 (delete-region beg end))) 393 (delete-region beg end)))
325 394
326(defun flymake-read-file-to-temp-buffer (file-name) 395(defun flymake-proc--read-file-to-temp-buffer (file-name)
327 "Insert contents of FILE-NAME into newly created temp buffer." 396 "Insert contents of FILE-NAME into newly created temp buffer."
328 (let* ((temp-buffer (get-buffer-create (generate-new-buffer-name (concat "flymake:" (file-name-nondirectory file-name)))))) 397 (let* ((temp-buffer (get-buffer-create (generate-new-buffer-name (concat "flymake:" (file-name-nondirectory file-name))))))
329 (with-current-buffer temp-buffer 398 (with-current-buffer temp-buffer
330 (insert-file-contents file-name)) 399 (insert-file-contents file-name))
331 temp-buffer)) 400 temp-buffer))
332 401
333(defun flymake-copy-buffer-to-temp-buffer (buffer) 402(defun flymake-proc--copy-buffer-to-temp-buffer (buffer)
334 "Copy contents of BUFFER into newly created temp buffer." 403 "Copy contents of BUFFER into newly created temp buffer."
335 (with-current-buffer 404 (with-current-buffer
336 (get-buffer-create (generate-new-buffer-name 405 (get-buffer-create (generate-new-buffer-name
@@ -338,13 +407,13 @@ instead of reading master file from disk."
338 (insert-buffer-substring buffer) 407 (insert-buffer-substring buffer)
339 (current-buffer))) 408 (current-buffer)))
340 409
341(defun flymake-check-include (source-file-name inc-name include-dirs) 410(defun flymake-proc--check-include (source-file-name inc-name include-dirs)
342 "Check if SOURCE-FILE-NAME can be found in include path. 411 "Check if SOURCE-FILE-NAME can be found in include path.
343Return t if it can be found via include path using INC-NAME." 412Return t if it can be found via include path using INC-NAME."
344 (if (file-name-absolute-p inc-name) 413 (if (file-name-absolute-p inc-name)
345 (flymake-same-files source-file-name inc-name) 414 (flymake-proc--same-files source-file-name inc-name)
346 (while (and include-dirs 415 (while (and include-dirs
347 (not (flymake-same-files 416 (not (flymake-proc--same-files
348 source-file-name 417 source-file-name
349 (concat (file-name-directory source-file-name) 418 (concat (file-name-directory source-file-name)
350 "/" (car include-dirs) 419 "/" (car include-dirs)
@@ -352,17 +421,17 @@ Return t if it can be found via include path using INC-NAME."
352 (setq include-dirs (cdr include-dirs))) 421 (setq include-dirs (cdr include-dirs)))
353 include-dirs)) 422 include-dirs))
354 423
355(defun flymake-find-buffer-for-file (file-name) 424(defun flymake-proc--find-buffer-for-file (file-name)
356 "Check if there exists a buffer visiting FILE-NAME. 425 "Check if there exists a buffer visiting FILE-NAME.
357Return t if so, nil if not." 426Return t if so, nil if not."
358 (let ((buffer-name (get-file-buffer file-name))) 427 (let ((buffer-name (get-file-buffer file-name)))
359 (if buffer-name 428 (if buffer-name
360 (get-buffer buffer-name)))) 429 (get-buffer buffer-name))))
361 430
362(defun flymake-create-master-file (source-file-name patched-source-file-name get-incl-dirs-f create-temp-f masks include-regexp) 431(defun flymake-proc--create-master-file (source-file-name patched-source-file-name get-incl-dirs-f create-temp-f masks include-regexp)
363 "Save SOURCE-FILE-NAME with a different name. 432 "Save SOURCE-FILE-NAME with a different name.
364Find master file, patch and save it." 433Find master file, patch and save it."
365 (let* ((possible-master-files (flymake-find-possible-master-files source-file-name flymake-master-file-dirs masks)) 434 (let* ((possible-master-files (flymake-proc--find-possible-master-files source-file-name flymake-proc-master-file-dirs masks))
366 (master-file-count (length possible-master-files)) 435 (master-file-count (length possible-master-files))
367 (idx 0) 436 (idx 0)
368 (temp-buffer nil) 437 (temp-buffer nil)
@@ -373,11 +442,11 @@ Find master file, patch and save it."
373 (while (and (not found) (< idx master-file-count)) 442 (while (and (not found) (< idx master-file-count))
374 (setq master-file-name (nth idx possible-master-files)) 443 (setq master-file-name (nth idx possible-master-files))
375 (setq patched-master-file-name (funcall create-temp-f master-file-name "flymake_master")) 444 (setq patched-master-file-name (funcall create-temp-f master-file-name "flymake_master"))
376 (if (flymake-find-buffer-for-file master-file-name) 445 (if (flymake-proc--find-buffer-for-file master-file-name)
377 (setq temp-buffer (flymake-copy-buffer-to-temp-buffer (flymake-find-buffer-for-file master-file-name))) 446 (setq temp-buffer (flymake-proc--copy-buffer-to-temp-buffer (flymake-proc--find-buffer-for-file master-file-name)))
378 (setq temp-buffer (flymake-read-file-to-temp-buffer master-file-name))) 447 (setq temp-buffer (flymake-proc--read-file-to-temp-buffer master-file-name)))
379 (setq found 448 (setq found
380 (flymake-check-patch-master-file-buffer 449 (flymake-proc--check-patch-master-file-buffer
381 temp-buffer 450 temp-buffer
382 master-file-name 451 master-file-name
383 patched-master-file-name 452 patched-master-file-name
@@ -393,260 +462,185 @@ Find master file, patch and save it."
393 (file-name-nondirectory source-file-name)) 462 (file-name-nondirectory source-file-name))
394 nil)))) 463 nil))))
395 464
396(defun flymake-save-buffer-in-file (file-name) 465(defun flymake-proc--save-buffer-in-file (file-name)
397 "Save the entire buffer contents into file FILE-NAME. 466 "Save the entire buffer contents into file FILE-NAME.
398Create parent directories as needed." 467Create parent directories as needed."
399 (make-directory (file-name-directory file-name) 1) 468 (make-directory (file-name-directory file-name) 1)
400 (write-region nil nil file-name nil 566) 469 (write-region nil nil file-name nil 566)
401 (flymake-log 3 "saved buffer %s in file %s" (buffer-name) file-name)) 470 (flymake-log 3 "saved buffer %s in file %s" (buffer-name) file-name))
402 471
403(defun flymake-process-filter (process output) 472(defun flymake-proc--diagnostics-for-pattern (proc pattern)
404 "Parse OUTPUT and highlight error lines. 473 (cl-flet ((guess-type
405It's flymake process filter." 474 (pred message)
406 (let ((source-buffer (process-buffer process))) 475 (cond ((null message)
407 476 :error)
408 (flymake-log 3 "received %d byte(s) of output from process %d" 477 ((stringp pred)
409 (length output) (process-id process)) 478 (if (string-match pred message)
410 (when (buffer-live-p source-buffer) 479 :warning
411 (with-current-buffer source-buffer 480 :error))
412 (flymake-parse-output-and-residual output))))) 481 ((functionp pred)
413 482 (let ((probe (funcall pred message)))
414(defun flymake-process-sentinel (process _event) 483 (cond ((assoc-default probe
484 flymake-diagnostic-types-alist)
485 probe)
486 (probe
487 :warning)
488 (t
489 :error)))))))
490 (condition-case-unless-debug err
491 (cl-loop
492 with (regexp file-idx line-idx col-idx message-idx) = pattern
493 while (and
494 (search-forward-regexp regexp nil t)
495 ;; If the preceding search spanned more than one line,
496 ;; move to the start of the line we ended up in. This
497 ;; preserves the usefulness of the patterns in
498 ;; `flymake-proc-err-line-patterns', which were
499 ;; written primarily for flymake's original
500 ;; line-by-line parsing and thus never spanned
501 ;; multiple lines.
502 (if (/= (line-number-at-pos (match-beginning 0))
503 (line-number-at-pos))
504 (goto-char (line-beginning-position))
505 t))
506 for fname = (and file-idx (match-string file-idx))
507 for message = (and message-idx (match-string message-idx))
508 for line-string = (and line-idx (match-string line-idx))
509 for line-number = (or (and line-string
510 (string-to-number line-string))
511 1)
512 for col-string = (and col-idx (match-string col-idx))
513 for col-number = (and col-string
514 (string-to-number col-string))
515 for full-file = (with-current-buffer (process-buffer proc)
516 (and fname
517 (funcall
518 (flymake-proc--get-real-file-name-function
519 fname)
520 fname)))
521 for buffer = (and full-file
522 (find-buffer-visiting full-file))
523 if (and (eq buffer (process-buffer proc)) message)
524 collect (pcase-let ((`(,beg . ,end)
525 (flymake-diag-region buffer line-number col-number)))
526 (flymake-make-diagnostic
527 buffer beg end
528 (with-current-buffer buffer
529 (guess-type flymake-proc-diagnostic-type-pred message))
530 message))
531 else
532 do (flymake-log 2 "Reference to file %s is out of scope" fname))
533 (error
534 (flymake-log 1 "Error parsing process output for pattern %s: %s"
535 pattern err)
536 nil))))
537
538(defun flymake-proc--process-filter (proc string)
539 "Parse STRING and collect diagnostics info."
540 (flymake-log 3 "received %d byte(s) of output from process %d"
541 (length string) (process-id proc))
542 (let ((output-buffer (process-get proc 'flymake-proc--output-buffer)))
543 (when (and (buffer-live-p (process-buffer proc))
544 output-buffer)
545 (with-current-buffer output-buffer
546 (let ((moving (= (point) (process-mark proc)))
547 (inhibit-read-only t)
548 (unprocessed-mark
549 (or (process-get proc 'flymake-proc--unprocessed-mark)
550 (set-marker (make-marker) (point-min)))))
551 (save-excursion
552 ;; Insert the text, advancing the process marker.
553 (goto-char (process-mark proc))
554 (insert string)
555 (set-marker (process-mark proc) (point)))
556 (if moving (goto-char (process-mark proc)))
557
558 ;; check for new diagnostics
559 ;;
560 (save-excursion
561 (goto-char unprocessed-mark)
562 (dolist (pattern flymake-proc-err-line-patterns)
563 (let ((new (flymake-proc--diagnostics-for-pattern proc pattern)))
564 (process-put
565 proc
566 'flymake-proc--collected-diagnostics
567 (append new
568 (process-get proc
569 'flymake-proc--collected-diagnostics)))))
570 (process-put proc 'flymake-proc--unprocessed-mark
571 (point-marker))))))))
572
573(defun flymake-proc--process-sentinel (proc _event)
415 "Sentinel for syntax check buffers." 574 "Sentinel for syntax check buffers."
416 (when (memq (process-status process) '(signal exit)) 575 (let (debug
417 (let* ((exit-status (process-exit-status process)) 576 (pid (process-id proc))
418 (command (process-command process)) 577 (source-buffer (process-buffer proc)))
419 (source-buffer (process-buffer process)) 578 (unwind-protect
420 (cleanup-f (flymake-get-cleanup-function (buffer-file-name source-buffer)))) 579 (when (buffer-live-p source-buffer)
421 580 (with-current-buffer source-buffer
422 (flymake-log 2 "process %d exited with code %d" 581 (cond ((process-get proc 'flymake-proc--obsolete)
423 (process-id process) exit-status) 582 (flymake-log 3 "proc %s considered obsolete"
424 (condition-case err 583 pid))
425 (progn 584 ((process-get proc 'flymake-proc--interrupted)
426 (flymake-log 3 "cleaning up using %s" cleanup-f) 585 (flymake-log 3 "proc %s interrupted by user"
427 (when (buffer-live-p source-buffer) 586 pid))
428 (with-current-buffer source-buffer 587 ((not (process-live-p proc))
429 (funcall cleanup-f))) 588 (let* ((exit-status (process-exit-status proc))
430 589 (command (process-command proc))
431 (delete-process process) 590 (diagnostics (process-get
432 (setq flymake-processes (delq process flymake-processes)) 591 proc
433 592 'flymake-proc--collected-diagnostics)))
434 (when (buffer-live-p source-buffer) 593 (flymake-log 2 "process %d exited with code %d"
435 (with-current-buffer source-buffer 594 pid exit-status)
436 595 (cond
437 (flymake-parse-residual) 596 ((equal 0 exit-status)
438 (flymake-post-syntax-check exit-status command) 597 (funcall flymake-proc--report-fn diagnostics
439 (setq flymake-is-running nil)))) 598 :explanation (format "a gift from %s" (process-id proc))
440 (error 599 ))
441 (let ((err-str (format "Error in process sentinel for buffer %s: %s" 600 (diagnostics
442 source-buffer (error-message-string err)))) 601 ;; non-zero exit but some diagnostics is quite
443 (flymake-log 0 err-str) 602 ;; normal...
444 (with-current-buffer source-buffer 603 (funcall flymake-proc--report-fn diagnostics
445 (setq flymake-is-running nil)))))))) 604 :explanation (format "a gift from %s" (process-id proc))))
446 605 ((null diagnostics)
447(defun flymake-post-syntax-check (exit-status command) 606 ;; ...but no diagnostics is strange, so panic.
448 (save-restriction 607 (setq debug debug-on-error)
449 (widen) 608 (flymake-proc--panic
450 (setq flymake-err-info flymake-new-err-info) 609 :configuration-error
451 (setq flymake-new-err-info nil) 610 (format "Command %s errored, but no diagnostics"
452 (setq flymake-err-info 611 command)))))))))
453 (flymake-fix-line-numbers 612 (let ((output-buffer (process-get proc 'flymake-proc--output-buffer)))
454 flymake-err-info 1 (count-lines (point-min) (point-max)))) 613 (cond (debug
455 (flymake-delete-own-overlays) 614 (flymake-log 3 "Output buffer %s kept alive for debugging"
456 (flymake-highlight-err-lines flymake-err-info) 615 output-buffer))
457 (let (err-count warn-count) 616 (t
458 (setq err-count (flymake-get-err-count flymake-err-info "e")) 617 (when (buffer-live-p source-buffer)
459 (setq warn-count (flymake-get-err-count flymake-err-info "w")) 618 (with-current-buffer source-buffer
460 (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" 619 (let ((cleanup-f (flymake-proc--get-cleanup-function
461 (buffer-name) err-count warn-count 620 (buffer-file-name))))
462 (- (float-time) flymake-check-start-time)) 621 (flymake-log 3 "cleaning up using %s" cleanup-f)
463 (setq flymake-check-start-time nil) 622 (funcall cleanup-f))))
464 623 (kill-buffer output-buffer)))))))
465 (if (and (equal 0 err-count) (equal 0 warn-count)) 624
466 (if (equal 0 exit-status) 625(defun flymake-proc--panic (problem explanation)
467 (flymake-report-status "" "") ; PASSED 626 "Tell Flymake UI about a fatal PROBLEM with this backend.
468 (if (not flymake-check-was-interrupted) 627May only be called in a dynamic environment where
469 (flymake-report-fatal-status "CFGERR" 628`flymake-proc--report-fn' is bound."
470 (format "Configuration error has occurred while running %s" command)) 629 (flymake-log 0 "%s: %s" problem explanation)
471 (flymake-report-status nil ""))) ; "STOPPED" 630 (if (and (boundp 'flymake-proc--report-fn)
472 (flymake-report-status (format "%d/%d" err-count warn-count) ""))))) 631 flymake-proc--report-fn)
473 632 (funcall flymake-proc--report-fn :panic
474(defun flymake-parse-output-and-residual (output) 633 :explanation (format "%s: %s" problem explanation))
475 "Split OUTPUT into lines, merge in residual if necessary." 634 (flymake-error "Trouble telling flymake-ui about problem %s(%s)"
476 (let* ((buffer-residual flymake-output-residual) 635 problem explanation)))
477 (total-output (if buffer-residual (concat buffer-residual output) output))
478 (lines-and-residual (flymake-split-output total-output))
479 (lines (nth 0 lines-and-residual))
480 (new-residual (nth 1 lines-and-residual)))
481 (setq flymake-output-residual new-residual)
482 (setq flymake-new-err-info
483 (flymake-parse-err-lines
484 flymake-new-err-info lines))))
485
486(defun flymake-parse-residual ()
487 "Parse residual if it's non empty."
488 (when flymake-output-residual
489 (setq flymake-new-err-info
490 (flymake-parse-err-lines
491 flymake-new-err-info
492 (list flymake-output-residual)))
493 (setq flymake-output-residual nil)))
494
495(defun flymake-fix-line-numbers (err-info-list min-line max-line)
496 "Replace line numbers with fixed value.
497If line-numbers is less than MIN-LINE, set line numbers to MIN-LINE.
498If line numbers is greater than MAX-LINE, set line numbers to MAX-LINE.
499The reason for this fix is because some compilers might report
500line number outside the file being compiled."
501 (let* ((count (length err-info-list))
502 (err-info nil)
503 (line 0))
504 (while (> count 0)
505 (setq err-info (nth (1- count) err-info-list))
506 (setq line (flymake-er-get-line err-info))
507 (when (or (< line min-line) (> line max-line))
508 (setq line (if (< line min-line) min-line max-line))
509 (setq err-info-list (flymake-set-at err-info-list (1- count)
510 (flymake-er-make-er line
511 (flymake-er-get-line-err-info-list err-info)))))
512 (setq count (1- count))))
513 err-info-list)
514
515(defun flymake-parse-err-lines (err-info-list lines)
516 "Parse err LINES, store info in ERR-INFO-LIST."
517 (let* ((count (length lines))
518 (idx 0)
519 (line-err-info nil)
520 (real-file-name nil)
521 (source-file-name buffer-file-name)
522 (get-real-file-name-f (flymake-get-real-file-name-function source-file-name)))
523
524 (while (< idx count)
525 (setq line-err-info (flymake-parse-line (nth idx lines)))
526 (when line-err-info
527 (setq real-file-name (funcall get-real-file-name-f
528 (flymake-ler-file line-err-info)))
529 (setq line-err-info (flymake-ler-set-full-file line-err-info real-file-name))
530
531 (when (flymake-same-files real-file-name source-file-name)
532 (setq line-err-info (flymake-ler-set-file line-err-info nil))
533 (setq err-info-list (flymake-add-err-info err-info-list line-err-info))))
534 (flymake-log 3 "parsed `%s', %s line-err-info" (nth idx lines) (if line-err-info "got" "no"))
535 (setq idx (1+ idx)))
536 err-info-list))
537
538(defun flymake-split-output (output)
539 "Split OUTPUT into lines.
540Return last one as residual if it does not end with newline char.
541Returns ((LINES) RESIDUAL)."
542 (when (and output (> (length output) 0))
543 (let* ((lines (split-string output "[\n\r]+" t))
544 (complete (equal "\n" (char-to-string (aref output (1- (length output))))))
545 (residual nil))
546 (when (not complete)
547 (setq residual (car (last lines)))
548 (setq lines (butlast lines)))
549 (list lines residual))))
550
551(defun flymake-reformat-err-line-patterns-from-compile-el (original-list)
552 "Grab error line patterns from ORIGINAL-LIST in compile.el format.
553Convert it to flymake internal format."
554 (let* ((converted-list '()))
555 (dolist (item original-list)
556 (setq item (cdr item))
557 (let ((regexp (nth 0 item))
558 (file (nth 1 item))
559 (line (nth 2 item))
560 (col (nth 3 item)))
561 (if (consp file) (setq file (car file)))
562 (if (consp line) (setq line (car line)))
563 (if (consp col) (setq col (car col)))
564
565 (when (not (functionp line))
566 (setq converted-list (cons (list regexp file line col) converted-list)))))
567 converted-list))
568 636
569(require 'compile) 637(require 'compile)
570 638
571(defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text 639(defun flymake-proc-get-project-include-dirs-imp (basedir)
572 (append
573 '(
574 ;; MS Visual C++ 6.0
575 ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) : \\(\\(error\\|warning\\|fatal error\\) \\(C[0-9]+\\):[ \t\n]*\\(.+\\)\\)"
576 1 3 nil 4)
577 ;; jikes
578 ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:[0-9]+: \\(\\(Error\\|Warning\\|Caution\\|Semantic Error\\):[ \t\n]*\\(.+\\)\\)"
579 1 3 nil 4)
580 ;; MS midl
581 ("midl[ ]*:[ ]*\\(command line error .*\\)"
582 nil nil nil 1)
583 ;; MS C#
584 ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\),[0-9]+): \\(\\(error\\|warning\\|fatal error\\) \\(CS[0-9]+\\):[ \t\n]*\\(.+\\)\\)"
585 1 3 nil 4)
586 ;; perl
587 ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1)
588 ;; PHP
589 ("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1)
590 ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1)
591 ;; ant/javac. Note this also matches gcc warnings!
592 (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\)\\(?::[0-9]+\\)?:[ \t\n]*\\(.+\\)"
593 2 4 nil 5))
594 ;; compilation-error-regexp-alist)
595 (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
596 "Patterns for matching error/warning lines. Each pattern has the form
597\(REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX).
598Use `flymake-reformat-err-line-patterns-from-compile-el' to add patterns
599from compile.el")
600
601(define-obsolete-variable-alias 'flymake-warning-re 'flymake-warning-predicate "24.4")
602(defvar flymake-warning-predicate "^[wW]arning"
603 "Predicate matching against error text to detect a warning.
604Takes a single argument, the error's text and should return non-nil
605if it's a warning.
606Instead of a function, it can also be a regular expression.")
607
608(defun flymake-parse-line (line)
609 "Parse LINE to see if it is an error or warning.
610Return its components if so, nil otherwise."
611 (let ((raw-file-name nil)
612 (line-no 0)
613 (err-type "e")
614 (err-text nil)
615 (patterns flymake-err-line-patterns)
616 (matched nil))
617 (while (and patterns (not matched))
618 (when (string-match (car (car patterns)) line)
619 (let* ((file-idx (nth 1 (car patterns)))
620 (line-idx (nth 2 (car patterns))))
621
622 (setq raw-file-name (if file-idx (match-string file-idx line) nil))
623 (setq line-no (if line-idx (string-to-number
624 (match-string line-idx line)) 0))
625 (setq err-text (if (> (length (car patterns)) 4)
626 (match-string (nth 4 (car patterns)) line)
627 (flymake-patch-err-text
628 (substring line (match-end 0)))))
629 (if (null err-text)
630 (setq err-text "<no error text>")
631 (when (cond ((stringp flymake-warning-predicate)
632 (string-match flymake-warning-predicate err-text))
633 ((functionp flymake-warning-predicate)
634 (funcall flymake-warning-predicate err-text)))
635 (setq err-type "w")))
636 (flymake-log
637 3 "parse line: file-idx=%s line-idx=%s file=%s line=%s text=%s"
638 file-idx line-idx raw-file-name line-no err-text)
639 (setq matched t)))
640 (setq patterns (cdr patterns)))
641 (if matched
642 (flymake-ler-make-ler raw-file-name line-no err-type err-text)
643 ())))
644
645(defun flymake-get-project-include-dirs-imp (basedir)
646 "Include dirs for the project current file belongs to." 640 "Include dirs for the project current file belongs to."
647 (if (flymake-get-project-include-dirs-from-cache basedir) 641 (if (flymake-proc--get-project-include-dirs-from-cache basedir)
648 (progn 642 (progn
649 (flymake-get-project-include-dirs-from-cache basedir)) 643 (flymake-proc--get-project-include-dirs-from-cache basedir))
650 ;;else 644 ;;else
651 (let* ((command-line (concat "make -C " 645 (let* ((command-line (concat "make -C "
652 (shell-quote-argument basedir) 646 (shell-quote-argument basedir)
@@ -665,148 +659,170 @@ Return its components if so, nil otherwise."
665 (when (not (string-match "^INCLUDE_DIRS=.*" (nth (1- inc-count) inc-lines))) 659 (when (not (string-match "^INCLUDE_DIRS=.*" (nth (1- inc-count) inc-lines)))
666 (push (replace-regexp-in-string "\"" "" (nth (1- inc-count) inc-lines)) inc-dirs)) 660 (push (replace-regexp-in-string "\"" "" (nth (1- inc-count) inc-lines)) inc-dirs))
667 (setq inc-count (1- inc-count))))) 661 (setq inc-count (1- inc-count)))))
668 (flymake-add-project-include-dirs-to-cache basedir inc-dirs) 662 (flymake-proc--add-project-include-dirs-to-cache basedir inc-dirs)
669 inc-dirs))) 663 inc-dirs)))
670 664
671(defvar flymake-get-project-include-dirs-function #'flymake-get-project-include-dirs-imp 665(defvar flymake-proc-get-project-include-dirs-function #'flymake-proc-get-project-include-dirs-imp
672 "Function used to get project include dirs, one parameter: basedir name.") 666 "Function used to get project include dirs, one parameter: basedir name.")
673 667
674(defun flymake-get-project-include-dirs (basedir) 668(defun flymake-proc--get-project-include-dirs (basedir)
675 (funcall flymake-get-project-include-dirs-function basedir)) 669 (funcall flymake-proc-get-project-include-dirs-function basedir))
676 670
677(defun flymake-get-system-include-dirs () 671(defun flymake-proc--get-system-include-dirs ()
678 "System include dirs - from the `INCLUDE' env setting." 672 "System include dirs - from the `INCLUDE' env setting."
679 (let* ((includes (getenv "INCLUDE"))) 673 (let* ((includes (getenv "INCLUDE")))
680 (if includes (split-string includes path-separator t) nil))) 674 (if includes (split-string includes path-separator t) nil)))
681 675
682(defvar flymake-project-include-dirs-cache (make-hash-table :test #'equal)) 676(defvar flymake-proc--project-include-dirs-cache (make-hash-table :test #'equal))
683 677
684(defun flymake-get-project-include-dirs-from-cache (base-dir) 678(defun flymake-proc--get-project-include-dirs-from-cache (base-dir)
685 (gethash base-dir flymake-project-include-dirs-cache)) 679 (gethash base-dir flymake-proc--project-include-dirs-cache))
686 680
687(defun flymake-add-project-include-dirs-to-cache (base-dir include-dirs) 681(defun flymake-proc--add-project-include-dirs-to-cache (base-dir include-dirs)
688 (puthash base-dir include-dirs flymake-project-include-dirs-cache)) 682 (puthash base-dir include-dirs flymake-proc--project-include-dirs-cache))
689 683
690(defun flymake-clear-project-include-dirs-cache () 684(defun flymake-proc--clear-project-include-dirs-cache ()
691 (clrhash flymake-project-include-dirs-cache)) 685 (clrhash flymake-proc--project-include-dirs-cache))
692 686
693(defun flymake-get-include-dirs (base-dir) 687(defun flymake-proc-get-include-dirs (base-dir)
694 "Get dirs to use when resolving local file names." 688 "Get dirs to use when resolving local file names."
695 (let* ((include-dirs (append '(".") (flymake-get-project-include-dirs base-dir) (flymake-get-system-include-dirs)))) 689 (let* ((include-dirs (append '(".") (flymake-proc--get-project-include-dirs base-dir) (flymake-proc--get-system-include-dirs))))
696 include-dirs)) 690 include-dirs))
697 691
698;; (defun flymake-restore-formatting () 692;; (defun flymake-proc--restore-formatting ()
699;; "Remove any formatting made by flymake." 693;; "Remove any formatting made by flymake."
700;; ) 694;; )
701 695
702;; (defun flymake-get-program-dir (buffer) 696;; (defun flymake-proc--get-program-dir (buffer)
703;; "Get dir to start program in." 697;; "Get dir to start program in."
704;; (unless (bufferp buffer) 698;; (unless (bufferp buffer)
705;; (error "Invalid buffer")) 699;; (error "Invalid buffer"))
706;; (with-current-buffer buffer 700;; (with-current-buffer buffer
707;; default-directory)) 701;; default-directory))
708 702
709(defun flymake-safe-delete-file (file-name) 703(defun flymake-proc--safe-delete-file (file-name)
710 (when (and file-name (file-exists-p file-name)) 704 (when (and file-name (file-exists-p file-name))
711 (delete-file file-name) 705 (delete-file file-name)
712 (flymake-log 1 "deleted file %s" file-name))) 706 (flymake-log 2 "deleted file %s" file-name)))
713 707
714(defun flymake-safe-delete-directory (dir-name) 708(defun flymake-proc--safe-delete-directory (dir-name)
715 (condition-case nil 709 (condition-case-unless-debug nil
716 (progn 710 (progn
717 (delete-directory dir-name) 711 (delete-directory dir-name)
718 (flymake-log 1 "deleted dir %s" dir-name)) 712 (flymake-log 2 "deleted dir %s" dir-name))
719 (error 713 (error
720 (flymake-log 1 "Failed to delete dir %s, error ignored" dir-name)))) 714 (flymake-log 1 "Failed to delete dir %s, error ignored" dir-name))))
721 715
722(defun flymake-proc-start-syntax-check ()
723 "Start syntax checking for current buffer."
724 (interactive)
725 (flymake-log 3 "flymake is running: %s" flymake-is-running)
726 (when (not flymake-is-running)
727 (when (or (not flymake-compilation-prevents-syntax-check)
728 (not (flymake-compilation-is-running))) ;+ (flymake-rep-ort-status buffer "COMP")
729 (flymake-clear-buildfile-cache)
730 (flymake-clear-project-include-dirs-cache)
731
732 (setq flymake-check-was-interrupted nil)
733
734 (let* ((source-file-name buffer-file-name)
735 (init-f (flymake-get-init-function source-file-name))
736 (cleanup-f (flymake-get-cleanup-function source-file-name))
737 (cmd-and-args (funcall init-f))
738 (cmd (nth 0 cmd-and-args))
739 (args (nth 1 cmd-and-args))
740 (dir (nth 2 cmd-and-args)))
741 (if (not cmd-and-args)
742 (progn
743 (flymake-log 0 "init function %s for %s failed, cleaning up" init-f source-file-name)
744 (funcall cleanup-f))
745 (progn
746 (setq flymake-last-change-time nil)
747 (flymake-start-syntax-check-process cmd args dir)))))))
748
749(defun flymake-start-syntax-check-process (cmd args dir)
750 "Start syntax check process."
751 (condition-case err
752 (let* ((process
753 (let ((default-directory (or dir default-directory)))
754 (when dir
755 (flymake-log 3 "starting process on dir %s" dir))
756 (apply 'start-file-process
757 "flymake-proc" (current-buffer) cmd args))))
758 (set-process-sentinel process 'flymake-process-sentinel)
759 (set-process-filter process 'flymake-process-filter)
760 (set-process-query-on-exit-flag process nil)
761 (push process flymake-processes)
762
763 (setq flymake-is-running t)
764 (setq flymake-last-change-time nil)
765 (setq flymake-check-start-time (float-time))
766
767 (flymake-report-status nil "*")
768 (flymake-log 2 "started process %d, command=%s, dir=%s"
769 (process-id process) (process-command process)
770 default-directory)
771 process)
772 (error
773 (let* ((err-str
774 (format-message
775 "Failed to launch syntax check process `%s' with args %s: %s"
776 cmd args (error-message-string err)))
777 (source-file-name buffer-file-name)
778 (cleanup-f (flymake-get-cleanup-function source-file-name)))
779 (flymake-log 0 err-str)
780 (funcall cleanup-f)
781 (flymake-report-fatal-status "PROCERR" err-str)))))
782
783(defun flymake-kill-process (proc)
784 "Kill process PROC."
785 (kill-process proc)
786 (let* ((buf (process-buffer proc)))
787 (when (buffer-live-p buf)
788 (with-current-buffer buf
789 (setq flymake-check-was-interrupted t))))
790 (flymake-log 1 "killed process %d" (process-id proc)))
791
792(defun flymake-stop-all-syntax-checks ()
793 "Kill all syntax check processes."
794 (interactive)
795 (while flymake-processes
796 (flymake-kill-process (pop flymake-processes))))
797 716
798(defun flymake-compilation-is-running () 717(defun flymake-proc-legacy-flymake (report-fn &rest args)
718 "Flymake backend based on the original Flymake implementation.
719This function is suitable for inclusion in
720`flymake-diagnostic-functions'. For backward compatibility, it
721can also be executed interactively independently of
722`flymake-mode'."
723 ;; Interactively, behave as if flymake had invoked us through its
724 ;; `flymake-diagnostic-functions' with a suitable ID so flymake can
725 ;; clean up consistently
726 (interactive (list
727 (lambda (diags &rest args)
728 (apply (flymake-make-report-fn 'flymake-proc-legacy-flymake)
729 diags
730 (append args '(:force t))))
731 :interactive t))
732 (let ((interactive (plist-get args :interactive))
733 (proc flymake-proc--current-process)
734 (flymake-proc--report-fn report-fn))
735 (when (processp proc)
736 (process-put proc 'flymake-proc--obsolete t)
737 (flymake-log 3 "marking %s obsolete" (process-id proc))
738 (when (process-live-p proc)
739 (when interactive
740 (user-error
741 "There's already a Flymake process running in this buffer")
742 (kill-process proc))))
743 (when
744 ;; This particular situation make us not want to error right
745 ;; away (and disable ourselves), in case the situation changes
746 ;; in the near future.
747 (and (or (not flymake-proc-compilation-prevents-syntax-check)
748 (not (flymake-proc--compilation-is-running))))
749 (let ((init-f
750 (and
751 buffer-file-name
752 ;; Since we write temp files in current dir, there's no point
753 ;; trying if the directory is read-only (bug#8954).
754 (file-writable-p (file-name-directory buffer-file-name))
755 (flymake-proc--get-init-function buffer-file-name))))
756 (unless init-f (error "Can find a suitable init function"))
757 (flymake-proc--clear-buildfile-cache)
758 (flymake-proc--clear-project-include-dirs-cache)
759
760 (let* ((cleanup-f (flymake-proc--get-cleanup-function buffer-file-name))
761 (cmd-and-args (funcall init-f))
762 (cmd (nth 0 cmd-and-args))
763 (args (nth 1 cmd-and-args))
764 (dir (nth 2 cmd-and-args))
765 (success nil))
766 (unwind-protect
767 (cond
768 ((not cmd-and-args)
769 (flymake-log 0 "init function %s for %s failed, cleaning up"
770 init-f buffer-file-name))
771 (t
772 (setq proc
773 (let ((default-directory (or dir default-directory)))
774 (when dir
775 (flymake-log 3 "starting process on dir %s" dir))
776 (make-process
777 :name "flymake-proc"
778 :buffer (current-buffer)
779 :command (cons cmd args)
780 :noquery t
781 :filter
782 (lambda (proc string)
783 (let ((flymake-proc--report-fn report-fn))
784 (flymake-proc--process-filter proc string)))
785 :sentinel
786 (lambda (proc event)
787 (let ((flymake-proc--report-fn report-fn))
788 (flymake-proc--process-sentinel proc event))))))
789 (process-put proc 'flymake-proc--output-buffer
790 (generate-new-buffer
791 (format " *flymake output for %s*" (current-buffer))))
792 (setq flymake-proc--current-process proc)
793 (flymake-log 2 "started process %d, command=%s, dir=%s"
794 (process-id proc) (process-command proc)
795 default-directory)
796 (setq success t)))
797 (unless success
798 (funcall cleanup-f))))))))
799
800(define-obsolete-function-alias 'flymake-start-syntax-check
801 'flymake-proc-legacy-flymake "26.1")
802
803(defun flymake-proc-stop-all-syntax-checks (&optional reason)
804 "Kill all syntax check processes."
805 (interactive (list "Interrupted by user"))
806 (dolist (buf (buffer-list))
807 (with-current-buffer buf
808 (let (p flymake-proc--current-process)
809 (when (process-live-p p)
810 (kill-process p)
811 (process-put p 'flymake-proc--interrupted reason)
812 (flymake-log 2 "killed process %d" (process-id p)))))))
813
814(defun flymake-proc--compilation-is-running ()
799 (and (boundp 'compilation-in-progress) 815 (and (boundp 'compilation-in-progress)
800 compilation-in-progress)) 816 compilation-in-progress))
801 817
802(defun flymake-compile () 818(defun flymake-proc-compile ()
803 "Kill all flymake syntax checks, start compilation." 819 "Kill all Flymake syntax checks, start compilation."
804 (interactive) 820 (interactive)
805 (flymake-stop-all-syntax-checks) 821 (flymake-proc-stop-all-syntax-checks "Stopping for proper compilation")
806 (call-interactively 'compile)) 822 (call-interactively 'compile))
807 823
808;;;; general init-cleanup and helper routines 824;;;; general init-cleanup and helper routines
809(defun flymake-create-temp-inplace (file-name prefix) 825(defun flymake-proc-create-temp-inplace (file-name prefix)
810 (unless (stringp file-name) 826 (unless (stringp file-name)
811 (error "Invalid file-name")) 827 (error "Invalid file-name"))
812 (or prefix 828 (or prefix
@@ -819,7 +835,7 @@ Return its components if so, nil otherwise."
819 (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) 835 (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name)
820 temp-name)) 836 temp-name))
821 837
822(defun flymake-create-temp-with-folder-structure (file-name _prefix) 838(defun flymake-proc-create-temp-with-folder-structure (file-name _prefix)
823 (unless (stringp file-name) 839 (unless (stringp file-name)
824 (error "Invalid file-name")) 840 (error "Invalid file-name"))
825 841
@@ -833,48 +849,47 @@ Return its components if so, nil otherwise."
833 (file-truename (expand-file-name (file-name-nondirectory file-name) 849 (file-truename (expand-file-name (file-name-nondirectory file-name)
834 temp-dir)))) 850 temp-dir))))
835 851
836(defun flymake-delete-temp-directory (dir-name) 852(defun flymake-proc--delete-temp-directory (dir-name)
837 "Attempt to delete temp dir created by `flymake-create-temp-with-folder-structure', do not fail on error." 853 "Attempt to delete temp dir created by `flymake-proc-create-temp-with-folder-structure', do not fail on error."
838 (let* ((temp-dir temporary-file-directory) 854 (let* ((temp-dir temporary-file-directory)
839 (suffix (substring dir-name (1+ (length temp-dir))))) 855 (suffix (substring dir-name (1+ (length temp-dir)))))
840 856
841 (while (> (length suffix) 0) 857 (while (> (length suffix) 0)
842 (setq suffix (directory-file-name suffix)) 858 (setq suffix (directory-file-name suffix))
843 ;;+(flymake-log 0 "suffix=%s" suffix) 859 ;;+(flymake-log 0 "suffix=%s" suffix)
844 (flymake-safe-delete-directory 860 (flymake-proc--safe-delete-directory
845 (file-truename (expand-file-name suffix temp-dir))) 861 (file-truename (expand-file-name suffix temp-dir)))
846 (setq suffix (file-name-directory suffix))))) 862 (setq suffix (file-name-directory suffix)))))
847 863
848(defvar-local flymake-temp-source-file-name nil) 864(defvar-local flymake-proc--temp-source-file-name nil)
849(defvar-local flymake-master-file-name nil) 865(defvar-local flymake-proc--master-file-name nil)
850(defvar-local flymake-temp-master-file-name nil) 866(defvar-local flymake-proc--temp-master-file-name nil)
851(defvar-local flymake-base-dir nil) 867(defvar-local flymake-proc--base-dir nil)
852 868
853(defun flymake-init-create-temp-buffer-copy (create-temp-f) 869(defun flymake-proc-init-create-temp-buffer-copy (create-temp-f)
854 "Make a temporary copy of the current buffer, save its name in buffer data and return the name." 870 "Make a temporary copy of the current buffer, save its name in buffer data and return the name."
855 (let* ((source-file-name buffer-file-name) 871 (let* ((source-file-name buffer-file-name)
856 (temp-source-file-name (funcall create-temp-f source-file-name "flymake"))) 872 (temp-source-file-name (funcall create-temp-f source-file-name "flymake")))
857 873
858 (flymake-save-buffer-in-file temp-source-file-name) 874 (flymake-proc--save-buffer-in-file temp-source-file-name)
859 (setq flymake-temp-source-file-name temp-source-file-name) 875 (setq flymake-proc--temp-source-file-name temp-source-file-name)
860 temp-source-file-name)) 876 temp-source-file-name))
861 877
862(defun flymake-simple-cleanup () 878(defun flymake-proc-simple-cleanup ()
863 "Do cleanup after `flymake-init-create-temp-buffer-copy'. 879 "Do cleanup after `flymake-proc-init-create-temp-buffer-copy'.
864Delete temp file." 880Delete temp file."
865 (flymake-safe-delete-file flymake-temp-source-file-name) 881 (flymake-proc--safe-delete-file flymake-proc--temp-source-file-name))
866 (setq flymake-last-change-time nil))
867 882
868(defun flymake-get-real-file-name (file-name-from-err-msg) 883(defun flymake-proc-get-real-file-name (file-name-from-err-msg)
869 "Translate file name from error message to \"real\" file name. 884 "Translate file name from error message to \"real\" file name.
870Return full-name. Names are real, not patched." 885Return full-name. Names are real, not patched."
871 (let* ((real-name nil) 886 (let* ((real-name nil)
872 (source-file-name buffer-file-name) 887 (source-file-name buffer-file-name)
873 (master-file-name flymake-master-file-name) 888 (master-file-name flymake-proc--master-file-name)
874 (temp-source-file-name flymake-temp-source-file-name) 889 (temp-source-file-name flymake-proc--temp-source-file-name)
875 (temp-master-file-name flymake-temp-master-file-name) 890 (temp-master-file-name flymake-proc--temp-master-file-name)
876 (base-dirs 891 (base-dirs
877 (list flymake-base-dir 892 (list flymake-proc--base-dir
878 (file-name-directory source-file-name) 893 (file-name-directory source-file-name)
879 (if master-file-name (file-name-directory master-file-name)))) 894 (if master-file-name (file-name-directory master-file-name))))
880 (files (list (list source-file-name source-file-name) 895 (files (list (list source-file-name source-file-name)
@@ -885,17 +900,17 @@ Return full-name. Names are real, not patched."
885 (when (equal 0 (length file-name-from-err-msg)) 900 (when (equal 0 (length file-name-from-err-msg))
886 (setq file-name-from-err-msg source-file-name)) 901 (setq file-name-from-err-msg source-file-name))
887 902
888 (setq real-name (flymake-get-full-patched-file-name file-name-from-err-msg base-dirs files)) 903 (setq real-name (flymake-proc--get-full-patched-file-name file-name-from-err-msg base-dirs files))
889 ;; if real-name is nil, than file name from err msg is none of the files we've patched 904 ;; if real-name is nil, than file name from err msg is none of the files we've patched
890 (if (not real-name) 905 (if (not real-name)
891 (setq real-name (flymake-get-full-nonpatched-file-name file-name-from-err-msg base-dirs))) 906 (setq real-name (flymake-proc--get-full-nonpatched-file-name file-name-from-err-msg base-dirs)))
892 (if (not real-name) 907 (if (not real-name)
893 (setq real-name file-name-from-err-msg)) 908 (setq real-name file-name-from-err-msg))
894 (setq real-name (flymake-fix-file-name real-name)) 909 (setq real-name (flymake-proc--fix-file-name real-name))
895 (flymake-log 3 "get-real-file-name: file-name=%s real-name=%s" file-name-from-err-msg real-name) 910 (flymake-log 3 "get-real-file-name: file-name=%s real-name=%s" file-name-from-err-msg real-name)
896 real-name)) 911 real-name))
897 912
898(defun flymake-get-full-patched-file-name (file-name-from-err-msg base-dirs files) 913(defun flymake-proc--get-full-patched-file-name (file-name-from-err-msg base-dirs files)
899 (let* ((base-dirs-count (length base-dirs)) 914 (let* ((base-dirs-count (length base-dirs))
900 (file-count (length files)) 915 (file-count (length files))
901 (real-name nil)) 916 (real-name nil))
@@ -907,7 +922,7 @@ Return full-name. Names are real, not patched."
907 (this-file (nth 0 (nth (1- file-count) files))) 922 (this-file (nth 0 (nth (1- file-count) files)))
908 (this-real-name (nth 1 (nth (1- file-count) files)))) 923 (this-real-name (nth 1 (nth (1- file-count) files))))
909 ;;+(flymake-log 0 "this-dir=%s this-file=%s this-real=%s msg-file=%s" this-dir this-file this-real-name file-name-from-err-msg) 924 ;;+(flymake-log 0 "this-dir=%s this-file=%s this-real=%s msg-file=%s" this-dir this-file this-real-name file-name-from-err-msg)
910 (when (and this-dir this-file (flymake-same-files 925 (when (and this-dir this-file (flymake-proc--same-files
911 (expand-file-name file-name-from-err-msg this-dir) 926 (expand-file-name file-name-from-err-msg this-dir)
912 this-file)) 927 this-file))
913 (setq real-name this-real-name))) 928 (setq real-name this-real-name)))
@@ -915,7 +930,7 @@ Return full-name. Names are real, not patched."
915 (setq base-dirs-count (1- base-dirs-count))) 930 (setq base-dirs-count (1- base-dirs-count)))
916 real-name)) 931 real-name))
917 932
918(defun flymake-get-full-nonpatched-file-name (file-name-from-err-msg base-dirs) 933(defun flymake-proc--get-full-nonpatched-file-name (file-name-from-err-msg base-dirs)
919 (let* ((real-name nil)) 934 (let* ((real-name nil))
920 (if (file-name-absolute-p file-name-from-err-msg) 935 (if (file-name-absolute-p file-name-from-err-msg)
921 (setq real-name file-name-from-err-msg) 936 (setq real-name file-name-from-err-msg)
@@ -928,41 +943,42 @@ Return full-name. Names are real, not patched."
928 (setq base-dirs-count (1- base-dirs-count)))))) 943 (setq base-dirs-count (1- base-dirs-count))))))
929 real-name)) 944 real-name))
930 945
931(defun flymake-init-find-buildfile-dir (source-file-name buildfile-name) 946(defun flymake-proc--init-find-buildfile-dir (source-file-name buildfile-name)
932 "Find buildfile, store its dir in buffer data and return its dir, if found." 947 "Find buildfile, store its dir in buffer data and return its dir, if found."
933 (let* ((buildfile-dir 948 (let* ((buildfile-dir
934 (flymake-find-buildfile buildfile-name 949 (flymake-proc--find-buildfile buildfile-name
935 (file-name-directory source-file-name)))) 950 (file-name-directory source-file-name))))
936 (if buildfile-dir 951 (if buildfile-dir
937 (setq flymake-base-dir buildfile-dir) 952 (setq flymake-proc--base-dir buildfile-dir)
938 (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name) 953 (flymake-proc--panic
939 (flymake-report-fatal-status
940 "NOMK" (format "No buildfile (%s) found for %s" 954 "NOMK" (format "No buildfile (%s) found for %s"
941 buildfile-name source-file-name))))) 955 buildfile-name source-file-name)))))
942 956
943(defun flymake-init-create-temp-source-and-master-buffer-copy (get-incl-dirs-f create-temp-f master-file-masks include-regexp) 957(defun flymake-proc--init-create-temp-source-and-master-buffer-copy (get-incl-dirs-f create-temp-f master-file-masks include-regexp)
944 "Find master file (or buffer), create its copy along with a copy of the source file." 958 "Find master file (or buffer), create its copy along with a copy of the source file."
945 (let* ((source-file-name buffer-file-name) 959 (let* ((source-file-name buffer-file-name)
946 (temp-source-file-name (flymake-init-create-temp-buffer-copy create-temp-f)) 960 (temp-source-file-name (flymake-proc-init-create-temp-buffer-copy create-temp-f))
947 (master-and-temp-master (flymake-create-master-file 961 (master-and-temp-master (flymake-proc--create-master-file
948 source-file-name temp-source-file-name 962 source-file-name temp-source-file-name
949 get-incl-dirs-f create-temp-f 963 get-incl-dirs-f create-temp-f
950 master-file-masks include-regexp))) 964 master-file-masks include-regexp)))
951 965
952 (if (not master-and-temp-master) 966 (if (not master-and-temp-master)
953 (progn 967 (progn
954 (flymake-log 1 "cannot find master file for %s" source-file-name) 968 (flymake-proc--panic
955 (flymake-report-status "!" "") ; NOMASTER 969 "NOMASTER"
970 (format-message "cannot find master file for %s"
971 source-file-name))
956 nil) 972 nil)
957 (setq flymake-master-file-name (nth 0 master-and-temp-master)) 973 (setq flymake-proc--master-file-name (nth 0 master-and-temp-master))
958 (setq flymake-temp-master-file-name (nth 1 master-and-temp-master))))) 974 (setq flymake-proc--temp-master-file-name (nth 1 master-and-temp-master)))))
959 975
960(defun flymake-master-cleanup () 976(defun flymake-proc-master-cleanup ()
961 (flymake-simple-cleanup) 977 (flymake-proc-simple-cleanup)
962 (flymake-safe-delete-file flymake-temp-master-file-name)) 978 (flymake-proc--safe-delete-file flymake-proc--temp-master-file-name))
963 979
964;;;; make-specific init-cleanup routines 980;;;; make-specific init-cleanup routines
965(defun flymake-get-syntax-check-program-args (source-file-name base-dir use-relative-base-dir use-relative-source get-cmd-line-f) 981(defun flymake-proc--get-syntax-check-program-args (source-file-name base-dir use-relative-base-dir use-relative-source get-cmd-line-f)
966 "Create a command line for syntax check using GET-CMD-LINE-F." 982 "Create a command line for syntax check using GET-CMD-LINE-F."
967 (funcall get-cmd-line-f 983 (funcall get-cmd-line-f
968 (if use-relative-source 984 (if use-relative-source
@@ -973,7 +989,7 @@ Return full-name. Names are real, not patched."
973 (file-name-directory source-file-name)) 989 (file-name-directory source-file-name))
974 base-dir))) 990 base-dir)))
975 991
976(defun flymake-get-make-cmdline (source base-dir) 992(defun flymake-proc-get-make-cmdline (source base-dir)
977 (list "make" 993 (list "make"
978 (list "-s" 994 (list "-s"
979 "-C" 995 "-C"
@@ -982,119 +998,196 @@ Return full-name. Names are real, not patched."
982 "SYNTAX_CHECK_MODE=1" 998 "SYNTAX_CHECK_MODE=1"
983 "check-syntax"))) 999 "check-syntax")))
984 1000
985(defun flymake-get-ant-cmdline (source base-dir) 1001(defun flymake-proc-get-ant-cmdline (source base-dir)
986 (list "ant" 1002 (list "ant"
987 (list "-buildfile" 1003 (list "-buildfile"
988 (concat base-dir "/" "build.xml") 1004 (concat base-dir "/" "build.xml")
989 (concat "-DCHK_SOURCES=" source) 1005 (concat "-DCHK_SOURCES=" source)
990 "check-syntax"))) 1006 "check-syntax")))
991 1007
992(defun flymake-simple-make-init-impl (create-temp-f use-relative-base-dir use-relative-source build-file-name get-cmdline-f) 1008(defun flymake-proc-simple-make-init-impl (create-temp-f use-relative-base-dir use-relative-source build-file-name get-cmdline-f)
993 "Create syntax check command line for a directly checked source file. 1009 "Create syntax check command line for a directly checked source file.
994Use CREATE-TEMP-F for creating temp copy." 1010Use CREATE-TEMP-F for creating temp copy."
995 (let* ((args nil) 1011 (let* ((args nil)
996 (source-file-name buffer-file-name) 1012 (source-file-name buffer-file-name)
997 (buildfile-dir (flymake-init-find-buildfile-dir source-file-name build-file-name))) 1013 (buildfile-dir (flymake-proc--init-find-buildfile-dir source-file-name build-file-name)))
998 (if buildfile-dir 1014 (if buildfile-dir
999 (let* ((temp-source-file-name (flymake-init-create-temp-buffer-copy create-temp-f))) 1015 (let* ((temp-source-file-name (flymake-proc-init-create-temp-buffer-copy create-temp-f)))
1000 (setq args (flymake-get-syntax-check-program-args temp-source-file-name buildfile-dir 1016 (setq args (flymake-proc--get-syntax-check-program-args temp-source-file-name buildfile-dir
1001 use-relative-base-dir use-relative-source 1017 use-relative-base-dir use-relative-source
1002 get-cmdline-f)))) 1018 get-cmdline-f))))
1003 args)) 1019 args))
1004 1020
1005(defun flymake-simple-make-init () 1021(defun flymake-proc-simple-make-init ()
1006 (flymake-simple-make-init-impl 'flymake-create-temp-inplace t t "Makefile" 'flymake-get-make-cmdline)) 1022 (flymake-proc-simple-make-init-impl 'flymake-proc-create-temp-inplace t t "Makefile" 'flymake-proc-get-make-cmdline))
1007 1023
1008(defun flymake-master-make-init (get-incl-dirs-f master-file-masks include-regexp) 1024(defun flymake-proc-master-make-init (get-incl-dirs-f master-file-masks include-regexp)
1009 "Create make command line for a source file checked via master file compilation." 1025 "Create make command line for a source file checked via master file compilation."
1010 (let* ((make-args nil) 1026 (let* ((make-args nil)
1011 (temp-master-file-name (flymake-init-create-temp-source-and-master-buffer-copy 1027 (temp-master-file-name (flymake-proc--init-create-temp-source-and-master-buffer-copy
1012 get-incl-dirs-f 'flymake-create-temp-inplace 1028 get-incl-dirs-f 'flymake-proc-create-temp-inplace
1013 master-file-masks include-regexp))) 1029 master-file-masks include-regexp)))
1014 (when temp-master-file-name 1030 (when temp-master-file-name
1015 (let* ((buildfile-dir (flymake-init-find-buildfile-dir temp-master-file-name "Makefile"))) 1031 (let* ((buildfile-dir (flymake-proc--init-find-buildfile-dir temp-master-file-name "Makefile")))
1016 (if buildfile-dir 1032 (if buildfile-dir
1017 (setq make-args (flymake-get-syntax-check-program-args 1033 (setq make-args (flymake-proc--get-syntax-check-program-args
1018 temp-master-file-name buildfile-dir nil nil 'flymake-get-make-cmdline))))) 1034 temp-master-file-name buildfile-dir nil nil 'flymake-proc-get-make-cmdline)))))
1019 make-args)) 1035 make-args))
1020 1036
1021(defun flymake-find-make-buildfile (source-dir) 1037(defun flymake-proc--find-make-buildfile (source-dir)
1022 (flymake-find-buildfile "Makefile" source-dir)) 1038 (flymake-proc--find-buildfile "Makefile" source-dir))
1023 1039
1024;;;; .h/make specific 1040;;;; .h/make specific
1025(defun flymake-master-make-header-init () 1041(defun flymake-proc-master-make-header-init ()
1026 (flymake-master-make-init 1042 (flymake-proc-master-make-init
1027 'flymake-get-include-dirs 1043 'flymake-proc-get-include-dirs
1028 '("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'") 1044 '("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'")
1029 "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\"")) 1045 "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\""))
1030 1046
1047(defun flymake-proc-real-file-name-considering-includes (scraped)
1048 (flymake-proc-get-real-file-name
1049 (let ((case-fold-search t))
1050 (replace-regexp-in-string "^in file included from[ \t*]"
1051 ""
1052 scraped))))
1053
1031;;;; .java/make specific 1054;;;; .java/make specific
1032(defun flymake-simple-make-java-init () 1055(defun flymake-proc-simple-make-java-init ()
1033 (flymake-simple-make-init-impl 'flymake-create-temp-with-folder-structure nil nil "Makefile" 'flymake-get-make-cmdline)) 1056 (flymake-proc-simple-make-init-impl 'flymake-proc-create-temp-with-folder-structure nil nil "Makefile" 'flymake-proc-get-make-cmdline))
1034 1057
1035(defun flymake-simple-ant-java-init () 1058(defun flymake-proc-simple-ant-java-init ()
1036 (flymake-simple-make-init-impl 'flymake-create-temp-with-folder-structure nil nil "build.xml" 'flymake-get-ant-cmdline)) 1059 (flymake-proc-simple-make-init-impl 'flymake-proc-create-temp-with-folder-structure nil nil "build.xml" 'flymake-proc-get-ant-cmdline))
1037 1060
1038(defun flymake-simple-java-cleanup () 1061(defun flymake-proc-simple-java-cleanup ()
1039 "Cleanup after `flymake-simple-make-java-init' -- delete temp file and dirs." 1062 "Cleanup after `flymake-proc-simple-make-java-init' -- delete temp file and dirs."
1040 (flymake-safe-delete-file flymake-temp-source-file-name) 1063 (flymake-proc--safe-delete-file flymake-proc--temp-source-file-name)
1041 (when flymake-temp-source-file-name 1064 (when flymake-proc--temp-source-file-name
1042 (flymake-delete-temp-directory 1065 (flymake-proc--delete-temp-directory
1043 (file-name-directory flymake-temp-source-file-name)))) 1066 (file-name-directory flymake-proc--temp-source-file-name))))
1044 1067
1045;;;; perl-specific init-cleanup routines 1068;;;; perl-specific init-cleanup routines
1046(defun flymake-perl-init () 1069(defun flymake-proc-perl-init ()
1047 (let* ((temp-file (flymake-init-create-temp-buffer-copy 1070 (let* ((temp-file (flymake-proc-init-create-temp-buffer-copy
1048 'flymake-create-temp-inplace)) 1071 'flymake-proc-create-temp-inplace))
1049 (local-file (file-relative-name 1072 (local-file (file-relative-name
1050 temp-file 1073 temp-file
1051 (file-name-directory buffer-file-name)))) 1074 (file-name-directory buffer-file-name))))
1052 (list "perl" (list "-wc " local-file)))) 1075 (list "perl" (list "-wc " local-file))))
1053 1076
1054;;;; php-specific init-cleanup routines 1077;;;; php-specific init-cleanup routines
1055(defun flymake-php-init () 1078(defun flymake-proc-php-init ()
1056 (let* ((temp-file (flymake-init-create-temp-buffer-copy 1079 (let* ((temp-file (flymake-proc-init-create-temp-buffer-copy
1057 'flymake-create-temp-inplace)) 1080 'flymake-proc-create-temp-inplace))
1058 (local-file (file-relative-name 1081 (local-file (file-relative-name
1059 temp-file 1082 temp-file
1060 (file-name-directory buffer-file-name)))) 1083 (file-name-directory buffer-file-name))))
1061 (list "php" (list "-f" local-file "-l")))) 1084 (list "php" (list "-f" local-file "-l"))))
1062 1085
1063;;;; tex-specific init-cleanup routines 1086;;;; tex-specific init-cleanup routines
1064(defun flymake-get-tex-args (file-name) 1087(defun flymake-proc--get-tex-args (file-name)
1065 ;;(list "latex" (list "-c-style-errors" file-name)) 1088 ;;(list "latex" (list "-c-style-errors" file-name))
1066 (list "texify" (list "--pdf" "--tex-option=-c-style-errors" file-name))) 1089 (list "texify" (list "--pdf" "--tex-option=-c-style-errors" file-name)))
1067 1090
1068(defun flymake-simple-tex-init () 1091(defun flymake-proc-simple-tex-init ()
1069 (flymake-get-tex-args (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace))) 1092 (flymake-proc--get-tex-args (flymake-proc-init-create-temp-buffer-copy 'flymake-proc-create-temp-inplace)))
1070 1093
1071;; Perhaps there should be a buffer-local variable flymake-master-file 1094;; Perhaps there should be a buffer-local variable flymake-master-file
1072;; that people can set to override this stuff. Could inherit from 1095;; that people can set to override this stuff. Could inherit from
1073;; the similar AUCTeX variable. 1096;; the similar AUCTeX variable.
1074(defun flymake-master-tex-init () 1097(defun flymake-proc-master-tex-init ()
1075 (let* ((temp-master-file-name (flymake-init-create-temp-source-and-master-buffer-copy 1098 (let* ((temp-master-file-name (flymake-proc--init-create-temp-source-and-master-buffer-copy
1076 'flymake-get-include-dirs-dot 'flymake-create-temp-inplace 1099 'flymake-proc-get-include-dirs-dot 'flymake-proc-create-temp-inplace
1077 '("\\.tex\\'") 1100 '("\\.tex\\'")
1078 "[ \t]*\\in\\(?:put\\|clude\\)[ \t]*{\\(.*%s\\)}"))) 1101 "[ \t]*\\in\\(?:put\\|clude\\)[ \t]*{\\(.*%s\\)}")))
1079 (when temp-master-file-name 1102 (when temp-master-file-name
1080 (flymake-get-tex-args temp-master-file-name)))) 1103 (flymake-proc--get-tex-args temp-master-file-name))))
1081 1104
1082(defun flymake-get-include-dirs-dot (_base-dir) 1105(defun flymake-proc--get-include-dirs-dot (_base-dir)
1083 '(".")) 1106 '("."))
1084 1107
1085;;;; xml-specific init-cleanup routines 1108;;;; xml-specific init-cleanup routines
1086(defun flymake-xml-init () 1109(defun flymake-proc-xml-init ()
1087 (list flymake-xml-program 1110 (list flymake-proc-xml-program
1088 (list "val" (flymake-init-create-temp-buffer-copy 1111 (list "val" (flymake-proc-init-create-temp-buffer-copy
1089 'flymake-create-temp-inplace)))) 1112 'flymake-proc-create-temp-inplace))))
1090 1113
1091 1114
1092;;;; Hook onto flymake-ui 1115;;;; Hook onto flymake-ui
1116(add-hook 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake)
1117
1118
1119;;;;
1120
1121(progn
1122 (define-obsolete-variable-alias 'flymake-compilation-prevents-syntax-check
1123 'flymake-proc-compilation-prevents-syntax-check "26.1")
1124 (define-obsolete-variable-alias 'flymake-xml-program
1125 'flymake-proc-xml-program "26.1")
1126 (define-obsolete-variable-alias 'flymake-master-file-dirs
1127 'flymake-proc-master-file-dirs "26.1")
1128 (define-obsolete-variable-alias 'flymake-master-file-count-limit
1129 'flymake-proc-master-file-count-limit "26.1"
1130 "Max number of master files to check.")
1131 (define-obsolete-variable-alias 'flymake-allowed-file-name-masks
1132 'flymake-proc-allowed-file-name-masks "26.1")
1133 (define-obsolete-variable-alias 'flymake-check-file-limit
1134 'flymake-proc-check-file-limit "26.1")
1135 (define-obsolete-function-alias 'flymake-reformat-err-line-patterns-from-compile-el
1136 'flymake-proc-reformat-err-line-patterns-from-compile-el "26.1")
1137 (define-obsolete-variable-alias 'flymake-err-line-patterns
1138 'flymake-proc-err-line-patterns "26.1")
1139 (define-obsolete-function-alias 'flymake-parse-line
1140 'flymake-proc-parse-line "26.1")
1141 (define-obsolete-function-alias 'flymake-get-include-dirs
1142 'flymake-proc-get-include-dirs "26.1")
1143 (define-obsolete-function-alias 'flymake-stop-all-syntax-checks
1144 'flymake-proc-stop-all-syntax-checks "26.1")
1145 (define-obsolete-function-alias 'flymake-compile
1146 'flymake-proc-compile "26.1")
1147 (define-obsolete-function-alias 'flymake-create-temp-inplace
1148 'flymake-proc-create-temp-inplace "26.1")
1149 (define-obsolete-function-alias 'flymake-create-temp-with-folder-structure
1150 'flymake-proc-create-temp-with-folder-structure "26.1")
1151 (define-obsolete-function-alias 'flymake-init-create-temp-buffer-copy
1152 'flymake-proc-init-create-temp-buffer-copy "26.1")
1153 (define-obsolete-function-alias 'flymake-simple-cleanup
1154 'flymake-proc-simple-cleanup "26.1")
1155 (define-obsolete-function-alias 'flymake-get-real-file-name
1156 'flymake-proc-get-real-file-name "26.1")
1157 (define-obsolete-function-alias 'flymake-master-cleanup
1158 'flymake-proc-master-cleanup "26.1")
1159 (define-obsolete-function-alias 'flymake-get-make-cmdline
1160 'flymake-proc-get-make-cmdline "26.1")
1161 (define-obsolete-function-alias 'flymake-get-ant-cmdline
1162 'flymake-proc-get-ant-cmdline "26.1")
1163 (define-obsolete-function-alias 'flymake-simple-make-init-impl
1164 'flymake-proc-simple-make-init-impl "26.1")
1165 (define-obsolete-function-alias 'flymake-simple-make-init
1166 'flymake-proc-simple-make-init "26.1")
1167 (define-obsolete-function-alias 'flymake-master-make-init
1168 'flymake-proc-master-make-init "26.1")
1169 (define-obsolete-function-alias 'flymake-find-make-buildfile
1170 'flymake-proc--find-make-buildfile "26.1")
1171 (define-obsolete-function-alias 'flymake-master-make-header-init
1172 'flymake-proc-master-make-header-init "26.1")
1173 (define-obsolete-function-alias 'flymake-simple-make-java-init
1174 'flymake-proc-simple-make-java-init "26.1")
1175 (define-obsolete-function-alias 'flymake-simple-ant-java-init
1176 'flymake-proc-simple-ant-java-init "26.1")
1177 (define-obsolete-function-alias 'flymake-simple-java-cleanup
1178 'flymake-proc-simple-java-cleanup "26.1")
1179 (define-obsolete-function-alias 'flymake-perl-init
1180 'flymake-proc-perl-init "26.1")
1181 (define-obsolete-function-alias 'flymake-php-init
1182 'flymake-proc-php-init "26.1")
1183 (define-obsolete-function-alias 'flymake-simple-tex-init
1184 'flymake-proc-simple-tex-init "26.1")
1185 (define-obsolete-function-alias 'flymake-master-tex-init
1186 'flymake-proc-master-tex-init "26.1")
1187 (define-obsolete-function-alias 'flymake-xml-init
1188 'flymake-proc-xml-init "26.1"))
1189
1093 1190
1094(add-to-list 'flymake-backends
1095 `(flymake-proc-can-syntax-check-buffer
1096 .
1097 flymake-proc-start-syntax-check))
1098 1191
1099(provide 'flymake-proc) 1192(provide 'flymake-proc)
1100;;; flymake-proc.el ends here 1193;;; flymake-proc.el ends here
diff --git a/lisp/progmodes/flymake-ui.el b/lisp/progmodes/flymake-ui.el
deleted file mode 100644
index bf5218c41d2..00000000000
--- a/lisp/progmodes/flymake-ui.el
+++ /dev/null
@@ -1,634 +0,0 @@
1;;; flymake-ui.el --- A universal on-the-fly syntax checker -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
4
5;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
6;; Maintainer: Leo Liu <sdl.web@gmail.com>
7;; Version: 0.3
8;; Keywords: c languages tools
9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software: you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation, either version 3 of the License, or
15;; (at your option) any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
24
25;;; Commentary:
26;;
27;; Flymake is a minor Emacs mode performing on-the-fly syntax checks.xo
28;;
29;; This file contains the UI for displaying and interacting with the
30;; results of such checks, as well as entry points for backends to
31;; hook on to. Backends are sources of diagnostic info.
32;;
33;;; Code:
34
35(eval-when-compile (require 'cl-lib))
36
37(defgroup flymake nil
38 "Universal on-the-fly syntax checker."
39 :version "23.1"
40 :link '(custom-manual "(flymake) Top")
41 :group 'tools)
42
43(defcustom flymake-error-bitmap '(exclamation-mark error)
44 "Bitmap (a symbol) used in the fringe for indicating errors.
45The value may also be a list of two elements where the second
46element specifies the face for the bitmap. For possible bitmap
47symbols, see `fringe-bitmaps'. See also `flymake-warning-bitmap'.
48
49The option `flymake-fringe-indicator-position' controls how and where
50this is used."
51 :group 'flymake
52 :version "24.3"
53 :type '(choice (symbol :tag "Bitmap")
54 (list :tag "Bitmap and face"
55 (symbol :tag "Bitmap")
56 (face :tag "Face"))))
57
58(defcustom flymake-warning-bitmap 'question-mark
59 "Bitmap (a symbol) used in the fringe for indicating warnings.
60The value may also be a list of two elements where the second
61element specifies the face for the bitmap. For possible bitmap
62symbols, see `fringe-bitmaps'. See also `flymake-error-bitmap'.
63
64The option `flymake-fringe-indicator-position' controls how and where
65this is used."
66 :group 'flymake
67 :version "24.3"
68 :type '(choice (symbol :tag "Bitmap")
69 (list :tag "Bitmap and face"
70 (symbol :tag "Bitmap")
71 (face :tag "Face"))))
72
73(defcustom flymake-fringe-indicator-position 'left-fringe
74 "The position to put flymake fringe indicator.
75The value can be nil (do not use indicators), `left-fringe' or `right-fringe'.
76See `flymake-error-bitmap' and `flymake-warning-bitmap'."
77 :group 'flymake
78 :version "24.3"
79 :type '(choice (const left-fringe)
80 (const right-fringe)
81 (const :tag "No fringe indicators" nil)))
82
83(defcustom flymake-start-syntax-check-on-newline t
84 "Start syntax check if newline char was added/removed from the buffer."
85 :group 'flymake
86 :type 'boolean)
87
88(defcustom flymake-no-changes-timeout 0.5
89 "Time to wait after last change before starting compilation."
90 :group 'flymake
91 :type 'number)
92
93(defcustom flymake-gui-warnings-enabled t
94 "Enables/disables GUI warnings."
95 :group 'flymake
96 :type 'boolean)
97(make-obsolete-variable 'flymake-gui-warnings-enabled
98 "it no longer has any effect." "26.1")
99
100(defcustom flymake-start-syntax-check-on-find-file t
101 "Start syntax check on find file."
102 :group 'flymake
103 :type 'boolean)
104
105(defcustom flymake-log-level -1
106 "Logging level, only messages with level lower or equal will be logged.
107-1 = NONE, 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG"
108 :group 'flymake
109 :type 'integer)
110
111(defcustom flymake-backends '()
112 "Ordered list of backends providing syntax check information for a buffer.
113Value is an alist of conses (PREDICATE . CHECKER). Both PREDICATE
114and CHECKER are functions called with a single argument, the
115buffer in which `flymake-mode' was enabled. PREDICATE is expected
116to (quickly) return t or nil if the buffer can be syntax checked
117by CHECKER, which in can performs more morose operations,
118possibly asynchronously."
119 :group 'flymake
120 :type 'alist)
121
122(defvar-local flymake-timer nil
123 "Timer for starting syntax check.")
124
125(defvar-local flymake-last-change-time nil
126 "Time of last buffer change.")
127
128(defvar-local flymake-check-start-time nil
129 "Time at which syntax check was started.")
130
131(defvar-local flymake-check-was-interrupted nil
132 "Non-nil if syntax check was killed by `flymake-compile'.")
133
134(defvar-local flymake-err-info nil
135 "Sorted list of line numbers and lists of err info in the form (file, err-text).")
136
137(defvar-local flymake-new-err-info nil
138 "Same as `flymake-err-info', effective when a syntax check is in progress.")
139
140(defun flymake-log (level text &rest args)
141 "Log a message at level LEVEL.
142If LEVEL is higher than `flymake-log-level', the message is
143ignored. Otherwise, it is printed using `message'.
144TEXT is a format control string, and the remaining arguments ARGS
145are the string substitutions (see the function `format')."
146 (if (<= level flymake-log-level)
147 (let* ((msg (apply #'format-message text args)))
148 (message "%s" msg))))
149
150(defun flymake-ins-after (list pos val)
151 "Insert VAL into LIST after position POS.
152POS counts from zero."
153 (let ((tmp (copy-sequence list)))
154 (setcdr (nthcdr pos tmp) (cons val (nthcdr (1+ pos) tmp)))
155 tmp))
156
157(defun flymake-set-at (list pos val)
158 "Set VAL at position POS in LIST.
159POS counts from zero."
160 (let ((tmp (copy-sequence list)))
161 (setcar (nthcdr pos tmp) val)
162 tmp))
163
164(defun flymake-er-make-er (line-no line-err-info-list)
165 (list line-no line-err-info-list))
166
167(defun flymake-er-get-line (err-info)
168 (nth 0 err-info))
169
170(defun flymake-er-get-line-err-info-list (err-info)
171 (nth 1 err-info))
172
173(cl-defstruct (flymake-ler
174 (:constructor nil)
175 (:constructor flymake-ler-make-ler (file line type text &optional full-file)))
176 file line type text full-file)
177
178(defun flymake-ler-set-file (line-err-info file)
179 (flymake-ler-make-ler file
180 (flymake-ler-line line-err-info)
181 (flymake-ler-type line-err-info)
182 (flymake-ler-text line-err-info)
183 (flymake-ler-full-file line-err-info)))
184
185(defun flymake-ler-set-full-file (line-err-info full-file)
186 (flymake-ler-make-ler (flymake-ler-file line-err-info)
187 (flymake-ler-line line-err-info)
188 (flymake-ler-type line-err-info)
189 (flymake-ler-text line-err-info)
190 full-file))
191
192(defun flymake-ler-set-line (line-err-info line)
193 (flymake-ler-make-ler (flymake-ler-file line-err-info)
194 line
195 (flymake-ler-type line-err-info)
196 (flymake-ler-text line-err-info)
197 (flymake-ler-full-file line-err-info)))
198
199(defun flymake-get-line-err-count (line-err-info-list type)
200 "Return number of errors of specified TYPE.
201Value of TYPE is either \"e\" or \"w\"."
202 (let* ((idx 0)
203 (count (length line-err-info-list))
204 (err-count 0))
205
206 (while (< idx count)
207 (when (equal type (flymake-ler-type (nth idx line-err-info-list)))
208 (setq err-count (1+ err-count)))
209 (setq idx (1+ idx)))
210 err-count))
211
212(defun flymake-get-err-count (err-info-list type)
213 "Return number of errors of specified TYPE for ERR-INFO-LIST."
214 (let* ((idx 0)
215 (count (length err-info-list))
216 (err-count 0))
217 (while (< idx count)
218 (setq err-count (+ err-count (flymake-get-line-err-count (nth 1 (nth idx err-info-list)) type)))
219 (setq idx (1+ idx)))
220 err-count))
221
222(defun flymake-highlight-err-lines (err-info-list)
223 "Highlight error lines in BUFFER using info from ERR-INFO-LIST."
224 (save-excursion
225 (dolist (err err-info-list)
226 (flymake-highlight-line (car err) (nth 1 err)))))
227
228(defun flymake-overlay-p (ov)
229 "Determine whether overlay OV was created by flymake."
230 (and (overlayp ov) (overlay-get ov 'flymake-overlay)))
231
232(defun flymake-make-overlay (beg end tooltip-text face bitmap)
233 "Allocate a flymake overlay in range BEG and END."
234 (when (not (flymake-region-has-flymake-overlays beg end))
235 (let ((ov (make-overlay beg end nil t))
236 (fringe (and flymake-fringe-indicator-position
237 (propertize "!" 'display
238 (cons flymake-fringe-indicator-position
239 (if (listp bitmap)
240 bitmap
241 (list bitmap)))))))
242 (overlay-put ov 'face face)
243 (overlay-put ov 'help-echo tooltip-text)
244 (overlay-put ov 'flymake-overlay t)
245 (overlay-put ov 'priority 100)
246 (overlay-put ov 'evaporate t)
247 (overlay-put ov 'before-string fringe)
248 ;;+(flymake-log 3 "created overlay %s" ov)
249 ov)
250 (flymake-log 3 "created an overlay at (%d-%d)" beg end)))
251
252(defun flymake-delete-own-overlays ()
253 "Delete all flymake overlays in BUFFER."
254 (dolist (ol (overlays-in (point-min) (point-max)))
255 (when (flymake-overlay-p ol)
256 (delete-overlay ol)
257 ;;+(flymake-log 3 "deleted overlay %s" ol)
258 )))
259
260(defun flymake-region-has-flymake-overlays (beg end)
261 "Check if region specified by BEG and END has overlay.
262Return t if it has at least one flymake overlay, nil if no overlay."
263 (let ((ov (overlays-in beg end))
264 (has-flymake-overlays nil))
265 (while (consp ov)
266 (when (flymake-overlay-p (car ov))
267 (setq has-flymake-overlays t))
268 (setq ov (cdr ov)))
269 has-flymake-overlays))
270
271(defface flymake-errline
272 '((((supports :underline (:style wave)))
273 :underline (:style wave :color "Red1"))
274 (t
275 :inherit error))
276 "Face used for marking error lines."
277 :version "24.4"
278 :group 'flymake)
279
280(defface flymake-warnline
281 '((((supports :underline (:style wave)))
282 :underline (:style wave :color "DarkOrange"))
283 (t
284 :inherit warning))
285 "Face used for marking warning lines."
286 :version "24.4"
287 :group 'flymake)
288
289(defun flymake-highlight-line (line-no line-err-info-list)
290 "Highlight line LINE-NO in current buffer.
291Perhaps use text from LINE-ERR-INFO-LIST to enhance highlighting."
292 (goto-char (point-min))
293 (forward-line (1- line-no))
294 (pcase-let* ((beg (progn (back-to-indentation) (point)))
295 (end (progn
296 (end-of-line)
297 (skip-chars-backward " \t\f\t\n" beg)
298 (if (eq (point) beg)
299 (line-beginning-position 2)
300 (point))))
301 (tooltip-text (mapconcat #'flymake-ler-text line-err-info-list "\n"))
302 (`(,face ,bitmap)
303 (if (> (flymake-get-line-err-count line-err-info-list "e") 0)
304 (list 'flymake-errline flymake-error-bitmap)
305 (list 'flymake-warnline flymake-warning-bitmap))))
306 (flymake-make-overlay beg end tooltip-text face bitmap)))
307
308(defun flymake-find-err-info (err-info-list line-no)
309 "Find (line-err-info-list pos) for specified LINE-NO."
310 (if err-info-list
311 (let* ((line-err-info-list nil)
312 (pos 0)
313 (count (length err-info-list)))
314
315 (while (and (< pos count) (< (car (nth pos err-info-list)) line-no))
316 (setq pos (1+ pos)))
317 (when (and (< pos count) (equal (car (nth pos err-info-list)) line-no))
318 (setq line-err-info-list (flymake-er-get-line-err-info-list (nth pos err-info-list))))
319 (list line-err-info-list pos))
320 '(nil 0)))
321
322(defun flymake-line-err-info-is-less-or-equal (line-one line-two)
323 (or (string< (flymake-ler-type line-one) (flymake-ler-type line-two))
324 (and (string= (flymake-ler-type line-one) (flymake-ler-type line-two))
325 (not (flymake-ler-file line-one)) (flymake-ler-file line-two))
326 (and (string= (flymake-ler-type line-one) (flymake-ler-type line-two))
327 (or (and (flymake-ler-file line-one) (flymake-ler-file line-two))
328 (and (not (flymake-ler-file line-one)) (not (flymake-ler-file line-two)))))))
329
330(defun flymake-add-line-err-info (line-err-info-list line-err-info)
331 "Update LINE-ERR-INFO-LIST with the error LINE-ERR-INFO.
332For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'.
333The new element is inserted in the proper position, according to
334the predicate `flymake-line-err-info-is-less-or-equal'.
335The updated value of LINE-ERR-INFO-LIST is returned."
336 (if (not line-err-info-list)
337 (list line-err-info)
338 (let* ((count (length line-err-info-list))
339 (idx 0))
340 (while (and (< idx count) (flymake-line-err-info-is-less-or-equal (nth idx line-err-info-list) line-err-info))
341 (setq idx (1+ idx)))
342 (cond ((equal 0 idx) (setq line-err-info-list (cons line-err-info line-err-info-list)))
343 (t (setq line-err-info-list (flymake-ins-after line-err-info-list (1- idx) line-err-info))))
344 line-err-info-list)))
345
346(defun flymake-add-err-info (err-info-list line-err-info)
347 "Update ERR-INFO-LIST with the error LINE-ERR-INFO, preserving sort order.
348Returns the updated value of ERR-INFO-LIST.
349For the format of ERR-INFO-LIST, see `flymake-err-info'.
350For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'."
351 (let* ((line-no (if (flymake-ler-file line-err-info) 1 (flymake-ler-line line-err-info)))
352 (info-and-pos (flymake-find-err-info err-info-list line-no))
353 (exists (car info-and-pos))
354 (pos (nth 1 info-and-pos))
355 (line-err-info-list nil)
356 (err-info nil))
357
358 (if exists
359 (setq line-err-info-list (flymake-er-get-line-err-info-list (car (nthcdr pos err-info-list)))))
360 (setq line-err-info-list (flymake-add-line-err-info line-err-info-list line-err-info))
361
362 (setq err-info (flymake-er-make-er line-no line-err-info-list))
363 (cond (exists (setq err-info-list (flymake-set-at err-info-list pos err-info)))
364 ((equal 0 pos) (setq err-info-list (cons err-info err-info-list)))
365 (t (setq err-info-list (flymake-ins-after err-info-list (1- pos) err-info))))
366 err-info-list))
367
368(defvar-local flymake-is-running nil
369 "If t, flymake syntax check process is running for the current buffer.")
370
371(defun flymake-on-timer-event (buffer)
372 "Start a syntax check for buffer BUFFER if necessary."
373 (when (buffer-live-p buffer)
374 (with-current-buffer buffer
375 (when (and (not flymake-is-running)
376 flymake-last-change-time
377 (> (- (float-time) flymake-last-change-time)
378 flymake-no-changes-timeout))
379
380 (setq flymake-last-change-time nil)
381 (flymake-log 3 "starting syntax check as more than 1 second passed since last change")
382 (flymake--start-syntax-check)))))
383
384(define-obsolete-function-alias 'flymake-display-err-menu-for-current-line
385 'flymake-popup-current-error-menu "24.4")
386
387(defun flymake-popup-current-error-menu (&optional event)
388 "Pop up a menu with errors/warnings for current line."
389 (interactive (list last-nonmenu-event))
390 (let* ((line-no (line-number-at-pos))
391 (errors (or (car (flymake-find-err-info flymake-err-info line-no))
392 (user-error "No errors for current line")))
393 (menu (mapcar (lambda (x)
394 (if (flymake-ler-file x)
395 (cons (format "%s - %s(%d)"
396 (flymake-ler-text x)
397 (flymake-ler-file x)
398 (flymake-ler-line x))
399 x)
400 (list (flymake-ler-text x))))
401 errors))
402 (event (if (mouse-event-p event)
403 event
404 (list 'mouse-1 (posn-at-point))))
405 (title (format "Line %d: %d error(s), %d warning(s)"
406 line-no
407 (flymake-get-line-err-count errors "e")
408 (flymake-get-line-err-count errors "w")))
409 (choice (x-popup-menu event (list title (cons "" menu)))))
410 (flymake-log 3 "choice=%s" choice)
411 (when choice
412 (flymake-goto-file-and-line (flymake-ler-full-file choice)
413 (flymake-ler-line choice)))))
414
415(defun flymake-goto-file-and-line (file line)
416 "Try to get buffer for FILE and goto line LINE in it."
417 (if (not (file-exists-p file))
418 (flymake-log 1 "File %s does not exist" file)
419 (find-file file)
420 (goto-char (point-min))
421 (forward-line (1- line))))
422
423;; flymake minor mode declarations
424(defvar-local flymake-mode-line nil)
425(defvar-local flymake-mode-line-e-w nil)
426(defvar-local flymake-mode-line-status nil)
427
428(defun flymake-report-status (e-w &optional status)
429 "Show status in mode line."
430 (when e-w
431 (setq flymake-mode-line-e-w e-w))
432 (when status
433 (setq flymake-mode-line-status status))
434 (let* ((mode-line " Flymake"))
435 (when (> (length flymake-mode-line-e-w) 0)
436 (setq mode-line (concat mode-line ":" flymake-mode-line-e-w)))
437 (setq mode-line (concat mode-line flymake-mode-line-status))
438 (setq flymake-mode-line mode-line)
439 (force-mode-line-update)))
440
441;; Nothing in flymake uses this at all any more, so this is just for
442;; third-party compatibility.
443(define-obsolete-function-alias 'flymake-display-warning 'message-box "26.1")
444
445(defun flymake-report-fatal-status (status warning)
446 "Display a warning and switch flymake mode off."
447 ;; This first message was always shown by default, and flymake-log
448 ;; does nothing by default, hence the use of message.
449 ;; Another option is display-warning.
450 (if (< flymake-log-level 0)
451 (message "Flymake: %s. Flymake will be switched OFF" warning))
452 (flymake-mode 0)
453 (flymake-log 0 "switched OFF Flymake mode for buffer %s due to fatal status %s, warning %s"
454 (buffer-name) status warning))
455
456(defvar-local flymake--backend nil
457 "The currently active backend selected by `flymake-mode'")
458
459(defun flymake--can-syntax-check-buffer (buffer)
460 (let ((all flymake-backends)
461 (candidate))
462 (catch 'done
463 (while (setq candidate (pop all))
464 (when (with-current-buffer buffer (funcall (car candidate)))
465 (throw 'done (cdr candidate)))))))
466
467(defun flymake--start-syntax-check ()
468 (funcall flymake--backend))
469
470;;;###autoload
471(define-minor-mode flymake-mode nil
472 :group 'flymake :lighter flymake-mode-line
473 (cond
474
475 ;; Turning the mode ON.
476 (flymake-mode
477 (let* ((backend (flymake--can-syntax-check-buffer (current-buffer))))
478 (cond
479 ((not backend)
480 (flymake-log 2 "flymake cannot check syntax in buffer %s" (buffer-name)))
481 (t
482 (setq flymake--backend backend)
483
484 (add-hook 'after-change-functions 'flymake-after-change-function nil t)
485 (add-hook 'after-save-hook 'flymake-after-save-hook nil t)
486 (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
487 ;;+(add-hook 'find-file-hook 'flymake-find-file-hook)
488
489 (flymake-report-status "" "")
490
491 (setq flymake-timer
492 (run-at-time nil 1 'flymake-on-timer-event (current-buffer)))
493
494 (when (and flymake-start-syntax-check-on-find-file
495 ;; Since we write temp files in current dir, there's no point
496 ;; trying if the directory is read-only (bug#8954).
497 (file-writable-p (file-name-directory buffer-file-name)))
498 (with-demoted-errors
499 (flymake--start-syntax-check)))))
500 )
501 )
502
503 ;; Turning the mode OFF.
504 (t
505 (setq flymake--backend nil)
506
507 (remove-hook 'after-change-functions 'flymake-after-change-function t)
508 (remove-hook 'after-save-hook 'flymake-after-save-hook t)
509 (remove-hook 'kill-buffer-hook 'flymake-kill-buffer-hook t)
510 ;;+(remove-hook 'find-file-hook (function flymake-find-file-hook) t)
511
512 (flymake-delete-own-overlays)
513
514 (when flymake-timer
515 (cancel-timer flymake-timer)
516 (setq flymake-timer nil))
517
518 (setq flymake-is-running nil))))
519
520;; disabling flymake-mode is safe, enabling - not necessarily so
521(put 'flymake-mode 'safe-local-variable 'null)
522
523;;;###autoload
524(defun flymake-mode-on ()
525 "Turn flymake mode on."
526 (flymake-mode 1)
527 (flymake-log 1 "flymake mode turned ON for buffer %s" (buffer-name)))
528
529;;;###autoload
530(defun flymake-mode-off ()
531 "Turn flymake mode off."
532 (flymake-mode 0)
533 (flymake-log 1 "flymake mode turned OFF for buffer %s" (buffer-name)))
534
535(defun flymake-after-change-function (start stop _len)
536 "Start syntax check for current buffer if it isn't already running."
537 ;;+(flymake-log 0 "setting change time to %s" (float-time))
538 (let((new-text (buffer-substring start stop)))
539 (when (and flymake-start-syntax-check-on-newline (equal new-text "\n"))
540 (flymake-log 3 "starting syntax check as new-line has been seen")
541 (flymake--start-syntax-check))
542 (setq flymake-last-change-time (float-time))))
543
544(defun flymake-after-save-hook ()
545 (if (local-variable-p 'flymake-mode (current-buffer)) ; (???) other way to determine whether flymake is active in buffer being saved?
546 (progn
547 (flymake-log 3 "starting syntax check as buffer was saved")
548 (flymake--start-syntax-check)))) ; no more mode 3. cannot start check if mode 3 (to temp copies) is active - (???)
549
550(defun flymake-kill-buffer-hook ()
551 (when flymake-timer
552 (cancel-timer flymake-timer)
553 (setq flymake-timer nil)))
554
555;;;###autoload
556(defun flymake-find-file-hook ()
557 ;;+(when flymake-start-syntax-check-on-find-file
558 ;;+ (flymake-log 3 "starting syntax check on file open")
559 ;;+ (flymake--start-syntax-check)
560 ;;+)
561 (when (and (not (local-variable-p 'flymake-mode (current-buffer)))
562 (flymake--can-syntax-check-buffer (current-buffer)))
563 (flymake-mode)
564 (flymake-log 3 "automatically turned ON flymake mode")))
565
566(defun flymake-get-first-err-line-no (err-info-list)
567 "Return first line with error."
568 (when err-info-list
569 (flymake-er-get-line (car err-info-list))))
570
571(defun flymake-get-last-err-line-no (err-info-list)
572 "Return last line with error."
573 (when err-info-list
574 (flymake-er-get-line (nth (1- (length err-info-list)) err-info-list))))
575
576(defun flymake-get-next-err-line-no (err-info-list line-no)
577 "Return next line with error."
578 (when err-info-list
579 (let* ((count (length err-info-list))
580 (idx 0))
581 (while (and (< idx count) (>= line-no (flymake-er-get-line (nth idx err-info-list))))
582 (setq idx (1+ idx)))
583 (if (< idx count)
584 (flymake-er-get-line (nth idx err-info-list))))))
585
586(defun flymake-get-prev-err-line-no (err-info-list line-no)
587 "Return previous line with error."
588 (when err-info-list
589 (let* ((count (length err-info-list)))
590 (while (and (> count 0) (<= line-no (flymake-er-get-line (nth (1- count) err-info-list))))
591 (setq count (1- count)))
592 (if (> count 0)
593 (flymake-er-get-line (nth (1- count) err-info-list))))))
594
595(defun flymake-skip-whitespace ()
596 "Move forward until non-whitespace is reached."
597 (while (looking-at "[ \t]")
598 (forward-char)))
599
600(defun flymake-goto-line (line-no)
601 "Go to line LINE-NO, then skip whitespace."
602 (goto-char (point-min))
603 (forward-line (1- line-no))
604 (flymake-skip-whitespace))
605
606(defun flymake-goto-next-error ()
607 "Go to next error in err ring."
608 (interactive)
609 (let ((line-no (flymake-get-next-err-line-no flymake-err-info (line-number-at-pos))))
610 (when (not line-no)
611 (setq line-no (flymake-get-first-err-line-no flymake-err-info))
612 (flymake-log 1 "passed end of file"))
613 (if line-no
614 (flymake-goto-line line-no)
615 (flymake-log 1 "no errors in current buffer"))))
616
617(defun flymake-goto-prev-error ()
618 "Go to previous error in err ring."
619 (interactive)
620 (let ((line-no (flymake-get-prev-err-line-no flymake-err-info (line-number-at-pos))))
621 (when (not line-no)
622 (setq line-no (flymake-get-last-err-line-no flymake-err-info))
623 (flymake-log 1 "passed beginning of file"))
624 (if line-no
625 (flymake-goto-line line-no)
626 (flymake-log 1 "no errors in current buffer"))))
627
628(defun flymake-patch-err-text (string)
629 (if (string-match "^[\n\t :0-9]*\\(.*\\)$" string)
630 (match-string 1 string)
631 string))
632
633(provide 'flymake-ui)
634;;; flymake-ui.el ends here
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 059bce95eed..45f0adfeba1 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1,4 +1,4 @@
1;;; flymake.el --- a universal on-the-fly syntax checker -*- lexical-binding: t; -*- 1;;; flymake.el --- A universal on-the-fly syntax checker -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2003-2017 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
4 4
@@ -20,22 +20,964 @@
20;; GNU General Public License for more details. 20;; GNU General Public License for more details.
21 21
22;; You should have received a copy of the GNU General Public License 22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. 23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 24
25;;; Commentary: 25;;; Commentary:
26;; 26;;
27;; Flymake is a minor Emacs mode performing on-the-fly syntax checks. 27;; Flymake is a minor Emacs mode performing on-the-fly syntax checks.
28;; 28;;
29;; It collects diagnostic information for multiple sources and 29;; Flymake collects diagnostic information for multiple sources,
30;; visually annotates the relevant lines in the buffer. 30;; called backends, and visually annotates the relevant portions in
31;; the buffer.
32;;
33;; This file contains the UI for displaying and interacting with the
34;; results produced by these backends, as well as entry points for
35;; backends to hook on to.
36;;
37;; The main entry points are `flymake-mode' and `flymake-start'
38;;
39;; The docstrings of these variables are relevant to understanding how
40;; Flymake works for both the user and the backend programmer:
41;;
42;; * `flymake-diagnostic-functions'
43;; * `flymake-diagnostic-types-alist'
31;; 44;;
32;; This file is just a stub for that loads the UI and backends, which
33;; could also be loaded separately.
34
35;;; Code: 45;;; Code:
36 46
37(require 'flymake-ui) 47(require 'cl-lib)
38(require 'flymake-proc) 48(require 'thingatpt) ; end-of-thing
49(require 'warnings) ; warning-numeric-level, display-warning
50(require 'compile) ; for some faces
51(require 'subr-x) ; when-let*, if-let*, hash-table-keys, hash-table-values
52
53(defgroup flymake nil
54 "Universal on-the-fly syntax checker."
55 :version "23.1"
56 :link '(custom-manual "(flymake) Top")
57 :group 'tools)
58
59(defcustom flymake-error-bitmap '(flymake-double-exclamation-mark
60 compilation-error)
61 "Bitmap (a symbol) used in the fringe for indicating errors.
62The value may also be a list of two elements where the second
63element specifies the face for the bitmap. For possible bitmap
64symbols, see `fringe-bitmaps'. See also `flymake-warning-bitmap'.
65
66The option `flymake-fringe-indicator-position' controls how and where
67this is used."
68 :version "24.3"
69 :type '(choice (symbol :tag "Bitmap")
70 (list :tag "Bitmap and face"
71 (symbol :tag "Bitmap")
72 (face :tag "Face"))))
73
74(defcustom flymake-warning-bitmap '(exclamation-mark compilation-warning)
75 "Bitmap (a symbol) used in the fringe for indicating warnings.
76The value may also be a list of two elements where the second
77element specifies the face for the bitmap. For possible bitmap
78symbols, see `fringe-bitmaps'. See also `flymake-error-bitmap'.
79
80The option `flymake-fringe-indicator-position' controls how and where
81this is used."
82 :version "24.3"
83 :type '(choice (symbol :tag "Bitmap")
84 (list :tag "Bitmap and face"
85 (symbol :tag "Bitmap")
86 (face :tag "Face"))))
87
88(defcustom flymake-note-bitmap '(exclamation-mark compilation-info)
89 "Bitmap (a symbol) used in the fringe for indicating info notes.
90The value may also be a list of two elements where the second
91element specifies the face for the bitmap. For possible bitmap
92symbols, see `fringe-bitmaps'. See also `flymake-error-bitmap'.
93
94The option `flymake-fringe-indicator-position' controls how and where
95this is used."
96 :version "26.1"
97 :type '(choice (symbol :tag "Bitmap")
98 (list :tag "Bitmap and face"
99 (symbol :tag "Bitmap")
100 (face :tag "Face"))))
101
102(defcustom flymake-fringe-indicator-position 'left-fringe
103 "The position to put Flymake fringe indicator.
104The value can be nil (do not use indicators), `left-fringe' or `right-fringe'.
105See `flymake-error-bitmap' and `flymake-warning-bitmap'."
106 :version "24.3"
107 :type '(choice (const left-fringe)
108 (const right-fringe)
109 (const :tag "No fringe indicators" nil)))
110
111(defcustom flymake-start-syntax-check-on-newline t
112 "Start syntax check if newline char was added/removed from the buffer."
113 :type 'boolean)
114
115(defcustom flymake-no-changes-timeout 0.5
116 "Time to wait after last change before automatically checking buffer.
117If nil, never start checking buffer automatically like this."
118 :type 'number)
119
120(defcustom flymake-gui-warnings-enabled t
121 "Enables/disables GUI warnings."
122 :type 'boolean)
123(make-obsolete-variable 'flymake-gui-warnings-enabled
124 "it no longer has any effect." "26.1")
125
126(defcustom flymake-start-syntax-check-on-find-file t
127 "Start syntax check on find file."
128 :type 'boolean)
129
130(defcustom flymake-log-level -1
131 "Obsolete and ignored variable."
132 :type 'integer)
133(make-obsolete-variable 'flymake-log-level
134 "it is superseded by `warning-minimum-log-level.'"
135 "26.1")
136
137(defcustom flymake-wrap-around t
138 "If non-nil, moving to errors wraps around buffer boundaries."
139 :type 'boolean)
140
141(define-fringe-bitmap 'flymake-double-exclamation-mark
142 (vector #b00000000
143 #b00000000
144 #b00000000
145 #b00000000
146 #b01100110
147 #b01100110
148 #b01100110
149 #b01100110
150 #b01100110
151 #b01100110
152 #b01100110
153 #b01100110
154 #b00000000
155 #b01100110
156 #b00000000
157 #b00000000
158 #b00000000))
159
160(defvar-local flymake-timer nil
161 "Timer for starting syntax check.")
162
163(defvar-local flymake-check-start-time nil
164 "Time at which syntax check was started.")
165
166(defun flymake--log-1 (level sublog msg &rest args)
167 "Do actual work for `flymake-log'."
168 (let (;; never popup the log buffer
169 (warning-minimum-level :emergency)
170 (warning-type-format
171 (format " [%s %s]"
172 (or sublog 'flymake)
173 (current-buffer))))
174 (display-warning (list 'flymake sublog)
175 (apply #'format-message msg args)
176 (if (numberp level)
177 (or (nth level
178 '(:emergency :error :warning :debug :debug) )
179 :error)
180 level)
181 "*Flymake log*")))
182
183(defun flymake-switch-to-log-buffer ()
184 "Go to the *Flymake log* buffer."
185 (interactive)
186 (switch-to-buffer "*Flymake log*"))
187
188;;;###autoload
189(defmacro flymake-log (level msg &rest args)
190 "Log, at level LEVEL, the message MSG formatted with ARGS.
191LEVEL is passed to `display-warning', which is used to display
192the warning. If this form is included in a byte-compiled file,
193the generated warning contains an indication of the file that
194generated it."
195 (let* ((compile-file (and (boundp 'byte-compile-current-file)
196 (symbol-value 'byte-compile-current-file)))
197 (sublog (if (and
198 compile-file
199 (not load-file-name))
200 (intern
201 (file-name-nondirectory
202 (file-name-sans-extension compile-file))))))
203 `(flymake--log-1 ,level ',sublog ,msg ,@args)))
204
205(defun flymake-error (text &rest args)
206 "Format TEXT with ARGS and signal an error for Flymake."
207 (let ((msg (apply #'format-message text args)))
208 (flymake-log :error msg)
209 (error (concat "[Flymake] " msg))))
210
211(cl-defstruct (flymake--diag
212 (:constructor flymake--diag-make))
213 buffer beg end type text backend)
214
215;;;###autoload
216(defun flymake-make-diagnostic (buffer
217 beg
218 end
219 type
220 text)
221 "Make a Flymake diagnostic for BUFFER's region from BEG to END.
222TYPE is a key to `flymake-diagnostic-types-alist' and TEXT is a
223description of the problem detected in this region."
224 (flymake--diag-make :buffer buffer :beg beg :end end :type type :text text))
225
226(cl-defun flymake--overlays (&key beg end filter compare key)
227 "Get flymake-related overlays.
228If BEG is non-nil and END is nil, consider only `overlays-at'
229BEG. Otherwise consider `overlays-in' the region comprised by BEG
230and END, defaulting to the whole buffer. Remove all that do not
231verify FILTER, a function, and sort them by COMPARE (using KEY)."
232 (save-restriction
233 (widen)
234 (let ((ovs (cl-remove-if-not
235 (lambda (ov)
236 (and (overlay-get ov 'flymake)
237 (or (not filter)
238 (funcall filter ov))))
239 (if (and beg (null end))
240 (overlays-at beg t)
241 (overlays-in (or beg (point-min))
242 (or end (point-max)))))))
243 (if compare
244 (cl-sort ovs compare :key (or key
245 #'identity))
246 ovs))))
247
248(defun flymake-delete-own-overlays (&optional filter)
249 "Delete all Flymake overlays in BUFFER."
250 (mapc #'delete-overlay (flymake--overlays :filter filter)))
251
252(defface flymake-error
253 '((((supports :underline (:style wave)))
254 :underline (:style wave :color "Red1"))
255 (t
256 :inherit error))
257 "Face used for marking error regions."
258 :version "24.4")
259
260(defface flymake-warning
261 '((((supports :underline (:style wave)))
262 :underline (:style wave :color "deep sky blue"))
263 (t
264 :inherit warning))
265 "Face used for marking warning regions."
266 :version "24.4")
267
268(defface flymake-note
269 '((((supports :underline (:style wave)))
270 :underline (:style wave :color "yellow green"))
271 (t
272 :inherit warning))
273 "Face used for marking note regions."
274 :version "26.1")
275
276(define-obsolete-face-alias 'flymake-warnline 'flymake-warning "26.1")
277(define-obsolete-face-alias 'flymake-errline 'flymake-error "26.1")
278
279;;;###autoload
280(defun flymake-diag-region (buffer line &optional col)
281 "Compute BUFFER's region (BEG . END) corresponding to LINE and COL.
282If COL is nil, return a region just for LINE. Return nil if the
283region is invalid."
284 (condition-case-unless-debug _err
285 (with-current-buffer buffer
286 (let ((line (min (max line 1)
287 (line-number-at-pos (point-max) 'absolute))))
288 (save-excursion
289 (goto-char (point-min))
290 (forward-line (1- line))
291 (cl-flet ((fallback-bol
292 () (progn (back-to-indentation) (point)))
293 (fallback-eol
294 (beg)
295 (progn
296 (end-of-line)
297 (skip-chars-backward " \t\f\t\n" beg)
298 (if (eq (point) beg)
299 (line-beginning-position 2)
300 (point)))))
301 (if (and col (cl-plusp col))
302 (let* ((beg (progn (forward-char (1- col))
303 (point)))
304 (sexp-end (ignore-errors (end-of-thing 'sexp)))
305 (end (or (and sexp-end
306 (not (= sexp-end beg))
307 sexp-end)
308 (ignore-errors (goto-char (1+ beg)))))
309 (safe-end (or end
310 (fallback-eol beg))))
311 (cons (if end beg (fallback-bol))
312 safe-end))
313 (let* ((beg (fallback-bol))
314 (end (fallback-eol beg)))
315 (cons beg end)))))))
316 (error (flymake-error "Invalid region line=%s col=%s" line col))))
317
318(defvar flymake-diagnostic-functions nil
319 "Special hook of Flymake backends that check a buffer.
320
321The functions in this hook diagnose problems in a buffer’s
322contents and provide information to the Flymake user interface
323about where and how to annotate problems diagnosed in a buffer.
324
325Whenever Flymake or the user decides to re-check the buffer, each
326function is called with an arbitrary number of arguments:
327
328* the first argument is always REPORT-FN, a callback function
329 detailed below;
330
331* the remaining arguments are keyword-value pairs in the
332 form (:KEY VALUE :KEY2 VALUE2...). Currently, Flymake provides
333 no such arguments, but backend functions must be prepared to
334 accept and possibly ignore any number of them.
335
336Backend functions are expected to initiate the buffer check, but
337aren't required to complete it check before exiting: if the
338computation involved is expensive, especially for large buffers,
339that task can be scheduled for the future using asynchronous
340processes or other asynchronous mechanisms.
341
342In any case, backend functions are expected to return quickly or
343signal an error, in which case the backend is disabled. Flymake
344will not try disabled backends again for any future checks of
345this buffer. Certain commands, like turning `flymake-mode' off
346and on again, reset the list of disabled backends.
347
348If the function returns, Flymake considers the backend to be
349\"running\". If it has not done so already, the backend is
350expected to call the function REPORT-FN with a single argument
351REPORT-ACTION also followed by an optional list of keyword-value
352pairs in the form (:REPORT-KEY VALUE :REPORT-KEY2 VALUE2...).
353
354Currently accepted values for REPORT-ACTION are:
355
356* A (possibly empty) list of diagnostic objects created with
357 `flymake-make-diagnostic', causing Flymake to annotate the
358 buffer with this information.
359
360 A backend may call REPORT-FN repeatedly in this manner, but
361 only until Flymake considers that the most recently requested
362 buffer check is now obsolete because, say, buffer contents have
363 changed in the meantime. The backend is only given notice of
364 this via a renewed call to the backend function. Thus, to
365 prevent making obsolete reports and wasting resources, backend
366 functions should first cancel any ongoing processing from
367 previous calls.
368
369* The symbol `:panic', signaling that the backend has encountered
370 an exceptional situation and should be disabled.
371
372Currently accepted REPORT-KEY arguments are:
373
374* ‘:explanation’: value should give user-readable details of
375 the situation encountered, if any.
376
377* ‘:force’: value should be a boolean suggesting that Flymake
378 consider the report even if it was somehow unexpected.")
379
380(defvar flymake-diagnostic-types-alist
381 `((:error
382 . ((flymake-category . flymake-error)))
383 (:warning
384 . ((flymake-category . flymake-warning)))
385 (:note
386 . ((flymake-category . flymake-note))))
387 "Alist ((KEY . PROPS)*) of properties of Flymake diagnostic types.
388KEY designates a kind of diagnostic can be anything passed as
389`:type' to `flymake-make-diagnostic'.
390
391PROPS is an alist of properties that are applied, in order, to
392the diagnostics of the type designated by KEY. The recognized
393properties are:
394
395* Every property pertaining to overlays, except `category' and
396 `evaporate' (see Info Node `(elisp)Overlay Properties'), used
397 to affect the appearance of Flymake annotations.
398
399* `bitmap', an image displayed in the fringe according to
400 `flymake-fringe-indicator-position'. The value actually
401 follows the syntax of `flymake-error-bitmap' (which see). It
402 is overridden by any `before-string' overlay property.
403
404* `severity', a non-negative integer specifying the diagnostic's
405 severity. The higher, the more serious. If the overlay
406 priority `priority' is not specified, `severity' is used to set
407 it and help sort overlapping overlays.
408
409* `flymake-category', a symbol whose property list is considered
410 as a default for missing values of any other properties. This
411 is useful to backend authors when creating new diagnostic types
412 that differ from an existing type by only a few properties.")
413
414(put 'flymake-error 'face 'flymake-error)
415(put 'flymake-error 'bitmap 'flymake-error-bitmap)
416(put 'flymake-error 'severity (warning-numeric-level :error))
417(put 'flymake-error 'mode-line-face 'compilation-error)
418
419(put 'flymake-warning 'face 'flymake-warning)
420(put 'flymake-warning 'bitmap 'flymake-warning-bitmap)
421(put 'flymake-warning 'severity (warning-numeric-level :warning))
422(put 'flymake-warning 'mode-line-face 'compilation-warning)
423
424(put 'flymake-note 'face 'flymake-note)
425(put 'flymake-note 'bitmap 'flymake-note-bitmap)
426(put 'flymake-note 'severity (warning-numeric-level :debug))
427(put 'flymake-note 'mode-line-face 'compilation-info)
428
429(defun flymake--lookup-type-property (type prop &optional default)
430 "Look up PROP for TYPE in `flymake-diagnostic-types-alist'.
431If TYPE doesn't declare PROP in either
432`flymake-diagnostic-types-alist' or in the symbol of its
433associated `flymake-category' return DEFAULT."
434 (let ((alist-probe (assoc type flymake-diagnostic-types-alist)))
435 (cond (alist-probe
436 (let* ((alist (cdr alist-probe))
437 (prop-probe (assoc prop alist)))
438 (if prop-probe
439 (cdr prop-probe)
440 (if-let* ((cat (assoc-default 'flymake-category alist))
441 (plist (and (symbolp cat)
442 (symbol-plist cat)))
443 (cat-probe (plist-member plist prop)))
444 (cadr cat-probe)
445 default))))
446 (t
447 default))))
448
449(defun flymake--fringe-overlay-spec (bitmap &optional recursed)
450 (if (and (symbolp bitmap)
451 (boundp bitmap)
452 (not recursed))
453 (flymake--fringe-overlay-spec
454 (symbol-value bitmap) t)
455 (and flymake-fringe-indicator-position
456 bitmap
457 (propertize "!" 'display
458 (cons flymake-fringe-indicator-position
459 (if (listp bitmap)
460 bitmap
461 (list bitmap)))))))
462
463(defun flymake--highlight-line (diagnostic)
464 "Highlight buffer with info in DIAGNOSTIC."
465 (when-let* ((ov (make-overlay
466 (flymake--diag-beg diagnostic)
467 (flymake--diag-end diagnostic))))
468 ;; First set `category' in the overlay, then copy over every other
469 ;; property.
470 ;;
471 (let ((alist (assoc-default (flymake--diag-type diagnostic)
472 flymake-diagnostic-types-alist)))
473 (overlay-put ov 'category (assoc-default 'flymake-category alist))
474 (cl-loop for (k . v) in alist
475 unless (eq k 'category)
476 do (overlay-put ov k v)))
477 ;; Now ensure some essential defaults are set
478 ;;
479 (cl-flet ((default-maybe
480 (prop value)
481 (unless (or (plist-member (overlay-properties ov) prop)
482 (let ((cat (overlay-get ov
483 'flymake-category)))
484 (and cat
485 (plist-member (symbol-plist cat) prop))))
486 (overlay-put ov prop value))))
487 (default-maybe 'bitmap 'flymake-error-bitmap)
488 (default-maybe 'face 'flymake-error)
489 (default-maybe 'before-string
490 (flymake--fringe-overlay-spec
491 (overlay-get ov 'bitmap)))
492 (default-maybe 'help-echo
493 (lambda (_window _ov pos)
494 (mapconcat
495 (lambda (ov)
496 (let ((diag (overlay-get ov 'flymake--diagnostic)))
497 (flymake--diag-text diag)))
498 (flymake--overlays :beg pos)
499 "\n")))
500 (default-maybe 'severity (warning-numeric-level :error))
501 (default-maybe 'priority (+ 100 (overlay-get ov 'severity))))
502 ;; Some properties can't be overridden.
503 ;;
504 (overlay-put ov 'evaporate t)
505 (overlay-put ov 'flymake t)
506 (overlay-put ov 'flymake--diagnostic diagnostic)))
507
508;; Nothing in Flymake uses this at all any more, so this is just for
509;; third-party compatibility.
510(define-obsolete-function-alias 'flymake-display-warning 'message-box "26.1")
511
512(defvar-local flymake--backend-state nil
513 "Buffer-local hash table of a Flymake backend's state.
514The keys to this hash table are functions as found in
515`flymake-diagnostic-functions'. The values are structures
516of the type `flymake--backend-state', with these slots:
517
518`running', a symbol to keep track of a backend's replies via its
519REPORT-FN argument. A backend is running if this key is
520present. If nil, Flymake isn't expecting any replies from the
521backend.
522
523`diags', a (possibly empty) list of recent diagnostic objects
524created by the backend with `flymake-make-diagnostic'.
525
526`reported-p', a boolean indicating if the backend has replied
527since it last was contacted.
528
529`disabled', a string with the explanation for a previous
530exceptional situation reported by the backend, nil if the
531backend is operating normally.")
532
533(cl-defstruct (flymake--backend-state
534 (:constructor flymake--make-backend-state))
535 running reported-p disabled diags)
536
537(defmacro flymake--with-backend-state (backend state-var &rest body)
538 "Bind BACKEND's STATE-VAR to its state, run BODY."
539 (declare (indent 2) (debug (sexp sexp &rest form)))
540 (let ((b (make-symbol "b")))
541 `(let* ((,b ,backend)
542 (,state-var
543 (or (gethash ,b flymake--backend-state)
544 (puthash ,b (flymake--make-backend-state)
545 flymake--backend-state))))
546 ,@body)))
547
548(defun flymake-is-running ()
549 "Tell if Flymake has running backends in this buffer"
550 (flymake-running-backends))
551
552(cl-defun flymake--handle-report (backend token report-action
553 &key explanation force
554 &allow-other-keys)
555 "Handle reports from BACKEND identified by TOKEN.
556BACKEND, REPORT-ACTION and EXPLANATION, and FORCE conform to the calling
557convention described in `flymake-diagnostic-functions' (which
558see). Optional FORCE says to handle a report even if TOKEN was
559not expected."
560 (let* ((state (gethash backend flymake--backend-state))
561 (first-report (not (flymake--backend-state-reported-p state))))
562 (setf (flymake--backend-state-reported-p state) t)
563 (let (expected-token
564 new-diags)
565 (cond
566 ((null state)
567 (flymake-error
568 "Unexpected report from unknown backend %s" backend))
569 ((flymake--backend-state-disabled state)
570 (flymake-error
571 "Unexpected report from disabled backend %s" backend))
572 ((progn
573 (setq expected-token (flymake--backend-state-running state))
574 (null expected-token))
575 ;; should never happen
576 (flymake-error "Unexpected report from stopped backend %s" backend))
577 ((and (not (eq expected-token token))
578 (not force))
579 (flymake-error "Obsolete report from backend %s with explanation %s"
580 backend explanation))
581 ((eq :panic report-action)
582 (flymake--disable-backend backend explanation))
583 ((not (listp report-action))
584 (flymake--disable-backend backend
585 (format "Unknown action %S" report-action))
586 (flymake-error "Expected report, but got unknown key %s" report-action))
587 (t
588 (setq new-diags report-action)
589 (save-restriction
590 (widen)
591 ;; only delete overlays if this is the first report
592 (when first-report
593 (flymake-delete-own-overlays
594 (lambda (ov)
595 (eq backend
596 (flymake--diag-backend
597 (overlay-get ov 'flymake--diagnostic))))))
598 (mapc (lambda (diag)
599 (flymake--highlight-line diag)
600 (setf (flymake--diag-backend diag) backend))
601 new-diags)
602 (setf (flymake--backend-state-diags state)
603 (append new-diags (flymake--backend-state-diags state)))
604 (when flymake-check-start-time
605 (flymake-log :debug "backend %s reported %d diagnostics in %.2f second(s)"
606 backend
607 (length new-diags)
608 (- (float-time) flymake-check-start-time)))))))))
609
610(defun flymake-make-report-fn (backend &optional token)
611 "Make a suitable anonymous report function for BACKEND.
612BACKEND is used to help Flymake distinguish different diagnostic
613sources. If provided, TOKEN helps Flymake distinguish between
614different runs of the same backend."
615 (let ((buffer (current-buffer)))
616 (lambda (&rest args)
617 (when (buffer-live-p buffer)
618 (with-current-buffer buffer
619 (apply #'flymake--handle-report backend token args))))))
620
621(defun flymake--collect (fn)
622 (let (retval)
623 (maphash (lambda (backend state)
624 (when (funcall fn state) (push backend retval)))
625 flymake--backend-state)
626 retval))
627
628(defun flymake-running-backends ()
629 "Compute running Flymake backends in current buffer."
630 (flymake--collect #'flymake--backend-state-running))
631
632(defun flymake-disabled-backends ()
633 "Compute disabled Flymake backends in current buffer."
634 (flymake--collect #'flymake--backend-state-disabled))
635
636(defun flymake-reporting-backends ()
637 "Compute reporting Flymake backends in current buffer."
638 (flymake--collect #'flymake--backend-state-reported-p))
639
640(defun flymake--disable-backend (backend &optional explanation)
641 "Disable BACKEND because EXPLANATION.
642If it is running also stop it."
643 (flymake-log :warning "Disabling backend %s because %s" backend explanation)
644 (flymake--with-backend-state backend state
645 (setf (flymake--backend-state-running state) nil
646 (flymake--backend-state-disabled state) explanation
647 (flymake--backend-state-reported-p state) t)))
648
649(defun flymake--run-backend (backend)
650 "Run the backend BACKEND, reenabling if necessary."
651 (flymake-log :debug "Running backend %s" backend)
652 (let ((run-token (cl-gensym "backend-token")))
653 (flymake--with-backend-state backend state
654 (setf (flymake--backend-state-running state) run-token
655 (flymake--backend-state-disabled state) nil
656 (flymake--backend-state-diags state) nil
657 (flymake--backend-state-reported-p state) nil))
658 ;; FIXME: Should use `condition-case-unless-debug' here, but don't
659 ;; for two reasons: (1) that won't let me catch errors from inside
660 ;; `ert-deftest' where `debug-on-error' appears to be always
661 ;; t. (2) In cases where the user is debugging elisp somewhere
662 ;; else, and using flymake, the presence of a frequently
663 ;; misbehaving backend in the global hook (most likely the legacy
664 ;; backend) will trigger an annoying backtrace.
665 ;;
666 (condition-case err
667 (funcall backend
668 (flymake-make-report-fn backend run-token))
669 (error
670 (flymake--disable-backend backend err)))))
671
672(defun flymake-start (&optional deferred force)
673 "Start a syntax check.
674Start it immediately, or after current command if DEFERRED is
675non-nil. With optional FORCE run even disabled backends.
676
677Interactively, with a prefix arg, FORCE is t."
678 (interactive (list nil current-prefix-arg))
679 (cl-labels
680 ((start
681 ()
682 (remove-hook 'post-command-hook #'start 'local)
683 (setq flymake-check-start-time (float-time))
684 (run-hook-wrapped
685 'flymake-diagnostic-functions
686 (lambda (backend)
687 (cond
688 ((and (not force)
689 (flymake--with-backend-state backend state
690 (flymake--backend-state-disabled state)))
691 (flymake-log :debug "Backend %s is disabled, not starting"
692 backend))
693 (t
694 (flymake--run-backend backend)))
695 nil))))
696 (if (and deferred
697 this-command)
698 (add-hook 'post-command-hook #'start 'append 'local)
699 (start))))
700
701(defvar flymake-mode-map
702 (let ((map (make-sparse-keymap))) map)
703 "Keymap for `flymake-mode'")
704
705;;;###autoload
706(define-minor-mode flymake-mode nil
707 :group 'flymake :lighter flymake--mode-line-format :keymap flymake-mode-map
708 (cond
709 ;; Turning the mode ON.
710 (flymake-mode
711 (add-hook 'after-change-functions 'flymake-after-change-function nil t)
712 (add-hook 'after-save-hook 'flymake-after-save-hook nil t)
713 (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
714
715 (setq flymake--backend-state (make-hash-table))
716
717 (when flymake-start-syntax-check-on-find-file
718 (flymake-start)))
719
720 ;; Turning the mode OFF.
721 (t
722 (remove-hook 'after-change-functions 'flymake-after-change-function t)
723 (remove-hook 'after-save-hook 'flymake-after-save-hook t)
724 (remove-hook 'kill-buffer-hook 'flymake-kill-buffer-hook t)
725 ;;+(remove-hook 'find-file-hook (function flymake-find-file-hook) t)
726
727 (flymake-delete-own-overlays)
728
729 (when flymake-timer
730 (cancel-timer flymake-timer)
731 (setq flymake-timer nil)))))
732
733(defun flymake--schedule-timer-maybe ()
734 "(Re)schedule an idle timer for checking the buffer.
735Do it only if `flymake-no-changes-timeout' is non-nil."
736 (when flymake-timer (cancel-timer flymake-timer))
737 (when flymake-no-changes-timeout
738 (setq
739 flymake-timer
740 (run-with-idle-timer
741 (seconds-to-time flymake-no-changes-timeout)
742 nil
743 (lambda (buffer)
744 (when (buffer-live-p buffer)
745 (with-current-buffer buffer
746 (when (and flymake-mode
747 flymake-no-changes-timeout)
748 (flymake-log
749 :debug "starting syntax check after idle for %s seconds"
750 flymake-no-changes-timeout)
751 (flymake-start))
752 (setq flymake-timer nil))))
753 (current-buffer)))))
754
755;;;###autoload
756(defun flymake-mode-on ()
757 "Turn Flymake mode on."
758 (flymake-mode 1))
759
760;;;###autoload
761(defun flymake-mode-off ()
762 "Turn Flymake mode off."
763 (flymake-mode 0))
764
765(make-obsolete 'flymake-mode-on 'flymake-mode "26.1")
766(make-obsolete 'flymake-mode-off 'flymake-mode "26.1")
767
768(defun flymake-after-change-function (start stop _len)
769 "Start syntax check for current buffer if it isn't already running."
770 (let((new-text (buffer-substring start stop)))
771 (when (and flymake-start-syntax-check-on-newline (equal new-text "\n"))
772 (flymake-log :debug "starting syntax check as new-line has been seen")
773 (flymake-start 'deferred))
774 (flymake--schedule-timer-maybe)))
775
776(defun flymake-after-save-hook ()
777 (when flymake-mode
778 (flymake-log :debug "starting syntax check as buffer was saved")
779 (flymake-start)))
780
781(defun flymake-kill-buffer-hook ()
782 (when flymake-timer
783 (cancel-timer flymake-timer)
784 (setq flymake-timer nil)))
785
786(defun flymake-find-file-hook ()
787 (unless (or flymake-mode
788 (null flymake-diagnostic-functions))
789 (flymake-mode)
790 (flymake-log :warning "Turned on in `flymake-find-file-hook'")))
791
792(defun flymake-goto-next-error (&optional n filter interactive)
793 "Go to Nth next Flymake error in buffer matching FILTER.
794Interactively, always move to the next error. With a prefix arg,
795skip any diagnostics with a severity less than ‘:warning’.
796
797If ‘flymake-wrap-around’ is non-nil and no more next errors,
798resumes search from top
799
800FILTER is a list of diagnostic types found in
801`flymake-diagnostic-types-alist', or nil, if no filter is to be
802applied."
803 ;; TODO: let filter be a number, a severity below which diags are
804 ;; skipped.
805 (interactive (list 1
806 (if current-prefix-arg
807 '(:error :warning))
808 t))
809 (let* ((n (or n 1))
810 (ovs (flymake--overlays :filter
811 (lambda (ov)
812 (let ((diag (overlay-get
813 ov
814 'flymake--diagnostic)))
815 (and diag
816 (or (not filter)
817 (memq (flymake--diag-type diag)
818 filter)))))
819 :compare (if (cl-plusp n) #'< #'>)
820 :key #'overlay-start))
821 (tail (cl-member-if (lambda (ov)
822 (if (cl-plusp n)
823 (> (overlay-start ov)
824 (point))
825 (< (overlay-start ov)
826 (point))))
827 ovs))
828 (chain (if flymake-wrap-around
829 (if tail
830 (progn (setcdr (last tail) ovs) tail)
831 (and ovs (setcdr (last ovs) ovs)))
832 tail))
833 (target (nth (1- n) chain)))
834 (cond (target
835 (goto-char (overlay-start target))
836 (when interactive
837 (message
838 (funcall (overlay-get target 'help-echo)
839 nil nil (point)))))
840 (interactive
841 (user-error "No more Flymake errors%s"
842 (if filter
843 (format " of types %s" filter)
844 ""))))))
845
846(defun flymake-goto-prev-error (&optional n filter interactive)
847 "Go to Nth previous Flymake error in buffer matching FILTER.
848Interactively, always move to the previous error. With a prefix
849arg, skip any diagnostics with a severity less than ‘:warning’.
850
851If ‘flymake-wrap-around’ is non-nil and no more previous errors,
852resumes search from bottom.
853
854FILTER is a list of diagnostic types found in
855`flymake-diagnostic-types-alist', or nil, if no filter is to be
856applied."
857 (interactive (list 1 (if current-prefix-arg
858 '(:error :warning))
859 t))
860 (flymake-goto-next-error (- (or n 1)) filter interactive))
861
862
863;;; Mode-line and menu
864;;;
865(easy-menu-define flymake-menu flymake-mode-map "Flymake"
866 `("Flymake"
867 [ "Go to next error" flymake-goto-next-error t ]
868 [ "Go to previous error" flymake-goto-prev-error t ]
869 [ "Check now" flymake-start t ]
870 [ "Go to log buffer" flymake-switch-to-log-buffer t ]
871 "--"
872 [ "Turn off Flymake" flymake-mode t ]))
873
874(defvar flymake--mode-line-format `(:eval (flymake--mode-line-format)))
875
876(put 'flymake--mode-line-format 'risky-local-variable t)
877
878(defun flymake--mode-line-format ()
879 "Produce a pretty minor mode indicator."
880 (let* ((known (hash-table-keys flymake--backend-state))
881 (running (flymake-running-backends))
882 (disabled (flymake-disabled-backends))
883 (reported (flymake-reporting-backends))
884 (diags-by-type (make-hash-table))
885 (all-disabled (and disabled (null running)))
886 (some-waiting (cl-set-difference running reported)))
887 (maphash (lambda (_b state)
888 (mapc (lambda (diag)
889 (push diag
890 (gethash (flymake--diag-type diag)
891 diags-by-type)))
892 (flymake--backend-state-diags state)))
893 flymake--backend-state)
894 `((:propertize " Flymake"
895 mouse-face mode-line-highlight
896 help-echo
897 ,(concat (format "%s known backends\n" (length known))
898 (format "%s running\n" (length running))
899 (format "%s disabled\n" (length disabled))
900 "mouse-1: go to log buffer ")
901 keymap
902 ,(let ((map (make-sparse-keymap)))
903 (define-key map [mode-line down-mouse-1]
904 flymake-menu)
905 map))
906 ,@(pcase-let ((`(,ind ,face ,explain)
907 (cond ((null known)
908 `("?" mode-line "No known backends"))
909 (some-waiting
910 `("Wait" compilation-mode-line-run
911 ,(format "Waiting for %s running backend(s)"
912 (length some-waiting))))
913 (all-disabled
914 `("!" compilation-mode-line-run
915 "All backends disabled"))
916 (t
917 `(nil nil nil)))))
918 (when ind
919 `((":"
920 (:propertize ,ind
921 face ,face
922 help-echo ,explain
923 keymap
924 ,(let ((map (make-sparse-keymap)))
925 (define-key map [mode-line mouse-1]
926 'flymake-switch-to-log-buffer)
927 map))))))
928 ,@(unless (or all-disabled
929 (null known))
930 (cl-loop
931 for (type . severity)
932 in (cl-sort (mapcar (lambda (type)
933 (cons type (flymake--lookup-type-property
934 type
935 'severity
936 (warning-numeric-level :error))))
937 (cl-union (hash-table-keys diags-by-type)
938 '(:error :warning)))
939 #'>
940 :key #'cdr)
941 for diags = (gethash type diags-by-type)
942 for face = (flymake--lookup-type-property type
943 'mode-line-face
944 'compilation-error)
945 when (or diags
946 (>= severity (warning-numeric-level :warning)))
947 collect `(:propertize
948 ,(format "%d" (length diags))
949 face ,face
950 mouse-face mode-line-highlight
951 keymap
952 ,(let ((map (make-sparse-keymap))
953 (type type))
954 (define-key map [mode-line mouse-4]
955 (lambda (_event)
956 (interactive "e")
957 (flymake-goto-prev-error 1 (list type) t)))
958 (define-key map [mode-line mouse-5]
959 (lambda (_event)
960 (interactive "e")
961 (flymake-goto-next-error 1 (list type) t)))
962 map)
963 help-echo
964 ,(concat (format "%s diagnostics of type %s\n"
965 (propertize (format "%d"
966 (length diags))
967 'face face)
968 (propertize (format "%s" type)
969 'face face))
970 "mouse-4/mouse-5: previous/next of this type\n"))
971 into forms
972 finally return
973 `((:propertize "[")
974 ,@(cl-loop for (a . rest) on forms by #'cdr
975 collect a when rest collect
976 '(:propertize " "))
977 (:propertize "]")))))))
39 978
40(provide 'flymake) 979(provide 'flymake)
980
981(require 'flymake-proc)
982
41;;; flymake.el ends here 983;;; flymake.el ends here
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 365191c56b0..9aa5134ca0d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3442,6 +3442,8 @@ def __PYTHON_EL_native_completion_setup():
3442 instance.rlcomplete = new_completer 3442 instance.rlcomplete = new_completer
3443 3443
3444 if readline.__doc__ and 'libedit' in readline.__doc__: 3444 if readline.__doc__ and 'libedit' in readline.__doc__:
3445 raise Exception('''libedit based readline is known not to work,
3446 see etc/PROBLEMS under \"In Inferior Python mode, input is echoed\".''')
3445 readline.parse_and_bind('bind ^I rl_complete') 3447 readline.parse_and_bind('bind ^I rl_complete')
3446 else: 3448 else:
3447 readline.parse_and_bind('tab: complete') 3449 readline.parse_and_bind('tab: complete')
@@ -3450,7 +3452,9 @@ def __PYTHON_EL_native_completion_setup():
3450 3452
3451 print ('python.el: native completion setup loaded') 3453 print ('python.el: native completion setup loaded')
3452 except: 3454 except:
3453 print ('python.el: native completion setup failed') 3455 import sys
3456 print ('python.el: native completion setup failed, %s: %s'
3457 % sys.exc_info()[:2])
3454 3458
3455__PYTHON_EL_native_completion_setup()" process) 3459__PYTHON_EL_native_completion_setup()" process)
3456 (when (and 3460 (when (and
diff --git a/lisp/ses.el b/lisp/ses.el
index 9221476e7a1..4c19c70c5da 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1254,8 +1254,7 @@ preceding cell has spilled over."
1254 ((< len width) 1254 ((< len width)
1255 ;; Fill field to length with spaces. 1255 ;; Fill field to length with spaces.
1256 (setq len (make-string (- width len) ?\s) 1256 (setq len (make-string (- width len) ?\s)
1257 text (if (or (stringp value) 1257 text (if (eq ses-call-printer-return t)
1258 (eq ses-call-printer-return t))
1259 (concat text len) 1258 (concat text len)
1260 (concat len text)))) 1259 (concat len text))))
1261 ((> len width) 1260 ((> len width)
diff --git a/lisp/time.el b/lisp/time.el
index 5c0eac0c208..c8726a9a1b0 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -160,24 +160,33 @@ LABEL is a string to display as the label of that TIMEZONE's time."
160 :type '(repeat (list string string)) 160 :type '(repeat (list string string))
161 :version "23.1") 161 :version "23.1")
162 162
163(defcustom display-time-world-list 163(defcustom display-time-world-list t
164 ;; Determine if zoneinfo style timezones are supported by testing that
165 ;; America/New York and Europe/London return different timezones.
166 (let ((nyt (format-time-string "%z" nil "America/New_York"))
167 (gmt (format-time-string "%z" nil "Europe/London")))
168 (if (string-equal nyt gmt)
169 legacy-style-world-list
170 zoneinfo-style-world-list))
171 "Alist of time zones and places for `display-time-world' to display. 164 "Alist of time zones and places for `display-time-world' to display.
172Each element has the form (TIMEZONE LABEL). 165Each element has the form (TIMEZONE LABEL).
173TIMEZONE should be in a format supported by your system. See the 166TIMEZONE should be in a format supported by your system. See the
174documentation of `zoneinfo-style-world-list' and 167documentation of `zoneinfo-style-world-list' and
175`legacy-style-world-list' for two widely used formats. LABEL is 168`legacy-style-world-list' for two widely used formats. LABEL is
176a string to display as the label of that TIMEZONE's time." 169a string to display as the label of that TIMEZONE's time.
170
171If the value is t instead of an alist, use the value of
172`zoneinfo-style-world-list' if it works on this platform, and of
173`legacy-style-world-list' otherwise."
174
177 :group 'display-time 175 :group 'display-time
178 :type '(repeat (list string string)) 176 :type '(repeat (list string string))
179 :version "23.1") 177 :version "23.1")
180 178
179(defun time--display-world-list ()
180 (if (listp display-time-world-list)
181 display-time-world-list
182 ;; Determine if zoneinfo style timezones are supported by testing that
183 ;; America/New York and Europe/London return different timezones.
184 (let ((nyt (format-time-string "%z" nil "America/New_York"))
185 (gmt (format-time-string "%z" nil "Europe/London")))
186 (if (string-equal nyt gmt)
187 legacy-style-world-list
188 zoneinfo-style-world-list))))
189
181(defcustom display-time-world-time-format "%A %d %B %R %Z" 190(defcustom display-time-world-time-format "%A %d %B %R %Z"
182 "Format of the time displayed, see `format-time-string'." 191 "Format of the time displayed, see `format-time-string'."
183 :group 'display-time 192 :group 'display-time
@@ -548,7 +557,7 @@ To turn off the world time display, go to that window and type `q'."
548 (not (get-buffer display-time-world-buffer-name))) 557 (not (get-buffer display-time-world-buffer-name)))
549 (run-at-time t display-time-world-timer-second 'display-time-world-timer)) 558 (run-at-time t display-time-world-timer-second 'display-time-world-timer))
550 (with-current-buffer (get-buffer-create display-time-world-buffer-name) 559 (with-current-buffer (get-buffer-create display-time-world-buffer-name)
551 (display-time-world-display display-time-world-list) 560 (display-time-world-display (time--display-world-list))
552 (display-buffer display-time-world-buffer-name 561 (display-buffer display-time-world-buffer-name
553 (cons nil '((window-height . fit-window-to-buffer)))) 562 (cons nil '((window-height . fit-window-to-buffer))))
554 (display-time-world-mode))) 563 (display-time-world-mode)))
@@ -556,7 +565,7 @@ To turn off the world time display, go to that window and type `q'."
556(defun display-time-world-timer () 565(defun display-time-world-timer ()
557 (if (get-buffer display-time-world-buffer-name) 566 (if (get-buffer display-time-world-buffer-name)
558 (with-current-buffer (get-buffer display-time-world-buffer-name) 567 (with-current-buffer (get-buffer display-time-world-buffer-name)
559 (display-time-world-display display-time-world-list)) 568 (display-time-world-display (time--display-world-list)))
560 ;; cancel timer 569 ;; cancel timer
561 (let ((list timer-list)) 570 (let ((list timer-list))
562 (while list 571 (while list
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 772a72d5c50..d268e1a3fe7 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -288,8 +288,10 @@ which is the \"1006\" extension implemented in Xterm >= 277."
288 (string-match "down-" last-name) 288 (string-match "down-" last-name)
289 (equal name (replace-match "" t t last-name))) 289 (equal name (replace-match "" t t last-name)))
290 (xterm-mouse--set-click-count event click-count))) 290 (xterm-mouse--set-click-count event click-count)))
291 ((not last-time) nil) 291 ((and last-time
292 ((and (> double-click-time (* 1000 (- this-time last-time))) 292 double-click-time
293 (or (eq double-click-time t)
294 (> double-click-time (* 1000 (- this-time last-time))))
293 (equal last-name (replace-match "" t t name))) 295 (equal last-name (replace-match "" t t name)))
294 (setq click-count (1+ click-count)) 296 (setq click-count (1+ click-count))
295 (xterm-mouse--set-click-count event click-count)) 297 (xterm-mouse--set-click-count event click-count))
diff --git a/src/callint.c b/src/callint.c
index 469205cc380..5d88082e38d 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -272,7 +272,7 @@ invoke it. If KEYS is omitted or nil, the return value of
272{ 272{
273 /* `args' will contain the array of arguments to pass to the function. 273 /* `args' will contain the array of arguments to pass to the function.
274 `visargs' will contain the same list but in a nicer form, so that if we 274 `visargs' will contain the same list but in a nicer form, so that if we
275 pass it to styled_format it will be understandable to a human. */ 275 pass it to Fformat_message it will be understandable to a human. */
276 Lisp_Object *args, *visargs; 276 Lisp_Object *args, *visargs;
277 Lisp_Object specs; 277 Lisp_Object specs;
278 Lisp_Object filter_specs; 278 Lisp_Object filter_specs;
@@ -502,7 +502,7 @@ invoke it. If KEYS is omitted or nil, the return value of
502 for (i = 2; *tem; i++) 502 for (i = 2; *tem; i++)
503 { 503 {
504 visargs[1] = make_string (tem + 1, strcspn (tem + 1, "\n")); 504 visargs[1] = make_string (tem + 1, strcspn (tem + 1, "\n"));
505 callint_message = styled_format (i - 1, visargs + 1, true, false); 505 callint_message = Fformat_message (i - 1, visargs + 1);
506 506
507 switch (*tem) 507 switch (*tem)
508 { 508 {
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 789aa008611..4a7068416fe 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -237,8 +237,7 @@ static char *
237XD_OBJECT_TO_STRING (Lisp_Object object) 237XD_OBJECT_TO_STRING (Lisp_Object object)
238{ 238{
239 AUTO_STRING (format, "%s"); 239 AUTO_STRING (format, "%s");
240 Lisp_Object args[] = { format, object }; 240 return SSDATA (CALLN (Fformat, format, object));
241 return SSDATA (styled_format (ARRAYELTS (args), args, false, false));
242} 241}
243 242
244#define XD_DBUS_VALIDATE_BUS_ADDRESS(bus) \ 243#define XD_DBUS_VALIDATE_BUS_ADDRESS(bus) \
diff --git a/src/editfns.c b/src/editfns.c
index 4dcf7cbe6ef..4fe50ac31d7 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -74,6 +74,7 @@ static Lisp_Object format_time_string (char const *, ptrdiff_t, struct timespec,
74static long int tm_gmtoff (struct tm *); 74static long int tm_gmtoff (struct tm *);
75static int tm_diff (struct tm *, struct tm *); 75static int tm_diff (struct tm *, struct tm *);
76static void update_buffer_properties (ptrdiff_t, ptrdiff_t); 76static void update_buffer_properties (ptrdiff_t, ptrdiff_t);
77static Lisp_Object styled_format (ptrdiff_t, Lisp_Object *, bool);
77 78
78#ifndef HAVE_TM_GMTOFF 79#ifndef HAVE_TM_GMTOFF
79# define HAVE_TM_GMTOFF false 80# define HAVE_TM_GMTOFF false
@@ -3958,7 +3959,7 @@ usage: (message FORMAT-STRING &rest ARGS) */)
3958 } 3959 }
3959 else 3960 else
3960 { 3961 {
3961 Lisp_Object val = styled_format (nargs, args, true, false); 3962 Lisp_Object val = Fformat_message (nargs, args);
3962 message3 (val); 3963 message3 (val);
3963 return val; 3964 return val;
3964 } 3965 }
@@ -3984,7 +3985,7 @@ usage: (message-box FORMAT-STRING &rest ARGS) */)
3984 } 3985 }
3985 else 3986 else
3986 { 3987 {
3987 Lisp_Object val = styled_format (nargs, args, true, false); 3988 Lisp_Object val = Fformat_message (nargs, args);
3988 Lisp_Object pane, menu; 3989 Lisp_Object pane, menu;
3989 3990
3990 pane = list1 (Fcons (build_string ("OK"), Qt)); 3991 pane = list1 (Fcons (build_string ("OK"), Qt));
@@ -4140,7 +4141,7 @@ produced text.
4140usage: (format STRING &rest OBJECTS) */) 4141usage: (format STRING &rest OBJECTS) */)
4141 (ptrdiff_t nargs, Lisp_Object *args) 4142 (ptrdiff_t nargs, Lisp_Object *args)
4142{ 4143{
4143 return styled_format (nargs, args, false, true); 4144 return styled_format (nargs, args, false);
4144} 4145}
4145 4146
4146DEFUN ("format-message", Fformat_message, Sformat_message, 1, MANY, 0, 4147DEFUN ("format-message", Fformat_message, Sformat_message, 1, MANY, 0,
@@ -4156,16 +4157,13 @@ and right quote replacement characters are specified by
4156usage: (format-message STRING &rest OBJECTS) */) 4157usage: (format-message STRING &rest OBJECTS) */)
4157 (ptrdiff_t nargs, Lisp_Object *args) 4158 (ptrdiff_t nargs, Lisp_Object *args)
4158{ 4159{
4159 return styled_format (nargs, args, true, true); 4160 return styled_format (nargs, args, true);
4160} 4161}
4161 4162
4162/* Implement ‘format-message’ if MESSAGE is true, ‘format’ otherwise. 4163/* Implement ‘format-message’ if MESSAGE is true, ‘format’ otherwise. */
4163 If NEW_RESULT, the result is a new string; otherwise, the result
4164 may be one of the arguments. */
4165 4164
4166Lisp_Object 4165static Lisp_Object
4167styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message, 4166styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4168 bool new_result)
4169{ 4167{
4170 ptrdiff_t n; /* The number of the next arg to substitute. */ 4168 ptrdiff_t n; /* The number of the next arg to substitute. */
4171 char initial_buffer[4000]; 4169 char initial_buffer[4000];
@@ -4195,9 +4193,6 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message,
4195 /* The start and end bytepos in the output string. */ 4193 /* The start and end bytepos in the output string. */
4196 ptrdiff_t start, end; 4194 ptrdiff_t start, end;
4197 4195
4198 /* Whether the argument is a newly created string. */
4199 bool_bf new_string : 1;
4200
4201 /* Whether the argument is a string with intervals. */ 4196 /* Whether the argument is a string with intervals. */
4202 bool_bf intervals : 1; 4197 bool_bf intervals : 1;
4203 } *info; 4198 } *info;
@@ -4241,6 +4236,9 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message,
4241 ptrdiff_t ispec; 4236 ptrdiff_t ispec;
4242 ptrdiff_t nspec = 0; 4237 ptrdiff_t nspec = 0;
4243 4238
4239 /* True if a string needs to be allocated to hold the result. */
4240 bool new_result = false;
4241
4244 /* If we start out planning a unibyte result, 4242 /* If we start out planning a unibyte result,
4245 then discover it has to be multibyte, we jump back to retry. */ 4243 then discover it has to be multibyte, we jump back to retry. */
4246 retry: 4244 retry:
@@ -4360,7 +4358,6 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message,
4360 if (nspec < ispec) 4358 if (nspec < ispec)
4361 { 4359 {
4362 spec->argument = args[n]; 4360 spec->argument = args[n];
4363 spec->new_string = false;
4364 spec->intervals = false; 4361 spec->intervals = false;
4365 nspec = ispec; 4362 nspec = ispec;
4366 } 4363 }
@@ -4378,7 +4375,6 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message,
4378 { 4375 {
4379 Lisp_Object noescape = conversion == 'S' ? Qnil : Qt; 4376 Lisp_Object noescape = conversion == 'S' ? Qnil : Qt;
4380 spec->argument = arg = Fprin1_to_string (arg, noescape); 4377 spec->argument = arg = Fprin1_to_string (arg, noescape);
4381 spec->new_string = true;
4382 if (STRING_MULTIBYTE (arg) && ! multibyte) 4378 if (STRING_MULTIBYTE (arg) && ! multibyte)
4383 { 4379 {
4384 multibyte = true; 4380 multibyte = true;
@@ -4397,7 +4393,6 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message,
4397 goto retry; 4393 goto retry;
4398 } 4394 }
4399 spec->argument = arg = Fchar_to_string (arg); 4395 spec->argument = arg = Fchar_to_string (arg);
4400 spec->new_string = true;
4401 } 4396 }
4402 4397
4403 if (!EQ (arg, args[n])) 4398 if (!EQ (arg, args[n]))
@@ -4421,7 +4416,6 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message,
4421 if (conversion == 's') 4416 if (conversion == 's')
4422 { 4417 {
4423 if (format == end && format - format_start == 2 4418 if (format == end && format - format_start == 2
4424 && (!new_result || spec->new_string)
4425 && ! string_intervals (args[0])) 4419 && ! string_intervals (args[0]))
4426 return arg; 4420 return arg;
4427 4421
diff --git a/src/frame.c b/src/frame.c
index 1aff3a007ac..ab801eec9c7 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2542,6 +2542,7 @@ for how to proceed. */)
2542 (Lisp_Object frame) 2542 (Lisp_Object frame)
2543{ 2543{
2544 struct frame *f = decode_live_frame (frame); 2544 struct frame *f = decode_live_frame (frame);
2545#ifdef HAVE_WINDOW_SYSTEM
2545 Lisp_Object parent = f->parent_frame; 2546 Lisp_Object parent = f->parent_frame;
2546 2547
2547 if (!NILP (parent)) 2548 if (!NILP (parent))
@@ -2562,6 +2563,7 @@ for how to proceed. */)
2562 return Qnil; 2563 return Qnil;
2563 } 2564 }
2564 } 2565 }
2566#endif /* HAVE_WINDOW_SYSTEM */
2565 2567
2566 /* Don't allow minibuf_window to remain on an iconified frame. */ 2568 /* Don't allow minibuf_window to remain on an iconified frame. */
2567 check_minibuf_window (frame, EQ (minibuf_window, selected_window)); 2569 check_minibuf_window (frame, EQ (minibuf_window, selected_window));
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 8d565c19c9c..4aa2c9bb5e0 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -577,11 +577,18 @@ xg_check_special_colors (struct frame *f,
577 if (get_fg) 577 if (get_fg)
578 gtk_style_context_get_color (gsty, state, &col); 578 gtk_style_context_get_color (gsty, state, &col);
579 else 579 else
580 /* FIXME: gtk_style_context_get_background_color is deprecated 580 {
581 in GTK+ 3.16. New versions of GTK+ don’t use the concept of 581 GdkRGBA *c;
582 a single background color any more, so we shouldn’t query for 582 /* FIXME: Retrieving the background color is deprecated in
583 it. */ 583 GTK+ 3.16. New versions of GTK+ don’t use the concept of a
584 gtk_style_context_get_background_color (gsty, state, &col); 584 single background color any more, so we shouldn’t query for
585 it. */
586 gtk_style_context_get (gsty, state,
587 GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &c,
588 NULL);
589 col = *c;
590 gdk_rgba_free (c);
591 }
585 592
586 unsigned short 593 unsigned short
587 r = col.red * 65535, 594 r = col.red * 65535,
diff --git a/src/keyboard.c b/src/keyboard.c
index e8701b88708..ee353d2b078 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -145,10 +145,6 @@ static Lisp_Object recover_top_level_message;
145/* Message normally displayed by Vtop_level. */ 145/* Message normally displayed by Vtop_level. */
146static Lisp_Object regular_top_level_message; 146static Lisp_Object regular_top_level_message;
147 147
148/* For longjmp to where kbd input is being done. */
149
150static sys_jmp_buf getcjmp;
151
152/* True while displaying for echoing. Delays C-g throwing. */ 148/* True while displaying for echoing. Delays C-g throwing. */
153 149
154static bool echoing; 150static bool echoing;
@@ -2570,9 +2566,6 @@ read_char (int commandflag, Lisp_Object map,
2570 so restore it now. */ 2566 so restore it now. */
2571 restore_getcjmp (save_jump); 2567 restore_getcjmp (save_jump);
2572 pthread_sigmask (SIG_SETMASK, &empty_mask, 0); 2568 pthread_sigmask (SIG_SETMASK, &empty_mask, 0);
2573#if THREADS_ENABLED
2574 maybe_reacquire_global_lock ();
2575#endif
2576 unbind_to (jmpcount, Qnil); 2569 unbind_to (jmpcount, Qnil);
2577 XSETINT (c, quit_char); 2570 XSETINT (c, quit_char);
2578 internal_last_event_frame = selected_frame; 2571 internal_last_event_frame = selected_frame;
@@ -10508,6 +10501,13 @@ handle_interrupt (bool in_signal_handler)
10508 outside of polling since we don't get SIGIO like X and we don't have a 10501 outside of polling since we don't get SIGIO like X and we don't have a
10509 separate event loop thread like W32. */ 10502 separate event loop thread like W32. */
10510#ifndef HAVE_NS 10503#ifndef HAVE_NS
10504#ifdef THREADS_ENABLED
10505 /* If we were called from a signal handler, we must be in the main
10506 thread, see deliver_process_signal. So we must make sure the
10507 main thread holds the global lock. */
10508 if (in_signal_handler)
10509 maybe_reacquire_global_lock ();
10510#endif
10511 if (waiting_for_input && !echoing) 10511 if (waiting_for_input && !echoing)
10512 quit_throw_to_read_char (in_signal_handler); 10512 quit_throw_to_read_char (in_signal_handler);
10513#endif 10513#endif
diff --git a/src/lisp.h b/src/lisp.h
index 680c25d4c49..266370333f5 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1865,6 +1865,26 @@ verify (offsetof (struct Lisp_Sub_Char_Table, contents)
1865 == (offsetof (struct Lisp_Vector, contents) 1865 == (offsetof (struct Lisp_Vector, contents)
1866 + SUB_CHAR_TABLE_OFFSET * sizeof (Lisp_Object))); 1866 + SUB_CHAR_TABLE_OFFSET * sizeof (Lisp_Object)));
1867 1867
1868
1869/* Save and restore the instruction and environment pointers,
1870 without affecting the signal mask. */
1871
1872#ifdef HAVE__SETJMP
1873typedef jmp_buf sys_jmp_buf;
1874# define sys_setjmp(j) _setjmp (j)
1875# define sys_longjmp(j, v) _longjmp (j, v)
1876#elif defined HAVE_SIGSETJMP
1877typedef sigjmp_buf sys_jmp_buf;
1878# define sys_setjmp(j) sigsetjmp (j, 0)
1879# define sys_longjmp(j, v) siglongjmp (j, v)
1880#else
1881/* A platform that uses neither _longjmp nor siglongjmp; assume
1882 longjmp does not affect the sigmask. */
1883typedef jmp_buf sys_jmp_buf;
1884# define sys_setjmp(j) setjmp (j)
1885# define sys_longjmp(j, v) longjmp (j, v)
1886#endif
1887
1868#include "thread.h" 1888#include "thread.h"
1869 1889
1870/*********************************************************************** 1890/***********************************************************************
@@ -3003,25 +3023,6 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
3003 static struct Lisp_Kboard_Objfwd ko_fwd; \ 3023 static struct Lisp_Kboard_Objfwd ko_fwd; \
3004 defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \ 3024 defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \
3005 } while (false) 3025 } while (false)
3006
3007/* Save and restore the instruction and environment pointers,
3008 without affecting the signal mask. */
3009
3010#ifdef HAVE__SETJMP
3011typedef jmp_buf sys_jmp_buf;
3012# define sys_setjmp(j) _setjmp (j)
3013# define sys_longjmp(j, v) _longjmp (j, v)
3014#elif defined HAVE_SIGSETJMP
3015typedef sigjmp_buf sys_jmp_buf;
3016# define sys_setjmp(j) sigsetjmp (j, 0)
3017# define sys_longjmp(j, v) siglongjmp (j, v)
3018#else
3019/* A platform that uses neither _longjmp nor siglongjmp; assume
3020 longjmp does not affect the sigmask. */
3021typedef jmp_buf sys_jmp_buf;
3022# define sys_setjmp(j) setjmp (j)
3023# define sys_longjmp(j, v) longjmp (j, v)
3024#endif
3025 3026
3026 3027
3027/* Elisp uses several stacks: 3028/* Elisp uses several stacks:
@@ -3969,7 +3970,6 @@ extern _Noreturn void time_overflow (void);
3969extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, bool); 3970extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, bool);
3970extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, 3971extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t,
3971 ptrdiff_t, bool); 3972 ptrdiff_t, bool);
3972extern Lisp_Object styled_format (ptrdiff_t, Lisp_Object *, bool, bool);
3973extern void init_editfns (bool); 3973extern void init_editfns (bool);
3974extern void syms_of_editfns (void); 3974extern void syms_of_editfns (void);
3975 3975
diff --git a/src/sysdep.c b/src/sysdep.c
index 26d381f5796..8291a606bea 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -232,7 +232,18 @@ emacs_get_current_dir_name (void)
232 bool use_libc = true; 232 bool use_libc = true;
233# endif 233# endif
234 if (use_libc) 234 if (use_libc)
235 return get_current_dir_name (); 235 {
236 /* GNU/Linux get_current_dir_name can return a string starting
237 with "(unreachable)" (Bug#27871). */
238 char *wd = get_current_dir_name ();
239 if (wd && ! (IS_DIRECTORY_SEP (*wd) || (*wd && IS_DEVICE_SEP (wd[1]))))
240 {
241 free (wd);
242 errno = ENOENT;
243 return NULL;
244 }
245 return wd;
246 }
236# endif 247# endif
237 248
238 char *buf; 249 char *buf;
diff --git a/src/thread.c b/src/thread.c
index 42d7791ad0f..d075bdb3a13 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -101,14 +101,20 @@ acquire_global_lock (struct thread_state *self)
101 post_acquire_global_lock (self); 101 post_acquire_global_lock (self);
102} 102}
103 103
104/* This is called from keyboard.c when it detects that SIGINT 104/* This is called from keyboard.c when it detects that SIGINT was
105 interrupted thread_select before the current thread could acquire 105 delivered to the main thread and interrupted thread_select before
106 the lock. We must acquire the lock to prevent a thread from 106 the main thread could acquire the lock. We must acquire the lock
107 running without holding the global lock, and to avoid repeated 107 to prevent a thread from running without holding the global lock,
108 calls to sys_mutex_unlock, which invokes undefined behavior. */ 108 and to avoid repeated calls to sys_mutex_unlock, which invokes
109 undefined behavior. */
109void 110void
110maybe_reacquire_global_lock (void) 111maybe_reacquire_global_lock (void)
111{ 112{
113 /* SIGINT handler is always run on the main thread, see
114 deliver_process_signal, so reflect that in our thread-tracking
115 variables. */
116 current_thread = &main_thread;
117
112 if (current_thread->not_holding_lock) 118 if (current_thread->not_holding_lock)
113 { 119 {
114 struct thread_state *self = current_thread; 120 struct thread_state *self = current_thread;
diff --git a/src/thread.h b/src/thread.h
index 7fce8674f0e..cb2133d72d4 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -158,6 +158,13 @@ struct thread_state
158 bool m_waiting_for_input; 158 bool m_waiting_for_input;
159#define waiting_for_input (current_thread->m_waiting_for_input) 159#define waiting_for_input (current_thread->m_waiting_for_input)
160 160
161 /* For longjmp to where kbd input is being done. This is per-thread
162 so that if more than one thread calls read_char, they don't
163 clobber each other's getcjmp, which will cause
164 quit_throw_to_read_char crash due to using a wrong stack. */
165 sys_jmp_buf m_getcjmp;
166#define getcjmp (current_thread->m_getcjmp)
167
161 /* The OS identifier for this thread. */ 168 /* The OS identifier for this thread. */
162 sys_thread_t thread_id; 169 sys_thread_t thread_id;
163 170
diff --git a/src/xdisp.c b/src/xdisp.c
index 86164eb9f6f..141275f15a0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10194,7 +10194,7 @@ vadd_to_log (char const *format, va_list ap)
10194 for (ptrdiff_t i = 1; i <= nargs; i++) 10194 for (ptrdiff_t i = 1; i <= nargs; i++)
10195 args[i] = va_arg (ap, Lisp_Object); 10195 args[i] = va_arg (ap, Lisp_Object);
10196 Lisp_Object msg = Qnil; 10196 Lisp_Object msg = Qnil;
10197 msg = styled_format (nargs, args, true, false); 10197 msg = Fformat_message (nargs, args);
10198 10198
10199 ptrdiff_t len = SBYTES (msg) + 1; 10199 ptrdiff_t len = SBYTES (msg) + 1;
10200 USE_SAFE_ALLOCA; 10200 USE_SAFE_ALLOCA;
@@ -19525,7 +19525,7 @@ DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "",
19525usage: (trace-to-stderr STRING &rest OBJECTS) */) 19525usage: (trace-to-stderr STRING &rest OBJECTS) */)
19526 (ptrdiff_t nargs, Lisp_Object *args) 19526 (ptrdiff_t nargs, Lisp_Object *args)
19527{ 19527{
19528 Lisp_Object s = styled_format (nargs, args, false, false); 19528 Lisp_Object s = Fformat (nargs, args);
19529 fwrite (SDATA (s), 1, SBYTES (s), stderr); 19529 fwrite (SDATA (s), 1, SBYTES (s), stderr);
19530 return Qnil; 19530 return Qnil;
19531} 19531}
diff --git a/src/xrdb.c b/src/xrdb.c
index 15a01475b7c..3c1bad1c735 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -345,6 +345,7 @@ get_user_db (Display *display)
345 db = XrmGetStringDatabase (xdefs); 345 db = XrmGetStringDatabase (xdefs);
346 else 346 else
347 { 347 {
348 /* Use ~/.Xdefaults. */
348 char *home = gethomedir (); 349 char *home = gethomedir ();
349 ptrdiff_t homelen = strlen (home); 350 ptrdiff_t homelen = strlen (home);
350 char *filename = xrealloc (home, homelen + sizeof xdefaults); 351 char *filename = xrealloc (home, homelen + sizeof xdefaults);
@@ -375,13 +376,15 @@ get_environ_db (void)
375 376
376 if (!p) 377 if (!p)
377 { 378 {
379 /* Use ~/.Xdefaults-HOSTNAME. */
378 char *home = gethomedir (); 380 char *home = gethomedir ();
379 ptrdiff_t homelen = strlen (home); 381 ptrdiff_t homelen = strlen (home);
380 Lisp_Object system_name = Fsystem_name (); 382 Lisp_Object system_name = Fsystem_name ();
381 ptrdiff_t filenamesize = (homelen + sizeof xdefaults 383 ptrdiff_t filenamesize = (homelen + sizeof xdefaults
382 + SBYTES (system_name)); 384 + 1 + SBYTES (system_name));
383 p = filename = xrealloc (home, filenamesize); 385 p = filename = xrealloc (home, filenamesize);
384 lispstpcpy (stpcpy (filename + homelen, xdefaults), system_name); 386 lispstpcpy (stpcpy (stpcpy (filename + homelen, xdefaults), "-"),
387 system_name);
385 } 388 }
386 389
387 db = XrmGetFileDatabase (p); 390 db = XrmGetFileDatabase (p);
diff --git a/test/lisp/emacs-lisp/generator-tests.el b/test/lisp/emacs-lisp/generator-tests.el
index 4cc6c841dac..cbb136ae919 100644
--- a/test/lisp/emacs-lisp/generator-tests.el
+++ b/test/lisp/emacs-lisp/generator-tests.el
@@ -282,3 +282,13 @@ identical output.
282(ert-deftest cps-test-declarations-preserved () 282(ert-deftest cps-test-declarations-preserved ()
283 (should (equal (documentation 'generator-with-docstring) "Documentation!")) 283 (should (equal (documentation 'generator-with-docstring) "Documentation!"))
284 (should (equal (get 'generator-with-docstring 'lisp-indent-function) 5))) 284 (should (equal (get 'generator-with-docstring 'lisp-indent-function) 5)))
285
286(ert-deftest cps-iter-lambda-with-dynamic-binding ()
287 "`iter-lambda' with dynamic binding produces correct result (bug#25965)."
288 (should (= 1
289 (iter-next
290 (funcall (iter-lambda ()
291 (let* ((fill-column 10) ;;any special variable will do
292 (i 0)
293 (j (setq i (1+ i))))
294 (iter-yield i))))))))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index d430caec8aa..a8fe06d4e67 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3438,7 +3438,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3438 (fboundp 'connection-local-set-profiles))) 3438 (fboundp 'connection-local-set-profiles)))
3439 3439
3440 ;; `connection-local-set-profile-variables' and 3440 ;; `connection-local-set-profile-variables' and
3441 ;; `connection-local-set-profiles' exists since Emacs 26. We don't 3441 ;; `connection-local-set-profiles' exist since Emacs 26. We don't
3442 ;; want to see compiler warnings for older Emacsen. 3442 ;; want to see compiler warnings for older Emacsen.
3443 (let ((default-directory tramp-test-temporary-file-directory) 3443 (let ((default-directory tramp-test-temporary-file-directory)
3444 explicit-shell-file-name kill-buffer-query-functions) 3444 explicit-shell-file-name kill-buffer-query-functions)
@@ -4108,12 +4108,29 @@ Use the `ls' command."
4108 tramp-connection-properties))) 4108 tramp-connection-properties)))
4109 (tramp--test-utf8))) 4109 (tramp--test-utf8)))
4110 4110
4111(ert-deftest tramp-test37-file-system-info ()
4112 "Check that `file-system-info' returns proper values."
4113 (skip-unless (tramp--test-enabled))
4114 ;; Since Emacs 27.1.
4115 (skip-unless (fboundp 'file-system-info))
4116
4117 ;; `file-system-info' exists since Emacs 27. We don't
4118 ;; want to see compiler warnings for older Emacsen.
4119 (let ((fsi (with-no-warnings
4120 (file-system-info tramp-test-temporary-file-directory))))
4121 (skip-unless fsi)
4122 (should (and (consp fsi)
4123 (= (length fsi) 3)
4124 (numberp (nth 0 fsi))
4125 (numberp (nth 1 fsi))
4126 (numberp (nth 2 fsi))))))
4127
4111(defun tramp--test-timeout-handler () 4128(defun tramp--test-timeout-handler ()
4112 (interactive) 4129 (interactive)
4113 (ert-fail (format "`%s' timed out" (ert-test-name (ert-running-test))))) 4130 (ert-fail (format "`%s' timed out" (ert-test-name (ert-running-test)))))
4114 4131
4115;; This test is inspired by Bug#16928. 4132;; This test is inspired by Bug#16928.
4116(ert-deftest tramp-test37-asynchronous-requests () 4133(ert-deftest tramp-test38-asynchronous-requests ()
4117 "Check parallel asynchronous requests. 4134 "Check parallel asynchronous requests.
4118Such requests could arrive from timers, process filters and 4135Such requests could arrive from timers, process filters and
4119process sentinels. They shall not disturb each other." 4136process sentinels. They shall not disturb each other."
@@ -4270,7 +4287,7 @@ process sentinels. They shall not disturb each other."
4270 (ignore-errors (cancel-timer timer)) 4287 (ignore-errors (cancel-timer timer))
4271 (ignore-errors (delete-directory tmp-name 'recursive))))))) 4288 (ignore-errors (delete-directory tmp-name 'recursive)))))))
4272 4289
4273(ert-deftest tramp-test38-recursive-load () 4290(ert-deftest tramp-test39-recursive-load ()
4274 "Check that Tramp does not fail due to recursive load." 4291 "Check that Tramp does not fail due to recursive load."
4275 (skip-unless (tramp--test-enabled)) 4292 (skip-unless (tramp--test-enabled))
4276 4293
@@ -4293,7 +4310,7 @@ process sentinels. They shall not disturb each other."
4293 (mapconcat 'shell-quote-argument load-path " -L ") 4310 (mapconcat 'shell-quote-argument load-path " -L ")
4294 (shell-quote-argument code)))))))) 4311 (shell-quote-argument code))))))))
4295 4312
4296(ert-deftest tramp-test39-remote-load-path () 4313(ert-deftest tramp-test40-remote-load-path ()
4297 "Check that Tramp autoloads its packages with remote `load-path'." 4314 "Check that Tramp autoloads its packages with remote `load-path'."
4298 ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el. 4315 ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el.
4299 ;; It shall still work, when a remote file name is in the 4316 ;; It shall still work, when a remote file name is in the
@@ -4316,7 +4333,7 @@ process sentinels. They shall not disturb each other."
4316 (mapconcat 'shell-quote-argument load-path " -L ") 4333 (mapconcat 'shell-quote-argument load-path " -L ")
4317 (shell-quote-argument code))))))) 4334 (shell-quote-argument code)))))))
4318 4335
4319(ert-deftest tramp-test40-unload () 4336(ert-deftest tramp-test41-unload ()
4320 "Check that Tramp and its subpackages unload completely. 4337 "Check that Tramp and its subpackages unload completely.
4321Since it unloads Tramp, it shall be the last test to run." 4338Since it unloads Tramp, it shall be the last test to run."
4322 :tags '(:expensive-test) 4339 :tags '(:expensive-test)
@@ -4374,7 +4391,7 @@ Since it unloads Tramp, it shall be the last test to run."
4374;; * Fix `tramp-test05-expand-file-name-relative' in `expand-file-name'. 4391;; * Fix `tramp-test05-expand-file-name-relative' in `expand-file-name'.
4375;; * Fix `tramp-test06-directory-file-name' for `ftp'. 4392;; * Fix `tramp-test06-directory-file-name' for `ftp'.
4376;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?). 4393;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?).
4377;; * Fix Bug#16928 in `tramp-test37-asynchronous-requests'. 4394;; * Fix Bug#16928 in `tramp-test38-asynchronous-requests'.
4378 4395
4379(defun tramp-test-all (&optional interactive) 4396(defun tramp-test-all (&optional interactive)
4380 "Run all tests for \\[tramp]." 4397 "Run all tests for \\[tramp]."
diff --git a/test/lisp/progmodes/flymake-resources/Makefile b/test/lisp/progmodes/flymake-resources/Makefile
index 0f3f39791c8..494407567f2 100644
--- a/test/lisp/progmodes/flymake-resources/Makefile
+++ b/test/lisp/progmodes/flymake-resources/Makefile
@@ -1,6 +1,6 @@
1# Makefile for flymake tests 1# Makefile for flymake tests
2 2
3CC_OPTS = -Wall 3CC_OPTS = -Wall -Wextra
4 4
5## Recent gcc (e.g. 4.8.2 on RHEL7) can automatically colorize their output, 5## Recent gcc (e.g. 4.8.2 on RHEL7) can automatically colorize their output,
6## which can confuse flymake. Set GCC_COLORS to disable that. 6## which can confuse flymake. Set GCC_COLORS to disable that.
@@ -8,6 +8,6 @@ CC_OPTS = -Wall
8## normally use flymake, so it seems like just avoiding the issue 8## normally use flymake, so it seems like just avoiding the issue
9## in this test is fine. Set flymake-log-level to 3 to investigate. 9## in this test is fine. Set flymake-log-level to 3 to investigate.
10check-syntax: 10check-syntax:
11 GCC_COLORS= $(CC) $(CC_OPTS) ${CHK_SOURCES} 11 GCC_COLORS= $(CC) $(CC_OPTS) ${CHK_SOURCES} || true
12 12
13# eof 13# eof
diff --git a/test/lisp/progmodes/flymake-resources/errors-and-warnings.c b/test/lisp/progmodes/flymake-resources/errors-and-warnings.c
new file mode 100644
index 00000000000..1d38bd6bd27
--- /dev/null
+++ b/test/lisp/progmodes/flymake-resources/errors-and-warnings.c
@@ -0,0 +1,13 @@
1/* Flymake should notice an error on the next line, since
2 that file has at least one warning.*/
3#include "some-problems.h"
4/* But not this one */
5#include "no-problems.h"
6
7int main()
8{
9 char c = 1000; /* a note and a warning */
10 int bla;
11 char c; if (bla == (void*)3); /* an error, and two warnings */
12 return c;
13}
diff --git a/test/lisp/progmodes/flymake-resources/no-problems.h b/test/lisp/progmodes/flymake-resources/no-problems.h
new file mode 100644
index 00000000000..19ddc615b32
--- /dev/null
+++ b/test/lisp/progmodes/flymake-resources/no-problems.h
@@ -0,0 +1 @@
typedef int no_problems;
diff --git a/test/lisp/progmodes/flymake-resources/some-problems.h b/test/lisp/progmodes/flymake-resources/some-problems.h
new file mode 100644
index 00000000000..165d8dd525e
--- /dev/null
+++ b/test/lisp/progmodes/flymake-resources/some-problems.h
@@ -0,0 +1,5 @@
1#include <stdio.h>
2
3strange;
4
5sint main();
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el
index b04346fd97c..5e042f2b082 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -1,4 +1,4 @@
1;;; flymake-tests.el --- Test suite for flymake 1;;; flymake-tests.el --- Test suite for flymake -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 2011-2017 Free Software Foundation, Inc. 3;; Copyright (C) 2011-2017 Free Software Foundation, Inc.
4 4
@@ -26,54 +26,295 @@
26(require 'flymake) 26(require 'flymake)
27 27
28(defvar flymake-tests-data-directory 28(defvar flymake-tests-data-directory
29 (expand-file-name "lisp/progmodes/flymake-resources" (getenv "EMACS_TEST_DIRECTORY")) 29 (expand-file-name "lisp/progmodes/flymake-resources"
30 (or (getenv "EMACS_TEST_DIRECTORY")
31 (expand-file-name "../../.."
32 (or load-file-name
33 buffer-file-name))))
30 "Directory containing flymake test data.") 34 "Directory containing flymake test data.")
31 35
32 36
33;; Warning predicate 37;;
34(defun flymake-tests--current-face (file predicate) 38;;
35 (let ((buffer (find-file-noselect 39(defun flymake-tests--wait-for-backends ()
36 (expand-file-name file flymake-tests-data-directory))) 40 ;; Weirdness here... http://debbugs.gnu.org/17647#25
37 (process-environment (cons "LC_ALL=C" process-environment)) 41 ;; ... meaning `sleep-for', and even
38 (i 0)) 42 ;; `accept-process-output', won't suffice as ways to get
43 ;; process filters and sentinels to run, though they do work
44 ;; fine in a non-interactive batch session. The only thing
45 ;; that will indeed unblock pending process output is
46 ;; reading an input event, so, as a workaround, use a dummy
47 ;; `read-event' with a very short timeout.
48 (unless noninteractive (read-event "" nil 0.1))
49 (cl-loop repeat 5
50 for notdone = (cl-set-difference (flymake-running-backends)
51 (flymake-reporting-backends))
52 while notdone
53 unless noninteractive do (read-event "" nil 0.1)
54 do (sleep-for (+ 0.5 flymake-no-changes-timeout))
55 finally (when notdone (ert-fail
56 (format "Some backends not reporting yet %s"
57 notdone)))))
58
59(cl-defun flymake-tests--call-with-fixture (fn file
60 &key (severity-predicate
61 nil sev-pred-supplied-p))
62 "Call FN after flymake setup in FILE, using `flymake-proc`.
63SEVERITY-PREDICATE is used to setup
64`flymake-proc-diagnostic-type-pred'"
65 (let* ((file (expand-file-name file flymake-tests-data-directory))
66 (visiting (find-buffer-visiting file))
67 (buffer (or visiting (find-file-noselect file)))
68 (process-environment (cons "LC_ALL=C" process-environment))
69 (warning-minimum-log-level :error))
39 (unwind-protect 70 (unwind-protect
40 (with-current-buffer buffer 71 (with-current-buffer buffer
41 (setq-local flymake-warning-predicate predicate) 72 (save-excursion
42 (goto-char (point-min)) 73 (when sev-pred-supplied-p
43 (flymake-mode 1) 74 (setq-local flymake-proc-diagnostic-type-pred severity-predicate))
44 ;; Weirdness here... https://debbugs.gnu.org/17647#25 75 (goto-char (point-min))
45 (while (and flymake-is-running (< (setq i (1+ i)) 10)) 76 (unless flymake-mode (flymake-mode 1))
46 (sleep-for (+ 0.5 flymake-no-changes-timeout))) 77 (flymake-tests--wait-for-backends)
47 (flymake-goto-next-error) 78 (funcall fn)))
48 (face-at-point)) 79 (and buffer
49 (and buffer (let (kill-buffer-query-functions) (kill-buffer buffer)))))) 80 (not visiting)
81 (let (kill-buffer-query-functions) (kill-buffer buffer))))))
82
83(cl-defmacro flymake-tests--with-flymake ((file &rest args)
84 &body body)
85 (declare (indent 1)
86 (debug (sexp &rest form)))
87 `(flymake-tests--call-with-fixture (lambda () ,@body) ,file ,@args))
50 88
51(ert-deftest warning-predicate-rx-gcc () 89(ert-deftest warning-predicate-rx-gcc ()
52 "Test GCC warning via regexp predicate." 90 "Test GCC warning via regexp predicate."
53 (skip-unless (and (executable-find "gcc") (executable-find "make"))) 91 (skip-unless (and (executable-find "gcc") (executable-find "make")))
54 (should (eq 'flymake-warnline 92 (flymake-tests--with-flymake
55 (flymake-tests--current-face "test.c" "^[Ww]arning")))) 93 ("test.c" :severity-predicate "^[Ww]arning")
94 (flymake-goto-next-error)
95 (should (eq 'flymake-warning
96 (face-at-point)))))
56 97
57(ert-deftest warning-predicate-function-gcc () 98(ert-deftest warning-predicate-function-gcc ()
58 "Test GCC warning via function predicate." 99 "Test GCC warning via function predicate."
59 (skip-unless (and (executable-find "gcc") (executable-find "make"))) 100 (skip-unless (and (executable-find "gcc") (executable-find "make")))
60 (should (eq 'flymake-warnline 101 (flymake-tests--with-flymake
61 (flymake-tests--current-face "test.c" 102 ("test.c" :severity-predicate
62 (lambda (msg) (string-match "^[Ww]arning" msg)))))) 103 (lambda (msg) (string-match "^[Ww]arning" msg)))
104 (flymake-goto-next-error)
105 (should (eq 'flymake-warning
106 (face-at-point)))))
63 107
64(ert-deftest warning-predicate-rx-perl () 108(ert-deftest warning-predicate-rx-perl ()
65 "Test perl warning via regular expression predicate." 109 "Test perl warning via regular expression predicate."
66 (skip-unless (executable-find "perl")) 110 (skip-unless (executable-find "perl"))
67 (should (eq 'flymake-warnline 111 (flymake-tests--with-flymake
68 (flymake-tests--current-face "test.pl" "^Scalar value")))) 112 ("test.pl" :severity-predicate "^Scalar value")
113 (flymake-goto-next-error)
114 (should (eq 'flymake-warning
115 (face-at-point)))))
69 116
70(ert-deftest warning-predicate-function-perl () 117(ert-deftest warning-predicate-function-perl ()
71 "Test perl warning via function predicate." 118 "Test perl warning via function predicate."
72 (skip-unless (executable-find "perl")) 119 (skip-unless (executable-find "perl"))
73 (should (eq 'flymake-warnline 120 (flymake-tests--with-flymake
74 (flymake-tests--current-face 121 ("test.pl" :severity-predicate
75 "test.pl" 122 (lambda (msg) (string-match "^Scalar value" msg)))
76 (lambda (msg) (string-match "^Scalar value" msg)))))) 123 (flymake-goto-next-error)
124 (should (eq 'flymake-warning
125 (face-at-point)))))
126
127(ert-deftest different-diagnostic-types ()
128 "Test GCC warning via function predicate."
129 (skip-unless (and (executable-find "gcc") (executable-find "make")))
130 (let ((flymake-wrap-around nil))
131 (flymake-tests--with-flymake
132 ("errors-and-warnings.c")
133 (flymake-goto-next-error)
134 (should (eq 'flymake-error (face-at-point)))
135 (flymake-goto-next-error)
136 (should (eq 'flymake-note (face-at-point)))
137 (flymake-goto-next-error)
138 (should (eq 'flymake-warning (face-at-point)))
139 (flymake-goto-next-error)
140 (should (eq 'flymake-error (face-at-point)))
141 (flymake-goto-next-error)
142 (should (eq 'flymake-warning (face-at-point)))
143 (flymake-goto-next-error)
144 (should (eq 'flymake-warning (face-at-point)))
145 (should-error (flymake-goto-next-error nil nil t)))))
146
147(ert-deftest included-c-header-files ()
148 "Test inclusion of .h header files."
149 (skip-unless (and (executable-find "gcc") (executable-find "make")))
150 (let ((flymake-wrap-around nil))
151 (flymake-tests--with-flymake
152 ("some-problems.h")
153 (flymake-goto-next-error)
154 (should (eq 'flymake-warning (face-at-point)))
155 (flymake-goto-next-error)
156 (should (eq 'flymake-error (face-at-point)))
157 (should-error (flymake-goto-next-error nil nil t)))
158 (flymake-tests--with-flymake
159 ("no-problems.h")
160 (should-error (flymake-goto-next-error nil nil t)))))
161
162(defmacro flymake-tests--assert-set (set
163 should
164 should-not)
165 (declare (indent 1))
166 `(progn
167 ,@(cl-loop
168 for s in should
169 collect `(should (memq (quote ,s) ,set)))
170 ,@(cl-loop
171 for s in should-not
172 collect `(should-not (memq (quote ,s) ,set)))))
173
174(defun flymake-tests--diagnose-words
175 (report-fn type words)
176 "Helper. Call REPORT-FN with diagnostics for WORDS in buffer."
177 (funcall report-fn
178 (cl-loop
179 for word in words
180 append
181 (save-excursion
182 (goto-char (point-min))
183 (cl-loop while (word-search-forward word nil t)
184 collect (flymake-make-diagnostic
185 (current-buffer)
186 (match-beginning 0)
187 (match-end 0)
188 type
189 (concat word " is wrong")))))))
190
191(ert-deftest dummy-backends ()
192 "Test many different kinds of backends."
193 (with-temp-buffer
194 (cl-letf
195 (((symbol-function 'error-backend)
196 (lambda (report-fn)
197 (run-with-timer
198 0.5 nil
199 #'flymake-tests--diagnose-words report-fn :error '("manha" "prognata"))))
200 ((symbol-function 'warning-backend)
201 (lambda (report-fn)
202 (run-with-timer
203 0.5 nil
204 #'flymake-tests--diagnose-words report-fn :warning '("ut" "dolor"))))
205 ((symbol-function 'sync-backend)
206 (lambda (report-fn)
207 (flymake-tests--diagnose-words report-fn :note '("quis" "commodo"))))
208 ((symbol-function 'panicking-backend)
209 (lambda (report-fn)
210 (run-with-timer
211 0.5 nil
212 report-fn :panic :explanation "The spanish inquisition!")))
213 ((symbol-function 'crashing-backend)
214 (lambda (_report-fn)
215 ;; HACK: Shoosh log during tests
216 (setq-local warning-minimum-log-level :emergency)
217 (error "crashed"))))
218 (insert "Lorem ipsum dolor sit amet, consectetur adipiscing
219 elit, sed do eiusmod tempor incididunt ut labore et dolore
220 manha aliqua. Ut enim ad minim veniam, quis nostrud
221 exercitation ullamco laboris nisi ut aliquip ex ea commodo
222 consequat. Duis aute irure dolor in reprehenderit in
223 voluptate velit esse cillum dolore eu fugiat nulla
224 pariatur. Excepteur sint occaecat cupidatat non prognata
225 sunt in culpa qui officia deserunt mollit anim id est
226 laborum.")
227 (let ((flymake-diagnostic-functions
228 (list 'error-backend 'warning-backend 'sync-backend
229 'panicking-backend
230 'crashing-backend
231 ))
232 (flymake-wrap-around nil))
233 (flymake-mode)
234
235 (flymake-tests--assert-set (flymake-running-backends)
236 (error-backend warning-backend panicking-backend)
237 (crashing-backend))
238
239 (flymake-tests--assert-set (flymake-disabled-backends)
240 (crashing-backend)
241 (error-backend warning-backend sync-backend
242 panicking-backend))
243
244 (flymake-tests--wait-for-backends)
245
246 (flymake-tests--assert-set (flymake-disabled-backends)
247 (crashing-backend panicking-backend)
248 (error-backend warning-backend sync-backend))
249
250 (goto-char (point-min))
251 (flymake-goto-next-error)
252 (should (eq 'flymake-warning (face-at-point))) ; dolor
253 (flymake-goto-next-error)
254 (should (eq 'flymake-warning (face-at-point))) ; ut
255 (flymake-goto-next-error)
256 (should (eq 'flymake-error (face-at-point))) ; manha
257 (flymake-goto-next-error)
258 (should (eq 'flymake-warning (face-at-point))) ; Ut
259 (flymake-goto-next-error)
260 (should (eq 'flymake-note (face-at-point))) ; quis
261 (flymake-goto-next-error)
262 (should (eq 'flymake-warning (face-at-point))) ; ut
263 (flymake-goto-next-error)
264 (should (eq 'flymake-note (face-at-point))) ; commodo
265 (flymake-goto-next-error)
266 (should (eq 'flymake-warning (face-at-point))) ; dolor
267 (flymake-goto-next-error)
268 (should (eq 'flymake-error (face-at-point))) ; prognata
269 (should-error (flymake-goto-next-error nil nil t))))))
270
271(ert-deftest recurrent-backend ()
272 "Test a backend that calls REPORT-FN multiple times"
273 (with-temp-buffer
274 (let (tick)
275 (cl-letf
276 (((symbol-function 'eager-backend)
277 (lambda (report-fn)
278 (funcall report-fn nil :explanation "very eager but no diagnostics")
279 (display-buffer (current-buffer))
280 (run-with-timer
281 0.5 nil
282 (lambda ()
283 (flymake-tests--diagnose-words report-fn :warning '("consectetur"))
284 (setq tick t)
285 (run-with-timer
286 0.5 nil
287 (lambda ()
288 (flymake-tests--diagnose-words report-fn :error '("fugiat"))
289 (setq tick t))))))))
290 (insert "Lorem ipsum dolor sit amet, consectetur adipiscing
291 elit, sed do eiusmod tempor incididunt ut labore et dolore
292 manha aliqua. Ut enim ad minim veniam, quis nostrud
293 exercitation ullamco laboris nisi ut aliquip ex ea commodo
294 consequat. Duis aute irure dolor in reprehenderit in
295 voluptate velit esse cillum dolore eu fugiat nulla
296 pariatur. Excepteur sint occaecat cupidatat non prognata
297 sunt in culpa qui officia deserunt mollit anim id est
298 laborum.")
299 (let ((flymake-diagnostic-functions
300 (list 'eager-backend))
301 (flymake-wrap-around nil))
302 (flymake-mode)
303 (flymake-tests--assert-set (flymake-running-backends)
304 (eager-backend) ())
305 (cl-loop until tick repeat 4 do (sleep-for 0.2))
306 (setq tick nil)
307 (goto-char (point-max))
308 (flymake-goto-prev-error)
309 (should (eq 'flymake-warning (face-at-point))) ; consectetur
310 (should-error (flymake-goto-prev-error nil nil t))
311 (cl-loop until tick repeat 4 do (sleep-for 0.2))
312 (flymake-goto-next-error)
313 (should (eq 'flymake-error (face-at-point))) ; fugiat
314 (flymake-goto-prev-error)
315 (should (eq 'flymake-warning (face-at-point))) ; back at consectetur
316 (should-error (flymake-goto-prev-error nil nil t))
317 )))))
77 318
78(provide 'flymake-tests) 319(provide 'flymake-tests)
79 320