<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/composite.c, branch scratch/cedet-object-name</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Prefer the 'min'/'max' macros where possible</title>
<updated>2025-01-19T16:21:22+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2025-01-19T16:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c37aa3df9d84325924a7a163271154447dfc0cfd'/>
<id>c37aa3df9d84325924a7a163271154447dfc0cfd</id>
<content type='text'>
* src/composite.c (find_automatic_composition):
* src/lisp.h (clip_to_bounds):
* src/pgtkfns.c (PATH_MAX_LEN):
* src/profiler.c (approximate_median):
* src/unexmacosx.c (unexec_write_zero, unexec_copy, unexec_realloc):
* src/xdisp.c (get_nearby_bol_pos): Prefer the 'min' and 'max' macros.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/composite.c (find_automatic_composition):
* src/lisp.h (clip_to_bounds):
* src/pgtkfns.c (PATH_MAX_LEN):
* src/profiler.c (approximate_median):
* src/unexmacosx.c (unexec_write_zero, unexec_copy, unexec_realloc):
* src/xdisp.c (get_nearby_bol_pos): Prefer the 'min' and 'max' macros.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace call[1-8] with calln</title>
<updated>2025-01-19T13:29:41+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2025-01-19T03:59:22+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=251e3d2654ae8e5fdee4624d9af93fb9c0e1b698'/>
<id>251e3d2654ae8e5fdee4624d9af93fb9c0e1b698</id>
<content type='text'>
Since the introduction of the 'calln' macro, the 'call1', 'call2', ...,
'call8' macros are just aliases for the former.  This is slightly
misleading and potentially unhelpful.  The number of arguments N can
also easily go out-of-synch with the used alias callN.  There is no
reason not to replace these aliases with using 'calln' directly.

To reduce the risk for mistakes, the tool Coccinelle was used to make
these changes.  See &lt;https://coccinelle.gitlabpages.inria.fr/website/&gt;.

* src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c:
* src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c:
* src/chartab.c, src/cmds.c, src/coding.c, src/composite.c:
* src/data.c, src/dbusbind.c, src/dired.c, src/doc.c:
* src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c:
* src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c:
* src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c:
* src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c:
* src/pgtkselect.c, src/print.c, src/process.c, src/sort.c:
* src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c:
* src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c:
* src/xmenu.c, src/xselect.c, src/xterm.c:
Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the introduction of the 'calln' macro, the 'call1', 'call2', ...,
'call8' macros are just aliases for the former.  This is slightly
misleading and potentially unhelpful.  The number of arguments N can
also easily go out-of-synch with the used alias callN.  There is no
reason not to replace these aliases with using 'calln' directly.

To reduce the risk for mistakes, the tool Coccinelle was used to make
these changes.  See &lt;https://coccinelle.gitlabpages.inria.fr/website/&gt;.

* src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c:
* src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c:
* src/chartab.c, src/cmds.c, src/coding.c, src/composite.c:
* src/data.c, src/dbusbind.c, src/dired.c, src/doc.c:
* src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c:
* src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c:
* src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c:
* src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c:
* src/pgtkselect.c, src/print.c, src/process.c, src/sort.c:
* src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c:
* src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c:
* src/xmenu.c, src/xselect.c, src/xterm.c:
Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year to 2025</title>
<updated>2025-01-01T07:39:17+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2025-01-01T07:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=4da38c632161867e914b3a13dc760f8019255f94'/>
<id>4da38c632161867e914b3a13dc760f8019255f94</id>
<content type='text'>
Run "TZ=UTC0 admin/update-copyright".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run "TZ=UTC0 admin/update-copyright".
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge from origin/emacs-29</title>
<updated>2024-03-09T09:18:53+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2024-03-09T09:18:53+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=7405f0340b5ebfc8ccb903554d6d2d586611ccca'/>
<id>7405f0340b5ebfc8ccb903554d6d2d586611ccca</id>
<content type='text'>
b9f7a2274f6 ; Improve documentation of 'minibuffer-allow-text-propert...
5ffcca121bb ; Improve documentation of image properties
6e801077ae8 ; * src/composite.c (composition_compute_stop_pos): Add c...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
b9f7a2274f6 ; Improve documentation of 'minibuffer-allow-text-propert...
5ffcca121bb ; Improve documentation of image properties
6e801077ae8 ; * src/composite.c (composition_compute_stop_pos): Add c...
</pre>
</div>
</content>
</entry>
<entry>
<title>; * src/composite.c (composition_compute_stop_pos): Add comment.</title>
<updated>2024-03-04T15:09:29+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2024-03-04T15:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6e801077ae88e72dbad32015a083602062c4efe3'/>
<id>6e801077ae88e72dbad32015a083602062c4efe3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>(struct composition): Remove dependency on hash-table internals</title>
<updated>2024-01-24T13:16:41+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2024-01-24T13:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=cc861fc528b49fc459bb9a1e5054f5fd82e1b689'/>
<id>cc861fc528b49fc459bb9a1e5054f5fd82e1b689</id>
<content type='text'>
`struct composition` kept an index into the internal `key_and_value` array
of hash tables, which only worked because of details of how
hash-tables are handled.  Replace it with a reference to the
key stored at that location in the hash-table, which saves us an
indirection while at it.

