aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix display of R2L textEli Zaretskii2019-11-161-6/+10
| | | | | * src/xdisp.c (extend_face_to_end_of_line): Fix padding of R2L screen lines with stretch glyph on the left. (Bug#38233)
* Do not report move frame events for tooltip frames (Bug#38213)Martin Rudalics2019-11-162-2/+4
| | | | | | * src/w32term.c (w32_read_socket): * src/xterm.c (handle_one_xevent): Do not report move frame events for tooltip frames (Bug#38213).
* Port new float-scaling code to SolarisPaul Eggert2019-11-151-4/+1
| | | | | | * src/floatfns.c (double_integer_scale): Simplify, so that the function works when (FP_ILOGBNAN == INT_MAX && FP_ILOGB0 == INT_MIN), as on Solaris.
* Port hexdigit init to non-GCC + pdumperPaul Eggert2019-11-152-23/+11
| | | | | | | | | | | | | | The old code assumed that hexdigit initialization (needed by non-GCC) could be done in syms_of_character, but that is no longer true with pdumper. Instead, simplify hexdigit init so that it can be done statically on all C99 platforms. Problem discovered on Solaris 10 sparc + Oracle Solaris Studio 12.6. * src/character.c (hexdigit): Add 1 to every value; all uses changed. This simplifies the initialization so that it can be done statically on any C99 compiler. hexdigit is now always const. (syms_of_character): Omit no-longer-necessary initialization. * src/character.h (HEXDIGIT_CONST, HEXDIGIT_IS_CONST): Remove. All uses removed.
* Improve documentation of 'add-variable-watcher'Eli Zaretskii2019-11-151-2/+3
| | | | | | | | * doc/lispref/variables.texi (Watching Variables): Clarify the documentation of 'add-variable-watcher' and fix markup. * src/data.c (Fadd_variable_watcher): Clarify the doc string. (Bug#38205)
* Fix a recent change in xdisp.cEli Zaretskii2019-11-151-3/+0
| | | | | | | * src/xdisp.c (tty_handle_tab_bar_click): Revert the last change which made this work only in the HAVE_NTGUI build. This function is needed by any build which supports a mouse on TTY frames.
* Handle weird cases like (ceil 0 0.0)Paul Eggert2019-11-141-9/+20
| | | | | | | | | | | * src/floatfns.c (double_integer_scale): Distinguish Inf from NaN. (rounding_driver): Handle (ceil 0 0.0) and (ceil 0 1.0e+INF). * test/src/floatfns-tests.el (special-round): Add tests for weird cases like this. Avoid crash with (floor 0 0.0) * src/floatfns.c (rounding_driver): Signal an arithmetic error if divisor is 0.0 or -0.0, instead of crashing.
* Fix byte-counting error in ‘format’Paul Eggert2019-11-141-3/+3
| | | | | | | Problem reported by Paul Pogonyshev (Bug#38191). * src/editfns.c (styled_format): When checking for adjacent %-sequences, use byte position rather than character position. * test/src/editfns-tests.el (format-properties): Test for fix.
* In Cairo builds, omit some unnecessary functionsPaul Eggert2019-11-143-2/+17
| | | | | | | | | | | * src/font.c (fset_font_data, font_put_frame_data) (font_get_frame_data): * src/ftfont.c (ftfont_open, ftfont_close) (ftfont_encode_char, ftfont_glyph_metrics) (ftfont_text_extents, ftfont_driver): Define only if USE_CAIRO. * src/xdisp.c (tty_handle_tab_bar_click): Define only if HAVE_NTGUI && !CYGWIN.
* Remove unneeded font_is_ignored prototypeRobert Pluim2019-11-141-4/+0
| | | | | * src/gtkutil.h: Remove unneeded prototype for font_is_ignored, it's in font.h now.
* ; Add explanation for face-ignored-fonts defaultsRobert Pluim2019-11-141-2/+3
|
* ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.Eli Zaretskii2019-11-141-0/+1
|
* Make GTK font chooser respect face-ignored-fontsRobert Pluim2019-11-143-14/+45
| | | | | | | | | | * src/font.c (font_delete_unmatched): Move Vface_ignored_fonts matching to... (font_is_ignored): ..Here. New function. * src/gtkutil.c (xg_font_filter): New function, uses font_is_ignored to filter fonts. (xg_get_font): Set GTK font chooser filter to xg_font_filter. * src/gtkutil.h: Add prototype for font_is_ignored.
* Fix double-rounding bug in ceiling etc.Paul Eggert2019-11-133-67/+52
| | | | | | | | | | | | This is doable now that we have bignums. * src/floatfns.c (integer_value): Remove; no longer used. (rescale_for_division): New function. (rounding_driver): Use it to divide properly (by using bignums) even when arguments are float, fixing a double-rounding FIXME. * src/lisp.h (LOG2_FLT_RADIX): Move here ... * src/timefns.c (frac_to_double): ... from here. * test/src/floatfns-tests.el (big-round): Add a test to catch the double-rounding bug.
* Refactor bignum multiplication, exponentiationPaul Eggert2019-11-133-74/+84
| | | | | | | This doesn’t alter behavior, and simplifies the next commit. * src/bignum.c (GMP_NLIMBS_MAX, NLIMBS_LIMIT, emacs_mpz_size) (emacs_mpz_mul, emacs_mpz_mul_2exp, emacs_mpz_pow_ui): Move here ... * src/data.c: ... from here.
* Refactor double integer scalingPaul Eggert2019-11-133-22/+29
| | | | | | | This doesn’t alter behavior, and simplifies a future commit. * src/floatfns.c (double_integer_scale): New function, with body adapted from the old timefns.c. * src/timefns.c (decode_float_time): Use it.
* Add "Noto Color Emoji" to face-ignored-fontsRobert Pluim2019-11-131-3/+7
| | | | | * src/xfaces.c (syms_of_xfaces) [HAVE_XFT]: Add "Noto Color Emoji" to face-ignored-fonts (Bug#37786).
* Make sure buffer is live before retrieving underline properties (Bug#38038)Martin Rudalics2019-11-124-29/+41
| | | | | | | | * src/window.h (WINDOW_BUFFER_LOCAL_VALUE): New macro. * src/nsterm.m (ns_draw_text_decoration): * src/w32term.c (w32_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Make sure buffer is live before retrieving underline properties from it (Bug#38038).
* Run scroll/recenter commands from minibuffer in original window (bug#38076)Juri Linkov2019-11-091-2/+2
| | | | | | | | | | | | | | * lisp/minibuffer.el (with-minibuffer-selected-window): New macro. (minibuffer-recenter-top-bottom, minibuffer-scroll-up-command) (minibuffer-scroll-down-command, minibuffer-scroll-other-window): (minibuffer-scroll-other-window-down): New commands. (minibuffer-local-map): Remap recenter/scroll symbols to their minibuffer wrappers: recenter-top-bottom to minibuffer-recenter-top-bottom. * src/window.c (Fother_window_for_scrolling): Use 'lambda' value for MINIBUF arg of Fnext_window, so minibuffer-scroll-other-window and minibuffer-scroll-other-window-down doesn't try to scroll the minibuffer window.
* Fix case-insensitive completion of buffer namesEli Zaretskii2019-11-091-5/+10
| | | | | | | | | | | * test/src/minibuf-tests.el (test-try-completion-ignore-case): New test, suggested by Stefan Monnier <monnier@iro.umontreal.ca>. * src/minibuf.c (Ftry_completion): Don't treat strings that are identical but for the case as if they were identical for the purposes of not counting the same string twice. This fixes case-insensitive completion when all the candidates are identical but for the letter-case. (Bug#11339)
* Fix unresponsive Help menu in macOSNick Helm2019-11-091-8/+16
| | | | | * src/nsterm.m (ns_check_menu_open): Don't postpone mouse drag and non-user-generated mouse down events (Bug#31371).
* Fix some quoting glitches in doc stringsPaul Eggert2019-11-083-6/+6
| | | | This also fixes a misplaced "only".
* Ensure building and running on non-IPv6 capable hosts worksRobert Pluim2019-11-081-8/+16
| | | | | | | | | | | * src/process.c (Fmake_network_process) [AF_INET6]: Only build ::1 localhost when IPv6 is supported. (Fnetwork_lookup_address_info) [AF_INET6]: Move check for Qipv6 inside ifdef, since its definition depends on AF_INET6. Don't return IPv6 addresses when they're not supported. * test/src/process-tests.el (lookup-family-specification, lookup-google): Only do IPv6 lookup if IPv6 is supported.
* Handle case where a face's :extend attribute is unspecified (Bug#37774)Jimmy Aguilar Mena2019-11-081-4/+10
| | | | | * src/xfaces.c (merge_face_vectors, merge_named_face): Handle case where the :extend attribute's value is 'unspecified' (Bug#37774).
* Describe IPv6 format in docstring for 'make-network-process'Robert Pluim2019-11-071-0/+2
| | | | | * src/process.c (Fmake_network_process): Add description of IPv6 address format.
* Simplify fixnum division slightlyPaul Eggert2019-11-061-4/+6
| | | | | | * src/data.c (arith_driver): Streamline fixnum division a bit more, and add a comment about why overflow is impossible. This responds to a private comment by Stefan Monnier.
* Remove unneeded overflow check in integer divisionPaul Eggert2019-11-051-4/+3
| | | | | | | * src/data.c (arith_driver): Remove unnecessary runtime test, since integer overflow is impossible on division of fixnums, given that the worst case is MOST_NEGATIVE_FIXNUM / -1 which is representable as an EMACS_INT (albeit not as a fixnum).
* Overflow errors are range errorsPaul Eggert2019-11-041-2/+2
| | | | | | | | | | | * etc/NEWS: Mention this. * doc/lispref/errors.texi (Standard Errors): Document overflow-error, which was formerly undocumented. It is a range error, not a domain error. * src/data.c (syms_of_data): overflow-error and (undocumented) underflow-error are subtypes range-error, not domain-error. This fixes bugs in timezone-time-from-absolute and in erc-ctcp-reply-PING.
* Don’t signal overflow for (expt 1 bignum)Paul Eggert2019-11-041-6/+21
| | | | | | | | Similarly for (expt 0 bignum) and (expt -1 bignum). The result is always a -1, 0 or 1, so do not signal overflow. * src/data.c (expt_integer): Do not signal an overflow if -1 <= X <= 1. Be clearer about when overflow is signaled. * test/src/floatfns-tests.el (bignum-expt): Test this.
* Fix last change in dired.cEli Zaretskii2019-11-041-2/+2
| | | | | * src/dired.c (file_name_completion): Fix arguments to Fcompare_strings. (Bug#38056)
* Fix English grammar in some doc strings and commentsStephen Gildea2019-11-035-12/+12
| | | | | | (files.el subr.el): Fix some grammar errors in doc strings and comments. (frame.c fringe.c image.c xfns.c xterm.c): Fix some English grammar errors in doc strings.
* Fix case-insensitive completion of non-ASCII file namesEli Zaretskii2019-11-031-35/+66
| | | | | | | | * src/dired.c (scmp): Comment on (non)applicability to comparisons of non-ASCII strings case-insensitively. (file_name_completion): Decode early the file names read from the directory, and use the decoded names for comparison when letter-case should be ignored. (Bug#11339)
* ; * src/font.c (Ffont_info): Minor fix of doc string.Eli Zaretskii2019-11-031-1/+3
|
* describe-font/font-info works with unloaded fontsLars Ingebrigtsen2019-11-031-3/+1
| | | | | | | | | * lisp/international/mule-diag.el (describe-font): This function can be used on unloaded fonts, so remove that restriction from the doc string (bug#16815). Also allow completion over all fonts on the system. * src/font.c (Ffont_info): Ditto for the doc string.
* Fix data-directory when executing from an out-of-source buildÓscar Fuentes2019-11-021-1/+1
| | | | | | Fixes #36828. * src/callproc.c (init_callproc): detect out-of-source build.
* Fix insert-file-contents file error regressionPaul Eggert2019-10-311-3/+2
| | | | | | | | Problem reported for dired-view-file (Bug#37950). * src/fileio.c (Finsert_file_contents): When visiting, signal an error if the file could not be opened for any reason, rather than signaling an error only for nonexistent files, fixing a bug introduced in 2019-09-16T03:17:43!eggert@cs.ucla.edu.
* Prevent text flicker with macOS input methods (bug#23412)Alan Third2019-10-311-3/+5
| | | | | * src/nsterm.m ([EmacsView setMarkedText:selectedRange:]): Don't always delete the working text as ns-put-working-text does that.
* Fix bug with lock file on nonstandard filesystemPaul Eggert2019-10-301-1/+7
| | | | | * src/filelock.c (create_lock_file): Don’t disable user write access to the lock file (Bug#37884).
* Fix print.c infloop on circular listsPaul Eggert2019-10-301-35/+27
| | | | | | | | | | | | | | Fix infinite loops in print.c when a circular list is passed to command-error-default-function or to error-message-string. * src/print.c (print_error_message): Use FOR_EACH_TAIL to avoid infloop on circular lists. (print_object): Use FOR_EACH_TAIL_SAFE, as it uses Brent’s teleporting tortoise-hare algorithm which is asymptotically better than the classic tortoise-hare algorithm that the code wsas using. * test/src/print-tests.el (print-circle-2): When print-circle is nil, do not insist on a particular cycle-detection heuristic. (error-message-string-circular): New test.
* Fix keyboard.c infloops on circular listsPaul Eggert2019-10-301-46/+39
| | | | | | | | | | | | | | Fix infinite loops in keyboard.c when a circular list is found in a hook, or in help-event-list, or in the argument of event-convert-list, or in a keymap where a Lucid event type list is expected, or in a menu or tab spec. * src/keyboard.c (safe_run_hooks_error, menu_bar_items) (parse_menu_item, parse_tab_bar_item, parse_tool_bar_item): Use FOR_EACH_TAIL to avoid infloop on circular lists. (help_char_p, Fevent_convert_list, lucid_event_type_list_p): Use FOR_EACH_TAIL_SAFE to avoid infloop on circular lists, when the action is idempotent so a circular list can be treated as a noncircular one.
* Fix fileio.c infloops on circular listsPaul Eggert2019-10-301-10/+7
| | | | | | | | | | | | | Fix infinite loops in fileio.c when a circular list is the value of after_insert_file_functions, buffer-auto-save-file-format, buffer-file-format, or write-region-annotate-functions. * src/fileio.c (Finsert_file_contents, build_annotations): Use FOR_EACH_TAIL to avoid infloop on circular lists. (build_annotations): Use an EMACS_INT, not an int, to count nesting level. * test/src/fileio-tests.el: (fileio-tests--circular-after-insert-file-functions): New test.
* Revert "Move description of value to syntax-ppss function."Lars Ingebrigtsen2019-10-301-1/+19
| | | | | | This reverts commit 305dbc7e2be05748039aacb1a3d697f6f64bed4c. Both of the functions in question are used a lot in the sources, so move it back to the more basic function.
* Move description of value to syntax-ppss function.Lars Ingebrigtsen2019-10-301-19/+1
| | | | | | | | | * lisp/emacs-lisp/syntax.el (syntax-ppss): Move the description of the return value from... * src/syntax.c (Fparse_partial_sexp): ... here because `syntax-ppss' is what's called over the place, and jumping through an indirection to get to the value description is inconvenient.
* Optimize conditional recursive merge face.Jimmy Aguilar Mena2019-10-291-2/+7
| | | | | | | * src/xfaces.c (merge_face_vectors) : Pass ATTR_FILTER to merge_face_ref to stop recursion merging in advance when possible. (merge_named_face) : add more conditions to potentially reduce calls to merge_face_vectors in more unneeded situations.
* Fix extend face in gui interfaces.Jimmy Aguilar Mena2019-10-291-16/+14
| | | | | | * src/xdisp.c (extend_face_to_end_of_line) : Change call to PRODUCE_GLYPHS with append_stretch_glyph to fill until the windows border.
* Fix inherited :extend attribute in faces.Jimmy Aguilar Mena2019-10-291-25/+46
| | | | | | | | * src/xfaces.c (merge_face_vectors) : Add extra parameter ATTR_FILTER with the same functionality than in merge_named_face. Update all occurrences. (merge_named_face): Remove condition to avoid call `merge_face_vectors`.
* Replay key if kboard is interrupted while initializing (Bug#37782)memeplex2019-10-261-1/+10
| | | | | | | | | | | The problem with the original fix for bug#5095 is that it drops the current event, which is a valid character event and not -2. Thus, the first ESC character sent by the terminal after turning on focus tracking is lost and we get '[' and 'I' events separately inserted into the buffer afterwards. * src/keyboard.c (read_key_sequence): Add key as mock_input and replay sequence using new keyboard, when the key is not -2.
* Remove redundant initialization of fringe bitmap (Bug#37756)memeplex2019-10-261-1/+0
| | | | | * src/fringe.c (Fdefine-fringe-bitmap): Remove redundant zeroing of fb.bits that only zeroed half of the array anyway.
* Fix recent changes in documentationEli Zaretskii2019-10-221-1/+1
| | | | | | | | * doc/lispref/edebug.texi (Edebug Eval, Eval List): Reword recently added text to follow conventions. * src/textprop.c (Ftext_properties_at): Don't use passive tense in doc string.
* Make text-properties-at mention describe-text-propertiesLars Ingebrigtsen2019-10-221-1/+4
| | | | | * src/textprop.c (Ftext_properties_at): Mention describe-text-properties in the doc string.