]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoMerge from origin/emacs-26
Paul Eggert [Fri, 3 Nov 2017 04:01:04 +0000 (21:01 -0700)]
Merge from origin/emacs-26

7f089aa5f6 Require seq in rmc.el
53aaad1dfc Make an example code introduced in the Gnus info work (bug...
7b29db222f Enable gnus-read-ephemeral-* to run multiple times (bug#29...
015f0bb2d8 Port thread.c to OpenBSD ARM
ad68bbd0da Fix another "wrong side of point" error in CC Mode.
646e56e150 Fix Bug#28959
685fd77959 Fix duplicate .o file on QNX
e562356c3f Fix two js indentation problems
b8cf159bbc Update documentation for windows build
46540a1c7a Fix a "wrong side of point" error in CC Mode.  Fixes bug #...
57ca409111 Fix autoload of flymake from elisp-mode during bootstrap (...
aee0bc8775 Fix non-native fullscreen on NS (bug#28872)
d6c1a9cb8a ; Fix author email address in test/lisp/url/url-tramp-test...
761c630766 Fix Bug#28982
628b653209 Fix windows build errors
e8a06a5f9a Fix compile warning for non-w32 builds
0c536a20fb Display commit in package description, if available (Bug#2...
1d83257a1d Port to QNX
19667f44ef * configure.ac: Tweak libcurses diagnostic.
3fc05cfaec Scripts to automate windows binary distribution
928a106939 Fix Edebug specs for map-let and with-maps-do
46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): ...
b51009d7f0 * admin/authors.el (authors-canonical-author-name): Ignore...
a015db90e3 * test/lisp/progmodes/sql-tests.el (sql-tests-postgres-lis...
529a9c09d3 Further work on Bug#28889
c6deabaf4d Improve Tramp backward compatibility
8093e82e42 Improve backward compatibility of tramp-tests.el
46cdc01daa Fix some ‘window-normalize-’ prefixed functions (Bug#28947)
6360611457 Port to OpenIndiana
a012ec766c Don't fill keywords after Emacs Lisp docstring
b7c4aa951c Refactor c-forward-token-2 with new function c-forward-ove...
3aee7be62e Avoid unnecessary rounding errors in timestamps
2bfa42855b Fix xdg timestamp error on 32-bit Emacs
237e96bc52 Test that advice doesn't trigger bytecomp warnings (Bug#28...
d719ea6ad5 Another fix for unsafe directory error message (Bug#865)
b060e091c3 Handle https url for debbugs mbox (Bug#28831)
9e4265ef91 Ignore string properties when saving eshell history (Bug#2...
0f286ca85a Fix Bug#28889

7 years ago* lisp/gnus/gnus.el: Use lexical-binding and cl-lib
Stefan Monnier [Fri, 3 Nov 2017 03:52:06 +0000 (23:52 -0400)]
* lisp/gnus/gnus.el: Use lexical-binding and cl-lib

Remove unneeded use of `eval-when' for gnus-splash hack.
(gnus-find-subscribed-addresses): Don't use `add-to-list' with local var.
(gnus-info-buffer): Declare var.
(gnus-interactive): Remove unused arg `params'.
(gnus-symbolic-argument): Remove unused arg `arg`.
(gnus-sloppily-equal-method-parameters): Use \' to match end of string.
(gnus-short-group-name): Remove unused var `name'.

7 years agomake all related faces inherit from each other
Sam Steingold [Thu, 2 Nov 2017 14:48:38 +0000 (10:48 -0400)]
make all related faces inherit from each other

* lisp/gnus/gnus.el (gnus-group-A-B): Inherit from `gnus-group-A-B-empty',
where "A" is "mail" and "news" and "B" is "1".."6" and "low".
(gnus-summary-high-A, gnus-summary-low-A): Inherit from
`gnus-summary-normal-A', where "A" is "ticked", "ancient",
"undownloaded", "unread", "read".

7 years agoFix Bug#11728: show files updated by git
Sam Steingold [Wed, 1 Nov 2017 23:13:46 +0000 (19:13 -0400)]
Fix Bug#11728: show files updated by git

* lisp/vc/vc-git.el (vc-git--pushpull): Accept extra-args and set
`compilation-error-regexp-alist' to `vc-git-error-regexp-alist'.
(vc-git-pull): Pass "--stat" as `extra-args' to `vc-git--pushpull'.
(vc-git-push): Pass "" as `extra-args' to `vc-git--pushpull'.

7 years ago* lisp/emacs-lisp/thunk.el: Assert lexical-binding
Michael Heerdegen [Thu, 26 Oct 2017 10:57:55 +0000 (12:57 +0200)]
* lisp/emacs-lisp/thunk.el: Assert lexical-binding

This fixes Bug#28990.  Also add a note to the file header that
creating thunks requires lexical-binding.
(thunk-delay): `cl-assert' lexical-binding.

7 years agoUser can specify files never subject to flymake.
Sam Steingold [Wed, 1 Nov 2017 13:36:41 +0000 (09:36 -0400)]
User can specify files never subject to flymake.

* lisp/progmodes/flymake-proc.el (flymake-proc-ignored-file-name-regexps):
Add user customization option.
(flymake-proc--get-file-name-mode-and-masks): Check it before
`flymake-proc-allowed-file-name-masks'.

7 years ago; Auto-commit of loaddefs files.
Glenn Morris [Wed, 1 Nov 2017 11:27:31 +0000 (07:27 -0400)]
; Auto-commit of loaddefs files.

7 years agoThe user can now specify the time stamp format.
Sam Steingold [Tue, 31 Oct 2017 21:01:39 +0000 (17:01 -0400)]
The user can now specify the time stamp format.

* lisp/textmodes/remember.el (remember-time-format): New user variable.
(remember-append-to-file): Pass it to `format-time-string' instead of
calling `current-time-string'.

7 years agoHighlight CL `with-' (context) and `do-' (iteration)
Sam Steingold [Tue, 31 Oct 2017 19:33:40 +0000 (15:33 -0400)]
Highlight CL `with-' (context) and `do-' (iteration)

* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2):
Highlight the Common Lisp conventional names as described in
http://www.cliki.net/Naming+conventions.
(lisp-el-font-lock-keywords-2): Remove the already commented out
code for `do-' and `with-' because Emacs Lisp does not have a similar
convention.

7 years agoHighlight uninterned symbols.
Sam Steingold [Tue, 31 Oct 2017 19:20:51 +0000 (15:20 -0400)]
Highlight uninterned symbols.

* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2):
Highlight uninterned symbols, often used as string designators to
avoid namespace pollution (https://stackoverflow.com/a/46981940/850781).

7 years ago* lisp/progmodes/ebnf2ps.el: Use lexical-binding; fix warnings
Stefan Monnier [Tue, 31 Oct 2017 03:54:19 +0000 (23:54 -0400)]
* lisp/progmodes/ebnf2ps.el: Use lexical-binding; fix warnings

(ebnf-eps-executing): Declare var.
(ebnf-eps-string): Clarify regexp; don't use string-as-unibyte since we're
manipulating chars rather than bytes.
(ebnf-tree): Move declaration before first use.
(ebnf-generate-eps, ebnf-generate): Don't use dyn-var as argument.
(ebnf-generate-eps): Use cl-letf and unwind-protect.
(ebnf-eps-production-list): Get a ref rather than a symbol.
(ebnf-generate-eps): Adjust call accordingly.

7 years ago* lisp/net/newst-backend.el: Use lexical scoping and fix warnings
Stefan Monnier [Mon, 30 Oct 2017 18:15:00 +0000 (14:15 -0400)]
* lisp/net/newst-backend.el: Use lexical scoping and fix warnings

(newsticker-stop, newsticker-get-all-news)
(newsticker--decode-rfc822-date, newsticker--lists-intersect-p)
(newsticker--update-process-ids, newsticker--cache-read)
(newsticker-opml-export, newsticker--run-auto-mark-filter)
(newsticker--do-run-auto-mark-filter): Use dolist.
(newsticker--insert-bytes): New function, to avoid string-to-multibyte.
(newsticker--get-news-by-funcall, newsticker--get-news-by-url-callback)
(newsticker--image-download-by-url-callback): Use it.
(newsticker--parse-rss-0.91, newsticker--parse-rss-0.92):
Remove unused var `pub-date`.
(newsticker--parse-generic-feed): Remove unused var `old-item`.
(newsticker--parse-generic-items): Use dolist and let rather than mapc
and setq.
(newsticker--image-download-by-url-callback): Simplify boolean expression.

7 years agoRemove last entry.
viniciusjl [Mon, 30 Oct 2017 16:21:00 +0000 (14:21 -0200)]
Remove last entry.

7 years agoEmail replacement.
viniciusjl [Sun, 29 Oct 2017 22:28:58 +0000 (20:28 -0200)]
Email replacement.

7 years agoAdd 'ert-quiet' variable
Paul Pogonyshev [Sat, 28 Oct 2017 10:46:36 +0000 (13:46 +0300)]
Add 'ert-quiet' variable

* lisp/emacs-lisp/ert.el (ert-quiet): New variable.
(ert-run-tests-batch): When 'ert-quiet' is non-nil, don't
print non-important information.  (Bug#29025)

* doc/misc/ert.texi (Running Tests in Batch Mode): Document it.

* etc/NEWS: Mention the new variable.

7 years agoFix documentation of `newsticker-new-item-functions' (bug#29023).
Ulf Jasper [Fri, 27 Oct 2017 11:26:06 +0000 (13:26 +0200)]
Fix documentation of `newsticker-new-item-functions' (bug#29023).

* lisp/net/newst-backend.el (newsticker-new-item-functions),
(newsticker-new-item-functions-sample),
(newsticker-download-enclosures): Fix docstring, rename
variable feed to feedname (bug#29023).

* doc/misc/newsticker.texi (Automatic Processing)
(Automatic Processing): Fix documentation of
`newsticker-new-item-functions' (bug#29023).

7 years agoRequire seq in rmc.el
Tino Calancha [Fri, 27 Oct 2017 11:21:26 +0000 (20:21 +0900)]
Require seq in rmc.el

* lisp/emacs-lisp/rmc.el: Require seq (Bug#28975).
* test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice): Add test.

7 years ago* lisp/vc/ediff-wind.el: Don't pop spurious frame in corner case
Stefan Monnier [Fri, 27 Oct 2017 02:15:41 +0000 (22:15 -0400)]
* lisp/vc/ediff-wind.el: Don't pop spurious frame in corner case

(ediff-setup-windows-multiframe-compare): Clarify control-flow.
Postpone the initial call to ediff-skip-unsuitable-frames until we're
sure it's needed to avoid creating a spurious new frame.
(ediff-setup-windows, ediff-setup-windows-plain)
(ediff-setup-windows-plain-merge, ediff-setup-control-frame)
(ediff-setup-windows-plain-compare, ediff-setup-windows-multiframe)
(ediff-setup-windows-multiframe-merge): Use with-current-buffer.

7 years agoMake an example code introduced in the Gnus info work (bug#29008)
Katsumi Yamaoka [Fri, 27 Oct 2017 01:14:17 +0000 (01:14 +0000)]
Make an example code introduced in the Gnus info work (bug#29008)

You can find it in the bottom of (info "(gnus)Foreign Groups").
NOTE: this change is worth being merged to the trunk.

* lisp/gnus/gnus-group.el (gnus-read-ephemeral-emacs-bug-group):
Allow a string for bug# (bug#29008).

7 years agoEnable gnus-read-ephemeral-* to run multiple times (bug#29008)
Katsumi Yamaoka [Fri, 27 Oct 2017 01:13:25 +0000 (01:13 +0000)]
Enable gnus-read-ephemeral-* to run multiple times (bug#29008)

NOTE: *DO NOT* merge this change to the trunk.

* lisp/gnus/gnus-group.el (gnus-read-ephemeral-gmane-group)
(gnus-read-ephemeral-bug-group): Make it work for any number of times
for the case `url-automatic-caching' is set (bug#29008).

7 years agoPort thread.c to OpenBSD ARM
Paul Eggert [Fri, 27 Oct 2017 00:31:41 +0000 (17:31 -0700)]
Port thread.c to OpenBSD ARM

Problem reported by Jeremie Courreges-Anglas (Bug#29005).
* src/thread.c (main_thread): Align to GCALIGNMENT.

7 years agoFix up svg text encoding
Lars Ingebrigtsen [Thu, 26 Oct 2017 19:48:46 +0000 (21:48 +0200)]
Fix up svg text encoding

* lisp/svg.el (svg--encode-text): The SVG driver doesn't like
it if we use ' for apostrophe, so use our own encoding
function instead of relying on the xml one.

7 years agoNew package, `faceup'
Anders Lindgren [Thu, 26 Oct 2017 19:31:13 +0000 (21:31 +0200)]
New package, `faceup'

`faceup' is a framework for regression testing of font-lock
keywords in ert.  It is based on a human-readable markup
language.  (Bug#16063 and bug#28311).

* lisp/emacs-lisp/faceup.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el:
* test/lisp/emacs-lisp/faceup-resources/files/test1.txt:
* test/lisp/emacs-lisp/faceup-resources/files/test1.txt.faceup:
New files.

7 years agoFix another "wrong side of point" error in CC Mode.
Alan Mackenzie [Thu, 26 Oct 2017 18:29:39 +0000 (18:29 +0000)]
Fix another "wrong side of point" error in CC Mode.

This fixes (a follow-up to) bug #28850.
A internal generated form for scanning text to fontify had a LIMIT parameter.
It also locally bound LIMIT to a value possibly beyond the original LIMIT,
allowing point to move beyond the original LIMIT, and to create the wrong side
error.  Fix it by checking point is not beyond LIMIT in the outer context
before using it.

* lisp/progmodes/cc-fonts.el (c-make-font-lock-search-form): Add a new
parameter CHECK-POINT which, when non-nil, directs the function to generate a
check on point.
(c-make-font-lock-context-search-function): Invoke the above function with new
argument value t.

7 years agoFix Bug#28959
Michael Albinus [Thu, 26 Oct 2017 14:24:28 +0000 (16:24 +0200)]
Fix Bug#28959

* lisp/net/tramp.el (tramp-handle-find-backup-file-name):
Use `tramp-tramp-file-p' rather than `tramp-file-name-p'.  Add
hop to backup file name.  (Bug#28959)

* test/lisp/net/tramp-tests.el (tramp-test34-find-backup-file-name):
New test.
(tramp-test35-make-nearby-temp-file)
(tramp-test36-special-characters)
(tramp-test36-special-characters-with-stat)
(tramp-test36-special-characters-with-perl)
(tramp-test36-special-characters-with-ls, tramp-test37-utf8)
(tramp-test37-utf8-with-stat, tramp-test37-utf8-with-perl)
(tramp-test37-utf8-with-ls, tramp-test38-file-system-info)
(tramp-test39-asynchronous-requests)
(tramp-test40-recursive-load, tramp-test41-remote-load-path)
(tramp-test42-delay-load, tramp-test43-unload): Rename.

7 years agoFix duplicate .o file on QNX
Paul Eggert [Thu, 26 Oct 2017 03:47:48 +0000 (20:47 -0700)]
Fix duplicate .o file on QNX

* configure.ac (CYGWIN_OBJ): Leave empty on QNX.
Problem reported by Elad Lahav in:
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00750.html

7 years agoFix two js indentation problems
Dmitry Gutov [Wed, 25 Oct 2017 23:43:33 +0000 (02:43 +0300)]
Fix two js indentation problems

Fix intentation problems reported in
https://github.com/mooz/js2-mode/issues/463.
* lisp/progmodes/js.el (js--continued-expression-p):
Check syntax state after /.
(js--multi-line-declaration-indentation):
Check syntax state before "const".

7 years agoUpdate documentation for windows build
Phillip Lord [Wed, 25 Oct 2017 21:06:50 +0000 (22:06 +0100)]
Update documentation for windows build

* admin/nt/dist-build/README-scripts: New File.

7 years agoFix a "wrong side of point" error in CC Mode. Fixes bug #28850.
Alan Mackenzie [Wed, 25 Oct 2017 18:14:00 +0000 (18:14 +0000)]
Fix a "wrong side of point" error in CC Mode.  Fixes bug #28850.

The cause was a scanning over a bracket pair taking us beyond the supplied
LIMIT parameter in c-forward-declarator.

* lisp/progmodes/cc-engine.el (c-forward-declarator): Add three checks (<
(point) limit) whilst dealing with tokens after the declared identifier.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Don't supply a LIMIT
argument to `c-forward-declarator' (twice), since we want to fontify up till
the end of a declarator, not an arbitrary jit-lock chunk end.

7 years agoFix misleading error during autoload (bug#28994)
Stefan Monnier [Wed, 25 Oct 2017 16:37:09 +0000 (12:37 -0400)]
Fix misleading error during autoload (bug#28994)

* src/eval.c (Fautoload_do_load): Don't silence `load` errors when
autoloading a macro.  If silencing load errors, also silence the
subsequent check.

7 years agoFix autoload of flymake from elisp-mode during bootstrap (bug#28994)
Stefan Monnier [Wed, 25 Oct 2017 16:31:40 +0000 (12:31 -0400)]
Fix autoload of flymake from elisp-mode during bootstrap (bug#28994)

* lisp/loadup.el: add `progmodes` to load-path so we can find flymake.el.
* lisp/kmacro.el: Require `replace` since we use query-replace-map.
* lisp/replace.el: Require `text-mode` since we use text-mode-map.

7 years ago* lisp/play/gamegrid.el: Use lexical-binding to silence warnings
Stefan Monnier [Wed, 25 Oct 2017 13:36:27 +0000 (09:36 -0400)]
* lisp/play/gamegrid.el: Use lexical-binding to silence warnings

(gamegrid-init-buffer): Silence another warning.

7 years agoFix non-native fullscreen on NS (bug#28872)
Alan Third [Wed, 25 Oct 2017 13:08:43 +0000 (14:08 +0100)]
Fix non-native fullscreen on NS (bug#28872)

* src/nsterm.m (EmacsView::updateFrameSize): Handle case where
FRAME_TOOLBAR_HEIGHT returns a negative number.  Force WM to set size
of frame.

7 years ago; Fix author email address in test/lisp/url/url-tramp-tests.el
Michael Albinus [Wed, 25 Oct 2017 11:45:01 +0000 (13:45 +0200)]
; Fix author email address in test/lisp/url/url-tramp-tests.el

7 years agoFix Bug#28982
Michael Albinus [Wed, 25 Oct 2017 11:36:49 +0000 (13:36 +0200)]
Fix Bug#28982

* admin/MAINTAINERS: Add test/lisp/url/url-tramp-tests.el.

* lisp/url/url-tramp.el (url-tramp-convert-url-to-tramp)
(url-tramp-convert-tramp-to-url): Adapt to recent Tramp changes.

* test/lisp/url/url-tramp-tests.el: New file.  (Bug#28982)

7 years agoFix windows build errors
Phillip Lord [Wed, 25 Oct 2017 08:17:16 +0000 (09:17 +0100)]
Fix windows build errors

* admin/nt/dist-build/build-zips.sh: Correct name of zip file, build
  64 bit first

7 years agoFix compile warning for non-w32 builds
Noam Postavsky [Tue, 24 Oct 2017 23:19:37 +0000 (19:19 -0400)]
Fix compile warning for non-w32 builds

Since 2017-07-25 "ls-lisp: Add an unload function and enable lexical
binding", the non-w32 builds would treat the undeclared
w32-collate-ignore-punctuation variable as lexical.
* lisp/ls-lisp.el (top-level): Declare it as a dynamic variable.

7 years agoDisplay commit in package description, if available (Bug#28637)
David Glasser [Tue, 10 Oct 2017 22:46:53 +0000 (15:46 -0700)]
Display commit in package description, if available (Bug#28637)

MELPA includes a :commit field in its
packages (https://github.com/melpa/package-build/pull/6).  You can use
this to tell if MELPA has processed a recently-merged change.  This
commit adds that metadata to the package description buffer.

* lisp/emacs-lisp/package.el: Display commit in package description.

Copyright-paperwork-exempt: yes

7 years agoPort to QNX
Paul Eggert [Tue, 24 Oct 2017 19:54:28 +0000 (12:54 -0700)]
Port to QNX

Simplified version of a patch proposed by Elad Lahav in:
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00716.html
which is based on a previous patch I proposed in:
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00707.html
* configure.ac (opsys, CFLAGS, LIBS_SYSTEM, hybrid_malloc)
(system_alloc, FIRST_PTY_LETTER, CYGWIN_OBJ):
Set appropriately for QNX.
* src/unexelf.c [__QNX__]: Include <sys/elf.h> instead of <elf.h>.
(unexec): Check for sbrk failure, and fall back on old BSS end.

7 years ago* configure.ac: Tweak libcurses diagnostic.
Paul Eggert [Tue, 24 Oct 2017 18:46:30 +0000 (11:46 -0700)]
* configure.ac: Tweak libcurses diagnostic.

7 years agoScripts to automate windows binary distribution
Phillip Lord [Tue, 24 Oct 2017 17:34:35 +0000 (18:34 +0100)]
Scripts to automate windows binary distribution

* admin/nt/dist-build/README-windows-binaries,
  admin/nt/dist-build/build-dep-zips.py,
  admin/nt/dist-build/build-zips.sh: New Files

7 years agoMake Snake, Tetris and Pong adjust to display DPI
Gemini Lasswell [Mon, 16 Oct 2017 15:30:51 +0000 (08:30 -0700)]
Make Snake, Tetris and Pong adjust to display DPI

Replace gamegrid's constant 16x16 glyph with a generated one based
on display dimensions (bug#24658).
* lisp/play/gamegrid.el (gamegrid-glyph-height-mm): New variable.
(gamegrid-glyph-height): Deleted.
(gamegrid-xpm, gamegrid-xbm): Constants replaced with functions.
(gamegrid-colorize-glyph): Use new functions instead of constants.
(gamegrid-calculate-glyph-size, gamegrid-insert-xbm-bits): New
functions.

7 years agoFix Edebug specs for map-let and with-maps-do
Gemini Lasswell [Mon, 16 Oct 2017 18:40:38 +0000 (11:40 -0700)]
Fix Edebug specs for map-let and with-maps-do

* lisp/emacs-lisp/map.el (map-let): Fix Edebug spec (bug#24777).
* test/lisp/emacs-lisp/map-tests.el (with-maps-do): Fix Edebug spec.

7 years ago* test/lisp/net/tramp-tests.el (tramp-test41-delay-load): New test.
Michael Albinus [Tue, 24 Oct 2017 09:55:20 +0000 (11:55 +0200)]
* test/lisp/net/tramp-tests.el (tramp-test41-delay-load): New test.

(tramp-test42-unload): Rename.

7 years ago* configure.ac (AC_INIT): Use https for package url.
Glenn Morris [Tue, 24 Oct 2017 05:07:51 +0000 (22:07 -0700)]
* configure.ac (AC_INIT): Use https for package url.

7 years ago* admin/authors.el (authors-canonical-author-name):
Glenn Morris [Tue, 24 Oct 2017 05:04:01 +0000 (22:04 -0700)]
* admin/authors.el (authors-canonical-author-name):
Ignore name issues in "lax" ChangeLogs.

7 years ago* test/lisp/progmodes/sql-tests.el
Glenn Morris [Tue, 24 Oct 2017 05:02:46 +0000 (22:02 -0700)]
* test/lisp/progmodes/sql-tests.el
(sql-tests-postgres-list-databases-error): Silence compiler.

7 years ago* lisp/format.el (format-alist): Use internal rot13.
Glenn Morris [Tue, 24 Oct 2017 05:01:14 +0000 (22:01 -0700)]
* lisp/format.el (format-alist): Use internal rot13.

7 years agoFurther work on Bug#28889
Michael Albinus [Mon, 23 Oct 2017 15:58:52 +0000 (17:58 +0200)]
Further work on Bug#28889

* lisp/net/tramp.el (tramp-set-syntax): New defun.
(tramp-syntax): Use it.  Change :package-version.  (Bug#28889)

7 years agoImprove Tramp backward compatibility
Michael Albinus [Mon, 23 Oct 2017 12:05:49 +0000 (14:05 +0200)]
Improve Tramp backward compatibility

* lisp/net/tramp-compat.el (tramp-compat-tramp-file-name-slots):
New defmacro.
* lisp/net/tramp.el (with-parsed-tramp-file-name): Use it.

7 years agoImprove backward compatibility of tramp-tests.el
Michael Albinus [Mon, 23 Oct 2017 10:46:32 +0000 (12:46 +0200)]
Improve backward compatibility of tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp--test-emacs26-p): Fix docstring.
(tramp-test41-unload): Skip unless Emacs >= 26.

7 years agoFix some ‘window-normalize-’ prefixed functions (Bug#28947)
Martin Rudalics [Mon, 23 Oct 2017 07:53:41 +0000 (09:53 +0200)]
Fix some ‘window-normalize-’ prefixed functions (Bug#28947)

* lisp/window.el (window-normalize-buffer): Fix case where
BUFFER-OR-NAME is a string specifying a dead buffer.  Fix
doc-string (Bug#28947).
(window-normalize-frame, window-normalize-window): Fix
doc-strings (Bug#28947).

7 years agoPort to OpenIndiana
Paul Eggert [Mon, 23 Oct 2017 05:44:42 +0000 (22:44 -0700)]
Port to OpenIndiana

Problem reported by Nelson H. F. Beebe (Bug#28893).
Also see Bug#23748, Bug#9736, and Bug#5735.
* configure.ac (tputs_library): Prefer libcurses to libtermcap,
since OpenIndiana libtermcap lacks tparm.

7 years agoFix to 2fddfb7ce7
Eric Abrahamsen [Sun, 22 Oct 2017 23:46:49 +0000 (16:46 -0700)]
Fix to 2fddfb7ce7

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
  Fix bogus paren wrapping.

7 years agoDon't fill keywords after Emacs Lisp docstring
Alexander Gramiak [Sun, 22 Oct 2017 07:46:05 +0000 (01:46 -0600)]
Don't fill keywords after Emacs Lisp docstring

This approach does mean that keywords that have spaces before them
inside of docstrings aren't filled, but I think this is should be fine
until Bug#28937 is fixed.

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Add a colon to
paragraph-start unconditionally, but require that it follows at least
one space.  (Bug#24622)
* test/lisp/emacs-lisp/lisp-tests.el: New tests for Bug#24622 and
Bug#7751.

7 years agoChange Edebug's behavior-changing hooks to variables
Gemini Lasswell [Sat, 14 Oct 2017 16:13:36 +0000 (09:13 -0700)]
Change Edebug's behavior-changing hooks to variables

* lisp/emacs-lisp/edebug.el (edebug-after-instrumentation-functions)
(edebug-new-definition-functions): Deleted.
(edebug-after-instrumentation-function)
(edebug-new-definition-function): New variables.
(edebug-behavior-alist): Update docstring.
(edebug-read-and-maybe-wrap-form1, edebug-make-form-wrapper): Use new
variables.

* lisp/emacs-lisp/testcover.el (testcover-start)
(testcover-this-defun): Use `edebug-after-instrumentation-function' and
`edebug-new-definition-function'.
(testcover-after-instrumentation): Return passed form.
(testcover-init-definition): Use argument instead of `edebug-def-name'.

* doc/lispref/edebug.texi (Edebug Options): Replace descriptions of
`edebug-after-instrumentation-functions' and `edebug-new-definition-functions'
with `edebug-after-instrumentation-function' and
`edebug-new-definition-function'.

7 years agoPut cpp config file to ~/.emacs.d/cpp.el if possible (Bug#28685)
Masatake YAMATO [Sun, 22 Oct 2017 09:22:41 +0000 (18:22 +0900)]
Put cpp config file to ~/.emacs.d/cpp.el if possible (Bug#28685)

If `cpp-config-file` starts with '.', remove the '.'
when putting the file to ~/.emacs.d.
Suggested by Noam Postavsky <npostavs@users.sourceforge.net>

* lisp/progmodes/cpp.el (cpp-locate-user-emacs-file): New
function wrapping `locate-user-emacs-file`.
(cpp-edit-load, cpp-edit-save): Use it.

7 years agoFix reading and writing cpp-config-file under home directory (Bug#28685)
Masatake YAMATO [Sun, 22 Oct 2017 09:22:40 +0000 (18:22 +0900)]
Fix reading and writing cpp-config-file under home directory (Bug#28685)

* lisp/progmodes/cpp.el (cpp-edit-load): Load ~/.cpp.el when
it is readable.
(cpp-edit-save): Write to ~/.cpp.el when it is wriable.

7 years agoHandle object string name in eieio-persistent-convert-list-object
Eric Abrahamsen [Sun, 22 Oct 2017 14:59:29 +0000 (07:59 -0700)]
Handle object string name in eieio-persistent-convert-list-object

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
  Starting to phase out the printing of object names in
  `object-write', handle either case.

7 years agoRefactor c-forward-token-2 with new function c-forward-over-token-and-ws.
Alan Mackenzie [Sun, 22 Oct 2017 14:18:20 +0000 (14:18 +0000)]
Refactor c-forward-token-2 with new function c-forward-over-token-and-ws.

Use the new function directly in several places where c-forward-token-2
wouldn't move over the last token in the buffer.  This caused an infinite loop
in c-restore-<>-properties.

* lisp/progmodes/cc-engine.el (c-forward-over-token-and-ws): New function,
extracted from c-forward-token-2.
(c-forward-token-2): Refactor, calling the new function.
(c-restore-<>-properties): Fix infinite loop.
(c-forward-<>-arglist-recur, c-in-knr-argdecl)
(c-looking-at-or-maybe-in-bracelist): Call the new function directly in place
of c-forward-token-2.

* lisp/progmodes/cc-cmds.el (c-defun-name) Call the new function directly in
place of c-forward-token-2.

* lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Call the new
function directly in place of c-forward-token-2.

7 years agoAvoid unnecessary rounding errors in timestamps
Paul Eggert [Sun, 22 Oct 2017 08:04:36 +0000 (01:04 -0700)]
Avoid unnecessary rounding errors in timestamps

Avoid the rounding errors of float-time when it’s easy.  E.g.,
replace (< (float-time a) (float-time b)) with (time-less-p a b).
* lisp/desktop.el (desktop-save):
* lisp/ecomplete.el (ecomplete-add-item):
* lisp/epg.el (epg-wait-for-completion):
* lisp/files.el (dir-locals-find-file, dir-locals-read-from-dir):
* lisp/image-dired.el (image-dired-get-thumbnail-image)
(image-dired-create-thumb-1):
* lisp/info.el (info-insert-file-contents):
* lisp/ls-lisp.el (ls-lisp-format-time):
* lisp/net/ange-ftp.el (ange-ftp-file-newer-than-file-p)
(ange-ftp-verify-visited-file-modtime):
* lisp/net/rcirc.el (rcirc-ctcp-sender-PING):
* lisp/textmodes/remember.el (remember-store-in-mailbox):
* lisp/url/url-cookie.el (url-cookie-expired-p):
Bypass float-time to avoid rounding errors.

* lisp/files.el (dir-locals-find-file):

7 years agoFix xdg timestamp error on 32-bit Emacs
Paul Eggert [Sun, 22 Oct 2017 07:29:04 +0000 (00:29 -0700)]
Fix xdg timestamp error on 32-bit Emacs

* lisp/xdg.el (xdg-thumb-mtime): Return an Emacs timestamp,
not an integer.  This avoids signaling an error on 32-bit
Emacs, where timestamps typically do not fit into fixnums
(Bug#28921).

7 years agoTest that advice doesn't trigger bytecomp warnings (Bug#28803)
John Williams [Thu, 12 Oct 2017 23:02:39 +0000 (16:02 -0700)]
Test that advice doesn't trigger bytecomp warnings (Bug#28803)

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--test-no-warnings-with-advice): New test.

Copyright-paperwork-exempt: yes

7 years agoAnother fix for unsafe directory error message (Bug#865)
Noam Postavsky [Sat, 21 Oct 2017 15:52:24 +0000 (11:52 -0400)]
Another fix for unsafe directory error message (Bug#865)

* lisp/server.el (server-ensure-safe-dir): Put file owner's uid, not
current user's for the wrong owner case.  Show expanded file name in
error message.

7 years agoHandle https url for debbugs mbox (Bug#28831)
Noam Postavsky [Fri, 20 Oct 2017 00:07:05 +0000 (20:07 -0400)]
Handle https url for debbugs mbox (Bug#28831)

In 2017-09-13 "Prefer HTTPS to FTP and HTTP in documentation",
gnus-bug-group-download-format-alist was updated to use https for the
debbugs.gnu.org mbox links, but gnus-read-ephemeral-bug-group assumed
http links.
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Use
url-parse functions to get the host name, instead of ad-hoc regexps.

7 years agoIgnore string properties when saving eshell history (Bug#28700)
Noam Postavsky [Sun, 15 Oct 2017 20:41:17 +0000 (16:41 -0400)]
Ignore string properties when saving eshell history (Bug#28700)

* lisp/eshell/em-hist.el (eshell-write-history): Remove properties
before inserting history strings.
(eshell-read-history): Remove obsolete comment.
* test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history):
New test.

7 years agoFix Bug#28889
Michael Albinus [Sat, 21 Oct 2017 16:51:25 +0000 (18:51 +0200)]
Fix Bug#28889

* lisp/net/tramp.el: Change autoload cookie to tramp-autoload cookie.
(tramp-completion-file-name-regexp-default)
(tramp-completion-file-name-handler-alist)
(tramp-completion-file-name-handler): Remove autoload cookie.
(tramp-initial-completion-file-name-regexp): Remove.
(tramp-autoload-file-name-regexp): New defconst.
(tramp-register-autoload-file-name-handlers): Use it.
(with-parsed-tramp-file-name): Adapt docstring.  Compute
`tramp-file-name' slots.  (Bug#28889)

7 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 21 Oct 2017 16:07:30 +0000 (09:07 -0700)]
Merge from origin/emacs-26

888e51f220 (origin/emacs-26) Update describe-function for recent Fdoc...
75bb482763 Make flymake's mouse-wheel interaction portable (Bug#28732)
035d7ac7e4 Prevent eldoc from changing the mode line
c9d71b31bf Fix doc strings in simple.el
0d8e4f45d6 Avoid creating inconsistent buffer states in term-char-mode
79d57f4b7a New input method 'usbek-cyrillic'
4587d8e0ef Document 'minibuffer-with-setup-hook'

# Conflicts:
# etc/NEWS

7 years agoUpdate describe-function for recent Fdocumentation change
Glenn Morris [Sat, 21 Oct 2017 16:00:16 +0000 (09:00 -0700)]
Update describe-function for recent Fdocumentation change

* lisp/help-fns.el (describe-function-1):
Handle Fdocumentation returning either void or invalid.

7 years agoMake flymake's mouse-wheel interaction portable (Bug#28732)
Charles A. Roelli [Sat, 21 Oct 2017 12:56:59 +0000 (14:56 +0200)]
Make flymake's mouse-wheel interaction portable (Bug#28732)

* lisp/progmodes/flymake.el (flymake--mode-line-format): Bind
'mouse-wheel-down-event' and 'mouse-wheel-up-event' instead of
'mouse-4' and 'mouse-5'.  Update the tooltip text accordingly, and
remove a stray newline in it.

7 years agoPrevent eldoc from changing the mode line
Nick Helm [Sat, 21 Oct 2017 08:41:28 +0000 (11:41 +0300)]
Prevent eldoc from changing the mode line

* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Don't
change the mode line if it is not displayed.  (Bug#28697)

7 years agoFix doc strings in simple.el
Eli Zaretskii [Sat, 21 Oct 2017 08:36:37 +0000 (11:36 +0300)]
Fix doc strings in simple.el

* lisp/simple.el (shell-command-saved-pos)
(region-extract-function, region-bounds): Doc fixes.  (Bug#28609)

7 years agoAvoid creating inconsistent buffer states in term-char-mode
Phil Sainty [Sat, 21 Oct 2017 08:17:56 +0000 (11:17 +0300)]
Avoid creating inconsistent buffer states in term-char-mode

* lisp/term.el (term-mode, term-char-mode, term-line-mode)
(term-emulate-terminal): Make buffer read-only in 'term-char-mode',
except for the process filter's output.  Use 'read-only-mode-hook' to
track and restore the user-set state of 'buffer-read-only' for
'term-line-mode'.  (Bug#24837)
(term-char-mode-buffer-read-only): New user option.
(term-line-mode-buffer-read-only): New buffer-local variable.
(term-line-mode-buffer-read-only-update): New function.
(term-char-mode, term-line-mode): Use 'term-set-goto-process-mark'
in pre-command-hook, and 'term-goto-process-mark-maybe' in
post-command-hook to counter-act unexpected changes to point when
using 'term-char-mode'.
(term-char-mode-point-at-process-mark): New user option.
(term-goto-process-mark): New buffer-local variable.
(term-set-goto-process-mark): New function.
(term-goto-process-mark-maybe): New function.
(term-process-mark): New function.

* etc/NEWS: Mention the new behavior and user options.

7 years agoNew input method 'usbek-cyrillic'
Bahodir Mansurov [Sat, 21 Oct 2017 08:07:34 +0000 (11:07 +0300)]
New input method 'usbek-cyrillic'

* lisp/leim/quail/cyrillic.el (uzbek-cyrillic): New input method.
(Bug#28848)

* etc/NEWS: Mention the new input method.

Copyright-paperwork-exempt: yes

7 years agoDocument 'minibuffer-with-setup-hook'
Eli Zaretskii [Sat, 21 Oct 2017 07:43:30 +0000 (10:43 +0300)]
Document 'minibuffer-with-setup-hook'

* doc/lispref/minibuf.texi (Minibuffer Misc): Document
minibuffer-with-setup-hook.  (Bug#28877)

7 years ago* etc/NEWS.26: Sync from emacs-26 etc/NEWS.
Paul Eggert [Sat, 21 Oct 2017 05:47:09 +0000 (22:47 -0700)]
* etc/NEWS.26: Sync from emacs-26 etc/NEWS.

7 years agoMerge from origin/emacs-26
Paul Eggert [Sat, 21 Oct 2017 05:45:36 +0000 (22:45 -0700)]
Merge from origin/emacs-26

868eb74f91 Simplify make-progress-reporter vs float-time
83db9a1bba Fix two more minor Gnus typos
e655946ce0 Fix two minor Gnus typos
6a00914d6d Tweak Fdocumentation's error for an undefined function
7c63655e39 Tweak format of list of old files in NEWS header

# Conflicts:
# etc/NEWS

7 years ago; Merge from origin/emacs-26
Paul Eggert [Sat, 21 Oct 2017 05:44:13 +0000 (22:44 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

ef3d8505ec * lisp/help-fns.el (describe-function-1): Fix help-fns-tes...

7 years agoMerge from origin/emacs-26
Paul Eggert [Sat, 21 Oct 2017 05:44:13 +0000 (22:44 -0700)]
Merge from origin/emacs-26

11bd8aa24b Fix flymake's loading of subr-x
b500e06f4d Fix Bug#28896
d815de017b Skip a Flymake test for old gcc versions
fd3d8610b2 Make :align-to account for display-line-numbers
831eafc8ae Augment Flymake API for third-party extensions
ddd547fada Improve treatment of Fortran's "class default"
234b1e3864 Flymake backends must check proc obsoleteness in source bu...
3ea6a4d4ba Skip an rsync test in tramp-tests.el
25f83fa7c5 ; Indentation fixes
4d578d432d On Windows default a frame's border width to zero (Bug#28873)
6f1dea5c74 Spelling fixes
b8433b0954 Use pop-to-buffer-same-window instead of switch-to-buffer
2f7163fb72 Fix the MSDOS build.
2551d28fe8 Fix line number display after 'widen'
dc8812829b Remove resizable attribute on macOS undecorated frames (bu...
b970a4a52a Fix handling of `border-width' in `frameset--restore-frame...
445e92658f Mention how to send CC to > 1 address in a bug report
8ca6fa585a Improve format-time-string doc
2e1b3522b8 Improve documentation of 'line-number-display-width'
5b6e59cfdb Implement vc-default-dir-extra-headers for vc-rcs
22adeca42a In NEWS give advice on use of `switch-to-buffer' (Bug#28645)
2c3e6f1ddc Dont update primary selection with winner-undo
b38724ab67 Work around ImageMagick bug 825
20cc68e871 Document rectangle-preview option more (Bug#27974)
a0b7b301dd Do not reject https://gnu.org in commit messages
fb4200a875 Fix Edebug spec for cl-defun (bug#24255)
db68cefe72 Fix errors in kmacro.el post-command-hook
c63b344c3d Fix range-error in image-dired.el
081d2187c4 Fix 'line-number-display-width' in hscrolled windows
16e85456e7 Fix error in tramp-smb-handle-insert-directory
613db8d35c Don't reject PBM header whitespace unnecessarily
3205b12a78 Fix regression in display of PPM images
1ca9ae7069 Require subr-x when compiling nnimap.el
de60992053 Fix ert-test finding by symbol (Bug#28849)
51615a8082 Don't remember old debugger window (Bug#17882)
5980de3727 Disable python native completion on w32 (Bug#28580)
616b4c5956 Let select-frame-by-name choose any frame when called from...
8eb3c01dbd * lisp/dired-aux.el (dired-create-directory): Doc fix.
325dfdae13 Avoid compilation warnings in optimized builds
f79382819c ; * src/composite.c (Fclear_composition_cache): Fix last c...
f95cd5cd70 Improve customization of arabic-shaper-ZWNJ-handling.
a7f154688d Improve customization type of 'mouse-drag-and-drop-region'
864734d112 ; Prefer https: to http: in GNU URLs
3c78960a47 Encourage https: in commit messages
def9715282 ; Cleanup of etc/NEWS
4e59ecc646 Fix wording in Elisp manual's child frames section (Bug#28...
eda9f5018c Another fix for C mode fontification of w32 source files
05aadd8990 Fix fontification of ALIGN_STACK functions
aa0c38f358 Make sure thread stack is properly aligned on MS-Windows
d7038020aa Do not under-align pseudovectors
ff33053012 Fix indentation bug in multi-line CSS selectors
8968be822e ; * etc/NEWS: Grammar and spelling fixes
716b84034d gnutls_mac_get_nonce_size has been added in gnutls 3.3
55e313f7be ; * CONTRIBUTE: More suggestions for using US English.
622c675648 * CONTRIBUTE: Suggest American English.

# Conflicts:
# etc/NEWS
# msdos/sed2v2.inp

7 years agoAllow to copy/rename file into a non-existent dir
Tino Calancha [Sat, 21 Oct 2017 04:05:48 +0000 (13:05 +0900)]
Allow to copy/rename file into a non-existent dir

* lisp/dired-aux.el (dired-create-destination-dirs): New option.
(dired-maybe-create-dirs): New defun.
(dired-copy-file-recursive, dired-rename-file): Use it (Bug#28834).
* lisp/dired-aux-tests.el (dired-test-bug28834): Add test.
* doc/emacs/dired.texi (Operating on Files): Update manual.
* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 27.1)
Announce this change.

7 years agoSimplify make-progress-reporter vs float-time
Paul Eggert [Sat, 21 Oct 2017 03:13:09 +0000 (20:13 -0700)]
Simplify make-progress-reporter vs float-time

* lisp/subr.el (make-progress-reporter): Remove no-longer-needed
doc and code for the case where float-time is not supported,
since float-time is always present now.

7 years agoPrefer nil to (current-time) when either works
Paul Eggert [Sat, 21 Oct 2017 02:40:09 +0000 (19:40 -0700)]
Prefer nil to (current-time) when either works

* doc/misc/gnus.texi (Category Syntax):
* lisp/allout-widgets.el (allout-widgets-post-command-business):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay)
(pulse-tick):
* lisp/cedet/semantic.el (bovinate):
* lisp/cedet/semantic/analyze.el:
(semantic-analyze-current-symbol-default, semantic-adebug-analyze):
* lisp/cedet/semantic/analyze/refs.el (semantic-analyze-current-tag):
* lisp/cedet/semantic/lex.el (semantic-lex-test):
* lisp/cedet/semantic/symref/filter.el:
(semantic-symref-test-count-hits-in-tag):
* lisp/cedet/srecode/dictionary.el (srecode-adebug-dictionary):
* lisp/cedet/srecode/map.el (srecode-adebug-maps):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/emacs-lisp/elp.el (elp--make-wrapper):
* lisp/epa.el (epa--show-key):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p):
* lisp/gnus/gnus-agent.el (gnus-agent-fetch-articles)
(gnus-agent-expire-group-1, gnus-agent-store-article):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data)
(gnus-cloud-collect-full-newsrc):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/gnus-html.el (gnus-html-cache-expired):
* lisp/gnus/gnus-score.el (gnus-score-load-file)
(gnus-decay-scores):
* lisp/gnus/nndiary.el (nndiary-expired-article-p):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/gnus/score-mode.el (gnus-score-edit-insert-date):
* lisp/image/gravatar.el (gravatar-cache-expired):
* lisp/net/newst-backend.el (newsticker--image-get)
(newsticker--cache-mark-expired):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-agenda.el (org-agenda-to-appt):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org/org-colview.el (org-columns-edit-value, org-columns)
(org-columns-compute-all, org-agenda-columns):
* lisp/org/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds)
(org-timer-show-remaining-time, org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe, org-read-date-analyze)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/time.el (emacs-uptime):
* lisp/type-break.el (type-break-mode, type-break)
(type-break-time-warning-schedule, type-break-check):
* lisp/url/url-cache.el (url-cache-expired):
* lisp/url/url.el (url-retrieve-synchronously):
* test/lisp/char-fold-tests.el (char-fold--speed-test):
* test/manual/cedet/semantic-ia-utest.el:
(semantic-symref-test-count-hits-in-tag):
* test/manual/cedet/semantic-tests.el (semantic-idle-pnf-test)
(semantic-lex-test-full-depth):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.

7 years agoFix two more minor Gnus typos
Paul Eggert [Sat, 21 Oct 2017 02:16:29 +0000 (19:16 -0700)]
Fix two more minor Gnus typos

* lisp/gnus/mail-source.el (mail-source-delete-old-incoming):
The old code had two minor bugs: first, it multiplied by 1/65536
instead of by 1/86400.  Second, it called current-time twice and
glued part of the two results together, resulting in a race.
Fix both bugs by simplifying the code and using
time-to-number-of-days.

7 years agoFix two minor Gnus typos
Paul Eggert [Sat, 21 Oct 2017 01:12:01 +0000 (18:12 -0700)]
Fix two minor Gnus typos

* lisp/gnus/gnus-sum.el (gnus-summary-import-article):
Remove unused local, and fix use of local that was never assigned to.

7 years ago; * etc/NEWS: Stop list of old NEWS files growing without limit.
Glenn Morris [Fri, 20 Oct 2017 23:29:15 +0000 (19:29 -0400)]
; * etc/NEWS: Stop list of old NEWS files growing without limit.

7 years agoTweak Fdocumentation's error for an undefined function
Glenn Morris [Fri, 20 Oct 2017 23:18:23 +0000 (19:18 -0400)]
Tweak Fdocumentation's error for an undefined function

* src/doc.c (Fdocumentation): Restore the pre-25 behavior
of signalling a void-function error for an undefined function.
This seems cleaner than Emacs 25's "invalid-function: nil" error,
which was (probably) an unintended consequence of changes to
Findirect_function.

7 years agoTweak format of list of old files in NEWS header
Glenn Morris [Fri, 20 Oct 2017 23:14:34 +0000 (19:14 -0400)]
Tweak format of list of old files in NEWS header

* etc/NEWS: Stop list of old NEWS files growing without limit.
* admin/admin.el (set-version): Handle either NEWS header format.

7 years ago* lisp/emacs-lisp/debug.el: Use cl-print more systematically
Stefan Monnier [Fri, 20 Oct 2017 23:00:11 +0000 (19:00 -0400)]
* lisp/emacs-lisp/debug.el: Use cl-print more systematically

(debugger-return-value, debugger-eval-expression, debugger--insert-locals):
Use debugger--print.

7 years ago* lisp/emacs-lisp/eieio.el (eieio-object-name-string): De-obsolete
Stefan Monnier [Fri, 20 Oct 2017 21:57:37 +0000 (17:57 -0400)]
* lisp/emacs-lisp/eieio.el (eieio-object-name-string): De-obsolete

This is apparently the advertised method to use for `eieio-named' objects.
Also use sxhash-eq to get a more precise default "object name".
(eieio-object-set-name-string): Clarify obsolescence message.

* lisp/emacs-lisp/eieio-base.el (eieio-object-name-string): Delegate to
the default method when applicable.

7 years ago* lisp/help-fns.el (describe-function-1):
Stefan Monnier [Fri, 20 Oct 2017 20:04:02 +0000 (16:04 -0400)]
* lisp/help-fns.el (describe-function-1):
Fix help-fns-test-dangling-alias.  (Bug#28918)

(cherry picked from commit e1d42f8f4a945669ff8b5159a569cb4b18f56e18)

7 years ago* lisp/help-fns.el (describe-function-1): Fix help-fns-test-dangling-alias.
Stefan Monnier [Fri, 20 Oct 2017 20:04:02 +0000 (16:04 -0400)]
* lisp/help-fns.el (describe-function-1): Fix help-fns-test-dangling-alias.

7 years agoFix flymake's loading of subr-x
Glenn Morris [Fri, 20 Oct 2017 17:07:30 +0000 (13:07 -0400)]
Fix flymake's loading of subr-x

* lisp/progmodes/flymake.el, test/lisp/progmodes/flymake-tests.el:
No need to load subr-x at run-time.

7 years agocss-mode: Don't confuse variable names with class names
Wilfred Hughes [Fri, 20 Oct 2017 14:04:37 +0000 (15:04 +0100)]
css-mode: Don't confuse variable names with class names

This fixes highlighting for class names that contain --, for example:

.foo--bar {
    display: none;
}

* lisp/textmodes/css-mode.el (css--font-lock-keywords): Make regular
  expression stricter.

7 years agoibuffer: new filter to list buffers running a process
Tino Calancha [Fri, 20 Oct 2017 13:22:08 +0000 (22:22 +0900)]
ibuffer: new filter to list buffers running a process

* lisp/ibuf-ext.el (ibuffer-filter-by-process): Add new filter (Bug#28825).
* lisp/ibuffer.el (ibuffer-mode-map): Bound it to '/E'.
; * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 27.1):
; Announce this change.

7 years agoMake ibuffer filters idempotent
Tino Calancha [Fri, 20 Oct 2017 13:11:39 +0000 (22:11 +0900)]
Make ibuffer filters idempotent

* lisp/ibuf-ext.el (ibuffer-push-filter): Check if the
filter is already in effect (Bug#28826).
* lisp/ibuf-macs.el (define-ibuffer-filter):
Report to user if the filter was already enabled.

7 years agoFix Bug#28896
Michael Albinus [Fri, 20 Oct 2017 10:46:54 +0000 (12:46 +0200)]
Fix Bug#28896

* lisp/net/tramp-adb.el (tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Handle FILENAME
being a directory.  (Bug#28896)

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file): Test also FILENAME being a directory.

7 years agoSkip a Flymake test for old gcc versions
João Távora [Fri, 20 Oct 2017 10:25:34 +0000 (11:25 +0100)]
Skip a Flymake test for old gcc versions

Fixes: 28906
* test/lisp/progmodes/flymake-tests.el
(different-diagnostic-types): Skip this test for gcc versions
< 5.

7 years agoMake :align-to account for display-line-numbers
Eli Zaretskii [Fri, 20 Oct 2017 09:36:12 +0000 (12:36 +0300)]
Make :align-to account for display-line-numbers

These changes also update the various bundled packages to use
new feature, and better support customizations of the line-number
face.
* src/xdisp.c (calc_pixel_width_or_height): Improve commentary.
Make :align-to count from the end of the line-number display when
the offset or the width form reference that of the text area.
(Bug#28855)

* src/indent.c (Fline_number_display_width): Implement support for
the PIXELWISE argument being 'columns'.  Update the doc string.
(syms_of_indent): New symbol 'columns'.

* lisp/ruler-mode.el (ruler-mode-window-col, ruler-mode-ruler):
Call line-number-display-width with last argument 'columns'.

* lisp/proced.el (proced-header-line): Call
line-number-display-width with 2nd arg 'columns', which also fixes
a problem when display-line-numbers is nil.

* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-line-number-width): Call line-number-display-width
with 2nd arg 'columns.
(tabulated-list-entry-lnum-width): Remove unneeded defvar.
(tabulated-list-print, tabulated-list-print-entry): No need to
account for the value of tabulated-list-entry-lnum-width.
(tabulated-list--current-lnum-width): New defvar.
(tabulated-list-watch-line-number-width): New function.
(tabulated-list-mode): Bind tabulated-list--current-lnum-width
locally, and set up tabulated-list-watch-line-number-width as
pre-redisplay-functions hook.

* doc/lispref/display.texi (Size of Displayed Text): Document the
'columns' value of the PIXELWISE argument.
(Pixel Specification): Update and improve the documentation of the
supported forms.

7 years agoAugment Flymake API for third-party extensions
João Távora [Thu, 19 Oct 2017 11:33:20 +0000 (12:33 +0100)]
Augment Flymake API for third-party extensions

See
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00619.html

* doc/misc/flymake.texi (Flymake error types): Rewrite
example.
(Flymake utility functions): Augment with new API.

* lisp/progmodes/flymake.el (flymake-diagnostics): New function.
(flymake--diag-accessor): New helper macro.
(flymake-diagnostic-buffer, flymake-diagnostic-text)
(flymake-diagnostic-beg, flymake-diagnostic-end)
(flymake-diagnostic-backend): Accessors for diagnostic objects.
(flymake--overlays): Use flymake-diagnostic property.
(flymake--highlight-line): Simplify.  Only set
flymake-diagnostic property.
(flymake--handle-report, flymake-goto-next-error): Use
flymake-diagnostic property.
(flymake-show-diagnostic): Use diagnostic object.
(flymake--diagnostics-buffer-entries): Use
flymake-diagnostics.

7 years agoImprove treatment of Fortran's "class default"
Glenn Morris [Fri, 20 Oct 2017 00:05:48 +0000 (20:05 -0400)]
Improve treatment of Fortran's "class default"

* lisp/progmodes/f90.el (f90-start-block-re, f90-no-block-limit):
Handle "class default".  (Bug#28786)
* test/automated/f90.el (f90-test-bug25039): Add "class default".