Philipp Stephani [Sun, 10 Dec 2017 17:03:04 +0000 (18:03 +0100)]
Skip tests for json.c unless compiled with native JSON support.
* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/object, json-parse-string/object)
(json-parse-string/string, json-serialize/string)
(json-parse-string/incomplete, json-parse-string/trailing)
(json-parse-buffer/incomplete, json-parse-buffer/trailing): Skip if
JSON functions aren't available.
Eli Zaretskii [Sun, 10 Dec 2017 16:36:37 +0000 (18:36 +0200)]
Support dynamic loading of libjansson on MS-Windows
* src/json.c [WINDOWSNT]: Define fn_* function pointers to jansson
functions.
(json_delete) [WINDOWSNT]: A wrapper around fn_json_delete, needed
by json_decref.
(init_json_functions) [WINDOWSNT]: New function.
(Fjson_serialize, Fjson_insert, Fjson_parse_string)
(Fjson_parse_buffer) [WINDOWSNT]: Call init_json_functions if
needed, and record JSON in Vlibrary_cache.
* src/emacs.c (main): Don't call init_json on WINDOWSNT.
* src/w32fns.c (syms_of_w32fns): DEFSYM "json".
* lisp/term/w32-win.el (dynamic-library-alist): Add JSON DLL to
the list.
* configure.ac (HAVE_JSON): Empty JSON_LIBS for MinGW.
* nt/INSTALL.W64:
* nt/INSTALL: Add information about libjansson.
Philipp Stephani [Sun, 10 Dec 2017 15:55:31 +0000 (16:55 +0100)]
* configure.ac: Fix minimum Jansson version requirement.
Wilfred Hughes [Sun, 10 Dec 2017 13:34:06 +0000 (13:34 +0000)]
Ensure that we can find definitions when buffer is narrowed
find-function-search-for-symbol will reuse the existing buffer if
we've already opened the file that contains this symbol. However, if
the user has narrowed that buffer, we can't find definitions outside
the narrowed area.
Instead, search the whole file to find definitions, and teach the help
buttons to widen if necessary.
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol):
Search the whole buffer for the target symbol.
* lisp/help-mode.el: Help buttons now widen the target buffer, if
narrowing is in effect and the target position is not in that range.
Philipp Stephani [Mon, 18 Sep 2017 08:51:39 +0000 (10:51 +0200)]
Implement native JSON support using Jansson
* configure.ac: New option --with-json.
* src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string)
(Fjson_parse_buffer): New defuns.
(json_malloc, json_free, json_has_prefix, json_has_suffix)
(json_make_string, json_build_string, json_encode)
(json_out_of_memory, json_parse_error)
(json_release_object, check_string_without_embedded_nulls, json_check)
(lisp_to_json, lisp_to_json_toplevel, lisp_to_json_toplevel_1)
(json_insert, json_insert_callback, json_to_lisp)
(json_read_buffer_callback, Fjson_parse_buffer, define_error): New
helper functions.
(init_json, syms_of_json): New file.
* src/lisp.h: Declaration for init_json and syms_of_json.
* src/emacs.c (main): Enable JSON functions.
* src/eval.c (internal_catch_all, internal_catch_all_1): New helper
functions to catch all signals.
(syms_of_eval): Add uninterned symbol to signify out of memory.
* src/Makefile.in (JSON_LIBS, JSON_CFLAGS, JSON_OBJ, EMACS_CFLAGS)
(base_obj, LIBES): Compile json.c if --with-json is enabled.
* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/object, json-parse-string/object)
(json-parse-string/string, json-serialize/string)
(json-parse-string/incomplete, json-parse-string/trailing)
(json-parse-buffer/incomplete, json-parse-buffer/trailing): New unit
tests.
* doc/lispref/text.texi (Parsing JSON): New manual section.
Michael Albinus [Sun, 10 Dec 2017 09:48:34 +0000 (10:48 +0100)]
* doc/misc/tramp.texi (Archive file names): Precise example.
Glenn Morris [Sun, 10 Dec 2017 03:17:18 +0000 (19:17 -0800)]
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test06-directory-file-name): Add skip condition.
Philipp Stephani [Sat, 9 Dec 2017 21:03:31 +0000 (22:03 +0100)]
* lisp/emacs-lisp/advice.el: Stop using old-style backquotes
Philipp Stephani [Tue, 3 Oct 2017 14:14:54 +0000 (16:14 +0200)]
Raise an error when detecting old-style backquotes.
They have been deprecated for a decade now.
* src/lread.c (Fload): Don't use record_unwind_protect to warn about
old-style backquotes any more. They now generate a hard error.
(read1): Signal an error when detecting old-style backquotes. Remove
unused label.
(syms_of_lread): Remove unused internal variable
'lread--old-style-backquotes'.
(load_error_old_style_backquotes): Rename from
'load_warn_oldstyle_backquotes'. Signal an error.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove check
from byte compiler. It isn't triggered any more.
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Adapt
unit test.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes)
(bytecomp-tests-function-put): Adapt unit tests.
* etc/NEWS: Document change.
Philipp Stephani [Sun, 15 Oct 2017 19:32:17 +0000 (21:32 +0200)]
Work around reader limitations for old-style backquotes.
See Bug#28759.
* admin/grammars/make.by: Escape ,@ to avoid old-style backquote
detection
Eli Zaretskii [Sat, 9 Dec 2017 15:36:33 +0000 (17:36 +0200)]
; Improve NEWS entry of the last change.
Michael Albinus [Sat, 9 Dec 2017 13:34:30 +0000 (14:34 +0100)]
Support for archive file names
* doc/misc/tramp.texi (Top, Usage): Add entry "Archive file names".
(History): Mention archive file names.
(GVFS based methods): Mentio "http" and "https" methods.
(Archive file names): New node.
(Frequently Asked Questions): Add Emacs 27 as supported version.
* etc/NEWS: Mention tramp-archive.el.
* lisp/net/tramp.el (tramp-run-real-handler)
(tramp-register-file-name-handlers)
(tramp-register-file-name-handlers, tramp-unload-file-name-handlers):
Add `tramp-archive-file-name-handler'.
(tramp-handle-file-name-completion): Do not insist in Tramp
file names.
* lisp/net/tramp-archive.el: New package.
* lisp/net/tramp-cache.el (tramp-dump-connection-properties): Check for
"archive" method.
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Cleanup also
local copies of archives.
* lisp/net/tramp-compat.el (tramp-compat-use-url-tramp-p): New defconst.
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods): Add "http" and "https".
(tramp-gvfs-gio-mapping): Add "gvfs-mount".
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Handle "uri" and "http".
(tramp-gvfs-unmount): New defun.
* test/lisp/net/tramp-archive-tests.el: New package.
Michael Albinus [Sat, 9 Dec 2017 13:30:04 +0000 (14:30 +0100)]
* test/Makefile.in (url-tramp-test.log): Do not handle special.
Michael Albinus [Sat, 9 Dec 2017 12:22:52 +0000 (13:22 +0100)]
Sync with Tramp 2.4.0-pre
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.4.0-pre".
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-file-directory-p'.
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb-handle-process-file):
Adapt `tramp-make-tramp-file-name' call.
(tramp-adb-handle-file-directory-p): Remove.
(tramp-adb-maybe-open-connection): Do not set
tramp-current-*.
* lisp/net/tramp-cache.el (tramp-get-hash-table):
Adapt `tramp-make-tramp-file-name' call.
* lisp/net/tramp-cmds.el (tramp-cleanup-connection): Do not set
tramp-current-*.
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Use `tramp-handle-file-directory-p'.
(tramp-gvfs-dbus-event-error): Trace with verbosity 6.
(tramp-gvfs-do-copy-or-rename-file): Use `file-truename'.
(tramp-gvfs-handle-file-directory-p): Remove.
(tramp-gvfs-handler-askpassword): Do not set tramp-current-*.
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-start-file-process)
(tramp-maybe-open-connection, tramp-get-remote-path): Do not
set tramp-current-*.
(tramp-maybe-open-connection): Set "password-vector" property.
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-handle-file-accessible-directory-p' and
`tramp-handle-file-directory-p'.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection): Do not set tramp-current-*.
(tramp-smb-handle-file-directory-p): Remove.
(tramp-smb-handle-make-symbolic-link):
Use `tramp-get-connection-buffer' rather than `buffer-name'.
* lisp/net/tramp.el (tramp-current-method, tramp-current-user)
(tramp-current-domain, tramp-current-host)
(tramp-current-port): Remove.
(tramp-dissect-file-name): No special handling of localname anymore.
(tramp-make-tramp-file-name): Reimplemnt with new signature.
(tramp-completion-make-tramp-file-name): Fix docstring.
(tramp-get-buffer, tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-check-cached-permissions, tramp-local-host-p)
(tramp-get-remote-tmpdir, tramp-clear-passwd):
Adapt `tramp-make-tramp-file-name' call.
(tramp-completion-handle-file-name-all-completions)
(tramp-action-login, tramp-read-passwd): Do not set
tramp-current-*.
(tramp-handle-file-directory-p): New defun.
(tramp-handle-verify-visited-file-modtime): Remove superfluous
`with-parsed-tramp-file-name'.
(tramp-process-actions, tramp-read-passwd):
Use "password-vector" property.
(tramp-call-process, tramp-call-process-region): No special
setting of vec.
(tramp-read-passwd): Handle "login-as" property.
* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Special code for "smb".
Michael Albinus [Fri, 8 Dec 2017 15:37:53 +0000 (16:37 +0100)]
Minor Tramp fixes
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Fix a bug when renaming.
* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp-test42-delay-load, tramp-test42-remote-load-path):
Skip unless Emacs >= 26.
Glenn Morris [Fri, 8 Dec 2017 01:30:39 +0000 (20:30 -0500)]
* lisp/help-mode.el (help-function-def):
Allow help-make-xrefs to call with one argument. (Bug#29611)
Martin Rudalics [Thu, 7 Dec 2017 08:55:21 +0000 (09:55 +0100)]
Fix doc-string of 'display-buffer-in-side-window'
* lisp/window.el (display-buffer-in-side-window): In doc-string
clarify why the window returned gets dedicated to its buffer.
Michael Albinus [Wed, 6 Dec 2017 19:49:30 +0000 (20:49 +0100)]
Fix Bug#29579
* lisp/files.el (file-name-non-special):
Inhibit `file-name-handler-alist' only for some operations.
Add missing operations. (Bug#29579)
* lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
Do not quote if it is quoted already.
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Use `copy-tree' but `copy-sequence'.
* lisp/net/tramp.el (tramp-handle-file-truename): Handle several
trailing slashes correctly.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files):
Handle also quoted file names.
(tramp-test21-file-links): Fix file name quoting test.
(tramp-test24-file-acl): Be more robust for "smb" method.
(tramp-test35-make-auto-save-file-name): Enable hidden test cases.
Michael Albinus [Sat, 9 Dec 2017 10:23:03 +0000 (11:23 +0100)]
Merge from origin/emacs-26
7eea3144d4 Minor Tramp fixes
c0a670a8b5 * lisp/help-mode.el (help-function-def): Allow help-make-x...
05720162c1 Fix doc-string of 'display-buffer-in-side-window'
a1bbc49015 Fix Bug#29579
cb3d979b74 ; NEWS: Update Org version number
Michael Albinus [Sat, 9 Dec 2017 09:13:03 +0000 (10:13 +0100)]
; Merge from origin/emacs-26
The following commit was skipped:
445eefd238 Backport: Update Org to v9.1.4
Michael Albinus [Sat, 9 Dec 2017 09:13:02 +0000 (10:13 +0100)]
Merge from origin/emacs-26
5381c70b7a In windows.texi mention special splitting behavior of side...
46d62b9f36 * lisp/gnus/gnus-group.el (gnus-group-mode-map): Bind [fol...
1ef1dbdbc5 Avoid compilation warning in xterm.c
5cf3c26f2d * README: Document all the top-level directories. (Bug#29...
e9ea2065a8 Don't enable erc modules on simply loading erc.el
Michael Albinus [Sat, 9 Dec 2017 09:13:02 +0000 (10:13 +0100)]
; Merge from origin/emacs-26
The following commit was skipped:
4b06af0643 Allow shr to use data: URLs without encoding
Michael Albinus [Sat, 9 Dec 2017 09:13:02 +0000 (10:13 +0100)]
Merge from origin/emacs-26
1fdac2d65c Don't add newlines in minibuffer history
de68f337e3 modhelp.py: Support Python 3 (Bug#24954)
afb04f7f3c Use forward slashes for python w32 config example (Bug#21656)
Paul Eggert [Fri, 8 Dec 2017 21:30:06 +0000 (13:30 -0800)]
Fix core dump from (format "%#08x" n) patch
Problem reported by Glenn Morris (Bug#29609#13).
* src/editfns.c (styled_format): Null-terminate output,
as later code now expects this.
Paul Eggert [Fri, 8 Dec 2017 20:11:25 +0000 (12:11 -0800)]
Fix daylight-saving inference for Irish time
* lisp/calendar/cal-dst.el (calendar-dst-find-data): Do not assume
that daylight-saving time has a greater UT offset than standard
time. The reverse is true in Ireland, where standard time "IST"
is UTC +01 in summer and daylight-saving time "GMT" is UTC +00 in
winter. The current Irish rules are given by the POSIX setting
TZ='IST-1GMT0,M10.5.0,M3.5.0/1'.
Michael Albinus [Fri, 8 Dec 2017 15:37:53 +0000 (16:37 +0100)]
Minor Tramp fixes
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Fix a bug when renaming.
* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp-test42-delay-load, tramp-test42-remote-load-path):
Skip unless Emacs >= 26.
Paul Eggert [Fri, 8 Dec 2017 02:07:54 +0000 (18:07 -0800)]
Fix zero-padding bug with (format "%#08x" n)
Problem reported by Gustaf Waldemarson (Bug#29609).
* src/editfns.c (styled_format):
Put zero padding after a leading "0x", not before.
* test/src/editfns-tests.el (format-sharp-0-x): New test.
Glenn Morris [Fri, 8 Dec 2017 01:30:39 +0000 (20:30 -0500)]
* lisp/help-mode.el (help-function-def):
Allow help-make-xrefs to call with one argument. (Bug#29611)
Martin Rudalics [Thu, 7 Dec 2017 08:55:21 +0000 (09:55 +0100)]
Fix doc-string of 'display-buffer-in-side-window'
* lisp/window.el (display-buffer-in-side-window): In doc-string
clarify why the window returned gets dedicated to its buffer.
Michael Albinus [Wed, 6 Dec 2017 19:49:30 +0000 (20:49 +0100)]
Fix Bug#29579
* lisp/files.el (file-name-non-special):
Inhibit `file-name-handler-alist' only for some operations.
Add missing operations. (Bug#29579)
* lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
Do not quote if it is quoted already.
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Use `copy-tree' but `copy-sequence'.
* lisp/net/tramp.el (tramp-handle-file-truename): Handle several
trailing slashes correctly.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files):
Handle also quoted file names.
(tramp-test21-file-links): Fix file name quoting test.
(tramp-test24-file-acl): Be more robust for "smb" method.
(tramp-test35-make-auto-save-file-name): Enable hidden test cases.
Rasmus [Wed, 6 Dec 2017 14:02:15 +0000 (15:02 +0100)]
Backport: Update Org to v9.1.4
Please note this is a bugfix release. See etc/ORG-NEWS for details.
(cherry picked from commit
567b5efe1f338c10c574758fb968915c5c34c909)
Rasmus [Wed, 6 Dec 2017 14:24:22 +0000 (15:24 +0100)]
; NEWS: Update Org version number
Rasmus [Wed, 6 Dec 2017 14:21:02 +0000 (15:21 +0100)]
Revert "; Add entry for new Org version in NEWS file"
This reverts commit
793ba92c50d69e1796ea2122520dea872007bca7.
Rasmus [Wed, 6 Dec 2017 14:05:50 +0000 (15:05 +0100)]
; Add entry for new Org version in NEWS file
Rasmus [Wed, 6 Dec 2017 14:02:15 +0000 (15:02 +0100)]
Update Org to v9.1.4
Please note this is a bugfix release. See etc/ORG-NEWS for details.
Martin Rudalics [Wed, 6 Dec 2017 08:53:30 +0000 (09:53 +0100)]
In windows.texi mention special splitting behavior of side and atomic windows
* doc/lispref/windows.texi (Splitting Windows): Add note about
and links to side and atomic windows.
Stefan Monnier [Wed, 6 Dec 2017 01:53:28 +0000 (20:53 -0500)]
* lisp/files.el (find-alternate-file): Use selected-window even if dedicated
Katsumi Yamaoka [Tue, 5 Dec 2017 08:22:20 +0000 (08:22 +0000)]
* lisp/gnus/gnus-group.el (gnus-group-mode-map):
Bind [follow-link] to mouse-face, not 'mouse-face (bug#29538).
Stefan Monnier [Mon, 4 Dec 2017 22:03:32 +0000 (17:03 -0500)]
* lisp/calendar/diary-lib.el: Use lexical-binding
(diary-pull-attrs): Avoid let...setq.
(diary-list-entries-2, diary-mark-entries-1)
(diary-font-lock-date-forms, diary-fancy-date-pattern):
Use calendar-dlet* around uses of diary-date-forms.
(list-only, number, date, entry): Don't declare globally.
(diary-including): Declare.
(diary-saved-point, date-string): Move before first use.
(diary-list-entries): Use calendar-dlet* around
diary-nongregorian-listing-hook and 'diary-list-entries-hook.
(displayed-year, displayed-month): Move before first use.
(diary-sexp-entry): Use calendar-let* around evaluation of the sexp.
(diary-remind): Use calendar-let* around evaluation of sexp.
Stefan Monnier [Mon, 4 Dec 2017 20:50:14 +0000 (15:50 -0500)]
* lisp/calendar/cal-dst.el: Use lexical-binding
(calendar-time-zone-daylight-rules, calendar-dst-starts)
(calendar-dst-ends, dst-in-effect): Bind `year' explicitly around `eval'.
Stefan Monnier [Mon, 4 Dec 2017 20:39:32 +0000 (15:39 -0500)]
* lisp/calendar/todo-mode.el: Use calendar-dlet*
(dayname, monthname, day, month, year): Don't declare globally.
(todo-date-pattern, todo-edit-item--header)
(todo-convert-legacy-date-time, todo-read-date):
Use calendar-dlet* around uses of calendar-date-display-form.
Stefan Monnier [Mon, 4 Dec 2017 20:36:22 +0000 (15:36 -0500)]
* lisp/calendar/solar.el: Use lexical-binding
(date): Don't declare globally.
(solar-time-string): Use calendar-dlet*.
* lisp/calendar/calendar.el (calendar-dlet*): New macro.
Eli Zaretskii [Mon, 4 Dec 2017 19:59:28 +0000 (21:59 +0200)]
Avoid compilation warning in xterm.c
* src/xterm.c (x_draw_underwave): Move the declaration of
'thickness' to the non-USE_CAIRO branch, to avoid compiler
warning. (Bug#29567)
Stefan Monnier [Mon, 4 Dec 2017 18:49:46 +0000 (13:49 -0500)]
* lisp/emacs-lisp/faceup.el: Don't require CL
(faceup-markup-start-char, faceup-markup-end-char): Use char immediates.
Stefan Monnier [Mon, 4 Dec 2017 18:43:23 +0000 (13:43 -0500)]
* lisp/emacs-lisp/elint.el (elint-init-form): Remove outdated CL hack
Eli Zaretskii [Mon, 4 Dec 2017 16:38:15 +0000 (18:38 +0200)]
* README: Document all the top-level directories. (Bug#29558)
Eli Zaretskii [Mon, 4 Dec 2017 15:43:35 +0000 (17:43 +0200)]
Fix an omission in lookup_basic_face
* src/xfaces.c (lookup_basic_face): Handle 'vertical-border' face
as well. (Bug#29557)
Glenn Morris [Mon, 4 Dec 2017 02:54:08 +0000 (18:54 -0800)]
Don't enable erc modules on simply loading erc.el
* lisp/erc/erc.el (erc-modules): Use default :initialize. (Bug#29417)
Paul Eggert [Mon, 4 Dec 2017 02:17:00 +0000 (18:17 -0800)]
allocate_vectorlike minor cleanup
* src/alloc.c (allocate_vectorlike): Move a bit of code out of the
critical section. Although this doesn’t really help performance,
it cleans up the code a bit and should make it easier to add
pointer bounds checking.
Paul Eggert [Mon, 4 Dec 2017 02:11:00 +0000 (18:11 -0800)]
Omit exprintf if modules but no X
* src/doprnt.c (exprintf): Do not define if HAVE_MODULES &&
!(have_X_WINDOWS || USE_X_TOOLKIT), as the modules code no longer
uses exprintf.
Paul Eggert [Mon, 4 Dec 2017 01:58:08 +0000 (17:58 -0800)]
Pacify GCC on Ubuntu 17.10 x86-64
* src/xfns.c (x_real_pos_and_offsets): Pull out parent frame
into a local, so that GCC doesn't warn about dereferencing
a possibly-null pointer.
Lars Ingebrigtsen [Sun, 3 Dec 2017 22:46:52 +0000 (23:46 +0100)]
Allow shr to use data: URLs without encoding
* lisp/net/shr.el (shr-image-from-data): Don't bug out on
image data: URLs that have no base64 encoding like
(shr-image-from-data
"text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E").
Lars Ingebrigtsen [Sun, 3 Dec 2017 22:46:52 +0000 (23:46 +0100)]
Allow shr to use data: URLs without encoding
* lisp/net/shr.el (shr-image-from-data): Don't bug out on
image data: URLs that have no base64 encoding like
(shr-image-from-data
"text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E").
Alan Third [Sun, 3 Dec 2017 17:39:03 +0000 (17:39 +0000)]
Add image resizing and rotation to NS port
* lisp/image.el (image--get-imagemagick-and-warn): Bypass imagemagick
check when using NS.
* src/nsimage.m (ns_load_image): Add rotation and resizing
functionality. Move the getMetaData call to before the resize/rotation
so it returns correct metadata.
(EmacsImage::setSizeFromSpec, EmacsImage::rotate): New functions.
* src/nsterm.h (EmacsImage): Add new function prototypes.
(NSCompositingOperationCopy): Add define to older equivalent for
GNUstep and pre-10.12 macOS.
* configure.ac: Don't use libjpeg on Cocoa.
Noam Postavsky [Thu, 23 Nov 2017 02:59:35 +0000 (21:59 -0500)]
Disable history expansion in eshell (Bug#29157)
History expansion is not so useful since interactive history commands
are already provided. It can produce surprising errors when the user
is not aware of the history designator syntax.
* lisp/eshell/em-hist.el (eshell-hist-initialize): Don't add
eshell-expand-history-references to eshell-expand-input-functions.
* etc/NEWS: Announce it.
Noam Postavsky [Fri, 1 Dec 2017 01:51:07 +0000 (20:51 -0500)]
; Tracing for eieio-test random failure (Bug#24503)
* test/Makefile.in [EMACS_HYDRA_CI]: Always show log for eieio-tests.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (top-level): Trace
cl-generic functions.
(eieio-test-dump-trace): New function.
(eieio-test-37-obsolete-name-in-constructor): Use it.
Noam Postavsky [Sun, 3 Dec 2017 00:38:36 +0000 (19:38 -0500)]
* lisp/emacs-lisp/package.el (package-read-from-string): Simplify.
Noam Postavsky [Fri, 1 Dec 2017 13:20:29 +0000 (08:20 -0500)]
Fix faceup tests when run from elc
String literals may be shared by the compiler, so the test string
needs to be copied before adding properties to it. For single
properties, just use a string literal with properties.
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el
(faceup-markup): Split into...
(faceup-markup-basics, faceup-markup-escaping, faceup-markup-plain)
(faceup-markup-plain-full-text, faceup-markup-anonymous-face)
(faceup-markup-anonymous-face-2keys, faceup-markup-anonymous-nested)
(faceup-markup-nested, faceup-markup-overlapping)
(faceup-markup-multi-face, faceup-markup-multi-property): New tests.
Noam Postavsky [Sun, 3 Dec 2017 04:17:05 +0000 (23:17 -0500)]
; test/lisp/dired-aux-tests.el (with-dired-bug28834-test): Fix debug decl.
E. Choroba [Sun, 3 Dec 2017 15:59:03 +0000 (17:59 +0200)]
Don't add newlines in minibuffer history
* lisp/simple.el (next-line-or-history-element): Bind
next-line-add-newlines to nil. (Bug#29529)
Copyright-paperwork-exempt: yes
Syohei YOSHIDA [Wed, 16 Nov 2016 14:16:15 +0000 (23:16 +0900)]
modhelp.py: Support Python 3 (Bug#24954)
* modules/modhelp.py: 'print' statement was removed in Python
3. 'print' function should be used instead of 'print' statement.
Noam Postavsky [Sun, 3 Dec 2017 05:24:21 +0000 (00:24 -0500)]
Use forward slashes for python w32 config example (Bug#21656)
* lisp/progmodes/python.el: Use forward slashes for Windows path
example, it doesn't require doubling of slashes which reduces chances
of confusion.
Paul Eggert [Sun, 3 Dec 2017 05:38:05 +0000 (21:38 -0800)]
Merge from origin/emacs-26
04e5b28ff1 Fix bug in i18n/l10n optimization
8227087194 Let autoload-compute-prefix be set file-locally (Bug#29471)
98ca7d5f26 Improve edit-kbd-macro prompting in case of remapped keys ...
c02c1f6be7 Add tests on electric-indentation and Python multiline str...
946bb6d225 Disable electric indent for python strings (Bug#29305)
35f1ed10e4 ; ChangeLog.2: Fix bug reference.
ac316634e4 Fix buffer overflow in fontname conversion (Bug#29523)
bf9b972843 Fix byte compilation of files with leading directories
ac144dc835 * lisp/files.el (make-backup-file-name-1): Fix scoping error.
1b351c8a47 Revert Tramp commit from 2017-11-20
77cf972592 Improve documentation of buffer-list commands and features
66ec92af00 Fix backing up remote files in local directories on MS-Win...
7e61e74da7 * doc/emacs/mule.texi (Output Coding): Clarify sendmail co...
1e25cd79ff Revert "Fix backing up remote files in local directories o...
f52d79500b Fix a typo in ELisp manual
bf26fc3656 * lisp/composite.el (find-composition): Fix a typo in the ...
Paul Eggert [Sun, 3 Dec 2017 05:38:05 +0000 (21:38 -0800)]
; Merge from origin/emacs-26
The following commit was skipped:
34a21c3bf6 ; Auto-commit of loaddefs files.
Paul Eggert [Sun, 3 Dec 2017 05:38:05 +0000 (21:38 -0800)]
Merge from origin/emacs-26
8c8b673288 Fix backing up remote files in local directories on MS-Win...
8eb6870be6 Fix vertical cursor motion in pixel-scroll.el
625e84f156 Fix typos in doc strings of message.el
9292276a44 Fix a typo in the Emacs manual
42509c0649 Improve the documentation of 'table-insert-sequence'
93dc7ae4a4 Port better to QNX
ad99550610 Make tramp-test42-auto-load more robust
af0ce33d08 ; * lisp/composite.el (find-composition): Fix a typo in la...
bdbcdbac43 Avoid assertions in find-composition
Paul Eggert [Sun, 3 Dec 2017 05:31:24 +0000 (21:31 -0800)]
Fix bug in i18n/l10n optimization
This fixes a off-by-one buffer overrun bug introduced in
2017-06-04T15:39:37Z!eggert@cs.ucla.edu. Problem uncovered by an
experimental version of Emacs built with -fcheck-pointer-bounds
and running on Intel MPX hardware.
* src/editfns.c (styled_format): Avoid overrunning internal buffers.
Noam Postavsky [Mon, 27 Nov 2017 12:26:10 +0000 (07:26 -0500)]
Let autoload-compute-prefix be set file-locally (Bug#29471)
* lisp/emacs-lisp/autoload.el (autoload-compute-prefixes): Mark
boolean values as safe.
Noam Postavsky [Mon, 27 Nov 2017 00:16:16 +0000 (19:16 -0500)]
Improve edit-kbd-macro prompting in case of remapped keys (Bug#29399)
* lisp/edmacro.el (edit-kbd-macro): Use substitute-command-keys to
present the current bindings in the prompt. Check the the
non-remapped binding of the entered key sequence as well.
Lele Gaifax [Wed, 15 Nov 2017 09:10:19 +0000 (10:10 +0100)]
Add tests on electric-indentation and Python multiline strings (Bug#29305)
* test/lisp/progmodes/python-tests.el
(python-indent-electric-comma-inside-multiline-string,
python-indent-electric-comma-after-multiline-string): New tests.
Noam Postavsky [Sun, 19 Nov 2017 14:00:43 +0000 (09:00 -0500)]
Disable electric indent for python strings (Bug#29305)
* lisp/progmodes/python.el (python-indent-post-self-insert-function):
Do nothing when point or beginning of line is in string.
Noam Postavsky [Mon, 27 Nov 2017 02:23:48 +0000 (21:23 -0500)]
; ChangeLog.2: Fix bug reference.
Yuuki Harano [Fri, 1 Dec 2017 19:31:16 +0000 (19:31 +0000)]
Fix buffer overflow in fontname conversion (Bug#29523)
* src/nsterm.m (ns_xlfd_to_fontname): Fix sscanf format.
Copyright-paperwork-exempt: yes
Eli Zaretskii [Sat, 2 Dec 2017 11:29:39 +0000 (13:29 +0200)]
Fix byte compilation of files with leading directories
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Pass basename
of target-file to make-temp-file, in case target-file includes a
leading directory that might not exist under TMPDIR. See
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00680.html
for the details.
Michael Albinus [Sat, 2 Dec 2017 11:27:27 +0000 (12:27 +0100)]
* lisp/files.el (make-backup-file-name-1): Fix scoping error.
Michael Albinus [Sat, 2 Dec 2017 11:09:57 +0000 (12:09 +0100)]
Revert Tramp commit from 2017-11-20
* lisp/net/tramp.el (tramp-drop-volume-letter)
(tramp-handle-find-backup-file-name): Revert change from
2017-11-20. Emacs' `make-backup-file-name-1' handles this
case now.
Eli Zaretskii [Sat, 2 Dec 2017 10:56:45 +0000 (12:56 +0200)]
Improve documentation of buffer-list commands and features
* doc/emacs/buffers.texi (List Buffers): Add a cross-reference to
"Several Buffers", to establish a relation between the two
sections.
(Buffer Menus): Expand on customizability of alternative buffer
menu offered by bs.el. Mention IBuffer.
Suggested by Alex Branham <alex.branham@gmail.com> in
emacs-manual-bugs@gnu.org.
Alan Mackenzie [Sat, 2 Dec 2017 10:00:56 +0000 (10:00 +0000)]
For help commands, ensure all keys of a mouse sequence are reported.
This solves the problem where read_key_sequence initializes and uses a global
buffer raw_keybuf, yet is called recusrsively. The initialization is now done
elsewhere, avoiding the reinitialization of that global buffer.
* src/keyboard.c (command_loop_1, read_key_sequence_vs): Initialize
raw_event_count before calling read_key_sequence.
(read_char_x_menu_prompt): Call x_popup_menu_1 in place of Fx_popup_menu.
(init_raw_keybuf_count): New function.
(read_key_sequence): Remove initialization of raw_event_count. Add a missing
GROW_RAW_KEYBUF invocation.
* src/keyboard.h: (init_raw_keybuf_count): New declaration.
* src/menu.c: (x_popup_menu_1): New function with the functionality of the
former Fx_popup_menu.
(Fx_popup_menu): Replace with function which initializes raw_event_count then
calls x_popup_menu_1.
* src/menu.h: (x_popup_menu_1): New declaration.
Eli Zaretskii [Sat, 2 Dec 2017 08:57:15 +0000 (10:57 +0200)]
Fix backing up remote files in local directories on MS-Windows
* lisp/files.el (make-backup-file-name-1): Support remote file
names correctly when they are backed up into a local directory on
MS-Windows and MS-DOS. (Bug#29440)
Vibhav Pant [Sat, 2 Dec 2017 05:38:34 +0000 (11:08 +0530)]
lisp/erc/erc.el: Use inline-letevals for when args are buffer local.
* lisp/erc/erc.el: (erc-get-server-user, erc-add-server-user,
erc-remove-server-user): Use inline-letevals for when the arguments
refer to buffer-local variables.
Glenn Morris [Sat, 2 Dec 2017 03:06:40 +0000 (22:06 -0500)]
* admin/gitmerge.el (gitmerge-resolve): Handle NEWS. (Bug#29366)
Glenn Morris [Sat, 2 Dec 2017 03:03:05 +0000 (22:03 -0500)]
Don't hard-code gitmerge.el's default merge branch
* admin/gitmerge.el (gitmerge-default-branch): Make it a variable,
defaulting to nil.
(gitmerge-emacs-version, gitmerge-default-branch): New functions.
(gitmerge): Guess the branch to merge from.
Glenn Morris [Sat, 2 Dec 2017 03:00:02 +0000 (22:00 -0500)]
* admin/gitmerge.el (gitmerge-resolve):
Fix treatment of generated files.
Glenn Morris [Sat, 2 Dec 2017 00:59:11 +0000 (19:59 -0500)]
* doc/emacs/mule.texi (Output Coding): Clarify sendmail coding.
John Wiegley [Fri, 1 Dec 2017 20:42:58 +0000 (12:42 -0800)]
Revert "Fix backing up remote files in local directories on MS-Windows"
This reverts commit
8c8b6732882248df4ca3b687e0a4b4e5e4ab3777.
Eli Zaretskii [Fri, 1 Dec 2017 19:56:31 +0000 (21:56 +0200)]
Fix a typo in ELisp manual
* doc/lispref/sequences.texi (Sequence Functions): Fix the example
of using 'seq-uniq'. (Bug#29524)
Eli Zaretskii [Fri, 1 Dec 2017 18:26:35 +0000 (20:26 +0200)]
; * doc/lispref/eval.texi (Deferred Eval): Improve wording.
Eli Zaretskii [Fri, 1 Dec 2017 16:59:13 +0000 (18:59 +0200)]
* lisp/composite.el (find-composition): Fix a typo in the doc string.
Glenn Morris [Fri, 1 Dec 2017 12:26:59 +0000 (07:26 -0500)]
; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Dec 2017 11:27:29 +0000 (06:27 -0500)]
; Auto-commit of loaddefs files.
Eli Zaretskii [Fri, 1 Dec 2017 10:40:26 +0000 (12:40 +0200)]
Fix backing up remote files in local directories on MS-Windows
* lisp/files.el (make-backup-file-name-1): Support remote file
names correctly when they are backed up into a local directory on
MS-Windows and MS-DOS. (Bug#29440)
Tak Kunihiro [Fri, 1 Dec 2017 08:54:37 +0000 (10:54 +0200)]
Fix vertical cursor motion in pixel-scroll.el
* lisp/pixel-scroll.el (pixel-scroll-up): Move cursor down
regardless of whether EOB is shown at the top.
(pixel-scroll-down) Move cursor up regardless of whether BOB
is shown at the top. (Bug#29374)
Basil L. Contovounesios [Fri, 1 Dec 2017 08:49:57 +0000 (10:49 +0200)]
Fix typos in doc strings of message.el
* lisp/gnus/message.el (message-header-to)
(message-header-subject, message-header-newsgroups)
(message-header-other): Fix typos in doc strings. (Bug#29405)
Eli Zaretskii [Fri, 1 Dec 2017 08:26:58 +0000 (10:26 +0200)]
Fix a typo in the Emacs manual
* doc/emacs/abbrevs.texi (Abbrev Concepts): Fix a typo. Reported
by clemens.radermacher@posteo.de in emacs-manual-bugs@gnu.org.
Eli Zaretskii [Fri, 1 Dec 2017 08:20:47 +0000 (10:20 +0200)]
Improve the documentation of 'table-insert-sequence'
* doc/emacs/text.texi (Table Misc): Fix the description of
'table-insert-sequence'. Reported by jack <jackh@gmx.co.uk> in
emacs-manual-bugs@gnu.org.
Michael Heerdegen [Thu, 2 Nov 2017 17:45:34 +0000 (18:45 +0100)]
Add macros `thunk-let' and `thunk-let*'
* lisp/emacs-lisp/thunk.el (thunk-let, thunk-let*): New macros.
* test/lisp/emacs-lisp/thunk-tests.el:
(thunk-let-basic-test, thunk-let*-basic-test)
(thunk-let-bound-vars-cant-be-set-test)
(thunk-let-laziness-test, thunk-let*-laziness-test)
(thunk-let-bad-binding-test): New tests for `thunk-let' and
`thunk-let*.
* doc/lispref/eval.texi (Deferred Eval): New section.
* doc/lispref/elisp.texi: Update menu.
Paul Eggert [Thu, 30 Nov 2017 23:22:46 +0000 (15:22 -0800)]
Port better to QNX
Problem reported by Elad Lahav on emacs-devel.
* configure.ac: On QNX, default CC to qcc (a GCC wrapper),
and default LDFLAGS to -N2MB so that the initial stack size
is not too small. Also, fix misspelling of ‘qnxnto’.
Phillip Lord [Wed, 29 Nov 2017 21:28:44 +0000 (21:28 +0000)]
Add date to dependency and source zips for snapshots
* admin/nt/dist-build/build-zips.sh,
admin/nt/dist-build/build-dep-zips.py: Support snapshot naming
Michael Albinus [Thu, 30 Nov 2017 19:31:33 +0000 (20:31 +0100)]
Make tramp-test42-auto-load more robust
* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Make it more robust. Don't skip.
Eli Zaretskii [Thu, 30 Nov 2017 17:58:02 +0000 (19:58 +0200)]
; * lisp/composite.el (find-composition): Fix a typo in last change.
Eli Zaretskii [Thu, 30 Nov 2017 17:55:41 +0000 (19:55 +0200)]
Avoid assertions in find-composition
* src/font.c (font_range): If called with STRING non-nil and FACE
a NULL pointer, compute face by calling face_at_string_position.
(Bug#29506)
* lisp/composite.el (find-composition): Doc fix.