1. 01 Jan, 2020 1 commit
  2. 19 Sep, 2019 1 commit
    • Juanma Barranquero's avatar
      lisp/*.el, src/*.c: Fix typos in docstrings · 79a01866
      Juanma Barranquero authored
      * 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.
      79a01866
  3. 07 Sep, 2019 1 commit
    • Eli Zaretskii's avatar
      Allow Zs characters to be composed · 7eaca940
      Eli Zaretskii authored
      * 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)
      7eaca940
  4. 21 Jul, 2019 2 commits
    • Paul Eggert's avatar
      Fix crash if user test munges hash table · 515afc9c
      Paul Eggert authored
      * 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.
      515afc9c
    • Paul Eggert's avatar
      Simplify hashfn/cmpfn calling convention · b6f194a0
      Paul Eggert authored
      * 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.
      b6f194a0
  5. 26 Apr, 2019 1 commit
    • Alexander Gramiak's avatar
      Rename generic x_* procedures in xdisp.c · ff4e31fa
      Alexander Gramiak authored
      * 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.
      ff4e31fa
  6. 07 Apr, 2019 1 commit
    • Paul Eggert's avatar
      Simplify fill_gstring_header · 404a5470
      Paul Eggert authored
      * 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.
      404a5470
  7. 15 Jan, 2019 1 commit
    • Daniel Colascione's avatar
      Add portable dumper · d12e5d00
      Daniel Colascione authored
      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.
      d12e5d00
  8. 05 Jan, 2019 1 commit
  9. 02 Jan, 2019 2 commits
    • Eli Zaretskii's avatar
      ; Fix last change in src /composite.c. · f7ccac9f
      Eli Zaretskii authored
      f7ccac9f
    • Eli Zaretskii's avatar
      Fix text direction of the HarfBuzz shaping buffer · 1cef2d7c
      Eli Zaretskii authored
      * 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.
      1cef2d7c
  10. 01 Jan, 2019 1 commit
  11. 29 Dec, 2018 1 commit
    • Eli Zaretskii's avatar
      Provide text directionality and language to HarfBuzz shaper · 48776b70
      Eli Zaretskii authored
      * 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.
      48776b70
  12. 09 Dec, 2018 1 commit
    • Paul Eggert's avatar
      Add make_vector and make_nil_vector · d79bb756
      Paul Eggert authored
      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.
      d79bb756
  13. 08 Aug, 2018 1 commit
    • Tom Tromey's avatar
      More macro renamings for bignum · d1ec3a0a
      Tom Tromey authored
      * 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.
      d1ec3a0a
  14. 13 Jul, 2018 1 commit
    • Tom Tromey's avatar
      Rename integerp->fixnum, etc, in preparation for bignums · 42fe787b
      Tom Tromey authored
      * 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.
      42fe787b
  15. 01 Jan, 2018 1 commit
  16. 15 Oct, 2017 2 commits
  17. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      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.
      bc511a64
  18. 17 May, 2017 1 commit
  19. 10 Feb, 2017 1 commit
    • Paul Eggert's avatar
      Fix a few integer-overflow glitches · abcba32c
      Paul Eggert authored
      * 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’.
      abcba32c
  20. 02 Jan, 2017 1 commit
  21. 01 Jan, 2017 1 commit
  22. 13 Sep, 2016 1 commit
  23. 22 Jun, 2016 1 commit
    • Paul Eggert's avatar
      Improve --without-x GCC pacification · 1c019905
      Paul Eggert authored
      * 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.
      1c019905
  24. 21 Jun, 2016 1 commit
    • Ken Brown's avatar
      Fix compiler warnings in no-window-system-build · d4c1535c
      Ken Brown authored
      * 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.
      d4c1535c
  25. 08 Jun, 2016 1 commit
  26. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      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.
      7352c6c6
  27. 01 Jan, 2016 1 commit
  28. 21 Oct, 2015 1 commit
    • Paul Eggert's avatar
      Include-file cleanup for src directory · 63cfb75f
      Paul Eggert authored
      Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707).
      In a few cases, add ‘#include "foo.h"’ if the file needs foo.h
      but does not include it directly.  As a general rule, a source
      file should include foo.h if it needs the interfaces that foo.h
      defines.
      * src/alloc.c: Don’t include process.h.  Include dispextern.h,
      systime.h.
      * src/atimer.c: Don’t include blockinput.h.
      * src/buffer.c: Include coding.h, systime.h.  Don’t include
      keyboard.h, coding.h.
      * src/callint.c: Don’t include commands.h, keymap.h.
      * src/callproc.c: Don’t include character.h, ccl.h, composite.h,
      systty.h, termhooks.h.
      * src/casetab.c: Don’t include character.h.
      * src/category.c: Don’t include charset.h, keymap.h.
      * src/ccl.h: Don’t include character.h.
      * src/character.c: Don’t include charset.h.
      * src/charset.c: Don’t include disptab.h.
      * src/chartab.c: Don’t include ccl.h.
      * src/cm.c: Don’t include frame.h, termhooks.h.
      * src/cmds.c: Don’t include window.h, dispextern.h.
      * src/coding.c: Don’t include window.h, frame.h.
      * src/composite.c: Include composite.h.  Don’t include window.h,
      font.h.
      * src/data.c: Don’t include syssignal.h, termhooks.h, font.h.
      * src/dbusbind.c: Don’t include frame.h.
      * src/decompress.c: Don’t include character.h.
      * src/dired.c: Don’t include character.h, commands.h, charset.h.
      * src/dispnew.c: Don’t include character.h, indent.h, intervals.h,
      process.h, timespec.h.  Include systime.h.
      * src/doc.c: Include coding.h.  Don’t include keyboard.h.
      * src/editfns.c: Include composite.h.  Don’t include frame.h.
      * src/emacs.c: Include fcntl.h, coding.h.  Don’t include
      commands.h, systty.h..
      * src/fileio.c: Don’t include intervals.h, dispextern.h.
      Include composite.h.
      * src/filelock.c: Don’t include character.h, systime.h.
      * src/fns.c: Don’t include time.h, commands.h, keyboard.h,
      keymap.h, frame.h, blockinput.h, xterm.h.  Include composite.h.
      * src/font.c: Include termhooks.h.
      * src/font.h: Don’t include ccl.h, frame.h.  Add forward decls of
      struct composition_it, struct face, struct glyph_string.
      * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h,
      intervals.h, window.h, termhooks.h.
      * src/frame.c: Don’t include character.h, commands.h, font.h.
      * src/frame.h: Don’t include dispextern.h.
      * src/fringe.c: Don’t include character.h.
      * src/ftcrfont.c: Don’t include dispextern.h, frame.h,
      character.h, charset.h, fontset.h.
      * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h,
      fontset.h.
      * src/ftxfont.c: Don’t include dispextern.h, character.h,
      charset.h, fontset.h.
      * src/gfilenotify.c: Don’t include frame.h, process.h.
      * src/gtkutil.c: Include dispextern.h, frame.h, systime.h.
      Don’t include syssignal.h, buffer.h, charset.h, font.h.
      * src/gtkutil.h: Don’t include frame.h.
      * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h.
      Don’t include character.h.
      * src/indent.c: Don’t include keyboard.h, termchar.h.
      * src/inotify.c: Don’t include character.h, frame.h.
      * src/insdel.c: Include composite.h.  Don’t include blockinput.h.
      * src/intervals.c: Don’t include character.h, keyboard.h.
      * src/intervals.h: Don’t include dispextern.h, composite.h.
      * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h.
      Include coding.h.
      * src/keyboard.h: Don’t incldue systime.h.
      * src/keymap.c: Don’t include charset.h, frame.h.
      * src/lread.c: Include dispextern.h and systime.h.
      Don’t include frame.h.  Include systime.h.
      * src/macros.c: Don’t include commands.h, character.h, buffer.h.
      * src/menu.c: Include character.h, coding.h.  Don’t include
      dispextern.h.
      * src/menu.h: Don’t include systime.h.
      * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h,
      intervals.h, termhooks.h.
      * src/print.c: Include coding.h.  Don’t include keyboard.h,
      window.h, dispextern.h, termchar.h, termhooks.h, font.h.
      Add forward decl of struct terminal.
      * src/process.c: Don’t include termhooks.h, commands.h,
      dispextern.h, composite.h.
      * src/region-cache.c: Don’t include character.h.
      * src/scroll.c: Don’t include keyboard.h, window.h.
      * src/search.c: Don’t include category.h, commands.h.
      * src/sound.c: Don’t include dispextern.h.
      * src/syntax.c: Don’t include command.h, keymap.h.
      * src/sysdep.c: Don’t include window.h, dispextern.h.
      * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’,
      * src/term.c: Don’t include systty.h, intervals.h, xterm.h.
      * src/terminal.c: Include character.h.
      Don’t include charset.h, coding.h.
      * src/textprop.c: Don’t include character.h.
      * src/undo.c: Don’t include character.h, commands.h, window.h.
      * src/unexsol.c: Don’t include character.h, charset.h.
      * src/widget.c: Include widget.h.  Don’t include keyboard.h,
      window.h, dispextern.h, blockinput.h, character.h, font.h.
      * src/widgetprv.h: Don’t include widget.h.
      * src/window.c: Don’t include character.h, menu.h, intervals.h.
      * src/xdisp.c: Include composite.h, systime.h.  Don’t include
      macros.h, process.h.
      * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h,
      intervals.h.
      * src/xfns.c: Don’t include menu.h, character.h, intervals.h,
      epaths.h, fontset.h, systime.h, atimer.h, termchar.h.
      * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h.
      * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h.
      * src/xgselect.c: Don’t include timespec.h, frame.h.
      Include systime.h.
      * src/xgselect.h: Don’t include time.h.
      Use a forward decl to struct timespec instead.
      * src/xmenu.c: Don’t include keymap.h, character.h, charset.h,
      dispextern.h.  Include systime.h.
      * src/xml.c: Don’t include character.h.
      * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h.
      * src/xselect.c: Don’t include dispextern.h, character.h,
      buffer.h, process.h.
      * src/xsmfns.c: Don’t include systime.h, sysselect.h.
      * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h,
      intervals.h process.h, keymap.h, xgselect.h.  Include composite.h.
      63cfb75f
  29. 11 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Give names to Unicode code points in C code · d6640d6e
      Paul Eggert authored
      * src/character.h (NO_BREAK_SPACE, SOFT_HYPHEN)
      (ZERO_WIDTH_NON_JOINER, ZERO_WIDTH_JOINER, HYPHEN)
      (NON_BREAKING_HYPHEN, LEFT_SINGLE_QUOTATION_MARK)
      (RIGHT_SINGLE_QUOTATION_MARK, PARAGRAPH_SEPARATOR)
      (LEFT_POINTING_ANGLE_BRACKET, RIGHT_POINTING_ANGLE_BRACKET)
      (LEFT_ANGLE_BRACKET, RIGHT_ANGLE_BRACKET)
      (OBJECT_REPLACEMENT_CHARACTER):
      New named constants for Unicode code points.
      * src/bidi.c (bidi_fetch_char, CANONICAL_EQU):
      * src/composite.c (char_composable_p):
      * src/lread.c (readevalloop, read1):
      * src/xdisp.c (get_next_display_element):
      Use them.
      * src/doc.c (LEFT_SINGLE_QUOTATION_POINT):
      Remove; now in character.h.
      d6640d6e
  30. 31 May, 2015 1 commit
    • Paul Eggert's avatar
      Remove unused DEFSYMs · 0c2a3cf6
      Paul Eggert authored
      Remove DEFSYMs that aren't used at the C level.  Also:
      * src/decompress.c (Qzlib_dll):
      * src/font.c (Qunicode_sip):
      * src/frame.c (Qtip_frame):
      * src/ftfont.c (Qserif):
      * src/gnutls.c (Qgnutls_dll):
      * src/xml.c (Qlibxml2_dll):
      Move from here ...
      * src/w32fns.c (syms_of_w32fns): ... to here,
      as these are used only on MS-Windows.
      0c2a3cf6
  31. 30 May, 2015 1 commit
    • Eli Zaretskii's avatar
      Fix display of composite characters with large fonts · 643470ff
      Eli Zaretskii authored
      * src/xdisp.c (x_produce_glyphs): Call normal_char_ascent_descent
      for reasonable values of font ascent and descent.
      (get_font_ascent_descent): New function.
      
      * src/composite.c (composition_gstring_width): Call
      get_font_ascent_descent for reasonable values of font ascent and
      descent.
      
      * dispextern.h: Add prototype for get_font_ascent_descent.
      643470ff
  32. 25 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Count MANY function args more reliably · a3689d3c
      Paul Eggert authored
      * alloc.c (Fgc_status, purecopy, unbind_to, garbage_collect_1):
      * buffer.c (Fbuffer_list, Fkill_buffer):
      * callint.c (read_file_name, Fcall_interactively):
      * charset.c (Fset_charset_priority, syms_of_charset):
      * chartab.c (uniprop_encode_value_numeric):
      * coding.c (syms_of_coding):
      * composite.c (syms_of_composite):
      * data.c (wrong_range):
      * dbusbind.c (syms_of_dbusbind):
      * dired.c (file_attributes):
      * editfns.c (Fdecode_time, update_buffer_properties, format2):
      * eval.c (run_hook_with_args_2, apply1, call1, call2, call3)
      (call4, call5, call6, call7):
      * fileio.c (Finsert_file_contents, choose_write_coding_system)
      (Fcar_less_than_car, build_annotations, auto_save_error):
      * filelock.c (get_boot_time):
      * fns.c (internal_equal, nconc2, Fyes_or_no_p, Fwidget_apply):
      (maybe_resize_hash_table, secure_hash):
      * font.c (font_style_to_value, font_open_by_name, Flist_fonts):
      * fontset.c (fontset_add, Fset_fontset_font):
      * ftfont.c (ftfont_lookup_cache):
      * gtkutil.c (xg_get_font):
      * insdel.c (signal_before_change, signal_after_change):
      * keymap.c (append_key):
      * lread.c (load_warn_old_style_backquotes, Fload, init_lread):
      * minibuf.c (Fread_buffer):
      * print.c (print_preprocess):
      * process.c (Fformat_network_address, Fmake_network_process)
      (server_accept_connection):
      * sound.c (Fplay_sound_internal):
      * term.c (Fsuspend_tty, Fresume_tty):
      * window.c (window_list):
      * xdisp.c (run_redisplay_end_trigger_hook, add_to_log)
      (message_with_string):
      * xfaces.c (Fx_list_fonts):
      * xfont.c (syms_of_xfont):
      * xselect.c (x_handle_selection_request)
      (x_handle_selection_clear, x_clear_frame_selections)
      (x_clipboard_manager_error_1):
      Prefer CALLMANY and CALLN to counting args by hand.
      * doc.c (reread_doc_file): Remove unused code.
      * fns.c (concat2, concat3): Redo to avoid need for local-var vector.
      (cmpfn_user_defined, hashfn_user_defined, Fmaphash):
      Prefer call1 and call2 to Ffuncall.
      * keyboard.c (safe_run_hook_funcall, safe_run_hooks):
      Use struct literal rather than a local var, for simplicity.
      * keymap.c (where_is_internal): Use NULL rather than a pointer
      to unused args.
      * lisp.h (CALLMANY, CALLN): New macros.
      * sound.c (Fplay_sound_internal): Coalesce duplicate code.
      Fixes: bug#19634
      a3689d3c
  33. 05 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Compute C decls for DEFSYMs automatically · 58f2d6ef
      Paul Eggert authored
      Fixes Bug#15880.
      This patch also makes Q constants (e.g., Qnil) constant addresses
      from the C point of view.
      * make-docfile.c: Revamp to generate table of symbols, too.
      Include <stdbool.h>.
      (xstrdup): New function.
      (main): Don't process the same file twice.
      (SYMBOL): New constant in enum global_type.
      (struct symbol): Turn 'value' member into a union, either v.value
      for int or v.svalue for string.  All uses changed.
      (add_global): New arg svalue, which overrides value, so that globals
      can have a string value.
      (close_emacs_global): New arg num_symbols; all uses changed.
      Output lispsym decl.
      (write_globals): Output symbol globals too.  Output more
      ATTRIBUTE_CONST, now that Qnil etc. are C constants.
      Output defsym_name table.
      (scan_c_file): Move most of guts into ...
      (scan_c_stream): ... new function.  Scan for DEFSYMs and
      record symbols found.  Don't read past EOF if file doesn't
      end in newline.
      * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
      * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
      * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
      * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
      * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
      * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
      * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
      * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
      * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
      * xselect.c, xsettings.c, xterm.c:
      Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
      These names are now defined automatically by make-docfile.
      * alloc.c (init_symbol): New function.
      (Fmake_symbol): Use it.
      (c_symbol_p): New function.
      (valid_lisp_object_p, purecopy): Use it.
      * alloc.c (marked_pinned_symbols):
      Use make_lisp_symbol instead of make_lisp_ptr.
      (garbage_collect_1): Mark lispsym symbols.
      (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
      (mark_object): Use it.
      (sweep_symbols): Sweep lispsym symbols.
      (symbol_uses_obj): New function.
      (which_symbols): Use it.  Work for lispsym symbols, too.
      (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
      since Qt's address is already known now.
      (syms_of_alloc): Add lispsym count to symbols_consed.
      * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
      when testing whether storage is all bits zero.
      * dispextern (struct image_type):
      * font.c (font_property_table):
      * frame.c (struct frame_parm_table, frame_parms):
      * keyboard.c (scroll_bar_parts, struct event_head):
      * xdisp.c (struct props):
      Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
      Lisp_Object *, since Qfoo is no longer an object whose address can be
      taken.  All uses changed.
      * eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
      use it, so that they no longer need to take the address of a Lisp sym.
      (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
      * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
      * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
      DEFSYM Qdeactivate_mark before the corresponding var.
      * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
      instead of interning their symbols; this avoids duplicates.
      (LISP_INITIALLY, TAG_PTR)
      (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
      New macros.
      (LISP_INITIALLY_ZERO): Use it.
      (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
      (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
      Move decls up, to avoid forward uses.  Include globals.h earlier, too.
      (make_lisp_symbol): New function.
      (XSETSYMBOL): Use it.
      (DEFSYM): Now just a placeholder for make-docfile.
      * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
      (intern_sym): New function, with body taken from old intern_driver.
      (intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
      All uses changed.
      (define_symbol): New function.
      (init_obarray): Define the C symbols taken from lispsym.
      Use plain DEFSYM for Qt and Qnil.
      * syntax.c (init_syntax_once): No need to worry about
      Qchar_table_extra_slots.
      58f2d6ef
  34. 01 Jan, 2015 2 commits
  35. 25 Dec, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix rendering of composed caharacters on the mode line. (Bug#19435) · a41d07b3
      Eli Zaretskii authored
       src/xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
       composition_compute_stop_pos to the number of characters in the
       string.
       <GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.
       src/composite.c (composition_compute_stop_pos): If no composition
       was found in a string before ENDPOS, and ENDPOS is the string end,
       no need to back up to a safe point.
       src/dispextern.h (struct it) <end_charpos>: Improve commentary.
      a41d07b3
  36. 14 Oct, 2014 1 commit
    • Dmitry Antipov's avatar
      Cleanup terminal handling code. · bb75cdf9
      Dmitry Antipov authored
      * dispextern.h (get_named_tty): Remove prototype but...
      * termhooks.h (get_named_terminal): ...resurrect it under
      more meaningful name.
      (get_terminal): Likewise, but with...
      (decode_live_terminal): ...this name.
      (decode_tty_terminal): Add prototype.
      * term.c (get_tty_terminal): Remove.
      (get_named_tty): Remove.
      (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
      (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
      Use decode_tty_terminal.
      (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
      * terminal.c (get_terminal): Refactor to...
      (decode_terminal, decode_live_terminal): ...new functions.
      (decode_tty_terminal): Replacement for get_tty_terminal.
      (get_named_terminal): Likewise for get_named_tty.
      * coding.c (Fset_terminal_coding_system_internal)
      (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
      (Fkeyboard_coding_system):
      * composite.c (Fcomposition_get_gstring):
      * dispnew.c (Fsend_string_to_terminal):
      * frame.c (Fmake_terminal_frame):
      * nsfns.m (check_ns_display_info):
      * w32fns.c, xfns.c (check_x_display_info):
      * xselect.c (frame_for_x_selection): Use decode_live_terminal.
      * keyboard.c (handle_interrupt_signal, handle_interrupt)
      (Fset_quit_char): Use get_named_terminal.
      (Fset_output_flow_control, Fset_input_meta_mode):
      Use decode_tty_terminal.
      bb75cdf9