aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow control of data amount read from subprocess in one chunkEli Zaretskii2019-12-211-5/+14
| | | | | | | | | | | * src/process.c (syms_of_process) <read-process-output-max>: New variable. (read_process_output): Use it instead of the hard-coded constant 4096. (Bug#38561) Use SAFE_ALLOCA to support large buffers for reading process output. * etc/NEWS: Mention 'read-process-output-max'.
* Support setting OS names of threads on MS-WindowsEli Zaretskii2019-12-204-5/+91
| | | | | | | | | | | | | | | | | | | * src/w32fns.c (setup_w32_kbdhook): Don't initialize is_debugger_present here... (globals_of_w32fns): ...initialize it here. Also initialize the new global variable set_thread_description. * src/systhread.c: [WINDOWSNT] Include mbctype.h (w32_set_thread_name): New function. (MS_VC_EXCEPTION): New macro. (THREADNAME_INFO, IsDebuggerPresent_Proc) (SetThreadDescription_Proc): New typedefs. (w32_beginthread_wrapper): Call w32_set_thread_name to set the name of the new thread. * src/thread.h (struct thread_state): New member thread_name. * src/thread.c (Fmake_thread): Set the thread_name field of the new thread object. (run_thread): Free the thread_name member after the thread exits.
* Fix face merging for display strings broken by a recent commitEli Zaretskii2019-12-162-5/+1
| | | | | | | | * src/xfaces.c (face_at_string_position): Revert the last change, as it cannot possibly solve bug#38563. * src/xdisp.c (face_at_pos): Fix a typo made during last change here, which broke face merging for display strings. (Bug#38633)
* Revert aa89c84e00d8dc85100e6fedab7631c415e6364d (bug#38457)Juri Linkov2019-12-161-56/+0
| | | | | | | | | | | | | * src/editfns.c (Fmessage): Don't use minibuffer-message. (Fmessage_in_echo_area): Remove function message-in-echo-area. (syms_of_editfns): Remove variable message-in-echo-area. * lisp/isearch.el (isearch--momentary-message): Remove message-in-echo-area. * lisp/minibuffer.el (minibuffer-message): Don't record message in the *Messages* buffer. (minibuffer-completion-help): Remove message-in-echo-area. * lisp/subr.el (do-after-load-evaluation): Remove discard-input (bug#38560)
* Remove nothing from union output_dataPaul Eggert2019-12-143-4/+0
| | | | | | * src/frame.h (union output_data): Remove ‘nothing’ member. It has had no effect for quite some time. All uses removed.
* Update documentation of pure-space overflowEli Zaretskii2019-12-141-2/+3
| | | | | | | * doc/lispref/internals.texi (Garbage Collection) (Pure Storage): * src/alloc.c (Fgarbage_collect): Update the documentation of pure-space overflow for when pdumper is used. (Bug#38492)
* Fix typo that broke GNU/Linux unexec buildPaul Eggert2019-12-131-1/+0
| | | | | | | * src/emacs.c (Fdump_emacs): Remove stray closing brace that breaks the build when configured with --with-dumping=unexec on GNU/Linux. (Apparently everybody is using pdumper now.) I introduced the bug in 2019-07-09T00:50:39Z!eggert@cs.ucla.edu.
* xfaces.c: Silence spurious maybe-uninitialized compiler warningJuanma Barranquero2019-12-131-0/+1
| | | | * src/xfaces.c (face_inherited_attr): Initialize 'ok' to false.
* ; * src/emacs-module.h.in: Sort includes alphabetically.Philipp Stephani2019-12-131-1/+1
|
* A better fix for extension of overlay string's facesEli Zaretskii2019-12-132-20/+9
| | | | | | | | | * src/xdisp.c (face_at_pos): Revert previous change that rejected the underlying face if it failed the filtering criteria. * src/xfaces.c (face_at_string_position): Reset the base face's attribute used for filtering faces if the attribute is t. (Bug#38563)
* ; * src/xdisp.c (face_at_pos): Fix last change.Eli Zaretskii2019-12-121-1/+2
|
* Avoid spurious warning about maybe-uninitialized variableJuanma Barranquero2019-12-121-1/+1
| | | | | * src/xdisp.c (face_at_pos): Initialize base_face_id to 0 to silence the compiler.
* Fix face extension of overlay strings on buffer text with facesEli Zaretskii2019-12-121-5/+19
| | | | | | * src/xdisp.c (face_at_pos): Reject the face returned by 'underlying_face_id' when we are filtering by face attribute, and that attribute's value fails the filter test. (Bug#38563)
* Avoid infloop in face merging due to bad face specEli Zaretskii2019-12-111-0/+2
| | | | | | * src/xfaces.c (face_inherited_attr): Don't infloop if get_lface_attributes fails in the inner loop. Reported by Yuri D'Elia <wavexx@thregr.org>.
* * src/xterm.c: Remove long-obsolete comments.Paul Eggert2019-12-111-5/+0
|
* Check for GUI frame in ns_color_index_to_rgbaRobert Pluim2019-12-111-7/+12
| | | | | * nsterm.m (ns_color_index_to_rgba): Check that we're using a GUI frame before converting color (Bug#38564).
* ; Spelling fixesPaul Eggert2019-12-103-6/+6
|
* Just use size_t for emacs_limb_tPaul Eggert2019-12-101-17/+7
| | | | | * src/emacs-module.h.in: Do not include limits.h; no longer needed. (emacs_limb_t, EMACS_LIMB_MAX): Now size_t and SIZE_MAX.
* Fix XBM files on NS (bug#26133)Alan Third2019-12-103-6/+17
| | | | | | | | | | | | | | Reinstate some of the functionality removed in commit 67a878f78f879ce534232408c34dd11f42dd802b. * src/nsimage.m (ns_image_from_XBM): Use new reverseBytes argument. ([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]): Add ability to reverse the contents of each byte for use with XBMs, while still working with fringe bitmaps. * src/nsterm.h ([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]): Modified function definition. * src/nsterm.m (ns_draw_fringe_bitmap): Use new reverseBytes argument.
* Fix mouse-position on macOS (bug#4892)Alan Third2019-12-101-14/+38
| | | | | * src/nsterm.m (ns_mouse_position): Implement a search for the frame under the mouse pointer.
* Simplify call to add-to-history in read_minibufFederico Tedin2019-12-101-19/+10
| | | | | | * src/minibuf.c (read_minibuf): Avoid restoring the previous buffer, as this is already done at the end of the function; call `add-to-history' after that point.
* Spelling fixesPaul Eggert2019-12-095-22/+22
|
* Fix fallout from fixing bug#37782Eli Zaretskii2019-12-071-3/+3
| | | | | | * src/keyboard.c (read_key_sequence): Modify the fix for bug#37782 so that it applies only to keyboard keys, not to other events, such as a new buffer. (Bug#38132)
* Fix set-marker when the position is larger than the largest bufferEli Zaretskii2019-12-061-1/+12
| | | | | | | * src/marker.c (set_marker_internal): Handle the case where POSITION is beyond PTRDIFF_MAX, which can happen if Emacs was built --with-wide-int. Bug uncovered by the recently added overlay tests.
* Another fix for :extend when :inherit is usedEli Zaretskii2019-12-051-5/+25
| | | | | * src/xfaces.c (face_inherited_attr): Support also values of :inherit which are lists. (Bug#37774)
* Make HIST arg of read-from-minibuffer work with buffer-local varsFederico Tedin2019-12-051-2/+18
| | | | | | | | | | | | | | | | | | | * lisp/simple.el (minibuffer-history-values): New function, should be used to access the minibuffer input history variable when the minibuffer might be active. If the variable is buffer-local, the previous buffer's value will be used. (goto-history-element): Use the new function to access the minibuffer history. (minibuffer-history-isearch-wrap): Use the new function to access the minibuffer history. * src/minibuf.c (read_minibuf): Switch to previous buffer temporarily before updating history list (Bug#38317). (read-from-minibuffer): Extend documentation to mention that the result of using the command will be added to the history list by default. * doc/lispref/minibuf.texi (Minibuffer History): Mention the possibility of using a buffer-local variable as history. * etc/NEWS: Announce changes.
* Pacify GCC 9.2.1 with recent module changesPaul Eggert2019-12-041-2/+1
| | | | | * src/emacs-module.c (module_encode): Remove unused decl. (module_extract_big_integer): Pacify gcc -Wenum-compare.
* Fix small bugs introduced in commit 096be9c454Philipp Stephani2019-12-052-3/+3
| | | | | | * src/module-env-27.h: * src/emacs-module.c (module_make_big_integer): Use 'emacs_limb_t' instead of 'unsigned long' consistently
* Use new function encode_string_utf_8 for the module API, tooPhilipp Stephani2019-12-041-7/+16
| | | | | | * src/emacs-module.c (module_encode): Remove. (module_copy_string_contents): Use encode_string_utf_8. (syms_of_module): Define symbol 'unicode-string-p'.
* * src/emacs-module.c: Add a few more restrictions for emacs-module.hPhilipp Stephani2019-12-041-0/+5
|
* Change module interface to no longer use GMP objects directly.Philipp Stephani2019-12-043-27/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in the new comment added to emacs-module.c, using GMP directly in the module interface has significant downsides: it couples the module interface directly to the implementation and requires module authors to link their module against the same GMP library as Emacs itself, which is often difficult and an unnecessary burden. By picking a representation for the magnitude that often matches the one used by GMP, we can avoid overhead when converting from and to GMP in most cases. Loading the test module in test/data/emacs-module and evaluating (dotimes (_ 10000) (mod-test-double (* 2 most-negative-fixnum))) under Callgrind shows that on my (GNU/Linux) machine Emacs only spends 10% of the CPU time of mod-test-double in mpz_import and mpz_export combined, even though that function does little else. (By contrast, 30% is spent in allocate_pseudovector.) * src/emacs-module.h.in: Don't check EMACS_MODULE_GMP. Don't include gmp.h. Remove emacs_mpz structure. Instead, define type alias emacs_limb_t and macro EMACS_LIMB_MAX. * src/module-env-27.h: Change interface of extract_big_integer and make_big_integer to take a sign-magnitude representation instead of mpz_t. * src/emacs-module.c: Don't check EMACS_MODULE_GMP or EMACS_MODULE_HAVE_MPZ_T. Add a comment about the chosen implementation. (module_extract_big_integer, module_make_big_integer): Reimplement without using mpz_t in the interface. * doc/lispref/internals.texi (Module Values): Adapt function documentation and example. Stop mentioning GMP and EMACS_MODULE_GMP. * test/data/emacs-module/mod-test.c: Don't define EMACS_MODULE_GMP or EMACS_MODULE_HAVE_MPZ_T. (memory_full, extract_big_integer, make_big_integer): New helper functions, identical to example in the Info documentation. (Fmod_test_nanoseconds, Fmod_test_double): Adapt to new interface.
* Fix incorrect GTK menus on HiDPI monitors with scaling factor > 1Tobias Bading2019-12-032-3/+7
| | | | | | | | | | | | | | | | | | | | | This should fix Bug#31223, Bug#28106, Bug#23672 as well as Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/emacs25/+bug/1695228 Also fixes the formerly unscaled Y value returned by frame-monitor-workarea (and display-monitor-attributes-list). For details on why some GTK menus were empty please see thread https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg01061.html * src/gtkutil.c (menubar_map_cb, xg_update_frame_menubar): Scale up req.height so that the menu bar's height is in device pixels as expected. (xg_event_is_for_menubar): Scale down rec.x and rec.y so that gtk_widget_intersect() works as intended. * src/xfns.c (Fx_display_monitor_attributes_list): Scale work.x and work.y up to be in device pixels. Copyright-paperwork-exempt: yes
* Fix typo in populating otf_capability method for HarfBuzzYAMAMOTO Mitsuharu2019-12-034-4/+4
| | | | | | | * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper) [HAVE_HARFBUZZ]: * src/ftfont.c (syms_of_ftfont_for_pdumper) [HAVE_HARFBUZZ]: * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper) [HAVE_HARFBUZZ]: * src/xftfont.c (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: Fix typos.
* * src/lread.c (syms_of_lread): Doc fix.Juanma Barranquero2019-11-301-2/+2
|
* Fix image scaling with masks (bug#38109)Alan Third2019-11-292-52/+106
| | | | | | | | | | | | | * src/image.c (lookup_image): Move call to image_set_transform after postprocess_image. (image_create_x_image_and_pixmap_1): Use new function. (image_set_transform): Apply the transform to the mask too. (x_create_xrender_picture): New function. (Create_Pixmap_From_Bitmap_Data): (xpm_load): Use new function. * src/xterm.c (x_composite_image): Use PictOpOver when there is a mask so the transparency is honoured. (x_draw_image_foreground_1): Use x_composite_image.
* Stop signaling an error when reading "smart quotes" in symbolsNoam Postavsky2019-11-284-37/+1
| | | | | | | | | | | Revert commits from 2018-01-28 "Fix round tripping of read->print for symbols with strange quotes", and 2017-07-22 "Signal error for symbol names with strange quotes (Bug#2967)". * etc/NEWS: Remove corresponding entries. * src/character.c (confusable_symbol_character_p): * test/src/lread-tests.el (lread-tests--old-style-backquotes): Remove. * src/lread.c (read1): Don't signal error on confusable character. * src/print.c (print_object): Don't escape confusable characters.
* Allow disabling the BPA part of bidi reorderingEli Zaretskii2019-11-282-1/+9
| | | | | | | | | * src/xdisp.c (syms_of_xdisp): New variable 'bidi-inhibit-bpa'. * src/bidi.c (bidi_paired_bracket_type): If 'bidi-inhibit-bpa' is non-nil, return BIDI_BRACKET_NONE for all characters. * lisp/frame.el: Add 'bidi-inhibit-bpa' to the list of variables whose changes require redisplay. (Bug#38407)
* Support wlan in network-interface-list on pre-Vista WindowsRobert Pluim2019-11-281-2/+17
| | | | | * src/w32.c (network_interface_list): Check for 'Wireless' in adapter description to support pre-Vista Windows.
* ; Fix recent change in w32.cEli Zaretskii2019-11-271-10/+9
| | | | | * src/w32.c (network_interface_list): Correct an embarrassing typo and cleanup the code.
* Mouse rectangular region selection (bug#38013)Mattias Engdegård2019-11-271-0/+12
| | | | | | | | | | | | | | | | | Make it possible to select a rectangular region using the mouse. The standard binding is C-M-mouse-1. * lisp/mouse.el (mouse-scroll-subr): Add ADJUST argument. (mouse-drag-region-rectangle): New. * lisp/rect.el (rectangle--reset-point-crutches): New. (rectangle--reset-crutches): Use 'rectangle--reset-point-crutches'. * src/xdisp.c (remember_mouse_glyph, syms_of_xdisp): Add 'mouse-fine-grained-tracking'. * doc/lispref/commands.texi (Motion Events): Document 'mouse-fine-grained-tracking'. * doc/emacs/frames.texi (Mouse Commands): * doc/emacs/killing.texi (Rectangles): * etc/NEWS: Document rectangular selection with the mouse.
* Fine-grained NS modifier key settings (bug#38296)Mattias Engdegård2019-11-271-48/+102
| | | | | | | | | | | | | | | | | | | | | | | | For the ns-KEY-modifier and ns-right-KEY-modifier variables, KEY being 'control', 'command', 'alternate' and 'function', allow values on the form (:ordinary SYMBOL :function :SYMBOL :mouse SYMBOL), so that the key can be used for different modifiers (or none) in different contexts. This is particularly useful for using the macOS Option key for extended character entry while still using it as an Emacs modifier for function keys and mouse clicks. * src/nsterm.m (mod_of_kind, right_mod, nil_or_none): Helper functions. (EV_MODIFIERS2): Add KIND argument. (EV_MODIFIERS): Adapt call to EV_MODIFIERS2. (ns_get_shifted_character): Use correct event kind for modifiers. (ns-alternate-modifier, ns-right-alternate-modifier) (ns-command-modifier, ns-right-command-modifier) (ns-control-modifier, ns-right-control-modifier) (ns-function-modifier): Rewrite doc strings for new data format. (QCordinary, QCfunction, QCmouse): Define symbols. * lisp/cus-start.el: Conform to new data types. * doc/emacs/macos.texi (Mac / GNUstep Basics) (Mac / GNUstep Customization): Improved documentation. * etc/NEWS: Mention the change.
* message uses minibuffer-message in the active minibuffer (bug#17272 bug#19064)Juri Linkov2019-11-271-0/+56
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Displaying Messages): Explain the behavior of using minibuffer-message if the minibuffer is active. * src/editfns.c (Fmessage_in_echo_area): New function with body copied from Fmessage. (Fmessage): Call minibuffer-message in the active minibuffer, otherwise call Fmessage_in_echo_area. (message-in-echo-area): New variable. * lisp/isearch.el (isearch--momentary-message, isearch-message): * lisp/minibuffer.el (minibuffer-message, minibuffer-completion-help): Use 'message-in-echo-area' instead of 'message' where necessary. * lisp/autorevert.el (auto-revert-handler): * lisp/man.el (Man-bgproc-sentinel): * lisp/subr.el (do-after-load-evaluation): Revert recent changes that replaced 'message' with 'minibuffer-message'. This is not needed anymore since 'message' uses 'minibuffer-message' in the active minibuffer.
* Allow recursive minibuffers for yes-or-no-p and y-or-n-p (bug#17272 bug#19064)Juri Linkov2019-11-271-2/+5
| | | | | | * lisp/subr.el (y-or-n-p): Let-bind enable-recursive-minibuffers to t. * src/fns.c (Fyes_or_no_p): Specbind Qenable_recursive_minibuffers to Qt.
* Support ':extend' in faces defined by list of key/value pairsEli Zaretskii2019-11-261-9/+99
| | | | | | | | | * src/xfaces.c: Update and improve commentary at the beginning of the file. (face_attr_sym): New static array. (init_xfaces): Initialize 'face_attr_sym'. (merge_face_ref): Handle the :extend attribute in faces specified as lists of key/value pairs. (Bug#37774)
* Fix MS-Windows build with mingw.org's MinGWEli Zaretskii2019-11-261-1/+79
| | | | | | | | | | | | | | | | | | mingw.org's MinGW by default targets Windows 9X, so _WIN32_WINNT is set to a value that bypasses declarations in system headers we need to compile network_interface_list. Also, the code needed a workaround for Windows XP, where some functionality is missing from the GetAdaptersAddresses API. * src/w32.c (_WIN32_WINNT): Define to 0x0501, if the value is lower, temporarily while processing iphlpapi.h. (address_prefix_match): New helper function. (network_interface_list): Work around the fact that the OnLinkPrefixLength member of IP_ADAPTER_UNICAST_ADDRESS is not available when _WIN32_WINNT < 0x0600. On Windows XP use special code that calls address_prefix_match to compute the network prefix length.
* Extend network-interface-list to return IPv6 and network infoRobert Pluim2019-11-263-61/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#38218 * src/process.c (Fnetwork_interface_list): Extend argument list to allow requesting full network info and/or IPv4/IPv6 info. (network_interface_list) [HAVE_GETIFADDRS]: Use getifaddrs to retrieve interface IP addresses. * src/process.h: Update prototype of network_interface_list. * src/w32.c (g_b_init_get_adapters_addresses): New init flag. (globals_of_w32): Initialize it. (GetAdaptersAddresses_Proc): New function typedef. (get_adapters_addresses): New wrapper function. (init_winsock): Load htonl and ntohl. (sys_htonl, sys_ntohl): New wrapper functions. (network_interface_list): Implement in terms of get_adapters_addresses. * nt/inc/sys/socket.h: Add sys_htonl and sys_ntohl prototypes. * etc/NEWS: Announce IPv4/IPv6 changes in network-interface-list. * doc/lispref/processes.texi (Misc Network): Document updated arglist and return values for network-interface-list.
* Fix face merging when some have :extend non-nil and some are inheritedEli Zaretskii2019-11-251-55/+55
| | | | | | | | | | | * src/xfaces.c (face_inherited_attr): New function. (merge_named_face): Call 'face_inherited_attr' when testing whether a face that inherits from another fits the filtering criteria specified by ATTR_FILTER. (merge_face_vectors): Revert the changes made in this function for filtering by ATTR_FILTER, and remove that argument as well. These tests are now completely done by the caller, see 'merge_named_face'. (Bug#37774)
* Add eassert check for bad default facePaul Eggert2019-11-231-2/+2
| | | | | | * src/xdisp.c (append_space_for_newline): Add an eassert check that default_face is not null, by calling FACE_FROM_ID instead of FACE_FROM_ID_OR_NULL. Initialize a local only if needed.
* Port gnutls.c to --enable-gcc-warnings --without-gnutlsPaul Eggert2019-11-231-41/+41
| | | | | | | * src/gnutls.c: Move the "#ifdef HAVE_GNUTLS" earlier, so that "./configure --enable-gcc-warnings --without-gnutls" does not complain about macros being defined but never used. Indent "#" directives more consistently.
* Fix cursor display at EOL before extended faceEli Zaretskii2019-11-231-3/+6
| | | | | | | * src/xdisp.c (extend_face_to_end_of_line): Make sure the character position of the stretch glyph inserted to extend the face is zero, as various other parts of the display code rely on that. (Bug#38330)