groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 17/21: [troff]: Slightly refactor.


From: G. Branden Robinson
Subject: [groff] 17/21: [troff]: Slightly refactor.
Date: Sat, 2 Mar 2024 01:25:03 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 3ee0022b93cd0822e44157da2fe5e84c700884e4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Mar 1 21:47:48 2024 -0600

    [troff]: Slightly refactor.
    
    * src/roff/troff/env.cpp (init_env_requests): Set up `hla` request and
      `.hla` register here, since they're environment-specific...
      (init_hyphenation_pattern_requests): ...instead of here.
---
 ChangeLog              | 7 +++++++
 src/roff/troff/env.cpp | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 06d9dd6f1..1bedea707 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-03-01  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/roff/troff/env.cpp (init_env_requests): Set up `hla`
+       request and `.hla` register here, since they're
+       environment-specific...
+       (init_hyphenation_pattern_requests): ...instead of here.
+
 2024-03-01  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/troff/env.cpp (init_hyphen_requests): Rename this...
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 6856b304d..13f9360da 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -4062,6 +4062,7 @@ void init_env_requests()
   init_request("ft", select_font);
   init_request("gcolor", glyph_color_change);
   init_request("hc", hyphen_char);
+  init_request("hla", select_hyphenation_language);
   init_request("hlm", hyphen_line_max_request);
   init_request("hy", hyphenate_request);
   init_request("hym", hyphenation_margin_request);
@@ -4105,6 +4106,7 @@ void init_env_requests()
   init_string_env_reg(".fam", get_font_family_string);
   init_string_env_reg(".fn", get_font_name_string);
   init_int_env_reg(".height", get_char_height);
+  register_dictionary.define(".hla", new hyphenation_language_reg);
   init_int_env_reg(".hlc", get_hyphen_line_count);
   init_int_env_reg(".hlm", get_hyphen_line_max);
   init_unsigned_env_reg(".hy", get_hyphenation_mode);
@@ -4290,12 +4292,10 @@ static void append_hyphenation_patterns_from_file()
 // init_env_requests() above.
 void init_hyphenation_pattern_requests()
 {
-  init_request("hla", select_hyphenation_language);
   init_request("hpf", load_hyphenation_patterns_from_file);
   init_request("hpfa", append_hyphenation_patterns_from_file);
   init_request("hw", add_hyphenation_exceptions);
   init_request("phw", print_hyphenation_exceptions);
-  register_dictionary.define(".hla", new hyphenation_language_reg);
 }
 
 // Local Variables:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]