* src/composite.h (struct composition): Replace `hash_index` with
the actual `key`.
(COMPOSITION_KEY): Simplify accordingly.
(mark_composite): Declare.
* src/composite.c (get_composition_id): Adjust accordingly.
(mark_composite): New function.

* src/charset.c (mark_charset): Uncomment.
* src/lisp.h (mark_charset): Declare.
* src/alloc.c (garbage_collect): Call `mark_charset` and `mark_composite`.
* src/pdumper.c (hash_table_contents): Remove invalid comment, since
compositions aren't dumped.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`struct composition` kept an index into the internal `key_and_value` array
of hash tables, which only worked because of details of how
hash-tables are handled.  Replace it with a reference to the
key stored at that location in the hash-table, which saves us an
indirection while at it.

* src/composite.h (struct composition): Replace `hash_index` with
the actual `key`.
(COMPOSITION_KEY): Simplify accordingly.
(mark_composite): Declare.
* src/composite.c (get_composition_id): Adjust accordingly.
(mark_composite): New function.

* src/charset.c (mark_charset): Uncomment.
* src/lisp.h (mark_charset): Declare.
* src/alloc.c (garbage_collect): Call `mark_charset` and `mark_composite`.
* src/pdumper.c (hash_table_contents): Remove invalid comment, since
compositions aren't dumped.
</pre>
</div>
</content>
</entry>
<entry>
<title>(DOHASH): Change calling convention</title>
<updated>2024-01-24T13:07:54+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2024-01-24T13:07:54+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3018c6e7ba5d35b756aea5eed7f3981548a597b4'/>
<id>3018c6e7ba5d35b756aea5eed7f3981548a597b4</id>
<content type='text'>
This leads to simpler code in the users, and more efficient machine
code because we don't repeatedly need to fetch the `table_size`
and `key_and_value` fields of the hash table object.

* src/lisp.h (DOHASH): Rewrite.
* src/composite.c (composition_gstring_lookup_cache): Simplify.
(composition_gstring_cache_clear_font):
* src/print.c (print):
* src/pdumper.c (hash_table_contents):
* src/minibuf.c (Ftest_completion):
* src/json.c (lisp_to_json_nonscalar_1):
* src/emacs-module.c (module_global_reference_p):
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/fns.c (Fmaphash): Adjust to new calling convention.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This leads to simpler code in the users, and more efficient machine
code because we don't repeatedly need to fetch the `table_size`
and `key_and_value` fields of the hash table object.

* src/lisp.h (DOHASH): Rewrite.
* src/composite.c (composition_gstring_lookup_cache): Simplify.
(composition_gstring_cache_clear_font):
* src/print.c (print):
* src/pdumper.c (hash_table_contents):
* src/minibuf.c (Ftest_completion):
* src/json.c (lisp_to_json_nonscalar_1):
* src/emacs-module.c (module_global_reference_p):
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/fns.c (Fmaphash): Adjust to new calling convention.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add C macro for hash table iteration</title>
<updated>2024-01-21T10:21:51+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2024-01-19T14:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=fec87a4b36a67688932e7bb7e1720bd2c4363a61'/>
<id>fec87a4b36a67688932e7bb7e1720bd2c4363a61</id>
<content type='text'>
This removes some boilerplate code and further reduces dependencies on
hash table implementation internals.

