aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Fix GC threshold typoPaul Eggert2019-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | Problem reported by Eli Zaretskii (Bug#37006#25). * src/alloc.c (garbage_collect_1): Fix typo in threshold calc. Go back to dividing by 10 since the numerator’s a constant now. Problem introduced in 2019-07-21T02:40:03Z!eggert@cs.ucla.edu.
* | | Fix initialization of user-defined fringe bitmaps in daemon modeEli Zaretskii2019-08-135-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fringe.c (gui_init_fringe): Rename from w32_init_fringe or x_cr_init_fringe, and make unconditionally compiled; all callers changed. Do nothing if the frame's redisplay_interface doesn't implement the define_fringe_bitmap method. Set up any user-defined fringe bitmaps in addition to the standard bitmaps. Suggested by Liam Quinlan <liamkquinlan@gmail.com> in https://lists.gnu.org/archive/html/emacs-devel/2019-08/msg00259.html. (w32_reset_fringes) [HAVE_NTGUI]: Do nothing if the frame's redisplay_interface doesn't implement the destroy_fringe_bitmap method. * src/w32fns.c (Fx_create_frame): Call gui_init_fringe when the first GUI frame is created for this session. * src/dispextern.h (w32_init_fringe): Rename to gui_init_fringe and make unconditional. (x_cr_init_fringe): Remove prototype.
* | | ; Add commentary to recent changesEli Zaretskii2019-08-124-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | * src/image.c (png_load_body): * src/editfns.c (styled_format): * src/casefiddle.c (do_casify_multibyte_string): * src/alloc.c (free_cons): Comment why we use a signed temporary integer variable. (Bug#37006)
* | | Prefer signed when testing for signed overflowPaul Eggert2019-08-114-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (free_cons): * src/casefiddle.c (do_casify_multibyte_string): * src/editfns.c (styled_format): * src/image.c (png_load_body): Use signed arguments to INT_MULTIPLY_WRAPV etc. This doesn’t fix any bugs, but GCC emits better code when all args are signed. Also, this removes the need for an if in free_cons (Bug#37006).
* | | Fix garbage collectionEli Zaretskii2019-08-111-1/+3
| | | | | | | | | | | | | | | * src/alloc.c (free_cons): Avoid false positives in INT_ADD_WRAPV. (Bug#37006)
* | | Double undo limitsStefan Kangas2019-08-101-3/+3
| | | | | | | | | | | | | | | * src/undo.c (syms_of_undo) <undo_limit, undo_strong_limit> <Vundo_outer_limit>: Double undo limits. (Bug#31104)
* | | Set up defined_color_hook for the initial frameAlex Gramiak2019-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | * src/terminal.c (init_initial_terminal): Set up the defined_color_hook. This avoids crashes when running in batch mode with code that manipulates colors. (Bug#36019)
* | | Fix doc strings modified in recent changesEli Zaretskii2019-08-091-17/+17
| | | | | | | | | | | | | | | | | | * src/xfns.c (Fx_change_window_property) (Fx_delete_window_property, Fx_window_property) (Fx_window_property_attributes): Doc fixes.
* | | Provide better target window consistency across x window property functions.Noah Friedman2019-08-081-41/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the argument name WINDOW-ID instead of SOURCE for same. Revise docstrings to clarify semantics of FRAME and WINDOW-ID. (Fx_change_window_property): Use `target_window' instead of `w'. This is consistent with other related functions. Finalize its value before blocking input. (Fx_window_property): (Fx_window_property_attributes): Use `window_id' instead of `source'. (Fx_delete_window_property): New optional arg window_id.
* | | (Fx_change_window_property): Rename SOURCE arg to WINDOW-IDNoah Friedman2019-08-081-5/+5
| | |
* | | (Fx_change_window_property): Add optional arg SOURCE.Noah Friedman2019-08-081-5/+17
| | | | | | | | | | | | | | | | | | | | | This provides symmetry with Fx_window_property, so that the window need not be an actual emacs frame. This is useful for modifying properties of parent windows (specified with --parent-id to emacs) or generally assisting the window manager.
* | | Re-port dump_bitset_clear to -fsanitize=undefinedPaul Eggert2019-08-061-1/+4
| | | | | | | | | | | | | | | | | | | | | * src/pdumper.c (dump_bitset_clear): Skip the memset if the size is zero, because in that case the destination might be NULL. This fixes a bug introduced in 2019-07-26T06:17:52Zeggert@cs.ucla.edu. Add a comment to make the bug less likely to reoccur.
* | | Fix minor compilation problems on MS-WindowsEli Zaretskii2019-08-062-7/+7
| | | | | | | | | | | | | | | | | | | | | * src/w32fns.c (Fdefault_printer_name): Fix size of local buffer. * src/image.c [WINDOWSNT]: Test __MINGW_MAJOR_VERSION as well to shut up compiler warnings.
* | | decode-time now returns subsec tooPaul Eggert2019-08-053-44/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The list that decode-time returns now contains an extra trailing component that counts the subseconds part of the original timestamp (Bug#36549). This builds on a suggestion by Lars Ingebrigtsen in: https://lists.gnu.org/r/emacs-devel/2019-07/msg00734.html * doc/lispref/os.texi (Time Conversion): * doc/misc/emacs-mime.texi (time-date): * etc/NEWS: Document this. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): * lisp/calendar/iso8601.el (iso8601-parse) (iso8601-parse-time, iso8601-parse-duration) (iso8601--decoded-time): * lisp/calendar/parse-time.el (parse-time-string): * lisp/calendar/time-date.el (make-decoded-time) (decoded-time-set-defaults): * lisp/org/org.el (org-fix-decoded-time) (org-parse-time-string): * src/timefns.c (Fdecode_time): Generate subsec member for decoded time. * lisp/calendar/time-date.el (decoded-time-add) Add the decoded subsec too. * lisp/simple.el (decoded-time): New subsec member. * src/data.c (Frem): Simplify zero-check to match that of new Fmod. (integer_mod): New function, with most of the guts of the old Fmod. Remove redundant zero-check. (Fmod): Use it. * src/timefns.c (Fencode_time): Handle new subsec member or (with the obsolescent calling convention) subsec arg. It defaults to 0. * test/lisp/calendar/icalendar-tests.el: (icalendar--decode-isodatetime): * test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years) (test-iso8601-date-dates, test-iso8601-date-obsolete) (test-iso8601-date-weeks, test-iso8601-date-ordinals) (test-iso8601-time, test-iso8601-combined) (test-iso8601-duration, test-iso8601-intervals) (standard-test-dates, standard-test-time-of-day-fractions) (standard-test-time-of-day-beginning-of-day) (standard-test-time-of-day-utc) (standard-test-time-of-day-zone) (standard-test-date-and-time-of-day, standard-test-interval): * test/lisp/calendar/parse-time-tests.el (parse-time-tests): * test/src/timefns-tests.el (format-time-string-with-zone) (encode-time-dst-numeric-zone): Adjust to match new behavior.
* | | New function time-convertPaul Eggert2019-08-051-105/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the awkward reuse of encode-time to both convert calendrical timestamps to Lisp timestamps, and to convert Lisp timestamps to other forms. Now, encode-time does just the former and the new function does just the latter. The new function builds on a suggestion by Lars Ingebrigtsen in: https://lists.gnu.org/r/emacs-devel/2019-07/msg00801.html and refined by Stefan Monnier in: https://lists.gnu.org/r/emacs-devel/2019-07/msg00803.html * doc/lispref/os.texi (Time of Day, Time Conversion): * doc/misc/emacs-mime.texi (time-date): * etc/NEWS: Update documentation. * lisp/calendar/cal-dst.el (calendar-next-time-zone-transition): * lisp/calendar/time-date.el (seconds-to-time, days-to-time): * lisp/calendar/timeclock.el (timeclock-seconds-to-time): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/completion.el (cmpl-hours-since-origin): * lisp/ecomplete.el (ecomplete-add-item): * lisp/emacs-lisp/cl-extra.el (cl--random-time): * lisp/emacs-lisp/timer.el (timer--time-setter) (timer-next-integral-multiple-of-time): * lisp/find-lisp.el (find-lisp-format-time): * lisp/gnus/gnus-diary.el (gnus-user-format-function-d): * lisp/gnus/gnus-group.el (gnus-group-set-timestamp): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-show-org-agenda): * lisp/gnus/nnrss.el (nnrss-normalize-date): * lisp/gnus/nnspool.el (nnspool-request-newgroups): * lisp/net/ntlm.el (ntlm-compute-timestamp): * lisp/net/pop3.el (pop3-uidl-dele): * lisp/obsolete/vc-arch.el (vc-arch-add-tagline): * lisp/org/org-clock.el (org-clock-get-clocked-time) (org-clock-resolve, org-resolve-clocks, org-clock-in) (org-clock-out, org-clock-sum): * lisp/org/org-id.el (org-id-uuid, org-id-time-to-b36): * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src): * lisp/proced.el (proced-format-time): * lisp/progmodes/cc-cmds.el (c-progress-init) (c-progress-update): * lisp/progmodes/cperl-mode.el (cperl-time-fontification): * lisp/progmodes/flymake.el (flymake--schedule-timer-maybe): * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info) (vhdl-fix-case-region-1): * lisp/tar-mode.el (tar-octal-time): * lisp/time.el (emacs-uptime): * lisp/url/url-auth.el (url-digest-auth-make-cnonce): * lisp/url/url-util.el (url-lazy-message): * lisp/vc/vc-cvs.el (vc-cvs-parse-entry): * lisp/vc/vc-hg.el (vc-hg-state-fast): * lisp/xt-mouse.el (xterm-mouse-event): * test/lisp/emacs-lisp/timer-tests.el: (timer-next-integral-multiple-of-time-2): Use time-convert, not encode-time. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): Don’t use now-removed FORM argument for encode-time. It wasn’t crucial anyway. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add time-convert. * lisp/emacs-lisp/elint.el (elint-unknown-builtin-args): Update encode-time signature to match current arg set. * lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time): Use timer-convert with t rather than doing it by hand. * src/timefns.c (time_hz_ticks, time_form_stamp, lisp_time_form_stamp): Remove; no longer needed. (decode_lisp_time): Rturn the form instead of having a *PFORM arg. All uses changed. (time_arith): Just return TICKS if HZ is 1. (Fencode_time): Remove argument FORM. All callers changed. Do not attempt to encode time values; just encode decoded (calendrical) times. Unless CURRENT_TIME_LIST, just return VALUE since HZ is 1. (Ftime_convert): New function, which does the time value conversion that bleeding-edge encode-time formerly did. Return TIME if it is easy to see that it is already of the correct form. (Fcurrent_time): Mention in doc that the form is planned to change. * test/src/timefns-tests.el (decode-then-encode-time): Don’t use (encode-time nil).
* | | Fix compilation with CHECK_STRUCTSEli Zaretskii2019-08-051-1/+1
| | | | | | | | | | | | | | | * src/pdumper.c (dump_hash_table): Update hash of HASH_Lisp_Hash_Table. (Bug#36929)
* | | Revert "Make `view-lossage' output of chars read from `read-char' more logical"Lars Ingebrigtsen2019-08-051-11/+2
| | | | | | | | | | | | | | | | | | This reverts commit 1abf76877847226daa5ab7e07000ac1d4aba3478. This change apparently led to problems with kmacro.
* | | Make `view-lossage' output of chars read from `read-char' more logicalLars Ingebrigtsen2019-08-051-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/help.el (view-lossage): Use the new data format to output data from `read-char' and the like in a more understandable fashion (bug#21867). * src/keyboard.c (command_loop_1): Record (in recent_keys) the end of commands. (Frecent_keys): Don't include `end-of-command' in non-command outputs. (syms_of_keyboard): Define `end-of-command'.
* | | Tweak time arithmetic performancePaul Eggert2019-08-041-12/+32
| | | | | | | | | | | | | | | | | | | | | * src/timefns.c (lispint_arith): New function, which should be a bit faster if B is 0, or if A is a bignum and B a fixnum with absolute value in unsigned long range. (time_arith): Use it.
* | | Fix the MS-Windows build broken by recent changesEli Zaretskii2019-08-042-0/+5
| | | | | | | | | | | | | | | | | | | | | * src/inotify.c (syms_of_inotify) <Qignored>: Don't define here... * src/coding.c (syms_of_coding) <Qignored>: ...define it here, because it is needed also on platforms that don't compile inotify.c.
* | | Minor fix to recent coding.c changePaul Eggert2019-08-041-63/+60
| | | | | | | | | | | | | | | | | | * src/coding.c (get_buffer_gap_address): Don’t assume string or buffer length fits in int. Also, improve wording of comments.
* | | Add Unicode-safe UTF-8 converterK. Handa2019-08-042-0/+734
| | | | | | | | | | | | | | | * src/coding.c (encode_string_utf_8, decode_string_utf_8): New functions. * src/coding.h (encode_string_utf_8, decode_string_utf_8): Extern them.
* | | Fix two mouse drag and drop issues (Bug#28620, Bug#36269)Martin Rudalics2019-08-048-159/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow 'mouse-drag-and-drop-region' to move/copy text from one frame to another (Bug#28620). Prevent mouse avoidance mode from interfering with 'mouse-drag-and-drop-region' (Bug#36269). * lisp/avoid.el (mouse-avoidance-ignore-p): Suspend avoidance when 'track-mouse' equals 'dropping'. * lisp/mouse.el (mouse-drag-and-drop-region): Set 'track-mouse' to 'dropping'. Continue reading events also when switching frames. * src/keyboard.c (Finternal_track_mouse): Rename from Ftrack_mouse. (some_mouse_moved): Return NULL also when mouse is not tracked. (show_help_echo, readable_events, kbd_buffer_get_event): Don't check whether mouse is tracked, some_mouse_moved does it now. (track_mouse): Rename variable from do_mouse_tracking. Adjust all users. In doc-string explain meanings of special values 'dragging' and 'dropping'. * src/nsterm.m (ns_mouse_position): During drag and drop consider last mouse frame only when there is no currently focused frame. * src/w32fns.c (w32_wnd_proc): Don't set mouse capture during a drag and drop operation. * src/w32term.c (w32_mouse_position): Track frame under mouse during mouse drag and drop. (mouse_or_wdesc_frame): New function. (w32_read_socket): Call mouse_or_wdesc_frame on mouse events. * src/xdisp.c (define_frame_cursor1): Don't change mouse cursor shape during mouse drag and drop. (syms_of_xdisp): New symbol Qdropping. * src/xterm.c (XTmouse_position): Allow mouse drag and drop move to another frame (mouse_or_wdesc_frame): New function. (handle_one_xevent): Use mouse_or_wdesc_frame for mouse events.
* | | Remove stale .pdmp files with ‘make clean’Paul Eggert2019-08-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Sven Joachim (Bug#36907). * admin/make-emacs: Simplify, now that clean does versionclean. * src/Makefile.in ($(etc)/DOC, versionclean, extraclean): Don’t ignore rm -f failures. (versionclean): Also remove emacs-*.*.*[0-9].pdmp and ../etc/DOC*. (clean): Depend on versionclean and simplify.
* | | Fix rare undefined behaviors in replace-matchPaul Eggert2019-08-031-69/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/search.c (Freplace_match): Simplify by caching search_regs components. Fix sanity check for out-of-range subscripts; it incorrectly allowed negative subscripts, subscripts equal to search_regs.num_regs, and it had undefined behavior for subscripts outside ptrdiff_t range. Improve wording of newly-introduced replace-match diagnostic. Rework use of opoint, to avoid setting point to an out-of-range value in rare cases involving modification hooks.
* | | Fix error message in replace-match for subexpressionsLars Ingebrigtsen2019-08-031-0/+6
| | | | | | | | | | | | | | | * src/search.c (Freplace_match): Output a more understandable error message when replacing a subexpression (bug#19208).
* | | Clarify Freplace_match logicLars Ingebrigtsen2019-08-031-2/+6
| | | | | | | | | | | | | | | * src/search.c (Freplace_match): Add some doc strings to clarify the logic and do a minor clean up (bug#19208).
* | | Say that while returns nilLars Ingebrigtsen2019-08-011-0/+3
| | | | | | | | | | | | | | | * src/eval.c (Fwhile): Say that while always returns nil (bug#22006).
* | | Avoid intern calls for builtin symsPaul Eggert2019-07-312-2/+2
| | | | | | | | | | | | | | | | | | * src/casefiddle.c (Fdowncase_region): * src/eval.c (Fdefvaralias): Use builtin symbol rather than calling intern.
* | | Fix Fload infile problemPaul Eggert2019-07-311-9/+8
| | | | | | | | | | | | | | | * src/lread.c (Fload): Close window of vulnerability where the wrong stream could have been closed.
* | | * src/lread.c (close_infile_unwind): Remove leftover debug codeStefan Monnier2019-07-311-1/+0
| | |
* | | * src/lread.c (infile): Set/reset it like a dynamically scoped variableStefan Monnier2019-07-311-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've seen segfaults where `infile` is nil when we get to readbyte_from_file, presumably because Fload set it to NULL (via close_infile_unwind) just before returning to its caller which was probably itself within another read/load and for some reason readevalloop didn't get to re-set `infile` like it used to do at every iteration. I was not able to really track down the bug, but the way `infile` was set/reset seemed fragile and managing it like a standard dynamically-scoped var seems both safer (and more efficient since we don't need readevalloop to constantly re-set it). (readchar): Assert that `infile` is set if using a function the depends on it. (readbyte_from_file): Assert that `infile` is set. (close_infile_unwind): Reset `infile` to its previous value rather than to NULL. (Fload): Remember the previous value of `infile` before chaning it. (readevalloop): Don't set `infile` any more.
* | | Merge from origin/emacs-26Glenn Morris2019-07-301-3/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8fbe462 (origin/emacs-26) ; * doc/lispref/positions.texi (List Motion... 1d9efc0 Add index for "\( in strings" (Bug#25195) 304e96f Fix doc-string of 'fit-window-to-buffer' (Bug#36848) d4c4987 Update view-mode docstring d6ca1fc ; * lisp/term.el: Add missing / to esc seq commentary. b3e2073 Fix subproc listening when setting filter to non-t (Bug#36591) f671950 * etc/NEWS.25: Belatedly announce rcirc-reconnect-delay. 7f42277 Mention term.el's \032 dir tracking in commentary (Bug#19524) 16a529e Remove upload functionality of package-x from the elisp manual 78e6c2a * etc/AUTHORS: Update. 086a56e Clarify Gravatar docs 0592467 * doc/lispref/display.texi (Defining Faces): Say a face can't... # Conflicts: # doc/emacs/programs.texi # etc/AUTHORS # lisp/term.el
| * | Fix subproc listening when setting filter to non-t (Bug#36591)Noam Postavsky2019-07-251-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/process.c (Fset_process_filter): Call add_process_read_fd according to the state of process filter before it's updated. This restores the correct functioning as it was before 2016-02-16 "Allow setting the filter masks later". Inline the set_process_filter_masks call instead of fixing it that function, because it is also called from connect_network_socket, and we don't want to change the behavior of that function so close to release. * test/src/process-tests.el (set-process-filter-t): New test.
* | | Add support for dealing with decoded time structuresLars Ingebrigtsen2019-07-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Time Conversion): Document the new functions that work on decoded time. (Time Calculations): Document new date/time functions. * lisp/simple.el (decoded-time-second, decoded-time-minute) (decoded-time-hour, decoded-time-day, decoded-time-month) (decoded-time-year, decoded-time-weekday, decoded-time-dst) (decoded-time-zone): New accessor functions for decoded time values. * lisp/calendar/time-date.el (date-days-in-month) (date-ordinal-to-time): New functions. (decoded-time--alter-month, decoded-time--alter-day) (decoded-time--alter-second, make-decoded-time): New functions added to manipulate decoded time structures. * src/timefns.c (Fdecode_time): Mention the new accessors. * test/lisp/calendar/time-date-tests.el: New file to test the decoded time functions and the other new functions.
* | | Always set the state of the "Show hidden files" gtk buttonLars Ingebrigtsen2019-07-281-5/+5
| | | | | | | | | | | | | | | | | | * src/gtkutil.c (xg_get_file_with_chooser): Always set the state of the "Show hidden files" button (bug#23977). If not, the visible state and the actual state get out of sync.
* | | Fix stretch glyphs overlap with line above (bug#36633)Alan Third2019-07-271-8/+4
| | | | | | | | | | | | | | | * src/nsterm.m (ns_dumpglyphs_stretch): Move overwriting of the clipping rectangle to after performing clipping.
* | | Fix arithmetic overflow in GC consing countPaul Eggert2019-07-271-1/+1
| | | | | | | | | | | | | | | | | | * src/alloc.c (allow_garbage_collection): Redo expression to avoid signed arithmetic overflow in an intermediate expression when CONSING is negative.
* | | Use the CSS convention for #RGB colors (bug#36304)Pip Cet2019-07-271-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_parse_color): Change interpretation of #RGB color triplets to match CSS rather than X conventions. * lisp/term/tty-colors.el (tty-color-standard-values): Change interpretation of #RGB color triplets to match CSS rather than X conventions. Allow upper-case digits. Fix rgb:R/G/B interpretation. * doc/emacs/display.texi (Colors): Specify the convention used for "#RGB" color triplets. * test/lisp/tty-colors-tests.el: New file. * etc/NEWS: Mention the change.
* | | Clarify docstring of last-command-event.Noam Postavsky2019-07-261-1/+1
| | | | | | | | | | | | * src/keyboard.c (syms_of_keyboard) <last-command-event>: Reword docstring.
* | | Adjust remaining uses of `NILP (HASH_HASH)`.Stefan Monnier2019-07-264-46/+60
| | | | | | | | | | | | | | | | | | | | | | | | * src/json.c (lisp_to_json_toplevel_1): * src/pdumper.c (dump_hash_table_stable_p, hash_table_contents): * src/print.c (print, print_vectorlike): * src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion): Use `EQ (HASH_KEY, Qunbound)` instead of `NILP (HASH_HASH)`.
* | | Don't dump the `hash` vector if it will need to be recomputed anywayStefan Monnier2019-07-263-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fns.c (hash_table_rehash): Only set `hash` field at the end. (sweep_weak_table): Only set slot of `hash` vector when that vector exists. (Fhash_table_count): No need to hash_rehash_if_needed any more. * src/lisp.h (hash_rehash_needed_p): Test the presence of `hash` instead. * src/pdumper.c (check_hash_table_rehash, dump_hash_table): Set `hash` to nil to indicate that the table needs to be rehashed.
* | | * src/fns.c: Use `EQ (key, Qunbound)` to check if a slot is in useStefan Monnier2019-07-262-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (make_hash_table): Use Qunbound for the key_and_value table. (maybe_resize_hash_table): Set new key_and_value slots to Qunbound. (hash_table_rehash): Don't bother copying the old table of hashes since we're recomputing it completely. (hash_table_rehash): Use hash_rehash_needed_p more. (hash_put): Add assertion that the slot was indeed considered empty. (hash_remove_from_table, hash_clear, sweep_weak_table): Set empty slot's key to Qunbound. (Fmaphash): Use `EQ (key, Qunbound)` to check if a slot is in use. * src/lisp.h (struct Lisp_Hash_Table): Update comments.
* | | * src/fns.c (hash_index_size): New function, extracted from make_hash_tableStefan Monnier2019-07-262-21/+19
| | | | | | | | | | | | | | | | | | (make_hash_table, maybe_resize_hash_table): Use it. * src/pdumper.c (check_hash_table_rehash): Use hash_rehash_needed_p.
* | | * src/fns.c (maybe_resize_hash_table): Obey rehash_size (bug#25743)Stefan Monnier2019-07-261-1/+1
| | |
* | | Fix recently-introduced file-name-absolute-p typoPaul Eggert2019-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix a bug introduced in 2019-07-24T21:28:13!eggert@cs.ucla.edu. * src/fileio.c (file_name_absolute_p): ~/foo is also absolute (Bug#36809). * test/src/fileio-tests.el (fileio-tests--file-name-absolute-p): Rename from fileio-tests--no-such-user and add more tests.
* | | Clarify last-command-event doc stringLars Ingebrigtsen2019-07-261-1/+2
| | | | | | | | | | | | | | | * src/keyboard.c (syms_of_keyboard): Clarify the doc string (bug#26626).
* | | Minor pdumper tweaksPaul Eggert2019-07-251-15/+12
| | | | | | | | | | | | | | | | | | | | | * src/pdumper.c (dump_hash_table_stable_p): Bool vectors and bignums are also stable keys. (decode_emacs_reloc, drain_reloc_list, Fdump_emacs_portable): (dump_bitset_clear): Simplify use of memset.
* | | Don't crash when parsing bad SVG dataPaul Eggert2019-07-251-2/+6
| | | | | | | | | | | | | | | Derived from a patch by Pip Cet (Bug#36773#47). * src/image.c (svg_load_image): Work around librsvg 2.40.13 bug.
* | | Fix HarfBuzz support on MS-WindowsEli Zaretskii2019-07-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32uniscribe.c [HAVE_HARFBUZZ]: Include hb-ot.h. (fn_hb_ot_font_set_funcs, hb_ot_font_set_funcs): Define. (w32hb_get_font): Call hb_ot_font_set_funcs after creating the hb_font_t object, to make the code work with versions of HarfBuzz before 2.0.0. Problem reported by Stephen Leake <stephen_leake@stephe-leake.org>. Solution suggested by Khaled Hosny <dr.khaled.hosny@gmail.com> in https://lists.freedesktop.org/archives/harfbuzz/2019-July/007412.html.