groff-commit
[Top][All Lists]
Advanced

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

[groff] 36/40: [sboxes]: Affix package name to early diagnostics.


From: G. Branden Robinson
Subject: [groff] 36/40: [sboxes]: Affix package name to early diagnostics.
Date: Sat, 5 Feb 2022 12:58:08 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit f3bdef5451314eb7e1b64c16aebbc48b64674b46
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Feb 6 03:14:04 2022 +1100

    [sboxes]: Affix package name to early diagnostics.
    
    * sboxes.tmac: Prefix early diagnostics with package file name
      literally.  (We don't yet know if we can use \*[] string
      interpolation.)  It is better to violate DRY a little here than to
      obscure from the user what is emitting the diagnostic.
    
    We arguably shouldn't do this for the main macro packages because we
    don't know what file names they will be installed under, due to the
    compatibility wrappers feature (see the NEWS entry for groff 1.22.4).
    In those cases it is better to omit the suggestion of a file name
    producing the diagnostic than to risk uttering an incorrect one, which
    can madden a person attempting to troubleshoot problems.
    
    But we can do it for other packages unique to groff...
---
 contrib/sboxes/ChangeLog   | 7 +++++++
 contrib/sboxes/sboxes.tmac | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/contrib/sboxes/ChangeLog b/contrib/sboxes/ChangeLog
index 5e9b62ad..d77d8732 100644
--- a/contrib/sboxes/ChangeLog
+++ b/contrib/sboxes/ChangeLog
@@ -1,3 +1,10 @@
+2021-02-06  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * sboxes.tmac: Prefix early diagnostics with package file name
+       literally.  (We don't yet know if we can use \*[] string
+       interpolation.)  It is better to violate DRY a little here than
+       to obscure from the user what is emitting the diagnostic.
+
 2021-02-06  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * sboxes.tmac: Skip macro package instead of aborting if there
diff --git a/contrib/sboxes/sboxes.tmac b/contrib/sboxes/sboxes.tmac
index 29a7d6f2..04ee0baf 100644
--- a/contrib/sboxes/sboxes.tmac
+++ b/contrib/sboxes/sboxes.tmac
@@ -21,12 +21,12 @@ You should have received a copy of the GNU General Public 
License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ..
 .if !\n(.g \{\
-.  tm groff sboxes macros require groff extensions; not loading
+.  tm sboxes.tmac: macros require groff extensions; not loading
 .  nx
 .\}
 .
 .if \n(.C \{\
-.  tm groff sboxes macros do not work in compatibility mode; not loading
+.  tm sboxes.tmac: macros do not work in compatibility mode; not loading
 .  nx
 .\}
 .



reply via email to

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