1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
Commit Graph

68297 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
267c98ae48 Fix rendering of some complex SVG images
* lisp/net/shr.el (shr-parse-image-data): Don't transform
SVG->DOM->XML unless we're blocking images, as this is apt to
destroy the SVG (bug#24111).
2017-01-24 22:21:45 +01:00
Lars Ingebrigtsen
3180deacf5 Clarify the last clarification
* lisp/net/shr.el (shr-width): Clarify the interaction with
`shr-use-fonts' (bug#24928).
2017-01-24 21:33:51 +01:00
Lars Ingebrigtsen
253fdf799b shr-width doc clarification
* lisp/net/shr.el (shr-width): Clarify the interaction with
`shr-use-fonts' (bug#24928).
2017-01-24 21:31:17 +01:00
Lars Ingebrigtsen
37567393a0 Allow passing in max-width/height
* lisp/net/shr.el (shr-rescale-image): Allow passing in
max-width/height (bug#25287).
2017-01-24 21:17:45 +01:00
Stefan Monnier
52a87c894d * lisp/progmodes/vhdl-mode.el: Avoid add-to-list on local vars
Require `cl' for `pushnew'.
(vhdl-scan-project-contents, vhdl-compose-wire-components)
(vhdl-uniquify): Use `pushnew' instead of `add-to-list'.
2017-01-24 11:31:11 -05:00
Alan Mackenzie
0c31ff43b6 Give , and .@ doc strings. Fixes bug #24561.
Also make *Help* links to ``' possible.  Also make usable as such doc strings
on the function-documentation property of a symbol.

* lisp/emacs-lisp/backquote.el (top-level): Give , and '@ doc strings on the
function-documentation property.  Also give these symbols a reader-construct
property.

* lisp/help-fns.el (describe-function): Allow the function-documentation
property to work.  Use princ rather than prin1 to print the function's name
when it has a reader-construct property.
(help-fns-signature): Don't insert `high-usage' for a reader-construct.
(describe-function-1): Adapt to process documentation on the
function-documentation property.  Print "a reader construct" when appropriate.

* lisp/help-mode.el (help-xref-symbol-regexp): Amend this regexp also to match
``'.
2017-01-23 19:00:49 +00:00
Mark Oteiza
03de82fe7c ; Fix previous commit
* lisp/play/dunnet.el (dun-drop): Nix assignment of nonexistent binding.
2017-01-22 10:18:42 -05:00
Tino Calancha
ade0652cc2 Prevent to use tabulated-list--near-rows unbound
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry):
Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506).
2017-01-22 14:23:45 +09:00
Juri Linkov
ad29e145b1 * lisp/simple.el (region-bounds): New function.
(region-noncontiguous-p): Use it.
http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00044.html
2017-01-22 01:18:53 +02:00
Alan Mackenzie
de3336051e Fix low-level handling of (big) C macros.
In particular, ensure that a comment detected by its syntax is not a CPP
construct marked with generic comment delimiter syntax-table text
properties.

* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Set
c-macro-cache-syntactic to nil when the cached macro changes.
(c-syntactic-end-of-macro, c-no-comment-end-of-macro)
(c-state-semi-pp-to-literal, c-state-full-pp-to-literal)
(c-state-pp-to-literal, c-parse-ps-state-to-cache)
(c-state-cache-non-literal-place, c-literal-limits, c-literal-start)
(c-determine-limit): When checking a parse syntax for a comment, check that
we're not in a CPP construct marked by syntax-table generic comment delimiter
text property.
(c-state-pp-to-literal): Change from a defsubst to a defun.