* src/lisp.h (DOHASH): New.
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/composite.c (composition_gstring_cache_clear_font):
* src/emacs-module.c (module_global_reference_p):
* src/fns.c (Fmaphash):
* src/json.c (lisp_to_json_nonscalar_1):
* src/minibuf.c (Ftest_completion):
* src/print.c (print):
Use it instead of a hand-written loop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes some boilerplate code and further reduces dependencies on
hash table implementation internals.

* src/lisp.h (DOHASH): New.
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/composite.c (composition_gstring_cache_clear_font):
* src/emacs-module.c (module_global_reference_p):
* src/fns.c (Fmaphash):
* src/json.c (lisp_to_json_nonscalar_1):
* src/minibuf.c (Ftest_completion):
* src/print.c (print):
Use it instead of a hand-written loop.
</pre>
</div>
</content>
</entry>
<entry>
<title>Inlined and specialised hash table look-up</title>
<updated>2024-01-13T19:50:38+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2023-11-21T11:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3b00255a4c70bc1075446c94a8ff65c987ac143f'/>
<id>3b00255a4c70bc1075446c94a8ff65c987ac143f</id>
<content type='text'>
This improves performance in several ways.  Separate functions are
used depending on whether the caller has a hash value computed or not.

* src/fns.c (hash_lookup_with_hash, hash_lookup_get_hash): New.
(hash_lookup): Remove hash return argument.
All callers adapted.

hash_lookup_with_hash hash_hash_t arg
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This improves performance in several ways.  Separate functions are
used depending on whether the caller has a hash value computed or not.

* src/fns.c (hash_lookup_with_hash, hash_lookup_get_hash): New.
(hash_lookup): Remove hash return argument.
All callers adapted.

hash_lookup_with_hash hash_hash_t arg
</pre>
</div>
</content>
</entry>
<entry>
<title>Store hash values as integers instead of Lisp_Object</title>
<updated>2024-01-13T19:50:38+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2023-10-29T10:57:06+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a3ae5653cfe1ab2b3eb4c77ce729844ad442b562'/>
<id>a3ae5653cfe1ab2b3eb4c77ce729844ad442b562</id>
<content type='text'>
This improves typing, saves pointless tagging and untagging, and
prepares for further changes. The new typedef hash_hash_t is an alias
for EMACS_UINT, and hash values are still limited to the fixnum range.
We now use hash_unused instead of Qnil to mark unused entries.

* src/lisp.h (hash_hash_t): New typedef for EMACS_UINT.
(hash_unused): New constant.
(struct hash_table_test): `hashfn` now returns
hash_hash_t.  All callers and implementations changed.
(struct Lisp_Hash_Table): Retype hash vector to an array of
hash_hash_t.  All code using it changed accordingly.
(HASH_HASH, hash_from_key):
* src/fns.c (set_hash_index_slot, hash_index_index)
(hash_lookup_with_hash, hash_lookup_get_hash, hash_put):
(hash_lookup, hash_put): Retype hash value arguments
and return values.  All callers adapted.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This improves typing, saves pointless tagging and untagging, and
prepares for further changes. The new typedef hash_hash_t is an alias
for EMACS_UINT, and hash values are still limited to the fixnum range.
We now use hash_unused instead of Qnil to mark unused entries.

* src/lisp.h (hash_hash_t): New typedef for EMACS_UINT.
(hash_unused): New constant.
(struct hash_table_test): `hashfn` now returns
hash_hash_t.  All callers and implementations changed.
(struct Lisp_Hash_Table): Retype hash vector to an array of
hash_hash_t.  All code using it changed accordingly.
(HASH_HASH, hash_from_key):
* src/fns.c (set_hash_index_slot, hash_index_index)
(hash_lookup_with_hash, hash_lookup_get_hash, hash_put):
(hash_lookup, hash_put): Retype hash value arguments
and return values.  All callers adapted.
</pre>
</div>
</content>
</entry>
</feed>
