summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use mint_ptr in w32notify.cEli Zaretskii2018-06-161-4/+4
| | | | | | * src/w32notify.c (Fw32notify_add_watch, Fw32notify_rm_watch) (Fw32notify_valid_p, w32_get_watch_object): Use make_mint_ptr and xmint_pointer.
* * doc/lispref/text.texi (Parsing JSON): Minor formatting changes.Eli Zaretskii2018-06-161-22/+15
|
* Minor doc string fixes in json.cEli Zaretskii2018-06-161-2/+3
| | | | * src/json.c (Fjson_serialize, Fjson_insert): Fix 'usage'.
* Formatting and doc fixes in recent changesEli Zaretskii2018-06-162-8/+9
| | | | | | | * src/xfaces.c (evaluate_face_filter): Explain the inner braces. (merge_face_ref): Fix whitespace. (syms_of_xfaces) <face-filters-always-match>: Doc fix. * src/xdisp.c (extend_face_to_end_of_line): Fix whitespace.
* Improve documentation of several recent changesEli Zaretskii2018-06-167-14/+52
| | | | | | | | | | | | | | | | | | | | | | * src/xfaces.c (merge_face_ref): Fix a typo in the commentary. (evaluate_face_filter, filter_face_ref): Minor copyedits in the commentary. * doc/lispref/display.texi (Face Remapping): * doc/lispref/text.texi (Special Properties): Document the ':filter' face specs and their effects. Document 'face-filters-always-match'. * doc/emacs/files.texi (Visiting): Document the new possibility to visit large files literally in response to question asked by Emacs. * etc/NEWS: Mention the new possibility to visit large files literally. * lisp/files.el (files--ask-user-about-large-file): Use "literally" instead of "raw", for consistency with find-file-literally. * doc/lispref/frames.texi (Input Focus): Tell explicitly that focus-change events are sometimes supported on TTY frames.
* Prevent QUIT to top level inside 'while-no-input'Eli Zaretskii2018-06-161-3/+25
| | | | | | * lisp/subr.el (while-no-input): Handle the case when BODY never tests quit-flag, and runs to completion even though input arrives while BODY executes. (Bug#31692)
* Fix a typo in xmenu.cEli Zaretskii2018-06-161-2/+2
| | | | | | * src/xmenu.c (x_menu_show): Replace a call to record_unwind_protect_pointer with record_unwind_protect_ptr. (Bug#31856)
* Fix --with-cairo buildAri Roponen2018-06-161-2/+2
| | | | | | * src/xterm.c (x_cr_destroy): Remove extra semicolon. (x_cr_export_frames): Fix a typo in calling record_unwind_protect_ptr. (Bug#31856)
* * src/Makefile.in: Update paxctl comment.Paul Eggert2018-06-151-1/+1
|
* Minor CANNOT_DUMP cleanupsPaul Eggert2018-06-152-55/+63
| | | | | | | | | | Mostly, this avoids munging executables when CANNOT_DUMP = yes, as the munging is needed only for unexec. * configure.ac (PAXCTL_dumped, PAXCTL_notdumped) [CANNOT_DUMP]: Leave these empty. (LD_SWITCH_SYSTEM_TEMACS) [CANNOT_DUMP]: Do not append -no-pie or -nopie. * src/alloc.c (my_heap_start) [CANNOT_DUMP]: Omit; not used.
* Remove old combreloc hackPaul Eggert2018-06-152-47/+0
| | | | | | | | | It has not been needed for many years and gets in the way of portable dumping, address sanitization, etc. See: https://lists.gnu.org/r/emacs-devel/2016-12/msg00147.html * configure.ac (LDFLAGS_NOCOMBRELOC, emacs_cv_znocombreloc): Remove. All uses removed. * etc/PROBLEMS: Remove discussion of combreloc problems.
* Fix typo in previous macfont.m changePaul Eggert2018-06-151-1/+2
| | | | | * src/macfont.m (macfont_descriptor_entity): Fix typo. Problem reported by Clemens Schüller.
* Restore macfont.m casts to void *Paul Eggert2018-06-151-2/+2
| | | | | | | * src/macfont.m (macfont_set_family_cache): Restore casts to void * that were mistakenly removed in my recent change. The types in question are pointer-to-const. Problem reported by Clemens Schüller.
* Fix a bug in Flymake handling of region-specific reportsJoão Távora2018-06-151-25/+28
| | | | | | | | | | | The backend's diagnostic list must be updated too, not just cleared. * lisp/progmodes/flymake.el (flymake--diag): Add overlay field. (flymake--highlight-line): Return created overlay. (flymake--handle-report): Iterate the backend's diagnostics, not the overlays. Set diagnostic overlay. (flymake--run-backend): Don't clean diagnostic list here. (flymake-mode): Call delete-overlay directly.
* Fix building --without-x and similarEli Zaretskii2018-06-151-6/+0
| | | | | | * src/keyboard.c (make_lispy_focus_out): Compile it unconditionally, as it is now supported on TTYs as well. Reported by Filipp Gunbin <fgunbin@fastmail.fm>.
* Flymake and backends exchange hints abouts changed regionsJoão Távora2018-06-153-47/+120
| | | | | | | | | | | | | | | | | | | | * lisp/progmodes/flymake.el (flymake--delete-own-overlays): Accept BEG and END. Rename from flymake-delete-own-overlays. (flymake-diagnostic-functions): Describe :region, :recent-changes in docstring. (flymake--handle-report): Accept REGION. (flymake--run-backend): Accept optional ARGS to pass to backend fn. (flymake--recent-changes): New buffer-local variable. (flymake-start): Call flymake--run-backend with recent changes. (flymake-mode): Initialize flymake--recent-changes. Call flymake--delete-own-overlays. (flymake-after-change-function): Collect recent changes. * doc/misc/flymake.texi (Backend functions): Describe :recent-changes and :region. * etc/NEWS (Flymake): Mention improvements in backend communication.
* customize-apropos: Separate package name from its descriptionTino Calancha2018-06-151-1/+1
| | | | | * lisp/cus-edit.el (custom-group-value-create): Always insert documentation indented from its package name (Bug#31466).
* Remove Lisp_Misc_Save_ValuePaul Eggert2018-06-143-407/+5
| | | | | | | | | | | | | | | | | | | | | | This type and its associated routines are no longer used. * src/alloc.c (voidfuncptr): Move here from src/lisp.h. (free_misc, make_save_int_int_int) (make_save_obj_obj_obj_obj, make_save_ptr) (make_save_ptr_int, make_save_ptr_ptr) (make_save_funcptr_ptr_obj, make_save_memory) (free_save_value, mark_save_value): Remove. (mark_object): Remove mention of Lisp_Misc_Save_Value. * src/lisp.h (Lisp_Misc_Save_Value, SAVE_SLOT_BITS) (SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, enum Lisp_Save_Type) (struct Lisp_Save_Value, SAVE_VALUEP, XSAVE_VALUE) (save_type, XSAVE_POINTER, set_save_pointer) (XSAVE_FUNCPOINTER, XSAVE_INTEGER, set_save_integer) (XSAVE_OBJECT): Remove. (union Lisp_Misc): Remove u_save_value. (voidfuncptr): Move from here to src/alloc.c. * src/print.c (print_object): Remove support for printing Lisp_Misc_Save_Value.
* New type Lisp_Misc_PtrPaul Eggert2018-06-145-11/+41
| | | | | | | | | | | | | | | This is a streamlined version of Lisp_Save_Value, which contains just a pointer, as that is all Lisp_Save_Values are used for any more. With the previous changes, these objects are not primarily used as save values, so just call them "Misc" rather than "Save". * src/alloc.c (make_misc_ptr): New function. (mark_object): Mark Lisp_Misc_Ptr too. * src/lisp.h (Lisp_Misc_Ptr): New constant. (struct Lisp_Misc_Ptr): New type. (make_mint_ptr, mint_ptrp, xmint_pointer): Use Lisp_Misc_Ptr, not Lisp_Save_Value. (union Lisp_Misc): Add Lisp_Misc_Ptr. * src/print.c (print_object): Print Lisp_Misc_Ptr.
* Avoid allocating Lisp_Save_Value for arraysPaul Eggert2018-06-143-3/+37
| | | | | | | | | | | | | | * src/alloc.c (mark_maybe_objects): New function. * src/eval.c (default_toplevel_binding) (backtrace_eval_unrewind, Fbacktrace__locals): Treat array unwindings like other miscellaneous pdl types. (record_unwind_protect_array): New function. (do_one_unbind): Free the array while unwinding. (mark_specpdl): Mark arrays directly. * src/lisp.h (SPECPDL_UNWIND_ARRAY): New constant. (union specbinding): New member unwind_array. (SAFE_ALLOCA_LISP_EXTRA): Use record_unwind_protect_array instead of make_save_memory + record_unwind_protect.
* Avoid allocating Lisp_Save_Value for excursionsPaul Eggert2018-06-143-29/+45
| | | | | | | | | | | | | | | | | | * src/editfns.c (save_excursion_save): New arg PDL, specifying where to save the state. All uses changed. (save_excursion_restore): Args are now the marker and info rather than a pointer to a Lisp_Save_Value containing them. All uses changed. * src/eval.c (default_toplevel_binding, Fbacktrace__locals): Treat excursions like other miscellaneous pdl types. (record_unwind_protect_excursion): Save data directly into the pdl rather than creating an object on the heap. This avoids the need to allocate and free an object. (do_one_unbind, backtrace_eval_unrewind): Unwind excursions directly. (mark_specpdl): Mark excursions directly. * src/lisp.h (SPECPDL_UNWIND_EXCURSION): New constant. (union specbinding): New member unwind_excursion.
* Just use cons in macfont_descriptor_entityPaul Eggert2018-06-141-7/+6
| | | | | | * src/macfont.m (macfont_descriptor_entity): Use cons instead of make_save_ptr_int, as this avoids the need for a special type and function for this one-off.
* Avoid allocating a Lisp_Save_Value in ftfont.cPaul Eggert2018-06-141-14/+12
| | | | | | | | | * src/ftfont.c (struct ftfont_cache_data): New member face_refcount. (ftfont_lookup_cache): Clear it when initializing. Use make_mint_ptr, since this typically avoids the need to allocate a Lisp_Save_Value as refcount is now stored elsewhere. (ftfont_open2, ftfont_close): Manipulate the reference count in the struct, not in the save object.
* Use record_unwind_protect_ptr to avoid allocationPaul Eggert2018-06-143-15/+27
| | | | | | | | | | | * src/term.c (struct tty_pop_down_menu): New type. (tty_pop_down_menu, tty_menu_show): Use it, along with record_unwind_protect_ptr, to avoid allocating a Lisp_Misc. * src/xmenu.c (struct pop_down_menu): New type. (pop_down_menu, x_menu_show): Use it, likewise. * src/xterm.c (x_cr_destroy, x_cr_export_frames): Use record_unwind_protect_pointer to avoid possibly allocating a Lisp_Misc.
* Avoid Lisp_Misc allocation if C stack sufficesPaul Eggert2018-06-142-18/+37
| | | | | | | | | * src/fileio.c (union read_non_regular): New type. (read_non_regular, Finsert_file_contents): Use it to avoid allocating a Lisp_Misc. * src/keymap.c (union map_keymap): New type. (map_keymap_char_table_item, map_keymap_internal): Use it to avoid allocating a Lisp_Misc.
* Simplify init_module_assertionsPaul Eggert2018-06-141-7/+3
| | | | | | | * src/emacs-module.c (init_module_assertions): Just use NULL instead of allocating a dummy on the stack and then using eassert. Practical platforms check for null pointer dereferencing nowadays, so this is good enough.
* New mint_ptr representation for C pointersPaul Eggert2018-06-1410-39/+78
| | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (make_mint_ptr, mint_ptrp, xmint_pointer): New functions. * src/dbusbind.c (xd_lisp_dbus_to_dbus, Fdbus__init_bus): * src/emacs-module.c (module_free_global_ref, Fmodule_load) (module_assert_runtime, module_assert_env, value_to_lisp) (lisp_to_value, initialize_environment) (finalize_environment, finalize_runtime_unwind) (mark_modules): * src/font.c (otf_open, font_put_frame_data) (font_get_frame_data): * src/macfont.m (macfont_invalidate_family_cache) (macfont_get_family_cache_if_present) (macfont_set_family_cache): * src/nsterm.h (XNS_SCROLL_BAR): * src/nsterm.m (ns_set_vertical_scroll_bar) (ns_set_horizontal_scroll_bar): * src/w32fns.c (w32_monitor_enum) (w32_display_monitor_attributes_list): * src/xterm.c (x_cr_destroy, x_cr_export_frames): * src/xwidget.c (webkit_javascript_finished_cb) (save_script_callback, Fxwidget_webkit_execute_script) (kill_buffer_xwidgets): Use mint pointers instead of merely save pointers.
* Also allow custom false and null when serializing to JSONJoão Távora2018-06-153-98/+152
| | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Describe new arguments of json-serialize and json-insert. * src/json.c (enum json_object_type, struct json_configuration): Move up in file before first usage. (lisp_to_json_toplevel, lisp_to_json_toplevel_1, lisp_to_json): Accept a struct json_configuration*. (Fjson_serialize, Fjson_insert): Accept multiple args. (json_parse_args): Accept new boolean configure_object_type. * test/src/json-tests.el (json-serialize, json-insert): Update forward decls. (json-parse-with-custom-null-and-false-objects): Add assertions for json-serialize.
* Support custom null and false objects when parsing JSONJoão Távora2018-06-153-69/+141
| | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Describe new :null-object and :false-object kwargs to json-parse-string and json-parse-buffer. * src/json.c (struct json_configuration): New type. (json_to_lisp): Accept a struct json_configuration* param. (json_parse_args): Rename from json_parse_object_type. (Fjson_parse_string): Rework docstring. (Fjson_parse_string, Fjson_parse_buffer): Update call to json_to_lisp. (syms_of_json): Two new syms, QCnull_object and QCfalse_object. * test/src/json-tests.el (json-parse-with-custom-null-and-false-objects): New test.
* Fix pretty-printing empty objects as nullDamien Cassou2018-06-142-3/+71
| | | | | | | | | | | | * lisp/json.el (json-pretty-print): Force distinction between empty objects and null. (json-encode-list): Remove responsibility to print "null" as this value is not a list. (json-encode): Give higher precedence to lists so that an empty list is printed as an empty object, not as "null". * test/lisp/json-tests.el (test-json-encode): Add many tests to check the behavior of pretty-printing.
* Remove some wrong 8-byte alignment assumptionsPaul Eggert2018-06-133-66/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not assume that 8-byte alignment suffices for all C objects, as some platforms require 16-byte alignment for some objects, and this will start to bite us as time goes on (e.g., if an Emacs module ever uses an object containing a long double, which requires 16-byte alignment on x86-64). Conversely, on !USE_LSB_TAG platforms, do not insist on aligning Lisp objects to a multiple of 8, as this is not needed for high-order tag bits. * src/alloc.c (LISP_ALIGNMENT, MALLOC_IS_LISP_ALIGNED): New constants. (XMALLOC_BASE_ALIGNMENT, XMALLOC_HEADER_ALIGNMENT): Removed. All uses replaced by LISP_ALIGNMENT. (aligned_alloc, laligned, lmalloc, lrealloc, union aligned_Lisp_Misc) (maybe_lisp_pointer, pure_alloc): Use LISP_ALIGNMENT rather than GCALIGNMENT. (aligned_alloc): Do not worry about an alignment of LISP_ALIGNMENT when MALLOC_IS_LISP_ALIGNED, as the code never uses aligned_alloc with alignment == LISP_ALIGNMENT in that case. (__alignof__): Remove. All uses removed. (MALLOC_IS_GC_ALIGNED): Remove. All uses replaced with MALLOC_IS_LISP_ALIGNED. (vector_alignment): Remove. All uses replaced with LISP_ALIGNMENT. * src/alloc.c (mark_maybe_pointer): * src/emacs-module.c (value_to_lisp_bits): Do not assume GCALIGNMENT == 1 << GCTYPEBITS, as GCALIGNMENT is 1 on !USE_LSB_TAG platforms now. * src/lisp.h (GCALIGNMENT) [!USE_LSB_TAG]: Now 1. (struct Lisp_Symbol, union vectorlike_header, struct Lisp_Cons) (struct Lisp_String): Simplify test for verifying alignment.
* Clarify that enabling a theme does not disable other themesDaniel Colascione2018-06-121-2/+11
| | | | | | | | Avoid user confusion by explicitly stating that enabling a theme does not imply disabling other themes and that theme load functions are not theme switch functions. * lisp/custom.el (load-theme, enable-theme): Clarify docstrings.
* Ignore focus events for dead framesDaniel Colascione2018-06-121-7/+9
| | | | | | | | | Frames can die between the time we generate a focus event and the time we get around to processing it. Do run after-focus-change-function, since that's idempotent and we want to make sure not to miss any changes. * lisp/frame.el (handle-focus-in, handle-focus-out): Check for dead frames.
* * lisp/textmodes/ispell.el (ispell-menu-map): Init in declarationStefan Monnier2018-06-121-82/+70
| | | | | (ispell-menu-map-needed): Remove, now that the menu doesn't include the list of dictionaries any more, so it's basically constant.
* ; Assorted documentation fixes in recent changesEli Zaretskii2018-06-124-22/+24
| | | | | | | | | | * etc/NEWS: Minor copyedits of recent entries. * src/keyboard.c (Finternal_handle_focus_in): * lisp/frame.el (frame-focus-state): Doc fixes. * doc/lispref/hooks.texi (Standard Hooks): Mention after-delete-frame-functions.
* Fix initialization of custom-delayed-init-variablesEli Zaretskii2018-06-123-4/+28
| | | | | | | | | | * lisp/startup.el (command-line): Re-evaluate delayed-init custom variables one more time after setting up the initial window-system. (Bug#30994) * doc/emacs/custom.texi (Early Init File): * etc/NEWS: Warn against using early-init.el as a substitute for .emacs.
* Give warning if losing value to defvaralias (Bug#5950)Noam Postavsky2018-06-122-0/+32
| | | | | | * src/eval.c (Fdefvaralias): Call `display-warning' if the alias target has a non-eq value to the variable being aliased. * test/src/eval-tests.el (defvaralias-overwrite-warning): New test.
* Let display-warning work during bootstrapNoam Postavsky2018-06-121-3/+7
| | | | | * lisp/emacs-lisp/warnings.el (display-warning): Only call `special-mode' and `newline' if they are `fbound'.
* * lisp/progmodes/sql.el Add MariaDB support (Robert Cochran)Michael R. Mauger2018-06-111-52/+190
| | | | | | | | | | | (sql-product-alist): Add MariaDB entry (sql-mariadb-program, sql-mariadb-options, sql-mariadb-login-params, sql-mode-mariadb-font-lock): New variables, aliases of the MySQL equivalents (sql-mariadb, sql-comint-mariadb): New interaction mode functions for MariaDB (sql-mode-mysql-font-lock-keywords): Updated font-lock for MySQL and MariaDB
* soap-client: Add byte-code compatibility function (Bug#31742)Thomas Fitzsimmons2018-06-112-41/+51
| | | | | | | | | | | | | * lisp/net/soap-client.el: Bump version to 3.1.4. (soap-type-of): New function. (soap-resolve-references, soap-decode-type) (soap-encode-attributes, soap-encode-value): Replace aref calls with calls to soap-type-of. * lisp/net/soap-inspect.el (soap-sample-value, soap-inspect): Replace aref calls with calls to soap-type-of. Co-authored-by: Noam Postavsky <npostavs@gmail.com>
* Add after-delete-frame-functionsDaniel Colascione2018-06-114-18/+38
| | | | | | | | | | | | | | | | | | | Instead of working around the behavior delete-frame-functions, just add an after-delete-frame-functions hook. * doc/lispref/frames.texi (Deleting Frames): Document `after-delete-frame-functions'. * etc/NEWS: Mention `after-delete-frame-functions'. * lisp/frame.el (blink-cursor--should-blink): (blink-cursor--rescan-frames, blink-frame-mode): Get rid of the ugly ignored-frame parameter and switch from `delete-frame-functions' to `after-delete-frame-functions'. * src/frame.c (syms_of_frame): New variable `after-delete-frame-functions'. (delete_frame): Use it.
* Make blink-cursor-mode use new focus functionsDaniel Colascione2018-06-111-12/+38
| | | | | | | | * lisp/frame.el (blink-cursor--should-blink): New function. (blink-cursor-check): Call it. (blink-cursor--rescan-frames): New function. (blink-cursor-mode): Wire up `blink-cursor--rescan-frames`; stop using `focus-in-hook' and `focus-out-hook'.
* Losing focus should not stop idlenessDaniel Colascione2018-06-111-0/+1
| | | | * src/keyboard.c (read_char): Make Qfocus_out not break idle.
* New focus management interfaceDaniel Colascione2018-06-118-122/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | focus-in-hook and focus-out-hook don't accurately reflect actual user-visible focus states. Add a new focus interface and mark the old one obsolete. * doc/lispref/frames.texi (Input Focus): Document new focus functions. Remove references to the now-obsolete focus hooks. * lisp/frame.el (frame-focus-state): New function. (after-focus-change-function): New variable. (focus-in-hook, focus-out-hook): Move to lisp from C; mark obsolete. * lisp/term/xterm.el (xterm-translate-focus-in) (xterm-translate-focus-out): Track tty focus in `tty-focus-state' terminal parameter; call `after-focus-change-function'. (xterm--suspend-tty-function): New function. * src/frame.c (Fhandle_switch_frame): Update docstring; don't call focus hooks. (focus-in-hook, focus-out-hook): Remove: moved to lisp. (syms_of_frame): Remove unread_switch_frame; add Vunread_switch_frame. * src/keyboard.c: (Finternal_handle_focus_in): New function. (make_lispy_event): Always report focus events to lisp; don't translate them to switch events sometimes. Lisp can take care of creating synthetic switch-frame events via `internal-handle-focus-in'. * src/w32term.c (x_focus_changed): Remove switch-avoidance logic: just directly report focus changes to lisp. * src/xterm.c (x_focus_changed): Remove switch-avoidance logic: just directly report focus changes to lisp.
* Remove code #if-0-ed terminal-local codeDaniel Colascione2018-06-111-45/+0
| | | | | | | This code hasn't been used since 2005. * src/data.c (get_terminal, Fterminal_local_value, Fset_terminal_local_value): Remove.
* Remove obsolete keyboard.c codeDaniel Colascione2018-06-111-39/+0
| | | | | * src/keyboard.c (any_kboard_state, single_kboard_state): Remove #if-0-ed functions.
* Don't have shr bug out on degenerate <img> tagsLars Ingebrigtsen2018-06-111-0/+4
| | | | | * lisp/net/shr.el (shr-tag-img): Protect against contructs like <img src=" ">.
* * lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Use \' i.s.o $.Stefan Monnier2018-06-101-3/+5
|
* Merge from emacs-26Noam Postavsky2018-06-102-4/+22
|\ | | | | | | 8a1576cc03 Fix term.el cursor movement at bottom margin (Bug#31690)
| * Fix term.el cursor movement at bottom margin (Bug#31690)Noam Postavsky2018-06-102-4/+24
| | | | | | | | | | | | * lisp/term.el (term-handle-ansi-escape) <\E[B cud>: Allow moving the cursor to the bottom margin line, rather than stopping one line before.