summaryrefslogtreecommitdiff
path: root/src/composite.c
Commit message (Collapse)AuthorAge
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Avoid segfaults due to using fonts that were closedEli Zaretskii2020-10-26
| | | | | | | | | | * src/composite.c (composition_gstring_cache_clear_font): New function. * src/composite.h (composition_gstring_cache_clear_font): Add prototype. * src/font.c (font_clear_cache): When we are about to close a font, remove from the gstring cache any lgstring that uses this font. (Bug#42943)
* Improve support for shaping Egyptian HieroglyphsEli Zaretskii2020-10-25
| | | | | | | | | | | | | | | | * src/composite.c (composition_gstring_lookup_cache): Renamed from gstring_lookup_cache and made external. All callers changed. * src/composite.h (composition_gstring_lookup_cache): Add prototype. * src/font.c (Ffont_shape_gstring): Call composition_gstring_lookup_cache and return the cached composition if it is already in the cache. * lisp/language/misc-lang.el (egyptian-shape-grouping): New function. (composition-function-table): Use egyptian-shape-grouping in setting up compositions for Egyptian Hieroglyphs. Fix the composition setup for horizontal and vertical joiners.
* Merge from origin/emacs-27Glenn Morris2020-08-18
|\ | | | | | | | | cf0ee6f49b ; spelling fixes 16f4f26632 Fix startup working dir bug on NeXTSTEP
| * ; spelling fixesPaul Eggert2020-08-13
| |
* | Fix GC bugs related to uninitialized vectorsPaul Eggert2020-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid problems if GC occurs while initializing a vector. Problem with Fdelete reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2020-08/msg00313.html I looked for similar problems elsewhere and found quite a few. * src/coding.c (make_subsidiaries): * src/composite.c (syms_of_composite): * src/font.c (build_style_table, Ffont_get_glyphs): * src/nsselect.m (clean_local_selection_data): * src/nsxwidget.m (js_to_lisp): * src/syntax.c (init_syntax_once): * src/window.c (Fcurrent_window_configuration): * src/xselect.c (selection_data_to_lisp_data) (clean_local_selection_data): Use make_nil_vector instead of make_uninit_vector. * src/fns.c (Fdelete): * src/xwidget.c (webkit_js_to_lisp): Use allocate_nil_vector instead of allocate_vector. * src/search.c (Fnewline_cache_check): Use make_vector instead of make_uninit_vector.
* | Rehash hash tables eagerly after loading a dumpPip Cet2020-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies code, and helps performance in some cases (Bug#36597). * src/lisp.h (hash_rehash_needed_p): Remove. All uses removed. (hash_rehash_if_needed): Remove. All uses removed. (struct Lisp_Hash_Table): Remove comment about rehashing hash tables. * src/pdumper.c (thaw_hash_tables): New function. (hash_table_thaw): New function. (hash_table_freeze): New function. (dump_hash_table): Simplify. (dump_hash_table_list): New function. (hash_table_contents): New function. (Fdump_emacs_portable): Handle hash tables by eager rehashing. (pdumper_load): Restore hash tables. (init_pdumper_once): New function.
* | Merge from origin/emacs-27Glenn Morris2020-07-29
|\| | | | | | | | | | | 4b3085a7fe Fix last change efdd4632c9 Fix Arabic shaping when column-number-mode is in effect d5acc50941 Fix description of kmacro-* commands in the user manual
| * Fix last changeEli Zaretskii2020-07-25
| | | | | | | | | | * src/composite.c (composition_reseat_it): Fix of the commentary, and a minor change of the last fix.
| * Fix Arabic shaping when column-number-mode is in effectPip Cet2020-07-25
| | | | | | | | | | | | | | | | * src/indent.c (scan_for_column, compute_motion): Pass -1, instead of NEUTRAL_DIR, to 'composition_reseat_it'. * src/composite.c (composition_reseat_it): Interpret negative value of BIDI_LEVEL to mean the caller doesn't know what is the bidi direction of the text. (Bug#41005)
* | ; * src/composite.c (syms_of_composite): Fix last change.Eli Zaretskii2020-06-02
| |
* | Fix Arabic composition rulesEli Zaretskii2020-06-02
| | | | | | | | | | | | | | | | * lisp/language/misc-lang.el (composition-function-table): Reorder Arabic composition rules in descending order of lookback. * src/composite.c (syms_of_composite): Document the order of rules in 'composition-function-table'.
* | Prefer more inline functions in character.hPaul Eggert2020-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/buffer.h (fetch_char_advance, fetch_char_advance_no_check) (buf_next_char_len, next_char_len, buf_prev_char_len) (prev_char_len, inc_both, dec_both): New inline functions, replacing the old character.h macros FETCH_CHAR_ADVANCE, FETCH_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS, INC_POS, BUF_DEC_POS, DEC_POS, INC_BOTH, DEC_BOTH respectively. All callers changed. These new functions all assume buffer primitives and so need to be here rather than in character.h. * src/casefiddle.c (make_char_unibyte): New static function, replacing the old MAKE_CHAR_UNIBYTE macro. All callers changed. (do_casify_unibyte_string): Use SINGLE_BYTE_CHAR_P instead of open-coding it. * src/ccl.c (GET_TRANSLATION_TABLE): New static function, replacing the old macro of the same name. * src/character.c (string_char): Omit 2nd arg. 3rd arg can no longer be NULL. All callers changed. * src/character.h (SINGLE_BYTE_CHAR_P): Move up. (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE, PREV_CHAR_BOUNDARY) (STRING_CHAR_AND_LENGTH, STRING_CHAR_ADVANCE) (FETCH_STRING_CHAR_ADVANCE) (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE) (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE) (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH) (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS): Remove. (make_char_multibyte): New static function, replacing the old macro MAKE_CHAR_MULTIBYTE. All callers changed. (CHAR_STRING_ADVANCE): Remove; all callers changed to use CHAR_STRING. (NEXT_CHAR_BOUNDARY): Remove; it was unused. (raw_prev_char_len): New inline function, replacing the old PREV_CHAR_BOUNDARY macro. All callers changed. (string_char_and_length): New inline function, replacing the old STRING_CHAR_AND_LENGTH macro. All callers changed. (STRING_CHAR): Rewrite in terms of string_char_and_length. (string_char_advance): New inline function, replacing the old STRING_CHAR_ADVANCE macro. All callers changed. (fetch_string_char_advance): New inline function, replacing the old FETCH_STRING_CHAR_ADVANCE macro. All callers changed. (fetch_string_char_as_multibyte_advance): New inline function, replacing the old FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE macro. All callers changed. (fetch_string_char_advance_no_check): New inline function, replacing the old FETCH_STRING_CHAR_ADVANCE_NO_CHECK macro. All callers changed. * src/regex-emacs.c (HEAD_ADDR_VSTRING): Remove; no longer used. * src/syntax.c (scan_lists): Use dec_bytepos instead of open-coding it. * src/xdisp.c (string_char_and_length): Rename from string_char_and_length to avoid name conflict with new function in character.h. All callers changed.
* | Treat out-of-range positions consistentlyPaul Eggert2020-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a position argument to get-byte etc. is an out-of-range integer, treat it the same regardless of whether it is a fixnum or a bignum. * src/buffer.c (fix_position): New function. * src/buffer.c (validate_region): * src/character.c (Fget_byte): * src/coding.c (Ffind_coding_systems_region_internal) (Fcheck_coding_systems_region): * src/composite.c (Ffind_composition_internal): * src/editfns.c (Fposition_bytes, Fchar_after, Fchar_before) (Finsert_buffer_substring, Fcompare_buffer_substrings) (Fnarrow_to_region): * src/fns.c (Fsecure_hash_algorithms): * src/font.c (Finternal_char_font, Ffont_at): * src/fringe.c (Ffringe_bitmaps_at_pos): * src/search.c (search_command): * src/textprop.c (get_char_property_and_overlay): * src/window.c (Fpos_visible_in_window_p): * src/xdisp.c (Fwindow_text_pixel_size): Use it instead of CHECK_FIXNUM_COERCE_MARKER, so that the code is simpler and treats bignums consistently with fixnums. * src/buffer.h (CHECK_FIXNUM_COERCE_MARKER): Define here rather than in lisp.h, and reimplement in terms of fix_position so that it treats bignums consistently with fixnums. * src/lisp.h (CHECK_FIXNUM_COERCE_MARKER): Move to buffer.h. * src/textprop.c (validate_interval_range): Signal with original bounds rather than modified ones.
* | Merge from origin/emacs-27Glenn Morris2020-03-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a4e4510ccd Fix handling MS-Windows keyboard input above the BMP a38bebb0c1 * etc/NEWS: More complete description of rx 'not' changes. d373647e8f ; * doc/emacs/mini.texi (Yes or No Prompts): Fix last change. 1ca6d15656 * doc/emacs/mini.texi (Yes or No Prompts): 'y-or-n-p' now ... fe1a447d52 Don't attempt to cache glyph metrics for FONT_INVALID_CODE b42b894d1d Fix fit-frame-to-buffer for multi-monitor setup 366fd4fd07 (emacs-27) ; * etc/NEWS: Fix typo. 49d3cd90bd rx: Improve 'or' compositionality (bug#37659) 6b48aedb6b * lisp/tab-line.el: Fix auto-hscrolling (bug#39649) c5f255d681 (tag: emacs-27.0.90) ; Update lisp/ldefs-boot.el 60c84ad992 ; * etc/TODO: Fix last change. 5af9e5baad ; Add an entry to TODO d424195905 Fix rx charset generation 9908b5a614 Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e... 6dc2ebe00e Fix overquoting in mule.el 5cca73dd82 * src/timefns.c (time_arith): Omit incorrect comment. d767c357ca Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e... 4dec693f70 * lisp/vc/vc-cvs.el (vc-cvs-ignore): Copy-edit doc string ff729e3f97 ; bug#39779: Fix some typos in documentation. 696ee02c3a checkdoc: Don't mistake "cf." for sentence end # Conflicts: # etc/NEWS
| * Don't attempt to cache glyph metrics for FONT_INVALID_CODERobert Pluim2020-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was causing massive slowdown in redisplay when eg #xfe0f (VARIATION SELECTOR-16) was present, as the cache ended up very large, unused, and being recreated on every call to font_fill_lglyph_metrics (Bug#39133). * src/composite.c (fill_gstring_body): Hoist FONT_OBJECT_P check out of loop. Calculate glyph code and check for FONT_INVALID_CODE before calling font_fill_lglyph_metrics. Pass glyph code to it. * src/font.c (font_fill_lglyph_metrics): Add code parameter, move glyph code calculation up the call stack into fill_gstring_body. * src/font.h: Adjust font_fill_lglyph_metrics prototype.
* | Allow composition of pure-ASCII strings in the mode lineEli Zaretskii2020-02-08
|/ | | | | | * src/composite.c (Fcomposition_get_gstring): Allow unibyte strings if they are pure ASCII, by copying text into a multibyte string.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* lisp/*.el, src/*.c: Fix typos in docstringsJuanma Barranquero2019-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/apropos.el (apropos-do-all): * lisp/auth-source-pass.el (auth-source-pass--select-from-entries): * lisp/auth-source.el (auth-source-user-or-password): * lisp/calc/calc-forms.el (math-tzone-names): * lisp/calendar/diary-lib.el (diary-face-attrs) (diary-mark-entries-1): * lisp/cedet/cedet-files.el (cedet-files-list-recursively): * lisp/cedet/ede.el (ede-constructing, ede-deep-rescan): * lisp/cedet/ede/cpp-root.el (ede-cpp-root-header-file-p): * lisp/cedet/ede/proj.el (ede-proj-target-makefile): * lisp/cedet/inversion.el (inversion-check-version) (inversion-test): * lisp/cedet/mode-local.el (mode-local-map-file-buffers): * lisp/cedet/semantic/complete.el (semantic-displayer-ghost): * lisp/cedet/semantic/db-find.el (semanticdb-find-translate-path-default): * lisp/cedet/semantic/db.el (semanticdb-table) (semanticdb-search-system-databases): * lisp/cedet/semantic/imenu.el (semantic-imenu-index-directory): * lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map): * lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-use-headers-flag): * lisp/cedet/semantic/lex.el (semantic-lex-make-keyword-table) (semantic-lex-make-type-table, semantic-lex-debug-analyzers): * lisp/cedet/semantic/tag-ls.el (semantic-tag-abstract-p) (semantic-tag-leaf-p, semantic-tag-static-p) (semantic-tag-prototype-p): * lisp/dnd.el (dnd-open-remote-file-function, dnd-open-local-file): * lisp/emacs-lisp/eieio-opt.el (eieio-build-class-alist) (eieio-read-class, eieio-read-subclass): * lisp/emacs-lisp/generator.el (cps--replace-variable-references) (cps--handle-loop-for): * lisp/erc/erc-dcc.el (erc-dcc-list, erc-dcc-member, erc-dcc-server) (erc-dcc-auto-mask-p, erc-dcc-get-file, erc-dcc-chat-accept): * lisp/eshell/em-pred.el (eshell-pred-file-type): * lisp/faces.el (defined-colors-with-face-attributes): * lisp/font-core.el (font-lock-mode): * lisp/frame.el (frame-restack): * lisp/net/shr.el (shr-image-animate): * lisp/org/org-agenda.el (org-agenda-change-all-lines) (org-agenda-today-p): * lisp/org/org-id.el (org-id-get): * lisp/org/org.el (org-highlight-latex-and-related) (org--valid-property-p): * lisp/org/ox-beamer.el (org-beamer--get-label): * lisp/org/ox-latex.el (org-latex--caption-above-p): * lisp/org/ox-odt.el (org-odt--copy-image-file) (org-odt--copy-formula-file): * lisp/org/ox.el (org-export-with-timestamps): * lisp/progmodes/verilog-mode.el (verilog-indent-declaration-macros): * lisp/ses.el (ses-file-format-extend-parameter-list): * lisp/term.el (ansi-term): * lisp/textmodes/bibtex.el (bibtex-no-opt-remove-re) (bibtex-beginning-of-first-entry, bibtex-autokey-get-title) (bibtex-read-key, bibtex-initialize): * lisp/textmodes/flyspell.el (flyspell-word): * lisp/view.el (view-mode-exit): * src/composite.c: * src/floatfns.c (Fisnan): Fix typos in docstrings.
* Allow Zs characters to be composedEli Zaretskii2019-09-07
| | | | | | | | * src/composite.c (char_composable_p): Allow SPC and other Zs characters to be composed. * lisp/composite.el (compose-gstring-for-graphic): Don't reject characters whose general category is Zs. (Bug#14461)
* Fix crash if user test munges hash tablePaul Eggert2019-07-20
| | | | | | | | | | | | | | | | | * src/fns.c (restore_mutability) (hash_table_user_defined_call): New functions. (cmpfn_user_defined, hashfn_user_defined): Use them. (make_hash_table, copy_hash_table): Mark new hash table as mutable. (check_mutable_hash_table): New function. (Fclrhash, Fputhash, Fremhash): Use it instead of CHECK_IMPURE. * src/lisp.h (struct hash_table_test): User-defined functions now take pointers to struct Lisp_Hash_Table, not to struct hash_table_test. All uses changed. (struct Lisp_Hash_Table): New member ‘mutable’. * src/pdumper.c (dump_hash_table): Copy it. * test/src/fns-tests.el (test-hash-function-that-mutates-hash-table): New test, which tests for the bug.
* Simplify hashfn/cmpfn calling conventionPaul Eggert2019-07-20
| | | | | | | | | | | | | | | | * src/fns.c (cmpfn_eql, cmpfn_equal, cmpfn_user_defined) (hashfn_eq, hashfn_equal, hashfn_eql, hashfn_user_defined): * src/profiler.c (cmpfn_profiler, hashfn_profiler): Use new calling convention where the return value is a fixnum instead of EMACS_UINT. While we’re at it, put the hash table at the end, since that’s a bit simpler and generates better code (at least on the x86-64). All callers changed. * src/fns.c (hash_lookup): Store fixnum rather than EMACS_UINT. All callers changed. (hash_put): Take a fixnum rather than an EMACS_UINT. All callers changed. Remove unnecessary eassert (XUFIXNUM does it). * src/lisp.h (struct hash_table_test): Adjust signatures of cmpfn and hashfn.
* Merge branch 'master' into harfbuzzYAMAMOTO Mitsuharu2019-04-27
|\
| * Rename generic x_* procedures in xdisp.cAlexander Gramiak2019-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (x_consider_frame_title, x_get_glyph_overhangs) (x_produce_glyphs, x_write_glyphs, x_insert_glyphs) (x_clear_end_of_line), x_fix_overlapping_area) (x_update_cursor, x_clear_cursor, x_clear_window_mouse_face) (x_draw_vertical_border, x_draw_right_divider, x_draw_bottom_divider) (x_intersect_rectangles): Rename with a gui prefix to indicate non-X-specific functionality. * src/composite.c: * src/dispextern.h: * src/nsfns.m: * src/nsterm.m: * src/w32fns.c: * src/w32term.c: * src/window.c: * src/xfns.c: * src/xterm.c: Use the renamed procedures.
| * Simplify fill_gstring_headerPaul Eggert2019-04-07
| | | | | | | | | | | | | | * src/composite.c (fill_gstring_header): Omit first argument HEADER, since in practice it is always nil. Change caller to match. Help the compiler by telling it LEN is nonnegative. Problem found with --enable-gcc-warnings and gcc -O2 -Og.
| * Add portable dumperDaniel Colascione2019-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new portable dumper as an alternative to unexec. Use it by default. * src/dmpstruct.awk: New file. * src/doc.c (get_doc_string): use will_dump_p(). * src/editfns.c (styled_format): silence compiler warning with UNINIT. * src/emacs-module.c (syms_of_module): staticpro ltv_mark. * src/emacs.c (gflags): new variable. (init_cmdargs): unwrap (string_starts_with_p, find_argument, dump_error_to_string) (load_pdump): new functions. (main): detect pdumper and --temacs invocation; actually load portable dump when detected; set gflags as appropriate; changes to init functions throughout to avoid passing explicit 'initialized' argument. * src/eval.c (inhibit_lisp_code): remove unused variable. (init_eval_once_for_pdumper): new function. (init_eval_once): call it. * src/filelock.c: CANNOT_DUMP -> will_dump_p() * src/fingerprint-dummy.c: new file * src/fingerprint.h: new file * src/fns.c: CANNOT_DUMP -> will_dump_p(), etc. (weak_hash_tables): remove (hashfn_equal, hashfn_eql): un-staticify (make_hash_table): set new 'next_weak' hash table field; drop global weak_hash_tables logic. (copy_hash_table): drop global weak_hash_tables logic. (hash_table_rehash): new function. (hash_lookup, hash_put, hash_remove_from_table, hash_clear): rehash if needed. (sweep_weak_table): un-staticify; explain logic; bool-ify. (sweep_weak_hash_tables): remove function. * src/font.c (syms_of_font): remember pdumper stuff. * src/fontset.c (syms_of_fontset): remember pdumper stuff. * src/frame.c (make_initial_frame): don't reset Vframe_list. (init_frame_once_for_pdumper, init_frame_once): new functions. (syms_of_frame): remove redundant staticpro. * src/fringe.c (init_fringe_once_for_pdumper): new functin. (init_fringe_once): call it. * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper): new function. (syms_of_ftcrfont): call it. * src/ftfont.c (syms_of_ftfont_for_pdumper): new function. (syms_of_ftfont): call it. * src/ftxont.c (syms_of_ftxfont_for_pdumper): new function. (syms_of_ftxfont): call it. * src/gmalloc.c: adjust for pdumper througout (DUMPED): remove weird custom dumped indicator. * src/gnutls.c (syms_of_gnutls): pdumper note for gnutls_global_initialized. * src/image.c (syms_of_image): add pdumper comment, initializer note. * src/insdel.c (prepare_to_modify_buffer_1): account for buffer contents possibly being in dump image. * src/keyboard.c (syms_of_keyboard_for_pdumper): new function. (syms_of_keyboard): staticpro more; call pdumper syms function. * src/lisp.h: add comments throughout (gflags): declare. (will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p) (dumped_with_pdumper_p, will_dump_with_unexec_p) (dumped_with_unexec_p, definitely_will_not_unexec_p): new functions. (POWER_OF_2, ROUNDUP): move macros. (PSEUDOVECTOR_TYPE, PSEUDOVECTOR_TYPEP): take vectorlike header pointer instead of vector; constify. (Lisp_Hash_Table): add comment about need to rehash on access; add comment for next_weak. (HASH_KEY, HASH_VALUE, HASH_HASH, HASH_TABLE_SIZE): const-ify. (hash_table_rehash): declare. (hash_rehash_needed_p, hash_rehash_if_needed): new functions. (finalizers, doomed_finalizers): declare extern. (SUBR_SECTION_ATTRIBUTE): new macro. (staticvec, staticidx): un-static-ify. (sweep_weak_hash_tables): remove declaration. (sweep_weak_table): declare. (hashfn_eql, hashfn_equal): declare. (number_finalizers_run): new variable. (Vdead): externify when ENABLE_CHECKING. (gc_root_type): new enumeration. (gc_root_visitor): new struct. (visit_static_gc_roots): declare. (vectorlike_nbytes): declare. (vector_nbytes): define as trivial inline function wrapper for vectorlike_nbytes. (init_obarray_once): change signature. (primary_thread): extern-ify. (init_buffer): change signature. (init_frame_once): declare. * src/lread.c (readevalloop): adjust for new dumped predicates. (init_obarray_once): new function. (ndefsubr): new variable. (defsubr): increment it. (load_path_check): adjust for pdumper. (load_path_default): use pdumper functions; adjust for dump search. * src/macfont.m (macfont_init_font_change_handler): avoid shadowing global. (syms_of_macfont_for_pdumper): new function. (syms_of_macfont): call it. * src/menu.c (syms_of_menu): staticpro more stuff. * src/minibuf.c (Ftry_completion): rehash if needed. (init_minibuf_once_for_pdumper): new function. (init_minibuf_once): call it. * src/nsfont.m (syms_of_nsfns): staticpro more. * src/nsfont.m (syms_of_nsfont_for_pdumper): new function. (syms_of_nsfont): call it. * src/nsterm.m (syms_of_nsfont): remember pdumper stuff. * src/pdumper.c: new file. * src/pdumper.h: new file. * src/process.c (init_process_emacs): use new pdumper functions instead of CANNOT_DUMP. * src/profiler.c (syms_of_profiler_for_pdumper): new function. (syms_of_profiler_for_pdumper): call it. * src/search.c (syms_of_search_for_pdumper): new function. (syms_of_search_for_pdumper): call it. * src/sheap.c (bss_sbrk_did_unexec): remove. * src/sheap.h (bss_sbrk_did_unexec): remove. * src/syntax.c (syms_of_syntax): don't redundantly staticpro re_match_object. * src/sysdep.c: use will_dump_with_unexec_p() instead of bss hack thing. * src/syssignals.h (init_sigsegv): declare. * src/systime.h (init_timefns): remove bool from signature. * src/textprop.c (syms_of_textprop): move staticpro. * src/thread.c (main_thread_p): constify. * src/thread.h (main_thread_p): constify. * src/timefns.c (init_timefns): remove bool from signature. (syms_of_timefns_for_pdumper): new function. (syms_of_timefns): call it. * src/w32.c: rearrange code. * src/w32.h (w32_relocate): declare. * src/w32fns.c (syms_of_w32fns): add pdumper note. * src/w32font.c (syms_of_w32font_for_pdumper): new function. (syms_of_w32font): call it. * src/w32heap.c (using_dynamic_heap): new variable. (init_heap): use it. * src/w32menu.c (syms_of_w32menu): add pdumper note. * src/w32proc.c (ctrl_c_handler, mainCRTStartup, _start, open_input_file) (rva_to_section, close_file_data): move here. * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper): new function. (syms_of_w32uniscribe): call it. * src/window.c (init_window_once_for_pdumper): new function. (init_window_once): call it; staticpro more stuff. * src/xfont.c (syms_of_xfont_for_pdumper): new function. (syms_of_xfont): call it. * src/xftfont.c (syms_of_xftfont_for_pdumper): new function. (syms_of_xftfont): call it. * src/xmenu.c (syms_of_xmenu_for_pdumper): new function. (syms_of_xmenu): call it. * src/xselect.c (syms_of_xselect_for_pdumper): new function. (syms_of_xselect): call it. * src/xsettings.c (syms_of_xsettings): add more pdumper notes. * src/term.c (syms_of_xterm): add pdumper note. * src/dispnew.c (init_faces_initial): new function. (init_display_interactive): rename from init_display; use will_dump_p instead of !initialized. Initialize faces early for pdumper if needed. (init_display): new function. (syms_of_display_for_pdumper): new function. (syms_of_display): call it. * src/dbusbind.c (syms_of_dbusbind): Add TODO for bus reset on pdumper load. * src/data.c (Fdefalias): Use will_dump_p instead of Vpurify_flag. (Fmake_variable_buffer_local): silence compiler warning with -Og by making valcontents UNINIT. (arith_driver): silence compiler warning with UNINIT. * src/conf_post.h (ATTRIBUTE_SECTION): new macro. * src/composite.c (composition_gstring_put_cache): rehash hash table if needed. * src/coding.c (init_coding_once, syms_of_coding): remember pdumper stuff. * src/charset.h (charset_table_size, charset_table_user): declare. * src/charset.c (charset_table_used, charset_table_size): un-static. (init_charset_oncem, syms_of_charset): remember pdumper stuff. * src/category.c (category_table_version): remove obsolete variable. * src/callint.c (syms_of_callint): staticpro 'preserved_fns' (init_callproc): use will_dump_p instead of !CANNOT_DUMP. * src/bytecode.c (exec_byte_code): rehash table tables if needed * src/buffer.c (alloc_buffer_text, free_buffer_text): account for pdumper (init_buffer_once): add TODO; remember stuff for pdumper. (init_buffer): don't take initialized argument; adjust for pdumper. * src/atimer.c (init_atimer): initialize subr only if !initialized. * src/alloc.c: (vector_marked_p, set_vector_marked) (vectorlike_marked_p, set_vectorlike_marked, cons_marked_p) (set_cons_marked, string_marked_p, set_string_marked) (symbol_marked_p, set_symbol_marked, interval_marked_p) (set_interval_marked): new accessor routines. Use them instead of raw GC access throughout. (Vdead): make non-static when ENABLE_CHECKING. (vectorlike_nbytes): rename of 'vector_nbytes'; take a vectorlike header as input instead of a vector. (number_finalizers_run): new internal C variable. (mark_maybe_object): check for pdumper objects. (valid_pointer_p): don't be gratuitously inefficient under rr(1). (make_pure_c_string): add support for size_byte = -2 mode indicating that string data points into Emacs image rodata. (visit_vectorlike_root): visits GC roots embedded in vectorlike objects. (visit_buffer_root): visits GC roots embedded in our totally-not-a-buffer buffer global objects. (visit_static_gc_roots): visit GC roots in the Emacs data section. (mark_object_root_visitor): root callback used for conventional GC marking (weak_hash_tables): new internal variable for tracking found weak hash tables during GC. (mark_and_sweep_weak_table_contents): new weak hash table marking. (garbage_collect_1): use new GC root visitor machinery. (mark_vectorlike): accept a vectorlike_header instead of a Lisp_Vector. (mark_frame, mark_window, mark_hash_table): new functions. (mark_object): initialize 'm'; check for pdumper objects and use new mark-bit accessors throughout. Remove some object-specific marking code and move to helper functions above. (survives_gc_p): check for pdumper objects. (gc-sweep): clear pdumper mark bits. (init_alloc_once_for_pdumper): new helper function for early init called both during normal init and pdumper load. (init_alloc_once): pdumper integration. * src/Makefile.in: Rewrite dumping for pdumper; add pdumper.o; invoke temacs with --temacs command line option; build dmpstruct.h from dmpstruct.awk; stop relying on CANNOT_DUMP; clean up pdumper intermediate files during build. * nextstep/Makefile.in: build emacs.pdmp into NS packages * lisp/startup.el: account for new '--temacs' and '--dump-file' command line option. * lisp/loadup.el: rewrite early init to account for pdumper; use injected 'dump-mode' variable (set via the new '--temacs' option) instead of parsing command line. * lisp/cus-start.el: Check 'dump-mode' instead of 'purify-flag', since the new 'dump-mode' * lib-src/make-fingerprint.c: new program * lib-src/Makefile.in: built make-fingerprint utility program * configure.ac: Add --with-pdumper toggle to control pdumper support; add --with-unexec toggle to control unexec support. Add --with-dumping option to control which dumping strategy we use by default. Adjust for pdumper throughout. Check for posix_madvise. * Makefile.in: Add @DUMPING@ substitution; add pdumper mode. * .gitignore: Add make-fingerprint, temacs.in, fingerprint.c, dmpstruct.h, and pdumper dump files.
| * Merge from origin/emacs-26Paul Eggert2018-12-31
| |\ | | | | | | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| | * Update copyright year to 2019Paul Eggert2019-01-01
| | | | | | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | | We need the bidi level not the paragraph directionKhaled Hosny2019-01-05
| | |
* | | ; Fix last change in src /composite.c.Eli Zaretskii2019-01-02
| | |
* | | Fix text direction of the HarfBuzz shaping bufferEli Zaretskii2019-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/indent.c (scan_for_column, compute_motion): * src/xdisp.c (CHAR_COMPOSED_P): Pass PDIR argument to composition_reseat_it. * src/composite.c (composition_reseat_it): Accept an additional argument PDIR that provides the current paragraph's base direction; all callers changed. Use PDIR to fix calculation of the DIRECTION argument to autocmp_chars. (Bug#33944) * src/composite.h: Include dispextern.h. (composition_reseat_it): Update prototype.
* | | Provide text directionality and language to HarfBuzz shaperEli Zaretskii2018-12-29
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/language/tv-util.el (tai-viet-composition-function): * lisp/language/ethio-util.el (ethio-composition-function): * lisp/language/japanese.el (compose-gstring-for-variation-glyph): * lisp/language/thai-util.el (thai-composition-function): * lisp/language/misc-lang.el (arabic-shape-gstring): * lisp/language/lao-util.el (lao-composition-function): * lisp/language/hebrew.el (hebrew-shape-gstring): * lisp/composite.el (compose-gstring-for-graphic) (compose-gstring-for-dotted-circle, auto-compose-chars) (compose-gstring-for-terminal): Accept 2nd argument DIRECTION; all callers changed. * src/composite.c (composition_reseat_it): Call auto-composition-function with one more argument DIRECTION. (syms_of_composite) <auto-composition-function>: Update the doc string. * src/ftfont.c (ftfont_shape_by_hb): Compute language and direction, and set buffer properties accordingly. * src/composite.c (autocmp_chars): * src/w32uniscribe.c (uniscribe_shape): * src/xftfont.c (xftfont_shape): * src/ftfont.c (ftfont_shape, ftfont_shape_by_hb): * src/font.c (Ffont_shape_gstring): Accept an additional argument DIRECTION. * src/macfont.m (lgstring_direction): New enum. (mac_font_shape_1, mac_screen_font_shape, mac_font_shape): Accept an additional argument specifying text direction. All callers changed. * src/font.c (syms_of_font): New symbols QL2R and QR2L. * src/font.h (shape): Accept new argument DIRECTION. All implementations changed. (Bug#33729) (ftfont_shape): Update prototype.
* | Add make_vector and make_nil_vectorPaul Eggert2018-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the callers a bit easier to read, and doubtless improves efficiency very slightly. It also simplifies possible future changes to allow bignum indexes to buffers. * src/alloc.c (allocate_vectorlike): Prefer ptrdiff_t to size_t when either will do. (make_vector): New function. (Fmake_vector): Use it. * src/buffer.c (syms_of_buffer): * src/bytecode.c (syms_of_bytecode): * src/category.c (Fmake_category_table, init_category_once): * src/ccl.c (syms_of_ccl): * src/character.c (syms_of_character): * src/charset.c (Fdefine_charset_internal) (Ffind_charset_region, Ffind_charset_string): * src/chartab.c (copy_char_table): * src/coding.c (Fdefine_coding_system_internal, syms_of_coding): * src/composite.c (get_composition_id, Fcomposition_get_gstring): * src/composite.h (LGLYPH_NEW): * src/fns.c (concat, Flocale_info, make_hash_table): * src/font.c (font_otf_ValueRecord, font_otf_anchor) (build_style_table, syms_of_font): * src/fontset.c (RFONT_DEF_NEW, fontset_find_font) (dump_fontset, syms_of_fontset): * src/image.c (xpm_make_color_table_v): * src/keyboard.c (modify_event_symbol, menu_bar_items) (parse_menu_item, parse_tool_bar_item, init_tool_bar_items) (syms_of_keyboard): * src/keymap.c (Fdefine_key, describe_map, describe_vector): * src/lread.c (read_vector): * src/macfont.m (macfont_shape): * src/menu.c (init_menu_items): * src/nsfns.m (ns_make_monitor_attribute_list): * src/process.c (conv_sockaddr_to_lisp, network_interface_info): * src/profiler.c (make_log): * src/window.c (Fcurrent_window_configuration): * src/xdisp.c (with_echo_area_buffer_unwind_data) (format_mode_line_unwind_data): * src/xfaces.c (Finternal_make_lisp_face) (Fface_attributes_as_vector): * src/xfns.c (x_make_monitor_attribute_list) (Fx_display_monitor_attributes_list): * src/xfont.c (syms_of_xfont): * src/xselect.c (x_handle_dnd_message): * src/xwidget.c (save_script_callback): Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil). * src/callint.c (Fcall_interactively): * src/charset.c (load_charset_map): * src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric): * src/composite.c (get_composition_id) * src/dispnew.c (Fframe_or_buffer_changed_p) (syms_of_display): * src/fns.c (make_hash_table, maybe_resize_hash_table): * src/font.c (font_style_to_value): * src/fontset.c (FONTSET_ADD, fontset_add): * src/json.c (json_to_lisp): * src/keymap.c (syms_of_keymap): * src/lread.c (init_obarray): * src/profiler.c (make_log, Fprofiler_cpu_log): * src/term.c (term_get_fkeys_1): Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V). * src/font.c (build_style_table): * src/macfont.m (macfont_shape): * src/process.c (conv_sockaddr_to_lisp, network_interface_info): Prefer make_uninit_vector if the vector will be initialized soon. * src/lisp.h (make_nil_vector): New function.
* | More macro renamings for bignumTom Tromey2018-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c, src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c, src/category.c, src/ccl.c, src/character.c, src/character.h, src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c, src/composite.c, src/composite.h, src/data.c, src/dbusbind.c, src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c, src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c, src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c, src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c, src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c, src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c, src/indent.c, src/insdel.c, src/intervals.c, src/json.c, src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c, src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c, src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c, src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h, src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c, src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
* | Rename integerp->fixnum, etc, in preparation for bignumsTom Tromey2018-07-12
|/ | | | | | | | | | | | | | | | | * src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c, src/sound.c, src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c, src/textprop.c, src/undo.c, src/w16select.c, src/w32.c, src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c, src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c, src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM, make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP, NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
* Update copyright year to 2018Paul Eggert2018-01-01
| | | | Run admin/update-copyright.
* ; * src/composite.c (Fclear_composition_cache): Fix last change.Eli Zaretskii2017-10-15
|
* Improve customization of arabic-shaper-ZWNJ-handling.K. Handa2017-10-15
| | | | | | | | | Make the effect of customizing arabic-shaper-ZWNJ-handling appear immediately. * lisp/language/misc-lang.el (arabic-shaper-ZWNJ-handling): Add :set value. * src/composite.c (Fclear_composition_cache): New function. (syms_of_composite): Defsubr it.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Pacify --enable-gcc-warnings --with-x-toolkit=noPaul Eggert2017-05-17
| | | | | * src/composite.c (autocmp_chars) [!HAVE_WINDOW_SYSTEM]: Avoid unused local.
* Fix a few integer-overflow glitchesPaul Eggert2017-02-10
| | | | | | | | | | * src/composite.c (composition_compute_stop_pos, composition_reseat_it): * src/dispextern.h (struct composition_it.rule_idx): * src/keyboard.c (Fset__this_command_keys): * src/xwidget.c (webkit_js_to_lisp): Don’t assume object sizes fit in ‘int’. * src/xwidget.c (Fxwidget_resize): Don’t assume Emacs integers fit in ‘int’.
* Fix compilation --without-xEli Zaretskii2017-01-02
| | | | | * src/composite.c (autocmp_chars) [HAVE_WINDOW_SYSTEM]: Call font_range only if it is compiled in. (Bug#25334)
* Merge from origin/emacs-25Paul Eggert2017-01-01
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-31
| | | | | | | | Run admin/update-copyright.
* | Port to ISO/IEC TS 18661-1:2014Paul Eggert2016-09-13
| | | | | | | | | | * src/character.h (CHARACTER_WIDTH): Rename from CHAR_WIDTH. All uses changed.
* | Improve --without-x GCC pacificationPaul Eggert2016-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/composite.c (autocmp_chars): * src/conf_post.h (DebPrint) [HAVE_NTGUI && !DebPrint && !EMACSDEBUG]: Use simpler ((void) 0) for no-op expression returning void. * src/dispextern.h [HAVE_WINDOW_SYSTEM]: Include fontset.h, for face_for_char. (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_FOR_CHAR): Now inline functions instead of macros. This avoids the need for all those casts to void. (FACE_SUITABLE_FOR_ASCII_CHAR_P): Omit 2nd (unused) arg. All uses changed. * src/frame.c (Ficonify_frame, Fset_frame_position): * src/xdisp.c (Fmove_point_visually, show_mouse_face): * src/xdisp.c (note_mode_line_or_margin_highlight) (note_mouse_highlight): Assume HAVE_WINDOW_SYSTEM for simplicity, since the code should now work either way without generating warnings. * src/frame.c (display_available) [HAVE_WINDOW_SYSTEM]: New function. (window_system_available) [HAVE_WINDOW_SYSTEM]: Move to frame.h. (decode_window_system_frame): Use check_window_system instead of rolling the code ourself. Return needed only if HAVE_WINDOW_SYSTEM. (decode_window_system_frame, check_window_system): Merge the HAVE_WINDOW_SYSTEM and !HAVE_WINDOW_SYSTEM versions into one. * src/frame.c (Ficonify_frame, Fset_frame_position): * src/xdisp.c (show_mouse_face, define_frame_cursor1) (note_mouse_highlight): Narrow the scope of the HAVE_WINDOW_SYSTEM #ifdef; this is a better way to pacify GCC. * src/xdisp.c (x_set_left_fringe, x_set_right_fringe) (x_set_right_divider_width, x_set_bottom_divider_width): * src/xfns.c (x_set_internal_border_width): Don’t use what are now function calls as lvalues. * src/frame.h (WINDOW_SYSTEM_RETURN): New macro. (decode_window_system_frame, check_window_system): Use it, to avoid the need for duplicate declarations. (window_system_available): Now an inline function. (display_available): New decl. (frame_dimension): New inline function. (FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH) (FRAME_RIGHT_FRINGE_WIDTH, FRAME_TOTAL_FRINGE_WIDTH) (FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH) (FRAME_BOTTOM_DIVIDER_WIDTH): Use it, to avoid the need for duplicate definitions. Now inline functions instead of macros. * src/gnutls.c (gnutls_log_function2i): Remove. * src/gnutls.h (GNUTLS_LOG2i): Use ‘message’ directly. This avoids complaints about gnutls_log_function2i being defined and not used on older platforms that do not need to call GNUTLS_LOG2i. * src/image.c (DefaultDepthOfScreen) [0]: Remove unused macro. * src/lisp.h (AUTO_STRING_WITH_LEN): Revert change from ‘type id = expr’ to ‘type id; id = expr’, as this would suppress valid jump-misses-init diagnostics. Let’s find a better way to address the problem. * src/vm-limit.c (__MALLOC_HOOK_VOLATILE): Define only if needed. * src/xdisp.c (handle_single_display_spec): Simplify fringe_bitmap computation. (define_frame_cursor1): Do nothing unless in a window system. All callers changed and simplified. * src/xfaces.c (realize_default_face): Use a simpler way to pacify GCC when a return value is not used on some platforms.
* | Fix compiler warnings in no-window-system-buildKen Brown2016-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/composite.c (autocmp_chars): Declare and set 'f' only if HAVE_WINDOW_SYSTEM. * src/dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P) (FACE_FOR_CHAR): Explicitly discard unused arguments. * src/font.c (font_open_entity): Declare 'min_width' where it is first set, and only if HAVE_WINDOW_SYSTEM. * src/frame.c [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame): Define _Noreturn version to avoid "suggest attribute noreturn" compiler warning. (check_window_system): Declare as _Noreturn. (Ficonify_frame): (Fset_frame_position): Don’t declare and set 'f'. * src/frame.h [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame) (check_window_system): Add _Noreturn prototypes. (FRAME_FRINGE_COLS, FRAME_TOTAL_FRINGE_WIDTH) (FRAME_LEFT_FRINGE_WIDTH, FRAME_RIGHT_FRINGE_WIDTH) (FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH) (FRAME_BOTTOM_DIVIDER_WIDTH): Explicitly discard unused argument. * src/xdisp.c (handle_single_display_spec): Declare 'fringe_bitmap' only if HAVE_WINDOW_SYSTEM. (append_space_for_newline): Declare 'g' where it is first set. (Fmove_point_visually): Declare and set 'target_is_eol_p' only if HAVE_WINDOW_SYSTEM. (show_mouse_face): Declare and set 'f' and 'phys_cursor_on_p' only if HAVE_WINDOW_SYSTEM. (note_mode_line_or_margin_highlight): (note_mouse_highlight): Declare and set 'cursor' and 'pointer' only if HAVE_WINDOW_SYSTEM. * src/xfaces.c (realize_default_face): Declare and set 'face' only if HAVE_X_WINDOWS. Remove redundant #ifdef.
* | Replace IF_LINT by NONVOLATILE and UNINITPaul Eggert2016-06-08
|/ | | | | | | Inspired by a suggestion from RMS in: http://bugs.gnu.org/23640#58 * .dir-locals.el (c-mode): Adjust to macro changes. * src/conf_post.h (NONVOLATILE, UNINIT): New macros (Bug#23640). (IF_LINT): Remove. All uses replaced by the new macros.
* Rework C source files to avoid ^(Paul Eggert2016-03-10
| | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.