* lisp/progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Check a
parse syntax as described above under cc-engine.el.
2017-01-21 15:16:49 +00:00
Tino Calancha
e5e42cefd7 diff-hunk-kill independent of point inside headers
Make diff-apply-hunk and diff-hunk-kill independent of the point
position in a diff header (Bug#17544).
This change allows to apply hunks in order.  It also makes possible to
press M-k repeatedly to kill hunks in the order they appear in the buffer.
See discussion on #Bug25105.
* lisp/vc/diff-mode.el (diff-file-junk-re):
Move definition before it's used.
(diff--at-diff-header-p): New predicate; return non-nil when point
is inside a hunk header, a file header, or within a line
matching diff-file-junk-re.
(diff-beginning-of-hunk): Use it.
Check if the point is inside a diff header, in the middle of a hunk,
or before the first hunk.
(diff-apply-hunk): Call diff-beginning-of-hunk with non-nil arg
before apply the hunk.
(diff-hunk-kill, diff-file-kill):
Call diff-beginning-of-hunk with non-nil arg after kill the hunks.
(diff-post-command-hook): Call diff-beginning-of-hunk with non-nil argument.
2017-01-21 11:54:55 +09:00
Tino Calancha
1508b538fd ; Revert "Improve diff-mode navigation/manipulation"
This reverts commit 2c8a7e50d2.
This change causes regressions:
https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00738.html
The following related commits are reverted as well:
61c6a10e31
a283d655db
6b6abe0dba
e5ef59b87d
73349822cb

Fixes: debbugs:25105, 25400.
2017-01-21 11:54:38 +09:00
Noam Postavsky
82a5e4dc88 Fix free var FOO-mode-{syntax,abbrev}-table warnings
* lisp/emacs-lisp/derived.el (define-derived-mode): Unconditionally
defvar the syntax and abbrev tables so that the compiler will know that
they are dynamically bound variables (Bug#25446).
2017-01-19 20:15:18 -05:00
Noam Postavsky
8c0fcaf667 Avoid inefficient regex in diff-refine-hunk (Bug#25410)
* lisp/vc/diff-mode.el (diff--forward-while-leading-char): New function.
(diff-refine-hunk): Use it instead of trying to match multiple lines
with a single lines.
2017-01-18 20:37:31 -05:00
Tom Tromey
dbb29d7eb4 Add info-lookup help for gdb-script-mode
Bug#25464:
* lisp/info-look.el (info-lookup-guess-gdb-script-symbol): New
function.
Add help for gdb-script-mode.
2017-01-17 15:40:16 -07:00
Tom Tromey
8083d258ba Treat ":root" as a css-selector
* lisp/textmodes/css-mode.el (css--font-lock-keywords): Recognize bare
":root" as selector.
2017-01-17 15:35:39 -07:00
Tom Tromey
aa711e0a92 Fix JS regexp literal syntax propertization in expressions
Bug#25465:
* lisp/progmodes/js.el (js-syntax-propertize): Recognize a regexp
literal after "!", "&", and "|".
test/lisp/progmodes/js-tests.el (js-mode-regexp-syntax): New test.
2017-01-17 15:33:20 -07:00
Mark Oteiza
14c7d3a6e0 Mark unused arguments and remove unused variables
* lisp/play/dunnet.el (dun-mode, dun-die, dun-inven, dun-try-take):
(dun-dig, dun-type, dun-n, dun-s, dun-e, dun-w, dun-ne, dun-se):
(dun-nw, dun-sw, dun-up, dun-down, dun-in, dun-out, dun-long):
(dun-swim, dun-score, dun-flush, dun-piss, dun-sleep, dun-drive):
(dun-superb, dun-power, dun-unix-parse, dun-bin, dun-fascii):
(dun-ftpquit, dun-ftphelp, dun-uexit, dun-pwd, dun-dos-parse):
(dun-dos-invd, dun-dos-spawn, dun-dos-exit, dun-dos-nil):
(dungeon-nil): Mark arguments as unused.
(dun-drop, dun-objnum-from-args, dun-get-path, dun-ftp):
(dun-restore): Remove unused variable.
2017-01-17 15:19:30 -05:00
Michael Albinus
299b190a6b Fix auto-save-file-name problem in Tramp on MS Windows
* lisp/files.el (make-auto-save-file-name): Use `file-remote-p'
rather than an ange-ftp regexp.

* lisp/net/tramp.el (tramp-handle-make-auto-save-file-name):
Fix a problem when running on MS Windows.

* test/lisp/net/tramp-tests.el (tramp-test31-make-auto-save-file-name):
Adapt test.
2017-01-17 17:35:23 +01:00
Paul Eggert
021d340cf9 ; Spelling fixes 2017-01-17 07:46:03 -08:00
Paul Eggert
2b36ae07e3 Merge from origin/emacs-25
42614fa Update remaining copyright years with admin.el M-x set-copyright
f17a006 * lisp/ffap.el (ffap-lax-url): Bump :version after recent cha...
2017-01-17 07:34:25 -08:00
Mark Oteiza
5362ef79cb Nix some uses of eval
* lisp/play/dunnet.el: Fix triple negative.
(dun-doverb): Use funcall instead of eval.
(dun-echo): Just call dun-mprinc.
(dun-save-val): Just bind value without eval.
2017-01-17 00:48:00 -05:00
Mark Oteiza
922850bcc7 ; * lisp/play/dunnet.el: Fix file footer. 2017-01-16 23:35:05 -05:00
Tom Tromey
e27239ad1b Fix comment in css-mode.el
* lisp/textmodes/css-mode.el: Remove obsolete comment.
2017-01-16 17:22:05 -07:00
Noam Postavsky
fd6b829d91 Improve ffap-gopher-at-point handling of long lines
* lisp/ffap.el (ffap-gopher-regexp): Only match the KEY part.  Note
setting to nil is now supported.
(ffap--gopher-var-on-line): New function.
(ffap-gopher-at-point): Use it instead of the old ffap-gopher-regexp
which could overflow the regexp stack on long lines (Bug#25391).  Use
`let-alist' instead of calling `set' on local variables.
* test/lisp/ffap-tests.el (ffap-gopher-at-point): New test.
2017-01-15 13:04:54 -05:00
Alan Mackenzie
a23974d6e6 Correct c-parse-state-get-strategy for moving HERE backward into a macro.
* list/progmodes/c-engine.el (c-parse-state-get-strategy): When HERE is below
its previous value, we chose strategy 'forward, and the new HERE is in a
(different) macro, ensure the returned START-POINT is not above the start of
the macro.
2017-01-14 12:38:43 +00:00
Eli Zaretskii
877c525f4b Include "Date:" in mail messages filed by 'sendmail-send-it'
* lisp/mail/sendmail.el (mail-do-fcc): Insert a 'Date:' header
into the filed message.  In the outgoing message, sendmail will
add the date, but the composed message body doesn't have it.
(Bug#25436)
2017-01-14 10:55:16 +02:00
Dmitry Gutov
5b9f08fb86 Remove leftover references to log-view-message-face
* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode): Use log-view-message.

* lisp/vc/vc-git.el (vc-git-root-log-format): Same.

* lisp/vc/vc-hg.el (vc-hg-root-log-format): Same.
2017-01-14 06:56:37 +03:00
Phillip Lord
72c668a904 Record autoloads till emacs dump
* admin/ldefs-clean.el (ldefs-clean-up): Record autoloads till emacs dump
* lisp/ldefs-boot-auto.el (batch-byte-compile): Update

Previously, autoloads were collected till loaddefs.el was generated as
part of the build. However, bootstrap-emacs does not load
loaddefs (rather it is dumped), hence we must record autoloads until the
full emacs binary is dumped.
2017-01-13 21:28:43 +00:00
Tom Tromey
502390822f Add chained indentation to js-mode
Bug#20896
* lisp/progmodes/js.el (js-chain-indent): New variable.
(js--skip-term-backward, js--skip-terms-backward)
(js--chained-expression-p): New functions.
(js--proper-indentation): Call js--chained-expression-p.
* test/manual/indent/js-chain.js: New file.
* test/manual/indent/js.js: Add (non-)chained indentation test.
2017-01-13 12:38:36 -07:00
Tom Tromey
b47f97218e Fix js-mode indentation bug
Bug#15582:
* lisp/progmodes/js.el (js--find-newline-backward): New function.
(js--continued-expression-p): Use it.
* test/manual/indent/js.js: Add new test.
2017-01-13 12:38:36 -07:00
Tom Tromey
765920f727 Add .jsx to auto-mode-alist
Bug#25389:
* lisp/files.el (auto-mode-alist): Add entry for .jsx.
2017-01-13 12:38:36 -07:00
Tom Tromey
05fe74bec2 Fix two js-mode filling bugs
Bug#19399 and Bug#22431:
* lisp/progmodes/js.el (js-mode): Set comment-line-break-function and
c-block-comment-start-regexp.
* test/lisp/progmodes/js-tests.el: New file.
2017-01-13 12:38:36 -07:00
Katsumi Yamaoka
62e27ebd54 Fix last change of dd80ee6 (was: mm-uu.el: Don't dissect patch part) 2017-01-13 07:42:35 +00:00
Katsumi Yamaoka
dd80ee695c mm-uu.el: Don't dissect patch part
This fixes a bug that the patch part is broken in the article
<87inpjzhpb.fsf@users.sourceforge.net> in the bug-gnu-emacs list.

* lisp/gnus/mm-uu.el (mm-uu-dissect-text-parts):
Don't dissect patch part.
2017-01-13 07:22:30 +00:00
Dmitry Lazurkin
d4a97088f6 Fix extracting async def type and name in python mode imenu
* lisp/progmodes/python.el (python-imenu--get-defun-type-name):
New function.
(python-imenu--build-tree): Use python-imenu--get-defun-type-name for
extract async or simple def type and name at current
position (Bug#24820).
* test/lisp/progmodes/python-tests.el (python-imenu-create-index-1):
(python-imenu-create-flat-index-1): Add async def's.
2017-01-12 20:40:19 -05:00
Katsumi Yamaoka
55b5265847 Remove garbage from Content-Transfer-Encoding value (bug#25420)
* lisp/mail/ietf-drums.el (ietf-drums-strip-cte): New function.
(ietf-drums-remove-garbage): New function.
(ietf-drums-remove-whitespace): Remove CR as well.

* lisp/mail/mail-parse.el (mail-header-strip-cte):
Alias to ietf-drums-strip-cte.

* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-sum.el (gnus-summary-enter-digest-group):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nndoc.el (nndoc-decode-content-transfer-encoding)
(nndoc-rfc822-forward-generate-article):
* lisp/mh-e/mh-mime.el (mh-decode-message-body):
Replace mail-header-strip with mail-header-strip-cte.
2017-01-12 23:32:41 +00:00
Alexander Kuleshov
d569dd2198
Add DNS keywords and remove duplications
* lisp/textmodes/dns-mode.el (dns-mode-types): Add two TLSA and
NSEC" DNS related keywords and remove duplication of "NSAP".
2017-01-11 10:30:46 -08:00
Alan Mackenzie
6463b85aeb Handle syntactic WS cache properties more accurately at buffer changes.
This fixes bug #25362.

* lisp/progmodes/cc-engine.el (c-sws-lit-type, c-sws-lit-limits)
(c-invalidate-sws-region-before, c-invalidate-sws-region-after-del)
(c-invalidate-sws-region-after-ins): New variables and functions.
(c-invalidate-sws-region-after): Change from a defsubst to a defun.
Also pass
it the standard OLD-LEN argument.  Call both
c-invalidate-sws-region-after-{ins,del} to check for "dangerous" WS
cache
properties.

* lisp/progmodes/cc-langs.el (c-block-comment-ender-regexp): New language
variable.

* lisp/progmodes/cc-mode.el (c-before-change): Call
c-invalidate-sws-region-before.
(c-after-change): Pass old-len to c-invalidate-sws-region-after.
2017-01-11 18:25:39 +00:00
Michael Albinus
3a6df2d604 Support stat 8.26 in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-stat): Use QUOTING_STYLE
environment variable of newer coreutils.  (Bug#23422)
2017-01-11 17:13:41 +01:00
Eli Zaretskii
560a384038 Don't use unsafe encoding for the bookmark file
* lisp/bookmark.el (bookmark-write-file): Handle the case when the
explicitly specified encoding of the bookmark file cannot encode the
additional bookmarks just added.  (Bug#25365)
2017-01-10 17:47:10 +02:00
Phillip Lord
ef8c9f8fc9 Remove unused ldefs-boot.el
* lisp/ldefs-boot.el: Remove

This file was not removed as reported in c27b645956, but accidentally
left.
2017-01-09 08:56:03 +00:00
Stefan Merten
3d418bd46f * lisp/textmodes/rst.el: Fix rst-forward-indented-block.
* rst.el (rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
	(rst-official-version, rst-official-cvs-rev)
	(rst-package-emacs-version-alist): Maintain version numbers.
	(rst-forward-indented-block): Fix. Start searching at next
	line again. Fixes fontification of comments continuing on the
	same line they started.
2017-01-08 11:09:10 +01:00
Michael Albinus
77f35363fd Fix a problem with `start-file-process' in Tramp
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
`start-file-process' shall work when `non-essential' is
non-nil, but there is already an established connection.
<https://github.com/company-mode/company-mode/issues/462>
2017-01-07 18:51:30 +01:00
Rolf Ade
75cdf42917 Fix selecting SQLite database files with sql-mode (Bug#23566)
* lisp/progmodes/sql.el (sql-sqlite-login-params): Allow any name as
SQLite database file name, by default.
(sql-get-login-ext): Fixed read-file-name arguments to provide
path completion even if a database name pattern is customized and to
allow creation of new SQLite database files.

Copyright-paperwork-exempt: yes
2017-01-07 11:20:17 -05:00
Eli Zaretskii
e272032769 Specify encoding of the bookmark file
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Accept an argument CODING and include a 'coding:' cookie in the
bookmark file preamble.
(bookmark-upgrade-file-format-from-0): Call
'bookmark-insert-file-format-version-stamp' with the file buffer's
encoding, as detected when it was read.
(bookmark-file-coding-system): New variable.
(bookmark-load): Set bookmark-file-coding-system to the encoding
of the loaded file.
(bookmark-write-file): Bind coding-system-for-write to either the
user setting via "C-x RET c" or to the existing file encoding,
defaulting to 'utf-8-emacs'.  Update the value of
bookmark-file-coding-system.  (Bug#25365)
2017-01-07 14:33:41 +02:00
Eli Zaretskii
50fd04cd4b Avoid infloop in 'ispell-region'
* lisp/textmodes/ispell.el (ispell-begin-skip-region-regexp):
Protect against 'ispell-skip-region-alist' being nil.  Reported by
Ernest Adrogué <nfdisco@gmail.com>, see
http://lists.gnu.org/archive/html/help-gnu-emacs/2017-01/msg00007.html.
2017-01-07 13:02:50 +02:00
Stefan Monnier
8f0376309e (feedmail-deduce-address-list): Avoid add-to-list on local variables.
Author:

* lisp/mail/feedmail.el (feedmail-deduce-address-list):
Avoid add-to-list on local variables.
2017-01-05 21:02:48 -05:00
Noam Postavsky
69b9224a32 Fix isearch handling of C-u C-u...
* lisp/isearch.el: Add `isearch-scroll' property to
universal-argument-more so that `isearch-allow-scroll' will apply to it
as well.
(isearch-pre-command-hook): Let `isearch-allow-prefix' apply to
`universal-argument-more' as well (Bug#25302).
2017-01-05 20:20:42 -05:00
Johan Claesson
d88cdad284 Fix term.el handling of ^Z-sequences spanning chunks
Bash will after each command send ?\032 and the current directory "/tmp"
to inform term.el.  Bash output is buffered in 4096 bytes chunks.  If a
command outputs roughly 4096 bytes then the end of the first chunk will
be "/tm" (Bug#13350).

* lisp/term.el (term-emulate-terminal): Change the regexp to find the
end of the ?\032 sequence to use \n instead of $, the latter can match
end of string as well.

Copyright-paperwork-exempt: yes
2017-01-04 23:20:47 -05:00
Mark Oteiza
0392f942c7 Turn on lexical-binding in mb-depth.el
* lisp/mb-depth.el: Turn on lexical-binding.
(minibuffer-depth-setup): Bind things used multiple times.
2017-01-04 22:31:26 -05:00
Glenn Morris
f17a0069f9 * lisp/ffap.el (ffap-lax-url): Bump :version after recent change. 2017-01-04 13:32:18 -05:00
Stefan Monnier
2ec41c415f Avoid add-to-list on local variables
* lisp/gnus/nnir.el: Use lexical-binding and cl-lib.
(nnir-retrieve-headers): Use pcase.
(nnir-search-thread): Avoid add-to-list on local variables.

* lisp/gnus/smime.el: Use lexical-binding and cl-lib.
(smime-verify-region): Avoid add-to-list on local variables.

* lisp/mail/undigest.el: Use lexical-binding and cl-lib.
(rmail-digest-parse-mime, rmail-digest-rfc1153)
(rmail-digest-parse-rfc934): Avoid add-to-list on local variable.

* lisp/net/ldap.el (ldap-search): Move init into declaration.

* lisp/net/newst-backend.el (newsticker--cache-add):
Avoid add-to-list on local variables; Simplify code with `assq'.

* lisp/net/zeroconf.el: Use lexical-binding and cl-lib.
(dbus-debug): Remove declaration, unused.
(zeroconf-service-add-hook, zeroconf-service-remove-hook)
(zeroconf-service-browser-handler, zeroconf-publish-service):
Avoid add-to-list and *-hook on local variables.

* lisp/org/org-archive.el (org-all-archive-files):
* lisp/org/org-agenda.el (org-agenda-get-restriction-and-command):
Avoid add-to-list on local variables.

* lisp/org/ox-publish.el (org-publish--run-functions): New function.
(org-publish-projects): Use it to avoid run-hooks on a local variable.
(org-publish-cache-file-needs-publishing): Avoid add-to-list on
local variables.

* lisp/progmodes/ada-prj.el: Use setq instead of (set '...).
(ada-prj-load-from-file): Avoid add-to-list on local variables.

* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library): Simplify.
(ada-gnat-parse-gpr, ada-parse-prj-file-1)
(ada-xref-find-in-modified-ali): Avoid add-to-list on local variables.

* lisp/progmodes/idlw-shell.el (idlwave-shell-update-bp-overlays):
Avoid add-to-list on local variables.
2017-01-04 00:40:45 -05:00
Mark Oteiza
f49f8c1454 Turn on lexical-binding in md4.el
* lisp/md4.el: Turn on lexical-binding.
* test/lisp/md4-tests.el: New file.
2017-01-03 18:34:13 -05:00
Stefan Merten
9ed3685a77 Lots of refactorings and a few minor improvements.
User visible improvements and changes:
* Improve and debug `rst-forward-section` and `rst-backward-section`.
* Auto-enumeration may be used with all styles for list insertion.
* Improve and debug `rst-toc-insert`.
* Adapt change in Emacs to use customization group `text` instead of `wp`.
* Bind `n` and `p` in `rst-toc-mode`.
* `z` in `toc-mode` returns to the previous window configuration.
* Require Emacs version >= 24.1.

Lots of refactorings including:
* Silence byte compiler.
* Use lexical binding.
* Use `cl-lib`.
* Add tests and raise test coverage.
2017-01-03 23:15:13 +01:00
Stefan Monnier
e28c99082a (cl-defstruct): Improve error message for slots w/o value (bug#25312)
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't signal an error but
emit a warning for those coders who forgot to put a default value in
their slot.
2017-01-03 16:07:44 -05:00
Philipp Stephani
5c6f1198d4
Small patch for ffap.el
* lisp/ffap.el (ffap-alist): Document that ffap sets the match data
while walking 'ffap-alist'.
2017-01-03 08:40:57 -08:00
Philipp Stephani
8dd624c8ac Document that functions in 'ffap-alist' can use the match data
* lisp/ffap.el (ffap-alist): Document that ffap sets the match data
while walking 'ffap-alist'.
2017-01-03 17:19:36 +01:00
Noam Postavsky
134e86b360 Handle multibyte chars spanning chunks in term.el
* lisp/term.el (term-terminal-undecoded-bytes): New variable.
(term-mode): Make it buffer local.  Don't make `term-terminal-parameter'
buffer-local twice.
(term-emulate-terminal): Check for bytes of incompletely decoded
characters, and save them until the next call when they can be fully
decoded (Bug#25288).
2017-01-03 08:58:40 -05:00
Michael Albinus
1d714e41ea Check also for "gvfs-monitor-dir.exe" in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-gvfs-monitor-dir): Check also
for "gvfs-monitor-dir.exe".
2017-01-02 19:30:21 +01:00
Sašo Živanović
1e8bb313ea Fix RefTeX to show table of contents for dtx files (tiny change)
* lisp/textmodes/reftex.el (reftex-compile-variables): Change the
  section regexp so that it accepts lines starting with the comment
  character. (tiny change)
* lisp/textmodes/reftex-parse.el (reftex-parse-from-file): Filter
  gathered toc entries, accepting a commented entry if and only if the
  source file is a ".dtx" file. (tiny change)
2017-01-02 13:11:49 +01:00
Paul Eggert
367dadf554 Remove mistakenly-added files
Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00008.html
* lisp/gnus/gnus-ems.el, lisp/gnus/gnus-sync.el:
* lisp/gnus/messcompat.el, lisp/nxml/nxml-glyph.el:
* lisp/nxml/nxml-uchnm.el, lisp/obsolete/awk-mode.el:
* lisp/obsolete/iso-acc.el, lisp/obsolete/iso-insert.el:
* lisp/obsolete/iso-swed.el, lisp/obsolete/resume.el:
* lisp/obsolete/scribe.el, lisp/obsolete/spell.el:
* lisp/obsolete/swedish.el, lisp/obsolete/sym-comp.el:
Remove files that were added by mistake during a merge.
2017-01-01 20:24:00 -08:00
Noam Postavsky
214a67b00b Warn about incomplete untarring of link files
The current tar-mode doesn't really support unpacking symlinks, it
simply creates an empty file of the same name.

* lisp/tar-mode.el (tar--describe-as-link): New function extracted from
`tar--check-descriptor'.
(tar-untar-buffer): Use it to warn about imperfectly untarred link
files.
2017-01-01 16:36:23 -05:00
Noam Postavsky
5da2a5f449 Remove sh-mode's skeleton-end-hook
* lisp/progmodes/sh-script.el (sh-mode): Remove local setting of
`skeleton-end-hook', `skeleton-insert' already does `newline-and-indent'
and also respects `skeleton-end-newline' (Bug#16634).
2017-01-01 16:36:22 -05:00
Mark Oteiza
bd34a6c73f Add term/tmux.el
Since tmux version 2.1, new tmux terminfos are shipped due to oddities
with xterm and screen terminfos.  This is simply a duplication of
term/screen.el with screen -> tmux.
* lisp/term/tmux.el: New file.
2017-01-01 11:50:59 -05:00
Philipp Stephani
93be35e038 Fix encoding of JSON surrogate pairs
JSON requires that such pairs be treated as UTF-16 surrogate pairs, not
individual code points; cf. Bug #24784.

* lisp/json.el (json-read-escaped-char): Fix decoding of surrogate
pairs.
(json--decode-utf-16-surrogates): New defun.

* test/lisp/json-tests.el (test-json-read-string): Add test for
surrogate pairs.
2017-01-01 13:24:14 +01:00
Michael Albinus
baa370f255 Remove tramp-gw.el, which was synced from emacs-25 by accident 2017-01-01 13:03:55 +01:00
Paul Eggert
e6a782ee1a Update copyright year to 2017 in master
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
2017-01-01 01:48:59 -08:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
61848d2da3 Merge from origin/emacs-25
697167b ; Improve wording of previous change in variables.texi
d7973e8 Document 'default-toplevel-value' and 'set-default-toplevel-v...
8b71826 Don't modify minibuffer variables globally
5b5e036 Revert to pre-25.1 behavior in ffap
19994a1 * lisp/ffap.el: Fix obsolete comment referencing ffap-bug.
3ace730 Attempt to fix 64-bit AIX build
f69bd79 Clarify usage of 'ediff-cleanup-hook' (Bug#24675)
c04ac8a Document that variable binding order is unspecified
272554a * lisp/desktop.el (desktop-buffers-not-to-save): Doc fix.
08de101 Fix M-x hints on Mac port
86a297a Work around reporting a dpi change in apply_xft_settings
cf1f985 ; lisp/skeleton.el (skeleton-insert): Fix typo in last change
9e1209d Amend the version number of CC Mode 5.33 -> 5.32.99.  Don't m...
88cdf14 Improve skeleton docstrings
2017-01-01 01:02:47 -08:00
Paul Eggert
4f7a90bf6c Merge from origin/emacs-25
9adb101 Document 'describe-fontset'
229315c ; Add missing symbol quoting.
3d94931 Repair desktop restoration on text terminals
43022f9 Ignore forward-sexp-function in js-mode indentation code
b19fb49 Improve documentation of 'define-coding-system'
467768f Fix Bug#25162
6db78ae Fix a typo in define-abbrev-table
5f7d906 Bump makeinfo requirement from 4.7 to 4.13
442e2f6 Fixes related to select-enable-clipboard
e4ac450 Define struct predicate before acccesors
08decbd Doc fix for vc-git
5531e75 Further improve make-dist checking
953bf67 Improve previous make-dist change
129645a Make make-dist --snapshot do some sanity checks

# Conflicts:
#	lisp/menu-bar.el
2017-01-01 01:02:45 -08:00
Alan Mackenzie
620e5a3cd4 Give eval-and-compile a correct edebug spec. Fixes bug #16184 properly.
* lisp/emacs-lisp/edebug.el (edebug_offset_indices): Revert abortive commit
from Thu Dec 29 09:22:36 2016 +0000 which didn't really fix the bug.

* lisp/emacs-lisp/byte-run.el (eval-and-compile): Change the edebug spec from
t to (&rest def-form).
2017-01-01 08:28:04 +00:00
Paul Eggert
2e2a806803 Fix copyright years by hand
These are dates that admin/update-copyright did not update, or
updated incorrectly.
2017-01-01 04:01:41 +00:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Philipp Stephani
4bbd5424a2 Checkdoc: use syntax functions instead of regex
In checkdoc.el, get rid of the error-prone regex to find definition
forms, and use existing syntax-based navigation functions instead.
This fixes a corner case with one-argument `defvar' forms.

* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): New function.
(checkdoc-next-docstring, checkdoc-defun): Use it.
* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--next-docstring):
Add unit test.
2016-12-31 17:30:46 +01:00
Alan Mackenzie
a285645b8b CC Mode: Fix the fontification of a spuriously recognised enum member.
The "enum" was in an argument list, but triggered the fontification of a
following identifier in the function block as though it were in an enum
declaration.

* lisp/progmodes/cc-fonts.el (c-font-lock-enum-body): New function.
(c-basic-matchers-after): Replace the inline stanza for enum elements with a
call to c-font-lock-enum-body.

* lisp/progmodes/cc-langs.el (c-enum-clause-introduction-re): New language
variable.
2016-12-30 15:31:42 +00:00
Nicolas Petton
e092f08515
Bump Emacs version to 25.1.91
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version.
* lisp/ldefs-boot.el: Update.
2016-12-30 15:38:03 +01:00
Arash Esbati
d9b126890d Add entry for biblatex
* lisp/textmodes/reftex-vars.el (reftex-cite-format-builtin): Add
entry for biblatex macros.
2016-12-30 10:28:29 +01:00
Tino Calancha
c336420d9f ffap-string-at-point: Limit max length of active region
Prevents that 'ffap-guesser' waste time checking large strings
which are likely not valid candidates (Bug#25243).
* lisp/ffap.el (ffap-max-region-length): New variable.
(ffap-string-at-point): Use it.
* test/lisp/ffap-tests.el: New test suite.
(ffap-tests-25243): Add test for this bug.
2016-12-30 15:31:01 +09:00
Mike Kupfer
b5b4c4938b * mh-e.el (mh-fetch-x-image-url): Fix a docstring typo. 2016-12-29 13:46:37 -08:00
Alan Mackenzie
11b81a54d5 Partially correct fontification of "(b*3)", and the like, in C++ Mode
This problem is caused by the fundamental ambiguity in C++ between
argument declarations and initialisation clauses.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): If we have an open
paren preceded by an arithmetic operator, we give this the context nil, not
'arglist.

* lisp/progmodes/cc-langs.el (c-arithmetic-operators, c-arithmetic-op-regexp):
New lang consts and vars.
2016-12-29 15:34:36 +00:00
Alan Mackenzie
0d19e69184 Initialize edebug-offset-indices to a cons, not nil. Fixes bug #16184.
This is because there are times when this variable is changed by setcar before
an atom is pushed onto it by debug-enter.  This happens, for example, whilst
instrumenting c-font-lock-declarations in .../lisp/progmodes/cc-fonts.el.

* lisp/emacs-lisp/edebug.el (edebug-offset-indices): initialize to '(0).
2016-12-29 09:22:36 +00:00
Stefan Monnier
af1b1026dd * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)
(inline--dont-quote): Quote the function with #' when passing it to `apply'.
Cherry picked from commit e6161f6489.
2016-12-28 11:50:02 -05:00
Michael Albinus
aebe6592db Release Tramp 2.3.1
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.1".

* lisp/net/tramp.el (tramp-eshell-directory-change): Add it to
`eshell-mode-hook' but `eshell-first-time-mode-hook'.

* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p)
(tramp-compat-file-name-quote)
(tramp-compat-file-name-unquote): Embed them in `eval-and-compile'.
2016-12-27 20:06:27 +01:00
Stefan Monnier
e6161f6489 * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)
(inline--dont-quote): Quote the function with #' when passing it to `apply'.
2016-12-27 12:44:32 -05:00
Mark Oteiza
ee264827f3 Remove a use of lexical-let
* lisp/gnus/message.el (message-completion-function): Just use let,
since the file now uses lexical-binding.
2016-12-27 11:11:30 -05:00
Bake Timmons
49c9670535 Fix bug in customizing `mail-sources' variable (bug#25274)
* lisp/gnus/mail-source.el (mail-sources): Use list instead of cons
for lone argument. (bug#25274) (tiny change)
2016-12-27 06:38:41 +00:00
Philipp Stephani
65b997b95e Checkdoc: Don't require a space before an arg list
See Bug#24998.

* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-regexp): Don't require a
space before a argument list.
* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--bug-24998):
Add unit test.
2016-12-26 21:13:26 +01:00
Michihito Shigemura
a8a24b5be7 Add zshrc and zshenv detection to sh-mode (bug#25217)
* lisp/progmodes/sh-script.el (sh-mode): Add zsh string-match

Copyright-paperwork-exempt: yes
2016-12-25 19:51:53 +00:00
Leo Liu
8b7182626e Don't modify minibuffer variables globally
* lisp/files.el (cd): Use setq-local instead.  (Bug#25260)
2016-12-25 14:37:51 +08:00
Dima Kogan
e5ef59b87d diff-mode auto-refines only after a successful motion
Prior to this patch (if enabled) auto-refinement would kick in after all
hunk navigation commands, even if the motion failed.  This would result
in a situation where the hunk navigation would signal an error and beep,
but yet still accomplish potentially useful work, by auto-refining.
This patch moves the auto-refinement code to only run when a motion was
successful

* lisp/vc/diff-mode.el (diff--internal-hunk-next,
  diff--internal-hunk-prev): Removed auto-refinement-triggering code
* lisp/vc/diff-mode.el (diff--wrap-navigation): Added
  auto-refinement-triggering code
2016-12-24 21:42:02 -08:00
Dima Kogan
6b6abe0dba diff-mode is able to better handle file headers
This fixes a regression introduced in

  http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=commit;h=2c8a7e50d24daf19ea7d86f1cfeaa98a41c56085

This bug was filed in

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25105

Patches generated from a VCS such as git contain a patch message at the
start, and diff-mode is now once-again able to properly able to ignore
this message when issuing navigation commands around the message.

* lisp/vc/diff-mode.el (diff-beginning-of-file-and-junk): More
  thoroughly ignore the header when looking for a beginning of file
  diffs.
2016-12-24 21:32:34 -08:00
Eli Zaretskii
5b5e036651 Revert to pre-25.1 behavior in ffap
* lisp/ffap.el (ffap-lax-url): Change the default to t, to produce
the same behavior as in Emacs 24.x.  (Bug#25264)
Explain the trade-offs of customizing this in the doc string.
2016-12-24 20:12:06 +02:00
Noam Postavsky
19994a1502 * lisp/ffap.el: Fix obsolete comment referencing ffap-bug. 2016-12-24 10:38:12 -05:00
Noam Postavsky
da52e939aa Remove redundant `save-match-data' in whitespace.el
* lisp/whitespace.el (whitespace-cleanup, whitespace-cleanup-region):
(whitespace-report-region): Remove redundant `save-match-data' calls.
2016-12-24 09:45:14 -05:00
Noam Postavsky
cf5417f028 Fix whitespace eob cleanup
* lisp/whitespace.el (whitespace-empty-at-eob-regexp): Match any number
of empty lines at end of buffer.
* test/lisp/whitespace-tests.el (whitespace-cleanup-eob): New test.
(whitespace-tests--cleanup-string): New helper function for tests.
2016-12-24 09:45:14 -05:00
Hong Xu
25c9cb77b4 Fix timezone detection of parse-iso8601-time-string
* parse-time.el (parse-iso8601-time-string): Fix timezone
parsing.  Add a doc string.  (Bug#25086)
* editfns.c (Fdecode-time): Doc fix.
* emacs-mime.texi (time-date): Add an example for
parse-iso8601-time-string.
* parse-time-tests.el (parse-time-tests): Add tests for
parse-iso8601-time-string.
2016-12-24 14:35:12 +02:00
Eli Zaretskii
272554a666 * lisp/desktop.el (desktop-buffers-not-to-save): Doc fix. 2016-12-23 11:36:04 +02:00
Stefan Monnier
08de101d75 Fix M-x hints on Mac port
* lisp/simple.el (execute-extended-command--shorter): Call
input-pending-p to trigger input processing on some systems, such
as Mac port.  (Bug#23002)
2016-12-23 10:53:31 +02:00
Paul Eggert
73349822cb ; Spelling fixes 2016-12-22 10:14:11 -08:00
Noam Postavsky
de06710967 Use completion-at-point in verilog-mode
There were some functions in verilog-mode that implemented in-buffer
completion, but this needlessly duplicates completion-at-point
functionality, and the popup window management had problems
(see Bug #23842).  We need to keep them for backwards compatibility with
older emacs versions, but use completion-at-point if available.

* lisp/progmodes/verilog-mode.el (verilog-toggle-completions): Mark as
obsolete if completion-cycle-threshold is available.
(verilog-mode-map, verilog-menu): Bind completion-at-point and
completion-help-at-point in preference to verilog-complete-word and
verilog-show-completions, respectively.
(verilog-mode): Add verilog-completion-at-point to
completion-at-point-functions.
(verilog-completion-at-point): New function.
(verilog-show-completions, verilog-complete-word): Use it to avoid code
duplication.
2016-12-21 21:39:58 -05:00
Reuben Thomas
acd65a7d94 Keep default CASECHARS/NOT-CASECHARS for ispell built-in dictionaries
* lisp/textmodes/ispell.el (ispell-set-spellchecker-params): Do not
override CASECHARS and NOT-CASECHARS.  The ispell dictionaries
retain their hardwired values, and all other dictionaries are given
sensible defaults.
2016-12-21 22:31:29 +00:00
Stefan Monnier
7ca4396f85 * tex-mode.el (tex-compile-commands): Add luatex and xetex commands 2016-12-21 15:51:14 -05:00
Stefan Monnier
a6063ffe5a * src/data.c (Fmake_variable_frame_local): Remove
* src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'.

* src/data.c (swap_in_symval_forwarding, set_internal)
(set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
Don't pay attention to ->frame_local any more.
(syms_of_data): Remove Qtrapping_frame_local and don't defsubr
Smake_variable_frame_local.

* etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal
of make-variable-frame-local.

* lisp/help-fns.el (describe-variable): Don't handle the now impossible
frame-local case.

* lisp/subr.el (make-variable-frame-local): Remove obsolescence data.

* src/frame.c (store_frame_param):
* src/eval.c (specbind): Don't pay attention to ->frame_local any more.

* src/widget.c (first_frame_p): Remove, unused.
2016-12-21 15:07:43 -05:00
Michael Albinus
8661313efd Remove gateway methods in Tramp
* doc/misc/tramp.texi (Top, Configuration): Remove section
`Gateway methods', insert section `Firewalls' in menu.
(History): Gateways are removed now.
(Gateway methods): Remove section.
(Multi-hops, Traces and Profiles): Don't reference to gateways anymore.
(Firewalls): New section.

* etc/NEWS: Gateway methods in Tramp have been removed.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-file-name-port, tramp-accept-process-output): Simplify.

* lisp/net/tramp-gw.el: Remove.

* lisp/net/tramp-sh.el (tramp-gw-tunnel-method)
(tramp-gw-socks-method): Remove declarations.
(tramp-methods) <scp, scpx, ssh, sshx, telnet, nc, plink, pscp>:
Remove `tramp-gw-args' and `tramp-default-port'.  (Bug#18967)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-compute-multi-hops, tramp-maybe-open-connection):
Remove gateway support.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
Remove gateway tests.
2016-12-21 12:42:22 +01:00
Noam Postavsky
cf1f9852d0 ; lisp/skeleton.el (skeleton-insert): Fix typo in last change 2016-12-20 22:16:42 -05:00
Alan Mackenzie
9e1209d7a6 Amend the version number of CC Mode 5.33 -> 5.32.99. Don't merge to trunk.
lisp/progmodes/cc-defs.el: Amend the version number.
etc/NEWS: Add an item explaining the change.
2016-12-20 21:49:31 +00:00
Mark Oteiza
221d3a9767 ; Revert "Recognize graphicsmagick in image-dired"
This reverts commit 5c266405f5.
There are too many annoying differences between GM and IM to make this
default behavior.
2016-12-20 11:14:53 -05:00
Christopher Genovese
35aaa6b6aa ibuffer: New filters and commands
Add several new filters and improve documentation.
See discussion on:
https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00399.html
* lisp/ibuf-ext.el: Add paragraph to file commentary.
(ibuffer-saved-filters, ibuffer-filtering-qualifiers)
(ibuffer-filter-groups): Update doc string.
(ibuffer-unary-operand): Add new function that transparently
handles 'not' formats for compound filters.
(ibuffer-included-in-filter-p): Handle 'not' fully; update doc string.
(ibuffer-included-in-filter-p-1): Handle 'and' compound filters.
(ibuffer-decompose-filter): Handle 'and' as well,
and handle 'not' consistently with other uses.
(ibuffer-and-filter): New defun analogous to 'ibuffer-or-filter'.
(ibuffer--or-and-filter): New defun.
(ibuffer-or-filter, ibuffer-and-filter): Use it.
(ibuffer-format-qualifier): Handle 'and' filters as well.
(ibuffer-filter-by-basename, ibuffer-filter-by-file-extension)
(ibuffer-filter-by-directory, ibuffer-filter-by-starred-name)
(ibuffer-filter-by-modified, ibuffer-filter-by-visiting-file):
Add new pre-defined filters.
(ibuffer-filter-chosen-by-completion): Add new interactive command
for easily choosing a filter from the descriptions.
* lisp/ibuffer.el (ibuffer-mode-map):
Bind ibuffer-filter-by-basename, ibuffer-filter-by-file-extension,
ibuffer-filter-by-starred-name, ibuffer-filter-by-modified,
ibuffer-filter-by-visiting-file to '/b', '/.', '/*', '/i', '/v'
respectively; bind 'ibuffer-or-filter', 'ibuffer-and-filter',
'ibuffer-pop-filter' ,'ibuffer-pop-filter-group' and
'ibuffer-filter-disable' to '/|', '/&', '/<up>', '/S-<up>'
and '/ DEL' respectively.
* test/lisp/ibuffer-tests.el (ibuffer-autoload): Add appropriate
skip specification.
Add menu entries for the new filters.
(ibuffer-filter-inclusion-1, ibuffer-filter-inclusion-2
ibuffer-filter-inclusion-3, ibuffer-filter-inclusion-4
ibuffer-filter-inclusion-5, ibuffer-filter-inclusion-6
ibuffer-filter-inclusion-7, ibuffer-filter-inclusion-8
ibuffer-decompose-filter, ibuffer-and-filter
ibuffer-or-filter): Add new tests; they are skipped unless
ibuf-ext is loaded.
; * etc/NEWS: Add entries for new user-facing features.
2016-12-20 17:41:56 +09:00
Mark Oteiza
5c266405f5 Recognize graphicsmagick in image-dired
* lisp/image-dired.el (image-dired-cmd-create-thumbnail-program):
(image-dired-cmd-create-thumbnail-options):
(image-dired-cmd-create-temp-image-program):
(image-dired-cmd-create-temp-image-options):
(image-dired-cmd-create-standard-thumbnail-options):
(image-dired-cmd-rotate-thumbnail-program):
(image-dired-cmd-rotate-thumbnail-options): Account for existence of
gm(1) executable.
2016-12-19 20:35:02 -05:00
Noam Postavsky
88cdf14b37 Improve skeleton docstrings
* lisp/skeleton.el (skeleton-end-newline): Remove mention of
`skeleton-end-hook', its default code was moved into `skeleton-insert'.
(skeleton-insert): Mention `skeleton-end-newline' and move reference to
`skeleton-end-hook' above the explanation of skeleton syntax.
2016-12-19 20:02:57 -05:00
Mark Oteiza
36b9973dec Implement asynchronous thumbnail generation in image-dired
Additionally, all FOO-options defcustoms that were in fact shell command
strings have been converted to argument lists.  Another method for
shrinking PNG thumbs with optipng(1) has been added.
* lisp/image-dired.el: Remove TODO item in commentary.
(image-dired-cmd-create-thumbnail-options):
(image-dired-cmd-create-temp-image-options):
(image-dired-cmd-rotate-thumbnail-options):
(image-dired-cmd-rotate-original-options):
(image-dired-cmd-write-exif-data-options):
(image-dired-cmd-read-exif-data-options): Convert to argument lists.
(image-dired-cmd-pngnq-program, image-dired-cmd-pngcrush-program):
Change string type to file.
(image-dired-cmd-create-standard-thumbnail-command): Remove.
(image-dired-cmd-pngnq-options):
(image-dired-cmd-create-standard-thumbnail-options):
(image-dired-cmd-optipng-program, image-dired-cmd-optipng-options):
New defcustoms.
(image-dired-queue, image-dired-queue-active-jobs):
(image-dired-queue-active-limit): New variables.
(image-dired-pngnq-thumb, image-dired-pngcrush-thumb):
(image-dired-optipng-thumb): New functions.
(image-dired-create-thumb-1): Renamed from image-dired-create-thumb.
Use start-process instead of call-process.  Set file modes.  Trigger
PNG file optimization in process sentinel.
(image-dired-thumb-queue-run, image-dired-create-thumb): New functions.
(image-dired-display-thumbs):
(image-dired-create-thumbs): Don't expect call-process return value.
(image-dired-display-image, image-dired-rotate-thumbnail): Use
start-process instead of call-process.
(image-dired-rotate-original, image-dired-set-exif-data):
(image-dired-get-exif-data): Adapt to arguments being an arg list.
2016-12-19 19:47:06 -05:00
Glenn Morris
ce5538248e ; Auto-commit of loaddefs file. 2016-12-19 13:26:17 -05:00
Sam Steingold
657bcaf5ac avoid Eager macro-expansion failure: (void-function string-to-list)
* loadup.el [ns]: "ucs-normalize" uses `string-to-list' which is defined
  in "mule-util", so we have to load "mule-util" before "ucs-normalize",
  otherwise I get "Eager macro-expansion failure" on "make bootstrap"
2016-12-19 11:44:18 -05:00
Michael Albinus
516b4c389a Fix Bug#24980
* lisp/ido.el (ido-add-virtual-buffers-to-list):
Suppress Tramp invocation.  (Bug#24980)
2016-12-19 09:32:30 +01:00
Philipp Stephani
229315c0e2 ; Add missing symbol quoting.
* lisp/vc/ediff-util.el (ediff-janitor): Add missing symbol quoting.
2016-12-18 22:27:42 +01:00
Philipp Stephani
5d1d00c341 Add a new compile error regexp for Clang includes
Clang uses a slight variation of GCC's include format, causing includes
to be treated as warnings instead of informational messages.  Use a new
regular expression instead.

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): New element
`clang-include' for Clang-style "included from" lines.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add unit test.
2016-12-18 21:59:14 +01:00
Alan Third
4b6baba252 Reinstate ispell character offset (bug#25219)
* lisp/textmodes/ispell.el (ispell-process-line): insert -1 where
ispell-offset used to be.
2016-12-18 16:01:16 +00:00
Mark Oteiza
15b3223ebc Bind new image-mode scroll commands in image-dired
* lisp/image-dired.el (image-dired-display-image-mode-map): Add bindings
to new image-mode commands.
2016-12-18 09:41:31 -05:00
Noam Postavsky
a7523ba955 Fix rx-any with range with ?\] and ?-
* lisp/emacs-lisp/rx.el: Make sure not to produce a circular
list (Bug#25123).
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any): New test.
2016-12-18 08:44:45 -05:00
Mark Oteiza
b21a3e726f Use floor of mtime instead of rounding for thumb property
This seems to be the correct thing to do, at least more in line with
what at least one other implementation does.  Anything using
gnome-desktop [0] effectively does the same, as
gnome_desktop_thumbnail_is_valid applies atol(3) to mtime for
comparison and time_t on GNU/Linux is a signed int.
[0] https://git.gnome.org/browse/gnome-desktop/
* lisp/image-dired.el (image-dired-create-thumb): Use floor here.
2016-12-18 07:28:03 -05:00
Reuben Thomas
1a15d14e14 Fix spelling mistake in private defun name (Bug#25218)
lisp/textmodes/flyspell.el (flyspell-ajust-cursor-point): Rename to
`flyspell-adjust-cursor-point'.
2016-12-17 21:08:07 +00:00
Reuben Thomas
63f827ab02 Remove XEmacs support from flyspell.el (Bug#25218)
lisp/textmodes/flyspell.el (flyspell-prog-mode, flyspell-mode-on):
(flyspell-word, flyspell-delete-region-overlays):
(flyspell-correct-word-before-point): Remove XEmacs support.
(flyspell-xemacs-popup): Remove XEmacs-specific defun.
2016-12-17 21:07:57 +00:00
Michael Albinus
cfa2fb2626 More tests for Tramp
* lisp/net/tramp.el (tramp-drop-volume-letter): Handle quoted
file names.

* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): Quote file
name properly.

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name):
Mark quoted file name as absolute.  (Bug#25183)
(tramp--test-windows-nt-and-batch)
(tramp--test-windows-nt-and-pscp-psftp-p): New defuns.
(tramp--test-windows-nt-or-smb-p): Rename from
`tramp--test-smb-windows-nt-p'.  Adapt callees.
(tramp--test-check-files): Improve checks for environment variables.
(tramp-test33-special-characters)
(tramp-test33-special-characters-with-stat)
(tramp-test33-special-characters-with-perl)
(tramp-test33-special-characters-with-ls, tramp-test34-utf8)
(tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
(tramp-test34-utf8-with-ls): Add more checks for skip.
2016-12-17 19:52:38 +01:00
Eli Zaretskii
3d94931cec Repair desktop restoration on text terminals
* lisp/desktop.el (desktop-restoring-frameset-p): Test for the GUI
frame here, instead of in desktop-restoring-frameset.  That's
because desktop-read wants to know whether frameset will actually
be restored, and has fallback procedures up its sleeve when it
won't be; these fallbacks need to be invoked when the frameset is
not going to be restored.  (Bug#24298)
2016-12-17 19:05:21 +02:00
Dmitry Gutov
43022f9860 Ignore forward-sexp-function in js-mode indentation code
* lisp/progmodes/js.el (js--multi-line-declaration-indentation)
(js--maybe-goto-declaration-keyword-end):
Bind forward-sexp-function to nil (bug#25215).
2016-12-17 01:52:12 +02:00
Mark Oteiza
6bf8321831 Be more selective clearing the image cache
* lisp/image-dired.el (image-dired-create-thumbs):
(image-dired-rotate-thumbnail, image-dired-refresh-thumb): Only clear
the current thumbnail file from the image cache.
2016-12-16 10:14:01 -05:00
Nicolas Petton
fb2fdb1435 Make seq-into return the sequence when no conversion needed
* lisp/emacs-lisp/seq.el (seq-into): Do not convert the sequence when
  no conversion is needed.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-into-and-identity): Add
  a regression test checking for identity.
2016-12-16 11:22:00 +01:00
Eli Zaretskii
b19fb4995e Improve documentation of 'define-coding-system'
* lisp/international/mule.el (define-coding-system): Warn against
possible infinite recursion in pre-write-conversion and
post-read-conversion functions.  (Bug#25203)
2016-12-16 10:49:31 +02:00
Mark Oteiza
cdf5340f51 New commands image-scroll-left and image-scroll-right
* etc/NEWS: Mention them.
* lisp/image-mode.el (image-scroll-left, image-scroll-right): New
functions.
2016-12-15 21:59:15 -05:00
Mark Oteiza
f8a47b07ff More image-dired refactoring
* lisp/image-dired.el (image-dired-thumbnail-mode):
(image-dired-display-image-mode): Add :group 'image-dired so
customize-mode works.
(image-dired-display-image): Rearrange.
(image-dired-copy-with-exif-file-name): This map is for side effect.
(image-dired-dired-edit-comment-and-tags): Just use #'identity.
2016-12-15 20:36:24 -05:00
Mark Oteiza
9886239bd2 * lisp/image-dired.el: Turn on lexical-binding. 2016-12-15 19:58:33 -05:00
Mark Oteiza
7ec55a189c Teach image-dired to also generate large thumbs
* lisp/image-dired.el (image-dired-thumbnail-storage): Add
standard-large option.
(image-dired-thumb-size): Add condition for standard-large storage.
(image-dired-insert-thumbnail): Check for new option.  Change
thumbnail path conditionally.
(image-dired-thumb-size): New function.
(image-dired-create-thumb, image-dired-line-up-dynamic): Use it.
2016-12-15 19:55:47 -05:00
Mark Oteiza
b22cb96906 Don't abuse princ and spam messages
* lisp/image-dired.el (image-dired-format-properties-string): Nix princ.
(image-dired-display-thumb-properties):
(image-dired-dired-display-properties): Nix princ.  Bind
message-log-max to nil.
2016-12-15 14:40:32 -05:00
Mark Oteiza
214acb1e6b Inherit things from special-mode and image-mode
* lisp/image-dired.el: Require image-mode library.
(image-dired-thumbnail-mode-map): Remove superfluous binding.
(image-dired-display-image-mode-map): Remove superfluous binding.
Add movement remaps from image-mode-map.
(image-dired-thumbnail-mode): Derive from special-mode.
(image-dired-display-image-mode): Derive from special-mode. Call
image-mode-setup-winprops.
2016-12-15 13:49:38 -05:00
Mark Oteiza
d79ff2a4b9 Fix some image-dired customization types
* lisp/image-dired.el (image-dired): Add info link to defgroup.
(image-dired-dir, image-dired-gallery-dir): Set type to directory.
(image-dired-db-file, image-dired-temp-image-file):
(image-dired-cmd-create-thumbnail-program):
(image-dired-cmd-create-temp-image-program):
(image-dired-cmd-rotate-thumbnail-program):
(image-dired-cmd-rotate-original-program):
(image-dired-temp-rotate-image-file):
(image-dired-cmd-write-exif-data-program):
(image-dired-cmd-read-exif-data-program): Set type to file.
(image-dired-create-thumb, image-dired-line-up-dynamic): Check storage
type at runtime, since setting image-dired-thumb-size does not
automatically set image-dired-thumb-width and image-dired-thumb-height.
2016-12-15 13:25:08 -05:00
Nicolas Petton
09a66ceb5e Fix circular list handling in seq-mapn
* lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists):
  Add a regression test.
2016-12-15 10:26:11 +01:00
Dominique Quatravaux
d381db25a2 Protect environment variables with double quotes in Tramp
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Protect environment variables with double quotes.

Copyright-paperwork-exempt: yes
2016-12-15 09:37:00 +01:00
Tino Calancha
0a5898c3dd * lisp/ibuf-macs.el (define-ibuffer-filter): Wrap ,@body in a progn. 2016-12-15 15:02:32 +09:00
Mark Oteiza
d0388bd12d * lisp/image-dired.el (image-dired-create-thumb): Create parent directories. 2016-12-14 20:36:06 -05:00
Mark Oteiza
0c77bcb393 * lisp/image-mode.el (image-mode-winprops-alist): Add docstring. 2016-12-14 16:38:18 -05:00
Mark Oteiza
53e8d7fb80 Recognize pngnq or pngnq-s9
* lisp/image-dired.el (image-dired-cmd-pngnq-program): Also consider
pngnq-s9 as a possible executable.
2016-12-14 16:34:12 -05:00
Mark Oteiza
66ccc65935 Update standard image-dired thumbnail location
* lisp/image-dired.el (image-dired-thumb-name): Conform to the latest
standard: consider XDG_CACHE_HOME, falling back on ~/.cache.
2016-12-14 14:34:21 -05:00
Mark Oteiza
44a77d34c6 Reset window scroll when displaying an image
When viewing a large image full size and scrolling, for instance, to
the lower right corner, then selecting a much smaller image in the
thumbnail buffer, the window stays scrolled so the new image is out of
the window.  One must scroll back to the "origin" to view the new
displayed image, or just kill the image-dired-display-image buffer and
try again.  This fixes the issue.
* lisp/image-dired.el (image-dired-display-window-width):
(image-dired-display-window-height): Operate on a window as argument.
(image-dired-display-image): Bind (image-dired-display-window) and use
it. Set window vscroll and hscroll to zero when refreshing the
buffer's contents.
2016-12-14 12:25:04 -05:00
Mark Oteiza
51b2669ad5 More image-dired polish
* lisp/image-dired.el (image-dired-file-name-at-point): New function.
(image-dired-thumbnail-mode, image-dired-display-image-mode): Disable
undo list. Add image-dired-file-name-at-point to
file-name-at-point-functions to facilitate find-file and friends.
(image-dired-thumbnail-display-external):
(image-dired-dired-display-external): Use start-process instead, to
avoid needlessly blocking and using a shell.
2016-12-13 22:56:42 -05:00
Phillip Lord
c27b645956 Replace ldefs-boot with a much smaller file
* Makefile.in (bootstrap-build,generate-ldefs-boot): New targets.
   (bootstrap): Depend on bootstrap-build.
 * admin/ldefs-clean.el: New file.
 * lisp/Makefile.in (compile-first): Depend on loaddefs.el
 * lisp/ldefs-boot.el: Remove.
 * lisp/ldefs-boot-auto.el: New file.
 * lisp/ldefs-boot-manual.el: New file.
 * lisp/loadup.el: Load ldefs-boot-manual.el.
 * src/emacs.c (generating_ldefs_boot): New variable.
   (main): Check whether we are generating ldefs.
 * src/eval.c (autoload-do-load): Dump autoload forms to stderr when
   requested.
 * src/lisp.h (generating_ldefs_boot): New variable.
 * admin/gitmerge.el, admin/make-tarball.txt, admin/notes/copyright,
   lisp/Makefile.in, lisp/cus-dep.el, lisp/emacs-lisp/elint.el,
   lisp/finder.el, lisp/loadup.el, msdos/mainmake.v2: Update reference to
   ldefs-boot.
 * admin/update_autogen: Alter mechanism for ldefs-boot generation.
2016-12-13 22:15:32 +00:00
Reuben Thomas
9e6618beca Remove support for aspell < 0.60 (from 2004)
lisp/textmodes/ispell.el (ispell-check-version): Require Aspell 0.60.
(ispell-aspell-dictionary-alist): Remove check that we have Aspell 0.60.
2016-12-13 19:43:49 +00:00
Reuben Thomas
97f327d8de Minor docstring and comment fixes to ispell.el
lisp/textmodes/ispell.el (ispell-aspell-dictionary-alist): Mention
ispell-aspell-dictionary-alist, not ispell-dictionary-alist.
(ispell-set-spellchecker-params): Change double-single quotes to
single single quotes in comment.
2016-12-13 19:43:49 +00:00
Reuben Thomas
94834bdf94 Remove unused variable
* lisp/textmodes/ispell.el (current-ispell-directory): Remove.
2016-12-13 19:43:49 +00:00
Reuben Thomas
6b5ac5837a Remove XEmacs-specific ispell-with-no-warnings
* lisp/textmodes/ispell.el (ispell-with-no-warnings): Remove this
defmacro, needed only for XEmacs.
(ispell-command-loop, ispell-message): Use with-no-warnings directly.
2016-12-13 19:43:49 +00:00