summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Implement dots and dashes on MS-WindowsPo Lu10 days
| | | | | | | | * src/haikuterm.c (haiku_draw_dash): Correct whitespace error. * src/w32term.c (w32_draw_dash, w32_fill_underline) (w32_draw_glyph_string): Port display of dash and dot underline styles from X.
* Remove redundant encoding of strings in androidvfs.cPo Lu10 days
| | | | | | | | | * java/org/gnu/emacs/EmacsService.java (getDocumentTrees): Accept PROVIDER as a String. * src/android.c (android_init_emacs_service): * src/androidvfs.c (android_saf_root_opendir): Adjust to match.
* Fix earlier change to content URI resolution on AndroidPo Lu10 days
| | | | | | | | | * java/org/gnu/emacs/EmacsService.java (openContentUri): Return -1 if fd be NULL. * src/androidvfs.c (android_authority_open): Detect SecurityException and suchlike. (android_vfs_init): Initialize exception classes on Android 4.4.
* Improve static checking when using upcoming GCC 13.3Paul Eggert11 days
| | | | | | | * src/lisp.h: In GCC 13.3 and later, do not ignore -Wanalyzer-allocation-size. * src/marker.c: In GCC 13.3 and later, do not ignore -Wanalyzer-deref-before-check.
* Intern additional symbols ahead-of-timePo Lu11 days
| | | | | | | * src/gnutls.c (Fgnutls_available_p, syms_of_gnutls): * src/minibuf.c (Fread_buffer, syms_of_minibuf): Define and intern symbols overlooked in the previous change.
* Replace calls to intern with a constant string with DEFSYMsPo Lu11 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (display_malloc_warning, syms_of_alloc): * src/buffer.c (Fmake_indirect_buffer, Fbuffer_local_variables) (Frename_buffer, Fkill_buffer, Fset_buffer_major_mode) (Fset_buffer_multibyte, syms_of_buffer): * src/callint.c (read_file_name, Fcall_interactively) (syms_of_callint): * src/callproc.c (call_process, create_temp_file) (syms_of_callproc): * src/charset.c (Fdefine_charset_internal, syms_of_charset): * src/cmds.c (internal_self_insert, syms_of_cmds): * src/coding.c (record_conversion_result) (Fdefine_coding_system_internal, syms_of_coding): * src/dbusbind.c (xd_signature, Fdbus_message_internal) (syms_of_dbusbind): * src/dispnew.c (init_faces_initial): * src/doc.c (Fsnarf_documentation, syms_of_doc): * src/dosfns.c (system_process_attributes, syms_of_dosfns): * src/emacs.c (init_cmdargs, Fdump_emacs, decode_env_path) (syms_of_emacs): * src/eval.c (call_debugger, Fdefvaralias, syms_of_eval): * src/fileio.c (barf_or_query_if_file_exists) (Finsert_file_contents, auto_save_error, Fdo_auto_save) (syms_of_fileio): * src/filelock.c (lock_file_1, syms_of_filelock): * src/fontset.c (fontset_from_font, syms_of_fontset): * src/frame.c (make_frame_without_minibuffer, syms_of_frame): * src/gnutls.c (emacs_gnutls_certificate_details) (Fgnutls_peer_status_warning_describe, Fgnutls_peer_status) (gnutls_verify_boot, syms_of_gnutls): * src/gtkutil.c (style_changed_cb, find_rtl_image): * src/image.c (imagemagick_filename_hint, gs_load) (syms_of_image): * src/keyboard.c (command_loop_1, read_char, timer_start_idle) (read_char_minibuf_menu_prompt, Fsuspend_emacs) (syms_of_keyboard): * src/keymap.c (Fmap_keymap, Flookup_key, Fdescribe_vector) (describe_vector, syms_of_keymap): * src/lread.c (Fread, Fread_positioning_symbols, syms_of_lread): * src/minibuf.c (Fabort_minibuffers, Fread_buffer) (Fcompleting_read, syms_of_minibuf): * src/msdos.c (XMenuActivate, run_msdos_command, syms_of_msdos): * src/nsfns.m (Fx_display_backing_store, Fx_display_visual_class) (Fns_hide_emacs, Fsystem_move_file_to_trash, ns_create_tip_frame) (x_hide_tip, Fx_show_tip, syms_of_nsfns): * src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity) (syms_of_nsfont): * src/pdumper.c (Fdump_emacs_portable): * src/pgtkfns.c (Fx_display_visual_class, x_create_tip_frame) (Fx_show_tip, syms_of_pgtkfns): * src/pgtkterm.c (syms_of_pgtkterm, pgtk_cr_export_frames): * src/term.c (term_get_fkeys_1, set_tty_color_mode, Fsuspend_tty) (Fresume_tty, tty_menu_activate, syms_of_term): * src/terminal.c (create_terminal, syms_of_terminal): * src/w32fns.c (Fx_display_backing_store) (Fx_display_visual_class, Fset_message_beep, Fx_open_connection) (Fx_show_tip, Fx_file_dialog, Fsystem_move_file_to_trash) (Fw32_toggle_lock_key, syms_of_w32fns): * src/w32font.c (w32_enumfont_pattern_entity, syms_of_w32font): * src/w32term.c (w32_bitmap_icon, syms_of_w32term): * src/xdisp.c (message_dolog, define_frame_cursor1) (syms_of_xdisp): * src/xfaces.c (tty_lookup_color, syms_of_xfaces): * src/xml.c (make_dom, syms_of_xml): * src/xterm.c (syms_of_xterm): * src/xwidget.c (store_xwidget_download_callback_event) (store_xwidget_js_callback_event, syms_of_xwidget): Define symbols for symbols interned with `intern' from a constant string, delete duplicate DEFSYM directives, and substitute them for such calls to intern. This excludes only those symbols which are interned and referenced only once during Emacs's initialization, the timing of whose interning is inconsequential, and symbols in w32.c, which would need to be transferred to a new syms_of_w32 function that I cannot test.
* Don't report erroneous /content directory on Android 4.3 and earlierPo Lu11 days
| | | | | * src/androidvfs.c (android_content_opendir): Skip two, not one, elements on Android <= 4.4.
* Fix hang after failed yank-media on AndroidPo Lu12 days
| | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsClipboard.java (getClipboardTargets) (getClipboardData): * java/org/gnu/emacs/EmacsSdk11Clipboard.java (getClipboardTargets, getClipboardData): * java/org/gnu/emacs/EmacsSdk8Clipboard.java (getClipboardTargets, getClipboardData): Return string data as Strings rather than byte arrays. * src/androidselect.c (android_init_emacs_clipboard) (Fandroid_get_clipboard_targets): Adjust to match. (extract_fd_offsets): Remove duplicated semicolon. (Fandroid_get_clipboard_data): Call unblock_input before returning if extract_fd_offsets fails.
* Do not report text conversion information from tooltip framesPo Lu13 days
| | | | | * src/xdisp.c (mark_window_display_accurate_1): Skip report_point_change if FRAME_WINDOW_P (WINDOW_XFRAME (w)).
* Fix bug#66151Po Lu13 days
| | | | | * src/fontset.c (free_realized_fontsets): Never call recompute_basic_faces on dead frames. (bug#66151)
* `read': give fuller error message for errors following "#".Alan Mackenzie14 days
| | | | | | | | | | | This solves bug#70702. * src/lread.c (READ_AND_BUFFER, INVALID_SYNTAX_WITH_BUFFER): New macros. (read0): For errors in characters sequences beginning with "#", output the entire character sequence rather than just "#". * test/src/lread-tests.el (lread-test-bug70702): New test.
* (Fkey_description): Fix corner (bug#59305)Stefan Monnier14 days
| | | | | * src/keymap.c (Fkey_description): Don't mistake latin-1 chars for ASCII-chars-with-meta.
* Fix lock files on some versions of CygwinEli Zaretskii2024-05-05
| | | | | * src/filelock.c (current_lock_owner): Support negative boot-time on rare systems. (Bug#70415)
* Retract lexical cookie source load warningMattias Engdegård2024-05-05
| | | | | | | | | | | | | | | On balance it seems likely that the warning would annoy more people than it would help, so let them deal with any actual problems when the default is changed instead. See discussion at: https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00250.html * src/lread.c (string_suffix_p, warn_missing_cookie, Fload) (Feval_buffer): * lisp/international/mule.el (load-with-code-conversion): * lisp/startup.el (command-line--load-script): * etc/NEWS: Revert all changes, except for the generalised `lisp_file_lexical_cookie` which may prove useful in the future.
* Fix cursor misalignment on truncated RTL rowsPo Lu2024-05-05
| | | | | * src/xdisp.c (set_cursor_from_row): Begin computing the position of the rightmost glyph from row->x, not 0.
* Fix implementation of the --terminal command-line switchEli Zaretskii2024-05-04
| | | | | | | | | | | | It sounds like this has been broken ever since multi-tty was added to Emacs. * src/keyboard.c (dev_tty): New global variable. * src/keyboard.h: Declare 'dev_tty'. * src/emacs.c (main): Initialize 'dev_tty'. * src/term.c (Fcontrolling_tty_p, Fresume_tty, init_tty): * src/process.c (dissociate_controlling_tty): * src/keyboard.c (handle_interrupt_signal, handle_interrupt) (Fset_quit_char): Use 'dev_tty' instead of 'DEV_TTY'. (Bug#70519)
* Only issue lexical cookie warning for elisp filesMattias Engdegård2024-05-04
| | | | | | | | * src/lread.c (string_suffix_p): New. (warn_missing_cookie): Suppress warning for files not ending in ".el", except ".emacs". * etc/NEWS: Update accordingly, and mention how the warning can be suppressed.
* Simplify management of Android handle IDsPo Lu2024-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsCursor.java (EmacsCursor): * java/org/gnu/emacs/EmacsGC.java (EmacsGC): * java/org/gnu/emacs/EmacsHandleObject.java (EmacsHandleObject): Remove HANDLE argument to constructor. * java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection) <windowHandle>: Change type to long. * java/org/gnu/emacs/EmacsNative.java (EmacsNative) (sendConfigureNotify, sendKeyPress, sendKeyRelease, sendFocusIn) (sendFocusOut, sendWindowAction, sendEnterNotify) (sendLeaveNotify, sendMotionNotify, sendButtonPress) (sendButtonRelease, sendTouchDown, sendTouchUp, sendTouchMove) (sendWheel, sendIconified, sendDeiconified, sendContextMenu) (sendExpose, sendDndDrag, sendDndUri, sendDndText) (beginBatchEdit, commitCompletion, endBatchEdit, commitText) (deleteSurroundingText, finishComposingText, replaceText) (getSelectedText, getTextAfterCursor, getTextBeforeCursor) (setComposingText, setComposingRegion, setSelection) (performEditorAction, performContextMenuAction, getExtractedText) (requestSelectionUpdate, requestCursorUpdates, clearInputFlags) (getSurroundingText, takeSnapshot, getSelection): Accept handles as longs, rather than shorts. All callers changed. * java/org/gnu/emacs/EmacsService.java (queryTree): Return handles as longs rather than shorts. (viewGetSelection): Take long WINDOW, not short. * src/android.c (struct android_emacs_handle): New structure. (handle_class): New variable. (android_init_emacs_service, android_init_emacs_pixmap) (android_init_emacs_gc_class, android_init_emacs_cursor): Adjust to match signature changes in constructors. (android_init_emacs_handle): New function. (initEmacs): Initialize the handle class, its fields and metods. (sendConfigureNotify, sendKeyPress, sendKeyRelease, sendFocusIn) (sendFocusOut, sendWindowAction, sendEnterNotify) (sendLeaveNotify, sendMotionNotify, sendButtonPress) (sendButtonRelease, sendTouchDown, sendTouchUp, sendTouchMove) (sendWheel, sendIconified, sendDeiconified, sendContextMenu) (sendExpose, sendDndDrag, sendDndUri, sendDndText): Update for changes to handle type. (android_alloc_id, android_resolve_handle) (android_resolve_handle2): Remove functions; replace the second with a macro that accepts one fewer argument. All callers changed. (android_destroy_handle): Cease indexing the handle list for the handle object. (android_globalize_reference): New function. (android_create_window, android_create_gc, android_create_pixmap) (android_create_font_cursor): Call android_globalize_reference to convert global references into handles. (android_free_cursor, android_destroy_window): Cease verifying the handle type. (android_copy_area): Check destination object type rather than handle entry. (android_query_tree): Adjust for changes to return types. (likely): Define __builtin_expect variant unconditionally. * src/android.h (android_resolve_handle): New macro. * src/androidgui.h (android_handle): Define to intptr_t. * src/androidterm.c (deleteSurroundingText, finishComposingText) (performEditorAction, performContextMenuAction, getExtractedText) (getSelectedText, requestSelectionUpdate, requestCursorUpdates) (clearInputFlags, getSurroundingText) (android_get_surrounding_text_internal): Accept handles as longs, not jshorts.
* ; * src/lread.c (warn_missing_cookie): Fix typo.Po Lu2024-05-04
|
* * src/lread.c (warn_missing_cookie): Exempt the user init file.Po Lu2024-05-04
|
* Warn when loading .el files without lexical-binding declarationMattias Engdegård2024-05-03
| | | | | | | | | | | | | | | | | | This corresponds to the byte-compiler warning for the same issue, here emitted for files that aren't compiled but loaded from source. It should make the planned change to enable lexical binding by default in Emacs 31 go smoother. * src/lread.c (lexical_cookie_t): New type. (lisp_file_lexically_bound_p): Renamed to... (lisp_file_lexical_cookie): ...this, with the return value retyped. * src/lread.c (warn_missing_cookie): New. (Fload): Warn when loading source file and cookie missing. (Feval_buffer): Add LOADING arg; warn when set and cookie missing. * lisp/international/mule.el (load-with-code-conversion): * lisp/startup.el (command-line--load-script): Call eval-buffer with LOADING arg set. * etc/NEWS: Announce.
* Prevent reporting of crashes when Emacs is restarted on AndroidPo Lu2024-05-03
| | | | | * src/emacs.c (Fkill_emacs): Ignore SIGBUS and SIGSGEV immediately before calling exit.
* Fix display of stipples on NS with respect to cursor highlightPo Lu2024-05-02
| | | | | | | | | | | | | * src/nsfont.m (nsfont_draw): Delete redundant code. * src/nsterm.m (ns_maybe_dumpglyphs_background): Conform logic to X version by always displaying the background if s->stipple_p should be set. (ns_draw_stretch_glyph_string): Set stipple background as appropriate. (ns_set_glyph_string_gc): New function. (ns_draw_glyph_string): Call it, as on X. Reported by Arash Esbati <arash@gnu.org>.
* ; Improve commentary in intervals.hEli Zaretskii2024-05-02
| | | | | * src/intervals.h (INTERVAL_GENERALLY_WRITABLE_P) (INTERVAL_EXPRESSLY_WRITABLE_P): Clarify commentary.
* Port visible bell to AndroidPo Lu2024-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Ignore GC_INVERT. * java/org/gnu/emacs/EmacsFillRectangle.java (EmacsFillRectangle) <invertFilter>: New variable. (perform): If the transfer mode is invert, copy the source to itself with invertFilter as the color filter. * java/org/gnu/emacs/EmacsGC.java (EmacsGC) <xorAlu, srcInAlu>: Delete now-redundant ALUs. (markDirty): Cease updating the paint's transfermode. * java/org/gnu/emacs/EmacsSafThread.java (openDocument1): Fix typo in documentation. * src/android.c (android_blit_xor): Delete unused function. (android_copy_area): Remove calls to unused blit functions. * src/androidgui.h (enum android_gc_function): Rename XOR to INVERT. * src/androidterm.c (android_flash): Replace with GXinvert.
* Switch to GXinvert in XTflashPo Lu2024-05-02
| | | | | | * src/xterm.c (XTflash): Move to inverting the regions of the display being flashed. Suggested by Manuel Giraud <manuel@ledu-giraud.fr>.
* ; Update commentary in intervals.hPo Lu2024-05-02
| | | | | * src/intervals.h (INTERVAL_GENERALLY_WRITABLE_P) (INTERVAL_EXPRESSLY_WRITABLE_P): Mention significance of RO.
* Fix minor typos in haikuterm.cPo Lu2024-05-01
| | | | | | * src/haikuterm.c (haiku_fill_underline) (haiku_draw_text_decoration): Don't pass view to unused frame parameter.
* Implement dots and dashes on NextstepPo Lu2024-05-01
| | | | | | | * src/Makefile.in (NON_OBJC_CFLAGS): Add -Wstrict-flex-arrays. * src/nsterm.m (ns_draw_dash, ns_fill_underline): New functions. (ns_draw_text_decoration): Port dash and dot display from X.
* ; Update pvec_type hash for CHECK_STRUCTSBasil L. Contovounesios2024-05-01
| | | | | This follows commit 2fa839c1886 of 2024-04-28 "(COMPILED): Rename to CLOSURE".
* ; * src/androidselect.c (extract_fd_offsets): Fix typos.Po Lu2024-05-01
|
* Fix compatibility issues with Android clipboardsPo Lu2024-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsClipboard.java (getClipboardData): Return an AssetFileDescriptor. * java/org/gnu/emacs/EmacsContextMenu.java (onMenuItemClick): Typo corrections in commentary. * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Raise minimum version on which to read file descriptors from ParcelFileDescriptor objects to Honeycomb. * java/org/gnu/emacs/EmacsSdk11Clipboard.java (getClipboardData): Return the asset file descriptor. * java/org/gnu/emacs/EmacsSdk8Clipboard.java (getClipboardData): Adjust return type to match. * src/android.h (struct android_parcel_file_descriptor_class): Move from androidselect.c. * src/androidselect.c (fd_class): Export function. (android_init_emacs_clipboard): Adjust signature of getClipboardData. (android_init_asset_file_descriptor, close_asset_fd) (extract_fd_offsets): New functions. (Fandroid_get_clipboard_data): Extract file descriptor and offset from the AssetFileDescriptor here, rather than in getClipboardData. (init_androidselect): Call android_init_asset_file_descriptor. * src/androidvfs.c (android_init_fd_class): Export and enable calling this function more than once.
* Fix deletion of text holding `inhibit-read-only' propertiesPo Lu2024-04-30
| | | | | | | | | | | | | | | | | * src/intervals.h (INTERVAL_VISIBLE_P): Split into ... (INTERVAL_GENERALLY_WRITABLE_P, INTERVAL_EXPRESSLY_WRITABLE_P): ... two new macros. * src/textprop.c (verify_interval_modification): If the buffer is read only, verify not that there is only a single exempting interval spanning the area of a multiple-character operation, but that every intervening interval in such an operation exempts it from write restrictions, either by providing a read-only property that appears in Vinhibit_read_only, or by providing an inhibit-read-only property. * test/src/textprop-tests.el (textprop-interval-immutability): New test.
* Work around bad GCC diagnostic in select_windowPaul Eggert2024-04-30
| | | | | * src/textconv.c (select_window): Add an eassume to work around GCC bug 114893.
* Pacify GCC 14 -Wanalyzer-out-of-bounds in hbfont.cPaul Eggert2024-04-30
| | | | * src/hbfont.c (hbfont_shape): Add an eassume.
* Pacify GCC 14 -Wstring-operflow in ftfont.cPaul Eggert2024-04-30
| | | | | | * src/ftfont.c (ftfont_drive_otf): Do not crash if spec->features[i] is nonnull but is empty. Use gfeatures local to pacify GCC 14.
* Pacify GCC 14 -Wnull-dereference in intervals.cPaul Eggert2024-04-30
| | | | | * src/intervals.c (set_intervals_multibyte_1): Add an eassume to pacify GCC. Deparenthesisze.
* Pacify GCC 14 -Wnull-dereference in tim_sortPaul Eggert2024-04-30
| | | | | | | * src/lisp.h (tim_sort): Require array arg to be nonnull. * src/sort.c (reverse_slice): Omit no-longer-needed eassert. (tim_sort): Avoid undefined behavior when length == 0, since reverse_slice would then compute &seq[-1].
* Pacify GCC 14 -Wclobbered in eval.cPaul Eggert2024-04-30
| | | | * src/eval.c: Ignore -Wclobbered.
* Pacify GCC 14 -Wnull-dereferencePaul Eggert2024-04-30
| | | | | | * src/xterm.c (x_dpyinfo): New function, which acts like x_display_info_for_display except it always returns nonnull. This simplifies callers and pacifies GCC 14. All callers changed.
* Pacify GCC 14 -Walloc-sizePaul Eggert2024-04-30
| | | | * src/xfns.c (xic_string_conversion_callback): Allocate size 1, not 0.
* Fix value< string comparison ungoodthinkMattias Engdegård2024-04-29
| | | | | | * src/fns.c (string_cmp): Fix bad comparisons for certain strings. This only affected `value<` for aggregates, not `string<`. * test/src/fns-tests.el (fns-value<-ordered): Add test cases.
* Take fields into account during text conversionPo Lu2024-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cus-edit.el (Custom-mode): Enable text conversion, now that fields are correctly treated. * src/alloc.c (mark_frame): Mark f->conversion.field. * src/androidterm.c (android_update_selection): Adjust conversion region and selection position by the field start and end. * src/editfns.c (find_field): Export function. * src/frame.c (make_frame): Clear f->conversion.field. * src/frame.h (struct text_conversion_state) <field>: New field. * src/lisp.h (find_fields, reset_frame_conversion): Export functions. * src/minibuf.c (Fread_from_minibuffer): Reset frame conversion if Voverriding_text_conversion_style is set. * src/textconv.c (textconv_query): Narrow to field. (reset_frame_conversion): New function. (reset_frame_state): Clear conversion field. (really_delete_surrounding_text): Narrow to field. (locate_and_save_position_in_field): New function. (really_request_point_update, really_set_point_and_mark) (complete_edit_check, handle_pending_conversion_events_1) (handle_pending_conversion_events, get_conversion_field) (set_composing_region, textconv_set_point_and_mark, replace_text) (get_extracted_text, get_surrounding_text, report_point_change): Compute, narrow to and offset by the currently active field whenever point is updated or a command is received. (syms_of_textconv): Revise doc strings. * src/textconv.h (get_conversion_field): Export function.
* Use a dedicated type to represent interpreted-function valuesStefan Monnier2024-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `function` so that when evaluating #'(lambda ...) we return an object of type `interpreted-function` rather than a list starting with one of `lambda` or `closure`. The new type reuses the existing PVEC_CLOSURE (nee PVEC_COMPILED) tag and tries to align the corresponding elements: - the arglist, the docstring, and the interactive-form go in the same slots as for byte-code functions. - the body of the function goes in the slot used for the bytecode string. - the lexical context goes in the slot used for the constants of bytecoded functions. The first point above means that `help-function-arglist`, `documentation`, and `interactive-form`s don't need to distinguish interpreted and bytecode functions any more. Main benefits of the change: - We can now reliably distinguish a list from a function value. - `cl-defmethod` can dispatch on `interactive-function` and `closure`. Dispatch on `function` also works now for interpreted functions but still won't work for functions represented as lists or as symbols, of course. - Function values are now self-evaluating. That was alrready the case when byte-compiled, but not when interpreted since (eval '(closure ...)) signals a void-function error. That also avoids false-positive warnings about "don't quote your lambdas" when doing things like `(mapcar ',func ...)`. * src/eval.c (Fmake_interpreted_closure): New function. (Ffunction): Use it and change calling convention of `Vinternal_make_interpreted_closure_function`. (FUNCTIONP, Fcommandp, eval_sub, funcall_general, funcall_lambda) (Ffunc_arity, lambda_arity): Simplify. (funcall_lambda): Adjust to new representation. (syms_of_eval): `defsubr` the new function. Remove definition of `Qclosure`. * lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure): Change calling convention and use `make-interpreted-closure`. * src/data.c (Fcl_type_of): Distinguish `byte-code-function`s from `interpreted-function`s. (Fclosurep, finterpreted_function_p): New functions. (Fbyte_code_function_p): Don't be confused by `interpreted-function`s. (Finteractive_form, Fcommand_modes): Simplify. (syms_of_data): Define new type symbols and `defsubr` the two new functions. * lisp/emacs-lisp/cl-print.el (cl-print-object) <interpreted-function>: New method. * lisp/emacs-lisp/oclosure.el (oclosure): Refine the parent to be `closure`. (oclosure--fix-type, oclosure-type): Simplify. (oclosure--copy, oclosure--get, oclosure--set): Adjust to new representation. * src/callint.c (Fcall_interactively): Adjust to new representation. * src/lread.c (bytecode_from_rev_list): * lisp/simple.el (function-documentation): * lisp/help.el (help-function-arglist): Remove the old `closure` case and adjust the byte-code case so it handles `interpreted-function`s. * lisp/emacs-lisp/cl-preloaded.el (closure): New type. (byte-code-function): Add it as a parent. (interpreted-function): Adjust parent (the type itself was already added earlier by accident). * lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Adjust to new representation. (byte-compile): Use `interpreted-function-p`. * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust to new representation. (side-effect-free-fns): Add `interpreted-function-p` and `closurep`. * src/profiler.c (trace_hash, ffunction_equal): Simplify. * lisp/profiler.el (profiler-function-equal): Simplify. * lisp/emacs-lisp/nadvice.el (advice--interactive-form-1): Use `interpreted-function-p`; adjust to new representation; and take advantage of the fact that function values are now self-evaluating. * lisp/emacs-lisp/lisp-mode.el (closure): Remove `lisp-indent-function` property. * lisp/emacs-lisp/disass.el (disassemble-internal): Adjust to new representation. * lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation): Use `interpreted-function-p`. * lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers): Add `closurep` and `interpreted-function-p`. * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Adjust to more precise type info in `describe-function`. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries): Use `interpreted-function-p`. * test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-f4, vk-f5): Don't hardcode function values. * doc/lispref/functions.texi (Anonymous Functions): Don't suggest that function values are lists. Reword "self-quoting" to reflect the fact that #' doesn't return the exact same object. Update examples with the new shape of the return value. * doc/lispref/variables.texi (Lexical Binding): * doc/lispref/lists.texi (Rearrangement): * doc/lispref/control.texi (Handling Errors): Update examples to reflect new representation of function values.
* (COMPILED): Rename to CLOSUREStefan Monnier2024-04-28
| | | | | | | | | | | | | | | | | | In preparation for the use of `PVEC_COMPILED` objects for interpreted functions, rename them to use a more neutral name. * src/lisp.h (enum pvec_type): Rename `PVEC_COMPILED` to `PVEC_CLOSURE`. (enum Lisp_Compiled): Use `CLOSURE_` prefix i.s.o `COMPILED_`. Also use `CODE` rather than `BYTECODE`. (CLOSUREP): Rename from `COMPILEDP`. (enum Lisp_Closure): Rename from `Lisp_Compiled`. * src/alloc.c, src/bytecode.c, src/comp.c, src/data.c, src/eval.c, * src/fns.c, src/lisp.h, src/lread.c, src/pdumper.c, src/print.c, * src/profiler.c: Rename all uses accordingly. * src/.gdbinit (xclosure): Rename from `xcompiled`. (xcompiled): New obsolete alias. (xpr): Adjust accordingly. Also adjust to new PVEC_CLOSURE tag name.
* * src/comp.c (comp_hash_string): Count bytes, not chars.Mattias Engdegård2024-04-28
|
* Implement dots and dashes on PGTKPo Lu2024-04-28
| | | | | | | | * src/image.c (image_create_bitmap_from_file) [HAVE_PGTK]: Remove unused variable. * src/pgtkterm.c (pgtk_draw_dash, pgtk_fill_underline) (pgtk_draw_glyph_string): New functions, ported from X.
* Implement dots and dashes on HaikuPo Lu2024-04-28
| | | | | | | | | * src/doc.c (store_function_docstring): Re-enable loading doc strings of compiled functions from etc/DOC, which haiku-win, ns-win, and the like require. * src/haikuterm.c (haiku_draw_dash, haiku_fill_underline) (haiku_draw_text_decoration): Port underline code from X.
* Fix the Haiku buildPo Lu2024-04-28
| | | | | * src/haikuterm.c (haiku_draw_text_decoration): Remove stray closing parenthesis.
* Implement dots and dashes on AndroidPo Lu2024-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsDrawLine.java (EmacsDrawLine) (measureLine, polyDashPattern): New function. (perform): Delegate to polyDashPattern if the line style is not LineSolid. Also simplify now that anti-aliasing need no longer be taken into account. * java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Mention omission in commentary. * java/org/gnu/emacs/EmacsGC.java (EmacsGC): Disable anti-aliasing in default paint object. <line_style, line>: New fields. (markDirty): Apply stroke width. * src/android.c (android_init_emacs_gc_class): Initialize new fields. (android_create_gc, android_free_gc, android_change_gc) (android_set_dashes, android_get_gc_values): * src/androidgui.h (enum android_line_style) (enum android_gc_value_mask, struct android_gc): Introduce line style, width, dash offset and dash GC attributes. * src/androidterm.c (android_draw_dash, android_fill_underline) (android_draw_glyph_string): Port from X. * src/xterm.c (x_draw_dash): Delete redundant code.