commit d0b9d35fbf733adf747df7eb55d4e9f35b53bdbe (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Thu Jan 2 09:44:44 2025 +0200 Adjust nt/gnulib-cfg.mk to recent Gnulib import * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_dirent-h) (OMIT_GNULIB_MODULE_inttypes-h-incomplete) (OMIT_GNULIB_MODULE_stdio-h, OMIT_GNULIB_MODULE_stdlib-h) (OMIT_GNULIB_MODULE_sys_select-h, OMIT_GNULIB_MODULE_sys_stat-h) (OMIT_GNULIB_MODULE_sys_time-h, OMIT_GNULIB_MODULE_sys_types-h) (OMIT_GNULIB_MODULE_unistd-h): Rename to follow Gnulib renaming the modules from "FOO" to "FOO-h". diff --git a/nt/gnulib-cfg.mk b/nt/gnulib-cfg.mk index 3dc70a44c68..321a7fdd17f 100644 --- a/nt/gnulib-cfg.mk +++ b/nt/gnulib-cfg.mk @@ -47,7 +47,7 @@ OMIT_GNULIB_MODULE_at-internal = true OMIT_GNULIB_MODULE_canonicalize-lgpl = true OMIT_GNULIB_MODULE_careadlinkat = true OMIT_GNULIB_MODULE_copy-file-range = true -OMIT_GNULIB_MODULE_dirent = true +OMIT_GNULIB_MODULE_dirent-h = true OMIT_GNULIB_MODULE_dirfd = true OMIT_GNULIB_MODULE_fchmodat = true OMIT_GNULIB_MODULE_fcntl = true @@ -61,7 +61,7 @@ OMIT_GNULIB_MODULE_fsusage = true OMIT_GNULIB_MODULE_futimens = true OMIT_GNULIB_MODULE_getdelim = true OMIT_GNULIB_MODULE_getline = true -OMIT_GNULIB_MODULE_inttypes-incomplete = true +OMIT_GNULIB_MODULE_inttypes-h-incomplete = true OMIT_GNULIB_MODULE_lchmod = true OMIT_GNULIB_MODULE_malloc-gnu = true OMIT_GNULIB_MODULE_malloc-posix = true @@ -75,14 +75,14 @@ OMIT_GNULIB_MODULE_secure_getenv = true OMIT_GNULIB_MODULE_signal-h = true OMIT_GNULIB_MODULE_signbit = true OMIT_GNULIB_MODULE_size_max = true -OMIT_GNULIB_MODULE_stdio = true -OMIT_GNULIB_MODULE_stdlib = true +OMIT_GNULIB_MODULE_stdio-h = true +OMIT_GNULIB_MODULE_stdlib-h = true OMIT_GNULIB_MODULE_stpncpy = true -OMIT_GNULIB_MODULE_sys_select = true -OMIT_GNULIB_MODULE_sys_stat = true -OMIT_GNULIB_MODULE_sys_time = true -OMIT_GNULIB_MODULE_sys_types = true -OMIT_GNULIB_MODULE_unistd = true +OMIT_GNULIB_MODULE_sys_select-h = true +OMIT_GNULIB_MODULE_sys_stat-h = true +OMIT_GNULIB_MODULE_sys_time-h = true +OMIT_GNULIB_MODULE_sys_types-h = true +OMIT_GNULIB_MODULE_unistd-h = true OMIT_GNULIB_MODULE_utimens = true OMIT_GNULIB_MODULE_utimensat = true OMIT_GNULIB_MODULE_xsize = true commit b082a8d9510a0fbbc0b92538e87252e6786b9e61 Author: Eli Zaretskii Date: Thu Jan 2 09:44:09 2025 +0200 ; Fix recent changes in bibtex.el documentation * lisp/textmodes/bibtex.el (bibtex-BibTeX-entry-alist) (bibtex-BibTeX-field-alist): Doc fixes. * etc/NEWS: Fix format of a new bibtex entry. diff --git a/etc/NEWS b/etc/NEWS index 18e2c0493b1..2179cf3389d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -771,7 +771,8 @@ toggle. ** BibTeX mode --- -*** New user variables 'bibtex-BibTeX-aux-entry-alist', +*** New user variables facilitate customization. +Mew user variables 'bibtex-BibTeX-aux-entry-alist', 'bibtex-biblatex-aux-entry-alist', 'bibtex-BibTeX-aux-opt-alist', and 'bibtex-biblatex-aux-opt-alist' facilitate the customization of BibTeX and biblatex entries. These variables now support the definition diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index d2206876dbd..0ea72e3abe9 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -448,11 +448,11 @@ If parsing fails, try to set this variable to nil." ("howpublished" "The way in which the work was published") ("month") ("year") ("note")))) "Alist of BibTeX entry types and their associated fields. -Elements are lists (ENTRY DOC REQUIRED CROSSREF OPTIONAL) +Elements are lists of the form (ENTRY DOC REQUIRED CROSSREF OPTIONAL) or (ENTRY DOC REF-ENTRY). ENTRY is the type of a BibTeX entry. -DOC is a brief doc string used for documentation. If nil ENTRY is used. +DOC is a brief doc string used for documentation. If nil, ENTRY is used. REF-ENTRY is another entry type, where ENTRY becomes an alias that inherits the definition of REF-ENTRY. @@ -875,9 +875,9 @@ Use this, e.g., for custom fields, see Sec. 2.2.4 of the biblatex manual." ("crossref" "Reference key of the cross-referenced entry") ("key" "Used as label with certain BibTeX styles")) "Alist of BibTeX fields. -Each element is a list (FIELD COMMENT). COMMENT is a comment used with -`bibtex-print-help-message' as a default if `bibtex-BibTeX-entry-alist' -does not define a comment for FIELD." +Each element is a list of the form (FIELD COMMENT). COMMENT is +a comment used with `bibtex-print-help-message' as a default +if `bibtex-BibTeX-entry-alist' does not define a comment for FIELD." :group 'bibtex :version "31.1" :type 'bibtex-field-alist) commit b26418694e8a573cd500d71029c0e8f53598ea3c Author: Roland Winkler Date: Wed Jan 1 23:09:58 2025 -0600 Provide more flexibility for definition of BibTeX entries. * lisp/textmodes/bibtex.el (bibtex-aux-opt-alist): Rename from bibtex-user-optional-fields. (bibtex-BibTeX-entry-alist, bibtex-biblatex-entry-alist): Permit aliases that inherit their definition from another entry. (bibtex-BibTeX-aux-entry-alist, bibtex-biblatex-aux-entry-alist) (bibtex-BibTeX-aux-opt-alist, bibtex-biblatex-aux-opt-alist): New user variables. (bibtex-entry-alist): Honor these new variables. (bibtex-field-alist): New function. (bibtex-include-OPTkey): Default changed to nil, declared obsolete. Use bibtex-aux-opt-alist instead. (bibtex-set-dialect): Use cl-flet and bibtex-field-alist. (bibtex-dialect-select-map): New variable. (bibtex-init-dialect): New function. (bibtex-field-list): Simplify. (bibtex-print-help-message): Bug fix. diff --git a/etc/NEWS b/etc/NEWS index 1a6f5ae7816..18e2c0493b1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -770,6 +770,21 @@ toggle. ** BibTeX mode +--- +*** New user variables 'bibtex-BibTeX-aux-entry-alist', +'bibtex-biblatex-aux-entry-alist', 'bibtex-BibTeX-aux-opt-alist', +and 'bibtex-biblatex-aux-opt-alist' facilitate the customization of +BibTeX and biblatex entries. These variables now support the definition +of aliases that inherit the definition of another entry. + +--- +*** The user variable 'bibtex-user-optional-fields' has been renamed +to 'bibtex-aux-opt-alist'. The old name is an obsolete alias. + +--- +*** The user variable 'bibtex-include-OPTkey' is now obsolete and +its default is nil. Use 'bibtex-aux-opt-alist' instead. + --- *** New user option 'bibtex-entry-ask-for-key'. When enabled, 'bibtex-entry' asks for a key. diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 217a4f8c26d..d2206876dbd 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -75,28 +75,24 @@ :group 'bibtex :type '(repeat string)) -(defcustom bibtex-include-OPTkey t +(defcustom bibtex-include-OPTkey nil "If non-nil, all newly created entries get an OPTkey field. If this is a string, use it as the initial field text. If this is a function, call it to generate the initial field text." :group 'bibtex + :version "31.1" ; change default :type '(choice (const :tag "None" nil) (string :tag "Initial text") (function :tag "Initialize Function") (const :tag "Default" t)) :risky t) - -(defcustom bibtex-user-optional-fields - '(("annote" "Personal annotation (ignored)")) - "List of optional fields the user wants to have always present. -Entries should be of the same form as the OPTIONAL list -in `bibtex-BibTeX-entry-alist' (which see)." - :group 'bibtex - :type '(repeat (group (string :tag "Field") - (string :tag "Comment") - (option (choice :tag "Init" - (const nil) string function)))) - :risky t) +;; The functionality provided by `bibtex-include-OPTkey' is a special case +;; of what `bibtex-aux-opt-alist' offers. Which BibTeX style files actually +;; use the key field? The BibTeX docomentation suggests it is used rarely. +;; Under biblatex, the key field is an alias for sortkey, see Secs. 2.2.3 +;; and 2.2.5. +(make-obsolete-variable 'bibtex-include-OPTkey + "use `bibtex-aux-opt-alist' instead." "31.1") (defcustom bibtex-entry-format '(opts-or-alts required-fields numerical-fields) @@ -285,66 +281,60 @@ If parsing fails, try to set this variable to nil." :group 'bibtex :type 'boolean) +(define-widget 'bibtex-field-list 'lazy + "Format of fields of entries in `bibtex-BibTeX-entry-alist' and friends." + :type '(group (string :tag "Field") + (option (choice :tag "Comment" :value nil + (const nil) string)) + (option (choice :tag "Init" :value nil + (const nil) string function)) + (option (choice :tag "Alternative" :value nil + (const nil) integer)))) + (define-widget 'bibtex-entry-alist 'lazy "Format of `bibtex-BibTeX-entry-alist' and friends." - :type '(repeat (group (string :tag "Entry type") - (string :tag "Documentation") - (repeat :tag "Required fields" - (group (string :tag "Field") - (option (choice :tag "Comment" :value nil - (const nil) string)) - (option (choice :tag "Init" :value nil - (const nil) string function)) - (option (choice :tag "Alternative" :value nil - (const nil) integer)))) - (repeat :tag "Crossref fields" - (group (string :tag "Field") - (option (choice :tag "Comment" :value nil - (const nil) string)) - (option (choice :tag "Init" :value nil - (const nil) string function)) - (option (choice :tag "Alternative" :value nil - (const nil) integer)))) - (repeat :tag "Optional fields" - (group (string :tag "Field") - (option (choice :tag "Comment" :value nil - (const nil) string)) - (option (choice :tag "Init" :value nil - (const nil) string function)) - (option (choice :tag "Alternative" :value nil - (const nil) integer))))))) + :type '(repeat + (choice (group :tag "Alias" + (string :tag "Entry type") + (string :tag "Documentation") + (string :tag "Alias")) + (group :tag "Entry" + (string :tag "Entry type") + (string :tag "Documentation") + (repeat :tag "Required fields" bibtex-field-list) + (repeat :tag "Crossref fields" bibtex-field-list) + (repeat :tag "Optional fields" bibtex-field-list))))) + +;; The variables `bibtex-BibTeX-entry-alist' and `bibtex-biblatex-entry-alist' +;; contain all magnificent definitions of entries for BibTeX and biblatex. +;; They have been user variables for a long time. But they are too bulky +;; for users to fiddle with them. So we preserve their status of all-embracing +;; user variables. But we provide the extra user variables +;; `bibtex-BibTeX-aux-entry-alist' and `bibtex-biblatex-aux-entry-alist' +;; that take precedence over `bibtex-BibTeX-entry-alist' and +;; `bibtex-biblatex-entry-alist'. Additional customization is possible via +;; `bibtex-BibTeX-aux-opt-alist' and `bibtex-biblatex-aux-opt-alist'. +;; The variables `bibtex-BibTeX-field-alist' and `bibtex-biblatex-field-alist' +;; are used with `bibtex-print-help-message'. They are less significant than +;; the entry-alist variables. (defcustom bibtex-BibTeX-entry-alist '(("Article" "Article in Journal" (("author") - ("title" "Title of the article (BibTeX converts it to lowercase)")) + ("title" "Title of the article")) (("journal") ("year")) (("volume" "Volume of the journal") - ("number" "Number of the journal (only allowed if entry contains volume)") + ("number" "Number of the journal") ("pages" "Pages in the journal") ("month") ("note"))) ("InProceedings" "Article in Conference Proceedings" (("author") - ("title" "Title of the article in proceedings (BibTeX converts it to lowercase)")) - (("booktitle" "Name of the conference proceedings") - ("year")) - (("editor") - ("volume" "Volume of the conference proceedings in the series") - ("number" "Number of the conference proceedings in a small series (overwritten by volume)") - ("series" "Series in which the conference proceedings appeared") - ("pages" "Pages in the conference proceedings") - ("month") ("address") - ("organization" "Sponsoring organization of the conference") - ("publisher" "Publishing company, its location") - ("note"))) - ("Conference" "Article in Conference Proceedings" ; same as InProceedings - (("author") - ("title" "Title of the article in proceedings (BibTeX converts it to lowercase)")) + ("title" "Title of the article in proceedings")) (("booktitle" "Name of the conference proceedings") ("year")) (("editor") ("volume" "Volume of the conference proceedings in the series") - ("number" "Number of the conference proceedings in a small series (overwritten by volume)") + ("number" "Number of the conference proceedings in a small series") ("series" "Series in which the conference proceedings appeared") ("pages" "Pages in the conference proceedings") ("month") ("address") @@ -353,17 +343,17 @@ If parsing fails, try to set this variable to nil." ("note"))) ("InCollection" "Article in a Collection" (("author") - ("title" "Title of the article in book (BibTeX converts it to lowercase)") + ("title" "Title of the article in book") ("booktitle" "Name of the book")) (("publisher") ("year")) (("editor") ("volume" "Volume of the book in the series") - ("number" "Number of the book in a small series (overwritten by volume)") + ("number" "Number of the book in a small series") ("series" "Series in which the book appeared") ("type" "Word to use instead of \"chapter\"") ("chapter" "Chapter in the book") ("pages" "Pages in the book") - ("edition" "Edition of the book as a capitalized English word") + ("edition" "Edition of the book as an ordinal") ("month") ("address") ("note"))) ("InBook" "Chapter or Pages in a Book" (("author" nil nil 0) @@ -372,11 +362,11 @@ If parsing fails, try to set this variable to nil." ("chapter" "Chapter in the book")) (("publisher") ("year")) (("volume" "Volume of the book in the series") - ("number" "Number of the book in a small series (overwritten by volume)") + ("number" "Number of the book in a small series") ("series" "Series in which the book appeared") ("type" "Word to use instead of \"chapter\"") ("address") - ("edition" "Edition of the book as a capitalized English word") + ("edition" "Edition of the book as an ordinal") ("month") ("pages" "Pages in the book") ("note"))) @@ -387,12 +377,12 @@ If parsing fails, try to set this variable to nil." (("booktitle" "Title of the proceedings for cross references") ("editor") ("volume" "Volume of the conference proceedings in the series") - ("number" "Number of the conference proceedings in a small series (overwritten by volume)") + ("number" "Number of the conference proceedings in a small series") ("series" "Series in which the conference proceedings appeared") ("address") ("month") ("organization" "Sponsoring organization of the conference") - ("publisher" "Publishing company, its location") + ("publisher" "Publishing company") ("note"))) ("Book" "Book" (("author" nil nil 0) @@ -400,13 +390,13 @@ If parsing fails, try to set this variable to nil." ("title" "Title of the book")) (("publisher") ("year")) (("volume" "Volume of the book in the series") - ("number" "Number of the book in a small series (overwritten by volume)") + ("number" "Number of the book in a small series") ("series" "Series in which the book appeared") ("address") - ("edition" "Edition of the book as a capitalized English word") + ("edition" "Edition of the book as an ordinal") ("month") ("note"))) ("Booklet" "Booklet (Bound, but no Publisher)" - (("title" "Title of the booklet (BibTeX converts it to lowercase)")) + (("title" "Title of the booklet")) nil (("author") ("howpublished" "The way in which the booklet was published") @@ -418,20 +408,20 @@ If parsing fails, try to set this variable to nil." ("year")) nil (("type" "Type of the PhD thesis") - ("address" "Address of the school (if not part of field \"school\") or country") + ("address" "Address of the school or country") ("month") ("note"))) ("MastersThesis" "Master's Thesis" (("author") - ("title" "Title of the master's thesis (BibTeX converts it to lowercase)") + ("title" "Title of the master's thesis") ("school" "School where the master's thesis was written") ("year")) nil (("type" "Type of the master's thesis (if other than \"Master's thesis\")") - ("address" "Address of the school (if not part of field \"school\") or country") + ("address" "Address of the school or country") ("month") ("note"))) ("TechReport" "Technical Report" (("author") - ("title" "Title of the technical report (BibTeX converts it to lowercase)") + ("title" "Title of the technical report") ("institution" "Sponsoring institution of the report") ("year")) nil @@ -444,51 +434,65 @@ If parsing fails, try to set this variable to nil." (("author") ("organization" "Publishing organization of the manual") ("address") - ("edition" "Edition of the manual as a capitalized English word") + ("edition" "Edition of the manual as an ordinal") ("month") ("year") ("note"))) ("Unpublished" "Unpublished" (("author") - ("title" "Title of the unpublished work (BibTeX converts it to lowercase)") + ("title" "Title of the unpublished work") ("note")) nil (("month") ("year"))) ("Misc" "Miscellaneous" nil nil (("author") - ("title" "Title of the work (BibTeX converts it to lowercase)") + ("title" "Title of the work") ("howpublished" "The way in which the work was published") ("month") ("year") ("note")))) "Alist of BibTeX entry types and their associated fields. -Elements are lists (ENTRY-TYPE DOC REQUIRED CROSSREF OPTIONAL). -ENTRY-TYPE is the type of a BibTeX entry. -DOC is a brief doc string used for menus. If nil ENTRY-TYPE is used. -REQUIRED is a list of required fields. -CROSSREF is a list of fields that are optional if a crossref field +Elements are lists (ENTRY DOC REQUIRED CROSSREF OPTIONAL) +or (ENTRY DOC REF-ENTRY). + +ENTRY is the type of a BibTeX entry. +DOC is a brief doc string used for documentation. If nil ENTRY is used. +REF-ENTRY is another entry type, where ENTRY becomes an alias that inherits +the definition of REF-ENTRY. + +REQUIRED is an alist of required fields. +CROSSREF is an alist of fields that are optional if a crossref field is present; but these fields are required otherwise. -OPTIONAL is a list of optional fields. +OPTIONAL is an alist of optional fields. Each element of these lists is a list of the form - (FIELD COMMENT INIT ALTERNATIVE). -COMMENT, INIT, and ALTERNATIVE are optional. + (FIELD [COMMENT [INIT [ALTERNATIVE]]]). FIELD is the name of the field. -COMMENT is the comment string that appears in the echo area. +COMMENT is a comment used with `bibtex-print-help-message'. If COMMENT is nil use `bibtex-BibTeX-field-alist' if possible. INIT is either the initial content of the field or a function, which is called to determine the initial content of the field. ALTERNATIVE if non-nil is an integer N that numbers sets of alternatives. A negative integer -N indicates an alias for the field +N. Such aliases are ignored by `bibtex-entry' in the template -for a new entry." +for a new entry. +See also `bibtex-BibTeX-aux-entry-alist' which takes precedence." :group 'bibtex - :version "28.1" ; extend alternatives + :version "31.1" ; allow aliases + :set (lambda (symbol value) + (set-default symbol value) + ;; `bibtex-init-dialect' is undefined during loading (no problem). + (if (fboundp 'bibtex-init-dialect) + (bibtex-init-dialect 'BibTeX))) :type 'bibtex-entry-alist :risky t) +;; Compare in biblatex documentation: +;; Sec. 2.1.1 Regular types (required and optional fields) +;; Sec. 2.1.2 Type Aliases +;; Sec. 2.1.3 Non-Standard Types -> `bibtex-biblatex-aux-entry-alist' +;; Sec. 2.2.2 Data Fields -> `bibtex-biblatex-field-alist' +;; Sec. 2.2.5 Field Aliases -> `bibtex-biblatex-aux-opt-alist' +;; Appendix A Default Crossref setup + (defcustom bibtex-biblatex-entry-alist - ;; Compare in biblatex documentation: - ;; Sec. 2.1.1 Regular types (required and optional fields) - ;; Sec. 2.2.5 Field Aliases - ;; Appendix A Default Crossref setup '(("Article" "Article in Journal" (("author") ("title") ("journaltitle" nil nil 3) ("journal" nil nil -3) @@ -546,34 +550,8 @@ for a new entry." ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) ("url") ("urldate"))) - ("BookInBook" "Book in Collection" ; same as @inbook - (("title") ("date" nil nil 1) ("year" nil nil -1)) - (("author") ("booktitle")) - (("bookauthor") ("editor") ("editora") ("editorb") ("editorc") - ("translator") ("annotator") ("commentator") ("introduction") ("foreword") - ("afterword") ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle") - ("maintitleaddon") ("booksubtitle") ("booktitleaddon") - ("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes") - ("series") ("number") ("note") ("publisher") - ("location" nil nil 2) ("address" nil nil -2) ("isbn") ("eid") - ("chapter") ("pages") ("addendum") ("pubstate") ("doi") - ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) - ("SuppBook" "Supplemental Material in a Book" ; same as @inbook - (("title") ("date" nil nil 1) ("year" nil nil -1)) - (("author") ("booktitle")) - (("bookauthor") ("editor") ("editora") ("editorb") ("editorc") - ("translator") ("annotator") ("commentator") ("introduction") ("foreword") - ("afterword") ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle") - ("maintitleaddon") ("booksubtitle") ("booktitleaddon") - ("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes") - ("series") ("number") ("note") ("publisher") - ("location" nil nil 2) ("address" nil nil -2) ("isbn") ("eid") - ("chapter") ("pages") ("addendum") ("pubstate") ("doi") - ("eprint")("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) + ("BookInBook" "Book in Collection" "InBook") + ("SuppBook" "Supplemental Material in a Book" "InBook") ("Booklet" "Booklet (Bound, but no Publisher)" (("author" nil nil 0) ("editor" nil nil 0) ("title") ("date" nil nil 1) ("year" nil nil -1)) @@ -628,21 +606,7 @@ for a new entry." ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) ("url") ("urldate"))) - ("SuppCollection" "Supplemental Material in a Collection" ; same as @incollection - (("author") ("title") - ("date" nil nil 1) ("year" nil nil -1)) - (("booktitle")) - (("editor") ("editora") ("editorb") ("editorc") ("translator") - ("annotator") ("commentator") ("introduction") ("foreword") ("afterword") - ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle") - ("maintitleaddon") ("booksubtitle") ("booktitleaddon") - ("language") ("origlanguage") ("volume") ("part") ("edition") - ("volumes") ("series") ("number") ("note") ("publisher") - ("location" nil nil 2) ("address" nil nil -2) - ("isbn") ("eid") ("chapter") ("pages") ("addendum") ("pubstate") ("doi") - ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) + ("SuppCollection" "Supplemental Material in a Collection" "InCollection") ("Dataset" "Data Set" (("author" nil nil 0) ("editor" nil nil 0) ("title") ("date" nil nil 1) ("year" nil nil -1)) @@ -708,20 +672,7 @@ for a new entry." ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) ("url") ("urldate"))) - ("SuppPeriodical" "Supplemental Material in a Periodical" ; same as @article - (("author") ("title") - ("journaltitle" nil nil 3) ("journal" nil nil -3) - ("date" nil nil 1) ("year" nil nil -1)) - nil - (("translator") ("annotator") ("commentator") ("subtitle") ("titleaddon") - ("editor") ("editora") ("editorb") ("editorc") ("journalsubtitle") - ("journaltitleaddon") ("issuetitle") ("issuesubtitle") ("issuetitleaddon") - ("language") ("origlanguage") ("series") ("volume") ("number") ("eid") - ("issue") ("month") ("pages") ("version") ("note") ("issn") - ("addendum") ("pubstate") ("doi") - ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) + ("SuppPeriodical" "Supplemental Material in a Periodical" "Article") ("Proceedings" "Single-Volume Conference Proceedings" (("title") ("date" nil nil 1) ("year" nil nil -1)) nil @@ -760,60 +711,10 @@ for a new entry." ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) ("url") ("urldate"))) - ("Conference" "Article in Conference Proceedings" ; same as InProceedings - (("author") - ("title" "Title of the article in proceedings (BibTeX converts it to lowercase)")) - (("booktitle" "Name of the conference proceedings") - ("year")) - (("editor") - ("volume" "Volume of the conference proceedings in the series") - ("number" "Number of the conference proceedings in a small series (overwritten by volume)") - ("series" "Series in which the conference proceedings appeared") - ("pages" "Pages in the conference proceedings") - ("month") ("address") - ("organization" "Sponsoring organization of the conference") - ("publisher" "Publishing company, its location") - ("note"))) - ("Reference" "Single-Volume Work of Reference" ; same as @collection - (("editor") ("title") ("date" nil nil 1) ("year" nil nil -1)) - nil - (("editora") ("editorb") ("editorc") ("translator") ("annotator") - ("commentator") ("introduction") ("foreword") ("afterword") - ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle") - ("maintitleaddon") ("language") ("origlanguage") ("volume") - ("part") ("edition") ("volumes") ("series") ("number") ("note") - ("publisher") ("location" nil nil 2) ("address" nil nil -2) - ("isbn") ("eid") ("chapter") ("pages") - ("pagetotal") ("addendum") ("pubstate") ("doi") - ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) - ("MVReference" "Multi-Volume Work of Reference" ; same as @mvcollection - (("editor") ("title") ("date" nil nil 1) ("year" nil nil -1)) - nil - (("editora") ("editorb") ("editorc") ("translator") ("annotator") - ("commentator") ("introduction") ("foreword") ("afterword") - ("subtitle") ("titleaddon") ("language") ("origlanguage") ("edition") - ("volumes") ("series") ("number") ("note") ("publisher") - ("location" nil nil 2) ("address" nil nil -2) - ("isbn") ("pagetotal") ("addendum") ("pubstate") ("doi") - ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) - ("InReference" "Article in a Work of Reference" ; same as @incollection - (("author") ("title") ("date" nil nil 1) ("year" nil nil -1)) - (("booktitle")) - (("editor") ("editora") ("editorb") ("editorc") ("translator") - ("annotator") ("commentator") ("introduction") ("foreword") ("afterword") - ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle") - ("maintitleaddon") ("booksubtitle") ("booktitleaddon") - ("language") ("origlanguage") ("volume") ("part") ("edition") - ("volumes") ("series") ("number") ("note") ("publisher") - ("location" nil nil 2) ("address" nil nil -2) - ("isbn") ("eid") ("chapter") ("pages") ("addendum") ("pubstate") ("doi") - ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) + ("Conference" "Article in Conference Proceedings" "InProceedings") + ("Reference" "Single-Volume Work of Reference" "Collection") + ("MVReference" "Multi-Volume Work of Reference" "MVCollection") + ("InReference" "Article in a Work of Reference" "InCollection") ("Report" "Technical or Research Report" (("author") ("title") ("type") ("institution" nil nil 6) ("school" nil nil -6) @@ -826,17 +727,7 @@ for a new entry." ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) ("url") ("urldate"))) - ("Software" "Computer Software" ; Same as @misc. - (("author" nil nil 0) ("editor" nil nil 0) ("title") - ("date" nil nil 1) ("year" nil nil -1)) - nil - (("subtitle") ("titleaddon") ("language") ("howpublished") ("type") - ("version") ("note") ("organization") - ("location" nil nil 2) ("address" nil nil -2) - ("month") ("addendum") ("pubstate") ("doi") - ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) - ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) - ("url") ("urldate"))) + ("Software" "Computer Software" "Misc") ("Thesis" "PhD or Master's Thesis" (("author") ("title") ("type") ("institution" nil nil 6) ("school" nil nil -6) @@ -852,30 +743,30 @@ for a new entry." ("PhdThesis" "PhD Thesis" (("author") ("title" "Title of the PhD thesis") - ("school" "School where the PhD thesis was written") - ("year")) - nil - (("type" "Type of the PhD thesis") - ("address" "Address of the school (if not part of field \"school\") or country") - ("month") ("note"))) - ("MastersThesis" "Master's Thesis" - (("author") - ("title" "Title of the master's thesis (BibTeX converts it to lowercase)") - ("school" "School where the master's thesis was written") - ("year")) + ("institution") + ("date" nil nil 1) ("year" nil nil -1)) nil - (("type" "Type of the master's thesis (if other than \"Master's thesis\")") - ("address" "Address of the school (if not part of field \"school\") or country") - ("month") ("note"))) + (("subtitle") ("titleaddon") ("language") ("note") + ("location" nil nil 2) ("address" nil nil -2) + ("month") ("isbn") ("eid") ("chapter") ("pages") ("pagetotal") + ("addendum") ("pubstate") ("doi") + ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) + ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) + ("url") ("urldate"))) + ("MastersThesis" "Master's Thesis" "PhdThesis") ("TechReport" "Technical Report" - (("author") - ("title" "Title of the technical report (BibTeX converts it to lowercase)") - ("institution" "Sponsoring institution of the report") - ("year")) + (("author") ("title") + ("institution" nil nil 6) ("school" nil nil -6) + ("date" nil nil 1) ("year" nil nil -1)) nil - (("type" "Type of the report (if other than \"technical report\")") - ("number" "Number of the technical report") - ("address") ("month") ("note"))) + (("type") + ("subtitle") ("titleaddon") ("language") ("number") ("version") ("note") + ("location" nil nil 2) ("address" nil nil -2) + ("month") ("isrn") ("eid") ("chapter") ("pages") + ("pagetotal") ("addendum") ("pubstate") ("doi") + ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4) + ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) + ("url") ("urldate"))) ("Unpublished" "Unpublished" (("author") ("title") ("date" nil nil 1) ("year" nil nil -1)) nil @@ -887,14 +778,88 @@ for a new entry." ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5) ("url") ("urldate")))) "Alist of biblatex entry types and their associated fields. -It has the same format as `bibtex-BibTeX-entry-alist'." +It has the same format as `bibtex-BibTeX-entry-alist'. +See also `bibtex-biblatex-aux-entry-alist' which takes precedence." :group 'bibtex - :version "28.1" + :version "31.1" + :set (lambda (symbol value) + (set-default symbol value) + ;; `bibtex-init-dialect' is undefined during loading (no problem). + (if (fboundp 'bibtex-init-dialect) + (bibtex-init-dialect 'biblatex))) :type 'bibtex-entry-alist :risky t) +(defcustom bibtex-BibTeX-aux-entry-alist + '(("Conference" "Article in Conference Proceedings" "InProceedings")) + "Auxiliary alist of BibTeX entry types and their associated fields. +Its entries take precedence over the entries in `bibtex-BibTeX-entry-alist'. +This alist has the same format as `bibtex-BibTeX-entry-alist'." + :group 'bibtex + :version "31.1" + :set (lambda (symbol value) + (set-default symbol value) + ;; `bibtex-init-dialect' is undefined during loading (no problem). + (if (fboundp 'bibtex-init-dialect) + (bibtex-init-dialect 'BibTeX))) + :type 'bibtex-entry-alist + :risky t) + +(defcustom bibtex-biblatex-aux-entry-alist nil + "Auxiliary alist of biblatex entry types and their associated fields. +Its entries take precedence over the entries in `bibtex-biblatex-entry-alist'. +This alist has the same format as `bibtex-BibTeX-entry-alist'. +Use this, e.g., for non-standard types, see Sec. 2.1.3 of the biblatex manual." + :group 'bibtex + :version "31.1" + :set (lambda (symbol value) + (set-default symbol value) + ;; `bibtex-init-dialect' is undefined during loading (no problem). + (if (fboundp 'bibtex-init-dialect) + (bibtex-init-dialect 'biblatex))) + :type 'bibtex-entry-alist + :risky t) + +(define-obsolete-variable-alias 'bibtex-user-optional-fields + 'bibtex-aux-opt-alist "31.1") +(defcustom bibtex-aux-opt-alist + '(("annote" "Personal annotation (ignored)")) + "Alist of auxiliary optional fields for all entries of all dialects. +Elements should be of the same form as the elements of the OPTIONAL alist +in `bibtex-BibTeX-entry-alist' (which see). These fields are always present. +See also `bibtex-BibTeX-aux-opt-alist' and `bibtex-biblatex-aux-opt-alist' +whose fields take precedence over optional fields in +`bibtex-BibTeX-entry-alist' and `bibtex-biblatex-entry-alist'." + :group 'bibtex + :version "31.1" + :type '(repeat (bibtex-field-list)) + :risky t) + +(defcustom bibtex-BibTeX-aux-opt-alist nil + "Alist of auxiliary optional fields for all BibTeX entries. +Elements should be of the same form as the elements of the OPTIONAL alist +in `bibtex-BibTeX-entry-alist' (which see). These fields take precedence +over optional fields in `bibtex-BibTeX-entry-alist'. +See also `bibtex-aux-opt-alist' whose fields are always present." + :group 'bibtex + :version "31.1" + :type '(repeat (bibtex-field-list)) + :risky t) + +(defcustom bibtex-biblatex-aux-opt-alist nil + "Alist of auxiliary optional fields for all biblatex entries. +Elements should be of the same form as the elements of the OPTIONAL alist +in `bibtex-BibTeX-entry-alist' (which see). These fields take precedence +over optional fields in `bibtex-biblatex-entry-alist'. +See also `bibtex-aux-opt-alist' whose fields are always present. +Use this, e.g., for custom fields, see Sec. 2.2.4 of the biblatex manual." + :group 'bibtex + :version "31.1" + :type '(repeat (bibtex-field-list)) + :risky t) + (define-widget 'bibtex-field-alist 'lazy - "Format of `bibtex-BibTeX-entry-alist' and friends." + "Format of `bibtex-BibTeX-field-alist' and friends." :type '(repeat (group (string :tag "Field type") (string :tag "Comment")))) @@ -906,12 +871,15 @@ It has the same format as `bibtex-BibTeX-entry-alist'." ("month" "Month of the publication as a string (remove braces)") ("note" "Remarks to be put at the end of the \\bibitem") ("publisher" "Publishing company") - ("address" "Address of the publisher")) + ("address" "Address of the publisher") + ("crossref" "Reference key of the cross-referenced entry") + ("key" "Used as label with certain BibTeX styles")) "Alist of BibTeX fields. -Each element is a list (FIELD COMMENT). COMMENT is used as a default -if `bibtex-BibTeX-entry-alist' does not define a comment for FIELD." +Each element is a list (FIELD COMMENT). COMMENT is a comment used with +`bibtex-print-help-message' as a default if `bibtex-BibTeX-entry-alist' +does not define a comment for FIELD." :group 'bibtex - :version "24.1" + :version "31.1" :type 'bibtex-field-alist) (defcustom bibtex-biblatex-field-alist @@ -989,7 +957,7 @@ if `bibtex-BibTeX-entry-alist' does not define a comment for FIELD." ("pagination" "Pagination of the work") ("part" "Number of a partial volume") ("publisher" "Name(s) of the publisher(s)") - ("pubstate" "Publication state of the work, e. g.,'in press'") + ("pubstate" "Publication state of the work, e.g., 'in press'") ("reprinttitle" "Title of a reprint of the work") ("series" "Name of a publication series") ("shortauthor" "Author(s) of the work, given in an abbreviated form") @@ -1010,17 +978,24 @@ if `bibtex-BibTeX-entry-alist' does not define a comment for FIELD." ("version" "Revision number of a piece of software, a manual, etc.") ("volume" "Volume of a multi-volume book or a periodical") ("volumes" "Total number of volumes of a multi-volume work") - ("year" "Year of publication")) + ("year" "Year of publication") + ("crossref" "Reference key of the cross-referenced entry") + ("key" "Used as label with certain BibTeX styles")) "Alist of biblatex fields. It has the same format as `bibtex-BibTeX-field-alist'." :group 'bibtex - :version "28.1" + :version "31.1" :type 'bibtex-field-alist) (defcustom bibtex-dialect-list '(BibTeX biblatex) "List of BibTeX dialects known to BibTeX mode. -For each DIALECT (a symbol) a variable bibtex-DIALECT-entry-alist defines -the allowed entries and bibtex-DIALECT-field-alist defines known field types. +For each DIALECT (a symbol) the following variables must be defined: + +bibtex-DIALECT-entry-alist defines the entry types allowed for dialect +bibtex-DIALECT-aux-entry-alist defines auxiliary entry types for dialect +bibtex-DIALECT-aux-opt-alist defines auxiliary optional fields for dialect +bibtex-DIALECT-field-alist defines known field types. + Predefined dialects include BibTeX and biblatex." :group 'bibtex :version "24.1" @@ -1028,7 +1003,7 @@ Predefined dialects include BibTeX and biblatex." (defcustom bibtex-dialect 'BibTeX "Current BibTeX dialect. For allowed values see `bibtex-dialect-list'. -To interactively change the dialect use the command `bibtex-set-dialect'." +To change the dialect use the command `bibtex-set-dialect'." :group 'bibtex :version "24.1" :set (lambda (symbol value) @@ -1589,8 +1564,8 @@ Set this variable before loading BibTeX mode." "C-c C-l" #'bibtex-url "C-c C-a" #'bibtex-search-entries "C-c C-o" #'bibtex-remove-OPT-or-ALT - ;; Most below functions seem to be undefined, which makes the - ;; byte-compiler warn if we quote them with #'. + ;; Most below functions get defined by `bibtex-init-dialect', + ;; which makes the byte-compiler warn if we quote them with #'. "C-c C-e TAB" 'bibtex-InProceedings "C-c C-e i" 'bibtex-InCollection "C-c C-e I" 'bibtex-InBook @@ -1704,7 +1679,7 @@ It is an alist with elements (FIELD RULE1 RULE2 ...), where each RULE is (REGEXP . TO-STR).") (defvar bibtex-pop-previous-search-point nil - "Next point where `bibtex-pop-previous' starts looking for a similar entry.") + "Previous point where `bibtex-pop-previous' starts looking for a similar entry.") (defvar bibtex-pop-next-search-point nil "Next point where `bibtex-pop-next' starts looking for a similar entry.") @@ -2550,8 +2525,7 @@ Formats current entry according to variable `bibtex-entry-format'." (nth 3 entry-list))) opt-field-list (append (if crossref-key (nth 3 entry-list)) - (nth 4 entry-list) - bibtex-user-optional-fields) + (nth 4 entry-list)) ;; default list of fields that may appear in this entry default-field-list (append req-field-list opt-field-list) ;; number of ALT fields we may find @@ -3658,6 +3632,10 @@ if that value is non-nil. (syntax-propertize-via-font-lock bibtex-font-lock-syntactic-keywords)) (let ((fun (lambda () + ;; `bibtex-dialect' and the other bibtex variables listed here + ;; may appear as file-local variables. So any variables whose + ;; values are derived from these bibtex variables must honor + ;; the file-local values. (bibtex-set-dialect) (setq-local comment-start bibtex-comment-start) (setq-local comment-start-skip @@ -3674,31 +3652,78 @@ if that value is non-nil. ;; commands don't bug out. (font-lock-set-defaults)) +;; It would be nice to process here `bibtex-include-OPTcrossref' +;; once and for all, so that then the variable `bibtex-entry-alist' need not +;; distinguish anymore between CROSSREF and OPTIONAL fields. But even if +;; an entry is listed in `bibtex-include-OPTcrossref', actual entries need not +;; use a crossref field. (defun bibtex-entry-alist (dialect) "Return entry-alist for DIALECT." - (let ((var (intern (format "bibtex-%s-entry-alist" dialect))) - entry-alist) - (if (boundp var) - (setq entry-alist (symbol-value var)) - (user-error "BibTeX dialect `%s' undefined" dialect)) - (if (not (consp (nth 1 (car entry-alist)))) - ;; new format - entry-alist - (let (lst) - (dolist (entry entry-alist) - (let ((fl (nth 1 entry)) req xref opt) - (dolist (field (copy-tree (car fl))) - (if (nth 3 field) (setcar (nthcdr 3 field) 0)) - (if (or (not (nth 2 entry)) - (assoc-string (car field) (car (nth 2 entry)) t)) - (push field req) - (push field xref))) - (dolist (field (nth 1 fl)) - (push field opt)) - (push (list (car entry) nil (nreverse req) - (nreverse xref) (nreverse opt)) - lst))) - (nreverse lst))))) + (cl-flet ((vfun (fmt) + (let ((var (intern (format fmt dialect)))) + (if (boundp var) + (symbol-value var) + (user-error "BibTeX dialect `%s': `%s' undefined" + dialect var))))) + (let* ((main-entry-alist (vfun "bibtex-%s-entry-alist")) + (aux-entry-alist (vfun "bibtex-%s-aux-entry-alist")) + (aux-opt-alist (append (vfun "bibtex-%s-aux-opt-alist") + bibtex-aux-opt-alist)) + ;; For look-up put auxiliary entries before regular entries. + (all-alist (append aux-entry-alist main-entry-alist)) + entry-alist) + (dolist (entry (mapcar + ;; Expand aliases + (lambda (entry) + (let ((elt (nth 2 entry)) + ref) + (cond ((listp elt) ; proper entry + entry) + ((setq ref (assoc-string elt all-alist t)) ; alias + (append (take 2 entry) (nthcdr 2 ref))) + (t (user-error "Alias `%s' undefined" entry))))) + ;; Give higher precedence to entry definitions + ;; in aux-entry-alist. + (reverse (append main-entry-alist aux-entry-alist)))) + ;; Include each entry only once. + (unless (assoc-string (car entry) entry-alist t) + (push (if aux-opt-alist + ;; Splice aux-opt-alist into entry (nondestructively). + ;; Elements in aux-opt-alist take precedence over elements + ;; in opt-alist of entry. + (let ((aux-opt-alist aux-opt-alist)) + (mapc (lambda (field) + (unless (assoc-string (car field) aux-opt-alist t) + (push field aux-opt-alist))) + (reverse (nth 4 entry))) + (append (take 4 entry) (list aux-opt-alist))) + entry) + entry-alist))) + entry-alist))) + +(defun bibtex-field-alist (dialect) + "Return field-alist for DIALECT." + ;; This function is used only once by `bibtex-set-dialect' + ;; to set the variable `bibtex-field-alist'. + (cl-flet ((vfun (fmt) + (let ((var (intern (format fmt dialect)))) + (if (boundp var) + (symbol-value var) + (user-error "BibTeX dialect `%s': `%s' undefined" + dialect var))))) + (let ((field-alist (vfun "bibtex-%s-field-alist"))) + (cl-flet ((f-push (field) + (unless (assoc-string (car field) field-alist t) + (push (take 2 field) field-alist)))) + ;; Give higher precedence to entry definitions in aux-opt-alist + (mapc #'f-push (vfun "bibtex-%s-aux-opt-alist")) + (mapc #'f-push bibtex-aux-opt-alist) + (mapc (lambda (entry) + (if (listp (nth 2 entry)) ; not an alias + (mapc #'f-push (apply #'append (nthcdr 2 entry))))) + (append (vfun "bibtex-%s-aux-entry-alist") + (vfun "bibtex-%s-entry-alist"))) + field-alist)))) (defun bibtex-set-dialect (&optional dialect local) "Select BibTeX DIALECT for editing BibTeX files. @@ -3714,106 +3739,120 @@ LOCAL is t for interactive calls." (mapcar #'list bibtex-dialect-list) nil t)) t)) - (let ((setfun (if (or local (local-variable-p 'bibtex-dialect)) - (lambda (var val) (set (make-local-variable var) val)) - 'set))) - (if dialect (funcall setfun 'bibtex-dialect dialect)) - - ;; Set internal variables - (funcall setfun 'bibtex-entry-alist (bibtex-entry-alist bibtex-dialect)) - (funcall setfun 'bibtex-field-alist - (let ((var (intern (format "bibtex-%s-field-alist" - bibtex-dialect)))) - (if (boundp var) - (symbol-value var) - (user-error "Field types for BibTeX dialect `%s' undefined" - bibtex-dialect)))) - (funcall setfun 'bibtex-entry-type - (concat "@[ \t]*\\(?:" - (regexp-opt (mapcar #'car bibtex-entry-alist)) "\\)")) - (funcall setfun 'bibtex-entry-head - (concat "^[ \t]*\\(" bibtex-entry-type "\\)[ \t]*[({][ \t\n]*\\(" - bibtex-reference-key "\\)")) - (funcall setfun 'bibtex-entry-maybe-empty-head - (concat bibtex-entry-head "?")) - (funcall setfun 'bibtex-any-valid-entry-type - (concat "^[ \t]*@[ \t]*\\(?:" - (regexp-opt - (append '("String" "Preamble") - (mapcar #'car bibtex-entry-alist))) "\\)")) + (setq local (or local (local-variable-p 'bibtex-dialect))) + (cl-flet ((setfun (var val) + (if local + (set (make-local-variable var) val) + (set var val)))) + (if dialect (setfun 'bibtex-dialect dialect)) + + ;; Set internal variables. + (setfun 'bibtex-entry-alist (bibtex-entry-alist bibtex-dialect)) + (setfun 'bibtex-field-alist (bibtex-field-alist bibtex-dialect)) + (setfun 'bibtex-entry-type + (concat "@[ \t]*" + (regexp-opt (mapcar #'car bibtex-entry-alist)))) + (setfun 'bibtex-entry-head + (concat "^[ \t]*\\(" bibtex-entry-type "\\)[ \t]*[({][ \t\n]*\\(" + bibtex-reference-key "\\)")) + (setfun 'bibtex-entry-maybe-empty-head + (concat bibtex-entry-head "?")) + (setfun 'bibtex-any-valid-entry-type + (concat "^[ \t]*@[ \t]*" + (regexp-opt + (append '("String" "Preamble") + (mapcar #'car bibtex-entry-alist))))) (setq imenu-generic-expression (list (list nil bibtex-entry-head bibtex-key-in-head)) imenu-case-fold-search t))) -;; Entry commands and menus for BibTeX dialects -;; We do not use `easy-menu-define' here because this gets confused -;; if we want to have multiple versions of the "same" menu. -(let ((select-map (make-sparse-keymap))) - ;; Submenu for selecting the dialect - (dolist (dialect (reverse bibtex-dialect-list)) - (define-key select-map (vector dialect) - `(menu-item ,(symbol-name dialect) - (lambda () (interactive) (bibtex-set-dialect ',dialect t)) - :button (:radio . (eq bibtex-dialect ',dialect))))) - ;; We define a menu for each dialect. - ;; Then we select the menu we want via the :visible keyword - (dolist (dialect bibtex-dialect-list) - (let ((entry-alist (bibtex-entry-alist dialect)) - (menu-map (make-sparse-keymap))) - (define-key menu-map [select] - `(menu-item "BibTeX dialect" ,select-map)) - (define-key menu-map [nil-2] '(menu-item "--")) - (define-key menu-map [bibtex-preamble] - '(menu-item "Preamble" bibtex-Preamble)) - (define-key menu-map [bibtex-String] - '(menu-item "String" bibtex-String)) - (define-key menu-map [nil-1] '(menu-item "--")) - (dolist (elt (reverse entry-alist)) - ;; Entry commands - (let* ((entry (car elt)) - (fname (intern (format "bibtex-%s" entry)))) - (unless (fboundp fname) - (defalias fname - (lambda () - (:documentation - (format "Insert a template for a @%s entry; see also `bibtex-entry'." - entry)) - (interactive "*") - (bibtex-entry entry)))) - ;; Menu entries - (define-key menu-map (vector fname) - `(menu-item ,(or (nth 1 elt) (car elt)) ,fname)))) - (define-key bibtex-mode-map - (vector 'menu-bar dialect) - `(menu-item "Entry-Types" ,menu-map - :visible (eq bibtex-dialect ',dialect)))))) - -(defun bibtex-field-list (entry-type) - "Return list of allowed fields for entry ENTRY-TYPE. +(defvar bibtex-dialect-select-map + (let ((select-map (make-sparse-keymap))) + (dolist (dialect (reverse bibtex-dialect-list)) + (define-key + select-map (vector dialect) + `(menu-item ,(symbol-name dialect) + (lambda () (interactive) (bibtex-set-dialect ',dialect t)) + :button (:radio . (eq bibtex-dialect ',dialect))))) + select-map) + "Submenu for selecting the BibTeX dialect.") + +;; We define a menu map for each dialect. +;; Then we select the menu map we want via the :visible keyword + +(defun bibtex-init-dialect (dialect) + "Initialize BibTeX DIALECT. +Define commands to insert templates for the entry types of DIALECT. +Also define a menu map for these commands." + (let ((menu-map (make-sparse-keymap)) + (aux (length (symbol-value + (intern (format "bibtex-%s-aux-entry-alist" dialect))))) + (cnt 0)) + (define-key menu-map [select] + `(menu-item "BibTeX dialect" ,bibtex-dialect-select-map)) + (define-key menu-map [nil-2] '(menu-item "--")) + (define-key menu-map [bibtex-preamble] + '(menu-item "Preamble" bibtex-Preamble)) + (define-key menu-map [bibtex-String] + '(menu-item "String" bibtex-String)) + (define-key menu-map [nil-1] '(menu-item "--")) + (dolist (elt (reverse (bibtex-entry-alist dialect))) + ;; Entry commands + (let* ((entry (car elt)) + (fname (intern (format "bibtex-%s" entry)))) + (unless (fboundp fname) + (defalias fname + (lambda () + (:documentation + (format "Insert a template for a @%s entry; see also `bibtex-entry'." + entry)) + (interactive "*") + (bibtex-entry entry)))) + ;; Menu entries + (define-key menu-map (vector fname) + `(menu-item ,(or (nth 1 elt) (car elt)) ,fname)) + ;; Put separator between regular entries in `bibtex-DIALECT-entry-alist' + ;; and auxiliary entries in `bibtex-DIALECT-aux-entry-alist'. + (setq cnt (1+ cnt)) + (if (= aux cnt) + (define-key menu-map [nil-3] '(menu-item "--"))))) + + ;; If we already have a menu map for DIALECT, replace it with the new one. + (let ((km (assq 'menu-bar (cdr bibtex-mode-map)))) + (if (and km (setq km (assq dialect (nthcdr 2 km)))) + (setcdr (nthcdr 2 km) (list menu-map + :visible `(eq bibtex-dialect ',dialect))) + (define-key bibtex-mode-map + (vector 'menu-bar dialect) + `(menu-item "Entry-Types" ,menu-map + :visible (eq bibtex-dialect ',dialect))))))) + +;; Initialize BibTeX dialects. +(mapc #'bibtex-init-dialect bibtex-dialect-list) + +(defun bibtex-field-list (entry) + "Return list of allowed fields for entry ENTRY. More specifically, the return value is a cons pair (REQUIRED . OPTIONAL), where REQUIRED and OPTIONAL are lists of the required and optional field -names for ENTRY-TYPE according to `bibtex-BibTeX-entry-alist' and friends, -`bibtex-include-OPTkey', `bibtex-include-OPTcrossref', -and `bibtex-user-optional-fields'." - (let ((e-list (assoc-string entry-type bibtex-entry-alist t)) - required optional) - (unless e-list - (user-error "Fields for BibTeX entry type %s not defined" entry-type)) - (if (member-ignore-case entry-type bibtex-include-OPTcrossref) - (setq required (nth 2 e-list) - optional (append (nth 3 e-list) (nth 4 e-list))) - (setq required (append (nth 2 e-list) (nth 3 e-list)) - optional (nth 4 e-list))) - (if bibtex-include-OPTkey - (push (list "key" "Used as label with certain BibTeX styles" +names for ENTRY according to `bibtex-BibTeX-entry-alist' and friends, +and `bibtex-include-OPTcrossref'." + (let* ((e-list (assoc-string entry bibtex-entry-alist t)) + (_ (unless e-list + (user-error "Fields for BibTeX entry type %s not defined" entry))) + (crossref (member-ignore-case entry bibtex-include-OPTcrossref)) + (required (if crossref (nth 2 e-list) + (append (nth 2 e-list) (nth 3 e-list)))) + (optional (if crossref + (append '(("crossref")) (nth 3 e-list) (nth 4 e-list)) + (nth 4 e-list)))) + ;; The following clause can be removed when the obsolete variable + ;; `bibtex-include-OPTkey' will be removed. + (if (and bibtex-include-OPTkey (not (assoc-string "key" optional t))) + (push (list "key" nil (if (or (stringp bibtex-include-OPTkey) (functionp bibtex-include-OPTkey)) bibtex-include-OPTkey)) optional)) - (if (member-ignore-case entry-type bibtex-include-OPTcrossref) - (push '("crossref" "Reference key of the cross-referenced entry") - optional)) - (setq optional (append optional bibtex-user-optional-fields)) (cons (bibtex--skip-field-aliases required) (bibtex--skip-field-aliases optional)))) @@ -3823,7 +3862,7 @@ Aliases are fields for which the element ALTERNATIVE is a negative number, see `bibtex-BibTeX-entry-alist'. The shortened field list is used for the templates of `bibtex-entry', whereas entry validation performed by `bibtex-format-entry' uses the full list of fields for an entry." - ;; FIXME: `bibtex-entry' and `bibtex-format-entry' handle aliases + ;; FIXME: `bibtex-entry' and `bibtex-format-entry' handle field aliases ;; under the hood in a manner that is largely invisible to users. ;; If instead one wanted to display the aliases as alternatives ;; in the usual way, field names may get both the ALT and the OPT prefix. @@ -4024,13 +4063,13 @@ interactive calls." (bibtex-beginning-of-entry) (looking-at bibtex-entry-maybe-empty-head) (bibtex-type-in-head))) - (field-list (bibtex-field-list type)) - (comment (assoc-string field (append (car field-list) - (cdr field-list)) t))) - (message "%s" (cond ((nth 1 comment) (nth 1 comment)) - ((setq comment (assoc-string field bibtex-field-alist t)) - (nth 1 comment)) - (t "No comment available")))))) + (field-list (bibtex-field-list type))) + (message "%s" (or (nth 1 (assoc-string field + (append (car field-list) + (cdr field-list)) + t)) + (nth 1 (assoc-string field bibtex-field-alist t)) + "No comment available"))))) (defun bibtex-make-field (field &optional move interactive nodelim) "Make a field named FIELD in current BibTeX entry. @@ -4593,8 +4632,7 @@ Return t if test was successful, nil otherwise." (unless crossref (copy-sequence (nth 3 entry-list))))) (opt (append (if crossref (nth 3 entry-list)) - (nth 4 entry-list) - bibtex-user-optional-fields)) + (nth 4 entry-list))) (default (append req opt)) (num-alt (let ((n 0)) (mapc (lambda (x) @@ -5335,6 +5373,8 @@ entries from minibuffer." (message "Buffer is now parsable. Please save it."))) (defun bibtex-completion-at-point-function () + "Compute completion data for BibTeX mode. +For use with `completion-at-point-functions'." (let ((pnt (point)) (case-fold-search t) (beg (save-excursion @@ -5572,14 +5612,7 @@ A prefix arg negates the value of `bibtex-search-entry-globally'. Return alist with elements (KEY FILE ENTRY), where FILE is the BibTeX file of ENTRY." (interactive - (list (completing-read - "Field: " - (delete-dups - (apply #'append - bibtex-user-optional-fields - (mapcar (lambda (x) (mapcar #'car (apply #'append (nthcdr 2 x)))) - bibtex-entry-alist))) - nil t) + (list (completing-read "Field: " bibtex-field-alist nil t) (read-string "Regexp: ") (if bibtex-search-entry-globally (not current-prefix-arg) commit fec6078f62c717edfe6ad5fe87f531ccbbd8e08f Author: Stefan Kangas Date: Thu Jan 2 02:48:36 2025 +0100 * lisp/progmodes/grep.el (grep-mode-map): Improve docstring. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index d204cf32000..72c0f871e0b 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -299,7 +299,7 @@ See `compilation-error-screen-columns'." (defvar-keymap grep-mode-map :doc "Keymap for grep buffers. -`compilation-minor-mode-map' is a cdr of this." +This keymap inherits from `compilation-minor-mode-map'." :parent compilation-minor-mode-map "SPC" #'scroll-up-command "S-SPC" #'scroll-down-command commit 885f6993b72a7eccb012a1b5be16210351d02d53 Author: Stefan Kangas Date: Thu Jan 2 02:46:39 2025 +0100 Prefer defvar-keymap in grep.el * lisp/progmodes/grep.el (grep-mode-map, grep-edit-mode-map): Prefer defvar-keymap. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 3a4e0d01ddd..d204cf32000 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -297,24 +297,22 @@ See `compilation-error-screen-columns'." "List of hook functions run by `grep-process-setup' (see `run-hooks')." :type 'hook) -(defvar grep-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map compilation-minor-mode-map) - (define-key map " " #'scroll-up-command) - (define-key map [?\S-\ ] #'scroll-down-command) - (define-key map "\^?" #'scroll-down-command) - (define-key map "\C-c\C-f" #'next-error-follow-minor-mode) - - (define-key map "\r" #'compile-goto-error) ;; ? - (define-key map "{" #'compilation-previous-file) - (define-key map "}" #'compilation-next-file) - (define-key map "\t" #'compilation-next-error) - (define-key map [backtab] #'compilation-previous-error) - - (define-key map "e" #'grep-change-to-grep-edit-mode) - map) - "Keymap for grep buffers. -`compilation-minor-mode-map' is a cdr of this.") +(defvar-keymap grep-mode-map + :doc "Keymap for grep buffers. +`compilation-minor-mode-map' is a cdr of this." + :parent compilation-minor-mode-map + "SPC" #'scroll-up-command + "S-SPC" #'scroll-down-command + "DEL" #'scroll-down-command + "C-c C-f" #'next-error-follow-minor-mode + + "RET" #'compile-goto-error + "{" #'compilation-previous-file + "}" #'compilation-next-file + "TAB" #'compilation-next-error + "" #'compilation-previous-error + + "e" #'grep-change-to-grep-edit-mode) (easy-menu-define grep-menu-map grep-mode-map "Menu for grep buffers." @@ -1082,12 +1080,10 @@ list is empty)." (1+ (pos-eol))) `(occur-target ((,m . ,m))))))))) -(defvar grep-edit-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map text-mode-map) - (define-key map (kbd "C-c C-c") #'grep-edit-save-changes) - map) - "Keymap for `grep-edit-mode'.") +(defvar-keymap grep-edit-mode-map + :doc "Keymap for `grep-edit-mode'." + :parent text-mode-map + "C-c C-c" #'grep-edit-save-changes) (defvar grep-edit-mode-hook nil "Hooks run when changing to Grep-Edit mode.") commit 21c7c594e8ef04da11ba796a18e7c63da359a7ad Author: Stefan Kangas Date: Thu Jan 2 02:41:06 2025 +0100 ; Update missed copyright year diff --git a/etc/tutorials/TUTORIAL.el_GR b/etc/tutorials/TUTORIAL.el_GR index 577010dae8b..5ce54d7ab20 100644 --- a/etc/tutorials/TUTORIAL.el_GR +++ b/etc/tutorials/TUTORIAL.el_GR @@ -1239,7 +1239,7 @@ list-packages. Στη σχετική λίστα, μπορείς να εγκατ πνευματικά δικαιώματα και δίνεται με την άδεια διανομής αντιγράφων υπό κάποιους όρους. - Πνευματικά Δικαιώματα (C) 1985, 1996, 1998, 2001-2024 Free Software + Πνευματικά Δικαιώματα (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc. Αυτό το αρχείο είναι μέρος του GNU Emacs. commit 3adf3f546e1ccd9c178dec2710f8e6e3e529373a Author: Paul Eggert Date: Wed Jan 1 15:18:19 2025 -0800 Update from Gnulib by running admin/merge-gnulib diff --git a/build-aux/config.guess b/build-aux/config.guess index a41cf66028b..48a684601bd 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,6 +1,6 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2025 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2025 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." diff --git a/build-aux/config.sub b/build-aux/config.sub index ca779e379fd..4aaae46f6f7 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,6 +1,6 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2025 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale @@ -76,7 +76,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2025 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." diff --git a/build-aux/update-copyright b/build-aux/update-copyright index 549e1c69633..124c7d2e423 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -47,8 +47,8 @@ # Each file's copyright statement must be formatted correctly in # order to be recognized. For example, each of these is fine: # -# Copyright @copyright{} 1990-2005, 2007-2009, 2025 Free Software -# Foundation, Inc. +# Copyright @copyright{} 1990-2005, 2007-2009, 2025 Free Software Foundation, +# Inc. # # # Copyright (C) 1990-2005, 2007-2009 Free Software # # Foundation, Inc. diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 0e0043f789e..456696f4c9e 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -5,7 +5,7 @@ % \def\texinfoversion{2024-11-04.20} % -% Copyright 1985--1986, 1988, 1990--2025 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990-2024 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 9eb5ff87c9c..afb00caf8f1 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h @@ -1,7 +1,7 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2025 Free Software - Foundation, Inc. + Copyright (C) 1995, 1999, 2001-2004, 2006-2025 Free Software Foundation, + Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/binary-io.h b/lib/binary-io.h index e6bc762ed89..20b9b5d8976 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -1,6 +1,5 @@ /* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008-2025 Free Software Foundation, - Inc. + Copyright (C) 2001, 2003, 2005, 2008-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/c-ctype.h b/lib/c-ctype.h index 76a1fc5452f..390631420f1 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -5,8 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2025 Free Software Foundation, - Inc. + Copyright (C) 2000-2003, 2006, 2008-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index 79e0dd1d96d..2d963c30e98 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c @@ -1,6 +1,5 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index b14a3314230..6da59d09b32 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c @@ -1,6 +1,5 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 13575af52a8..9ec3ca33224 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -1,7 +1,7 @@ /* Read symbolic links into a buffer without size limitation, relative to fd. - Copyright (C) 2001, 2003-2004, 2007, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 2001, 2003-2004, 2007, 2009-2025 Free Software Foundation, + Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/cloexec.c b/lib/cloexec.c index a73b4dca087..8ab5591f5e9 100644 --- a/lib/cloexec.c +++ b/lib/cloexec.c @@ -1,7 +1,6 @@ /* cloexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 1991, 2004-2006, 2009-2025 Free Software Foundation, - Inc. + Copyright (C) 1991, 2004-2006, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/close-stream.c b/lib/close-stream.c index 4ee8d77216b..5dbb19c6ce9 100644 --- a/lib/close-stream.c +++ b/lib/close-stream.c @@ -1,7 +1,6 @@ /* Close a stream, with nicer error checking than fclose's. - Copyright (C) 1998-2002, 2004, 2006-2025 Free Software Foundation, - Inc. + Copyright (C) 1998-2002, 2004, 2006-2025 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/diffseq.h b/lib/diffseq.h index 9ce6e7c275e..8a823f98ea0 100644 --- a/lib/diffseq.h +++ b/lib/diffseq.h @@ -1,7 +1,7 @@ /* Analyze differences between two vectors. - Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2025 Free - Software Foundation, Inc. + Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2025 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/dup2.c b/lib/dup2.c index ef3d4e77780..69b37196dee 100644 --- a/lib/dup2.c +++ b/lib/dup2.c @@ -1,7 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2025 Free Software Foundation, - Inc. + Copyright (C) 1999, 2004-2007, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/endian.in.h b/lib/endian.in.h index 30fd8aff128..e81aa7da8ce 100644 --- a/lib/endian.in.h +++ b/lib/endian.in.h @@ -29,6 +29,10 @@ /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_ENDIAN_H@ +#elif @HAVE_SYS_ENDIAN_H@ + +# include + #endif @@ -69,7 +73,7 @@ _GL_INLINE_HEADER_BEGIN # define BYTE_ORDER LITTLE_ENDIAN #endif -#if @HAVE_ENDIAN_H@ +#if @HAVE_ENDIAN_H@ || @HAVE_SYS_ENDIAN_H@ /* Make sure we don't have any system definitions. */ # undef be16toh diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c index c64280c2a0f..35dcc19f169 100644 --- a/lib/file-has-acl.c +++ b/lib/file-has-acl.c @@ -55,6 +55,12 @@ static char const UNKNOWN_SECURITY_CONTEXT[] = "?"; # include # include # include +# ifndef XATTR_NAME_SMACK +# define XATTR_NAME_SMACK "security.SMACK64" +# endif +# ifndef XATTR_NAME_SELINUX +# define XATTR_NAME_SELINUX "security.selinux" +# endif # ifndef XATTR_NAME_NFSV4_ACL # define XATTR_NAME_NFSV4_ACL "system.nfs4_acl" # endif diff --git a/lib/filemode.h b/lib/filemode.h index 633c618c9ca..288b3619a2f 100644 --- a/lib/filemode.h +++ b/lib/filemode.h @@ -1,7 +1,7 @@ /* Make a string describing file modes. - Copyright (C) 1998-1999, 2003, 2006, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 1998-1999, 2003, 2006, 2009-2025 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fpending.c b/lib/fpending.c index 7786fd98945..7614b607832 100644 --- a/lib/fpending.c +++ b/lib/fpending.c @@ -1,6 +1,6 @@ /* fpending.c -- return the number of pending output bytes on a stream - Copyright (C) 2000, 2004, 2006-2007, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 2000, 2004, 2006-2007, 2009-2025 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fpending.h b/lib/fpending.h index f2a94655872..423a6fa2116 100644 --- a/lib/fpending.h +++ b/lib/fpending.h @@ -1,7 +1,7 @@ /* Declare __fpending. - Copyright (C) 2000, 2003, 2005-2006, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 2000, 2003, 2005-2006, 2009-2025 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fsusage.c b/lib/fsusage.c index 1ddf18a280d..e26bda88aa6 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -1,7 +1,7 @@ /* fsusage.c -- return space usage of mounted file systems - Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2025 Free - Software Foundation, Inc. + Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2025 Free Software + Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/getgroups.c b/lib/getgroups.c index fe165f66abb..402206bf886 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c @@ -1,7 +1,6 @@ /* provide consistent interface to getgroups for systems that don't allow N==0 - Copyright (C) 1996, 1999, 2003, 2006-2025 Free Software Foundation, - Inc. + Copyright (C) 1996, 1999, 2003, 2006-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/getloadavg.c b/lib/getloadavg.c index b777af3d875..a7966462c73 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c @@ -1,7 +1,7 @@ /* Get the system load averages. - Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2025 Free - Software Foundation, Inc. + Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2025 Free Software + Foundation, Inc. NOTE: The canonical source of this file is maintained with gnulib. Bugs can be reported to bug-gnulib@gnu.org. diff --git a/lib/gettime.c b/lib/gettime.c index f1c2f18c6bb..b124614a060 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -1,7 +1,6 @@ /* gettime -- get the system clock - Copyright (C) 2002, 2004-2007, 2009-2025 Free Software Foundation, - Inc. + Copyright (C) 2002, 2004-2007, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index cb10bff8d76..304e23b23c7 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -1,7 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001-2003, 2005-2007, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 2c569b394eb..a42e77e99b8 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -47,7 +47,7 @@ # --avoid=iswctype \ # --avoid=iswdigit \ # --avoid=iswxdigit \ -# --avoid=langinfo \ +# --avoid=langinfo-h \ # --avoid=libgmp-mpq \ # --avoid=localename-unsafe-limited \ # --avoid=lock \ @@ -67,19 +67,20 @@ # --avoid=setenv \ # --avoid=sigprocmask \ # --avoid=stat \ -# --avoid=stdarg \ +# --avoid=stdarg-h \ # --avoid=threadlib \ # --avoid=tzset \ # --avoid=unsetenv \ # --avoid=utime \ # --avoid=utime-h \ -# --avoid=wchar \ +# --avoid=wchar-h \ # --avoid=wcrtomb \ # --avoid=wctype \ # --avoid=wctype-h \ # alignasof \ # alloca-opt \ # binary-io \ +# bool \ # boot-time \ # builtin-expect \ # byteswap \ @@ -155,19 +156,18 @@ # socklen \ # stat-time \ # std-gnu11 \ -# stdbool \ # stdc_bit_width \ # stdc_count_ones \ # stdc_trailing_zeros \ -# stdckdint \ -# stddef \ -# stdio \ +# stdckdint-h \ +# stddef-h \ +# stdio-h \ # stpcpy \ # strnlen \ # strtoimax \ # symlink \ -# sys_stat \ -# sys_time \ +# sys_stat-h \ +# sys_time-h \ # tempname \ # time-h \ # time_r \ @@ -927,6 +927,7 @@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ +HAVE_SYS_ENDIAN_H = @HAVE_SYS_ENDIAN_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ @@ -1037,6 +1038,7 @@ LIB_WSOCK32 = @LIB_WSOCK32@ LIB_XATTR = @LIB_XATTR@ LIMITS_H = @LIMITS_H@ LN_S_FILEONLY = @LN_S_FILEONLY@ +LOCALE_EN_UTF8 = @LOCALE_EN_UTF8@ LTLIBGMP = @LTLIBGMP@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ @@ -1823,8 +1825,8 @@ libgnu_a_SOURCES += diffseq.h endif ## end gnulib module diffseq -## begin gnulib module dirent -ifeq (,$(OMIT_GNULIB_MODULE_dirent)) +## begin gnulib module dirent-h +ifeq (,$(OMIT_GNULIB_MODULE_dirent-h)) BUILT_SOURCES += dirent.h @@ -1872,7 +1874,7 @@ MOSTLYCLEANFILES += dirent.h dirent.h-t EXTRA_DIST += dirent.in.h endif -## end gnulib module dirent +## end gnulib module dirent-h ## begin gnulib module dirfd ifeq (,$(OMIT_GNULIB_MODULE_dirfd)) @@ -1946,6 +1948,7 @@ endian.h: endian.in.h $(top_builddir)/config.status -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''HAVE_ENDIAN_H''@|$(HAVE_ENDIAN_H)|g' \ -e 's|@''NEXT_ENDIAN_H''@|$(NEXT_ENDIAN_H)|g' \ + -e 's|@''HAVE_SYS_ENDIAN_H''@|$(HAVE_SYS_ENDIAN_H)|g' \ -e 's|@''ENDIAN_H_JUST_MISSING_STDINT''@|$(ENDIAN_H_JUST_MISSING_STDINT)|g' \ $(srcdir)/endian.in.h > $@-t $(AM_V_at)mv $@-t $@ @@ -1962,8 +1965,8 @@ EXTRA_DIST += endian.in.h endif ## end gnulib module endian -## begin gnulib module errno -ifeq (,$(OMIT_GNULIB_MODULE_errno)) +## begin gnulib module errno-h +ifeq (,$(OMIT_GNULIB_MODULE_errno-h)) BUILT_SOURCES += $(ERRNO_H) @@ -1994,7 +1997,7 @@ MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h endif -## end gnulib module errno +## end gnulib module errno-h ## begin gnulib module euidaccess ifeq (,$(OMIT_GNULIB_MODULE_euidaccess)) @@ -2534,8 +2537,8 @@ EXTRA_DIST += intprops-internal.h intprops.h endif ## end gnulib module intprops -## begin gnulib module inttypes-incomplete -ifeq (,$(OMIT_GNULIB_MODULE_inttypes-incomplete)) +## begin gnulib module inttypes-h-incomplete +ifeq (,$(OMIT_GNULIB_MODULE_inttypes-h-incomplete)) BUILT_SOURCES += inttypes.h @@ -2577,7 +2580,7 @@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t EXTRA_DIST += inttypes.in.h endif -## end gnulib module inttypes-incomplete +## end gnulib module inttypes-h-incomplete ## begin gnulib module lchmod ifeq (,$(OMIT_GNULIB_MODULE_lchmod)) @@ -3169,8 +3172,8 @@ endif endif ## end gnulib module stdc_trailing_zeros -## begin gnulib module stdckdint -ifeq (,$(OMIT_GNULIB_MODULE_stdckdint)) +## begin gnulib module stdckdint-h +ifeq (,$(OMIT_GNULIB_MODULE_stdckdint-h)) BUILT_SOURCES += $(STDCKDINT_H) @@ -3190,10 +3193,10 @@ MOSTLYCLEANFILES += stdckdint.h stdckdint.h-t EXTRA_DIST += intprops-internal.h stdckdint.in.h endif -## end gnulib module stdckdint +## end gnulib module stdckdint-h -## begin gnulib module stddef -ifeq (,$(OMIT_GNULIB_MODULE_stddef)) +## begin gnulib module stddef-h +ifeq (,$(OMIT_GNULIB_MODULE_stddef-h)) BUILT_SOURCES += $(STDDEF_H) @@ -3222,10 +3225,10 @@ MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h endif -## end gnulib module stddef +## end gnulib module stddef-h -## begin gnulib module stdint -ifeq (,$(OMIT_GNULIB_MODULE_stdint)) +## begin gnulib module stdint-h +ifeq (,$(OMIT_GNULIB_MODULE_stdint-h)) BUILT_SOURCES += $(STDINT_H) @@ -3272,10 +3275,10 @@ MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h endif -## end gnulib module stdint +## end gnulib module stdint-h -## begin gnulib module stdio -ifeq (,$(OMIT_GNULIB_MODULE_stdio)) +## begin gnulib module stdio-h +ifeq (,$(OMIT_GNULIB_MODULE_stdio-h)) BUILT_SOURCES += stdio.h @@ -3435,10 +3438,10 @@ endif EXTRA_DIST += stdio.in.h endif -## end gnulib module stdio +## end gnulib module stdio-h -## begin gnulib module stdlib -ifeq (,$(OMIT_GNULIB_MODULE_stdlib)) +## begin gnulib module stdlib-h +ifeq (,$(OMIT_GNULIB_MODULE_stdlib-h)) BUILT_SOURCES += stdlib.h libgnu_a_SOURCES += stdlib.c @@ -3609,7 +3612,7 @@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t1 stdlib.h-t2 stdlib.h-t3 EXTRA_DIST += stdlib.in.h endif -## end gnulib module stdlib +## end gnulib module stdlib-h ## begin gnulib module stpcpy ifeq (,$(OMIT_GNULIB_MODULE_stpcpy)) @@ -3621,8 +3624,8 @@ endif endif ## end gnulib module stpcpy -## begin gnulib module string -ifeq (,$(OMIT_GNULIB_MODULE_string)) +## begin gnulib module string-h +ifeq (,$(OMIT_GNULIB_MODULE_string-h)) BUILT_SOURCES += string.h @@ -3740,7 +3743,7 @@ MOSTLYCLEANFILES += string.h string.h-t1 string.h-t2 EXTRA_DIST += string.in.h endif -## end gnulib module string +## end gnulib module string-h ## begin gnulib module strnlen ifeq (,$(OMIT_GNULIB_MODULE_strnlen)) @@ -3788,8 +3791,8 @@ endif endif ## end gnulib module symlink -## begin gnulib module sys_random -ifeq (,$(OMIT_GNULIB_MODULE_sys_random)) +## begin gnulib module sys_random-h +ifeq (,$(OMIT_GNULIB_MODULE_sys_random-h)) BUILT_SOURCES += sys/random.h @@ -3818,10 +3821,10 @@ MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_random.in.h endif -## end gnulib module sys_random +## end gnulib module sys_random-h -## begin gnulib module sys_select -ifeq (,$(OMIT_GNULIB_MODULE_sys_select)) +## begin gnulib module sys_select-h +ifeq (,$(OMIT_GNULIB_MODULE_sys_select-h)) BUILT_SOURCES += sys/select.h @@ -3852,10 +3855,10 @@ MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_select.in.h endif -## end gnulib module sys_select +## end gnulib module sys_select-h -## begin gnulib module sys_stat -ifeq (,$(OMIT_GNULIB_MODULE_sys_stat)) +## begin gnulib module sys_stat-h +ifeq (,$(OMIT_GNULIB_MODULE_sys_stat-h)) BUILT_SOURCES += sys/stat.h @@ -3927,10 +3930,10 @@ MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_stat.in.h endif -## end gnulib module sys_stat +## end gnulib module sys_stat-h -## begin gnulib module sys_time -ifeq (,$(OMIT_GNULIB_MODULE_sys_time)) +## begin gnulib module sys_time-h +ifeq (,$(OMIT_GNULIB_MODULE_sys_time-h)) BUILT_SOURCES += sys/time.h @@ -3962,10 +3965,10 @@ MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_time.in.h endif -## end gnulib module sys_time +## end gnulib module sys_time-h -## begin gnulib module sys_types -ifeq (,$(OMIT_GNULIB_MODULE_sys_types)) +## begin gnulib module sys_types-h +ifeq (,$(OMIT_GNULIB_MODULE_sys_types-h)) BUILT_SOURCES += sys/types.h @@ -3990,7 +3993,7 @@ MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_types.in.h endif -## end gnulib module sys_types +## end gnulib module sys_types-h ## begin gnulib module tempname ifeq (,$(OMIT_GNULIB_MODULE_tempname)) @@ -4140,8 +4143,8 @@ EXTRA_DIST += u64.h endif ## end gnulib module u64 -## begin gnulib module unistd -ifeq (,$(OMIT_GNULIB_MODULE_unistd)) +## begin gnulib module unistd-h +ifeq (,$(OMIT_GNULIB_MODULE_unistd-h)) BUILT_SOURCES += unistd.h libgnu_a_SOURCES += unistd.c @@ -4359,7 +4362,7 @@ MOSTLYCLEANFILES += unistd.h unistd.h-t1 unistd.h-t2 unistd.h-t3 unistd.h-t4 EXTRA_DIST += unistd.in.h endif -## end gnulib module unistd +## end gnulib module unistd-h ## begin gnulib module unlocked-io-internal ifeq (,$(OMIT_GNULIB_MODULE_unlocked-io-internal)) diff --git a/lib/group-member.c b/lib/group-member.c index 919f6e7d84b..a26eebe37d2 100644 --- a/lib/group-member.c +++ b/lib/group-member.c @@ -1,7 +1,7 @@ /* group-member.c -- determine whether group id is in calling user's group list - Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2025 Free - Software Foundation, Inc. + Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2025 Free Software + Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/malloc.c b/lib/malloc.c index 6b650b8105a..5642c83c2d9 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -1,7 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/md5-stream.c b/lib/md5-stream.c index 8eeafc1df33..fdbf97a682b 100644 --- a/lib/md5-stream.c +++ b/lib/md5-stream.c @@ -1,7 +1,7 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2025 Free - Software Foundation, Inc. + Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2025 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/md5.c b/lib/md5.c index c8578476c96..ae2622a1e75 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -1,7 +1,7 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2025 Free - Software Foundation, Inc. + Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2025 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/md5.h b/lib/md5.h index 3635cd65ebd..b42b7b010ce 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -1,7 +1,7 @@ /* Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2025 Free - Software Foundation, Inc. + Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2025 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/memmem.c b/lib/memmem.c index 9801fe387f0..0410596a110 100644 --- a/lib/memmem.c +++ b/lib/memmem.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2025 Free - Software Foundation, Inc. +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2025 Free Software + Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/memrchr.c b/lib/memrchr.c index b45f4e7c601..b143fb0a3a5 100644 --- a/lib/memrchr.c +++ b/lib/memrchr.c @@ -1,7 +1,7 @@ /* memrchr -- find the last occurrence of a byte in a memory block - Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2025 Free - Software Foundation, Inc. + Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2025 Free Software + Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and diff --git a/lib/nanosleep.c b/lib/nanosleep.c index e3dbd4ec142..cfafa4e37e1 100644 --- a/lib/nanosleep.c +++ b/lib/nanosleep.c @@ -1,7 +1,6 @@ /* Provide a replacement for the POSIX nanosleep function. - Copyright (C) 1999-2000, 2002, 2004-2025 Free Software Foundation, - Inc. + Copyright (C) 1999-2000, 2002, 2004-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/save-cwd.h b/lib/save-cwd.h index 8e3ace79c68..f0c79431eb1 100644 --- a/lib/save-cwd.h +++ b/lib/save-cwd.h @@ -1,7 +1,7 @@ /* Save and restore current working directory. - Copyright (C) 1995, 1997-1998, 2003, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 1995, 1997-1998, 2003, 2009-2025 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sha1.c b/lib/sha1.c index 7a17e1c4575..d10c159af6c 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -1,8 +1,7 @@ /* sha1.c - Functions to compute SHA1 message digest of files or memory blocks according to the NIST specification FIPS-180-1. - Copyright (C) 2000-2001, 2003-2006, 2008-2025 Free Software - Foundation, Inc. + Copyright (C) 2000-2001, 2003-2006, 2008-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/sig2str.c b/lib/sig2str.c index dc906b3e00e..e8c830c6daf 100644 --- a/lib/sig2str.c +++ b/lib/sig2str.c @@ -1,7 +1,6 @@ /* sig2str.c -- convert between signal names and numbers - Copyright (C) 2002, 2004, 2006, 2009-2025 Free Software Foundation, - Inc. + Copyright (C) 2002, 2004, 2006, 2009-2025 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 2b785a1896a..f8e2a6ce344 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -1,7 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2025 Free Software Foundation, - Inc. + Copyright (C) 1995, 2001-2004, 2006-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/strtoimax.c b/lib/strtoimax.c index e34f081a103..1dec8130baf 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -1,7 +1,7 @@ /* Convert string representation of a number into an intmax_t value. - Copyright (C) 1999, 2001-2004, 2006, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 1999, 2001-2004, 2006, 2009-2025 Free Software Foundation, + Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/strtol.c b/lib/strtol.c index 381a694edb2..0bcc6f40eca 100644 --- a/lib/strtol.c +++ b/lib/strtol.c @@ -1,7 +1,7 @@ /* Convert string representation of a number into an integer value. - Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2025 Free - Software Foundation, Inc. + Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2025 Free Software + Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. diff --git a/lib/strtoll.c b/lib/strtoll.c index efcf7089202..4326f5f0306 100644 --- a/lib/strtoll.c +++ b/lib/strtoll.c @@ -1,6 +1,6 @@ /* Function to parse a 'long long int' from text. - Copyright (C) 1995-1997, 1999, 2001, 2009-2025 Free Software - Foundation, Inc. + Copyright (C) 1995-1997, 1999, 2001, 2009-2025 Free Software Foundation, + Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/lib/time_r.c b/lib/time_r.c index e2dd422b9c6..15d65d599c2 100644 --- a/lib/time_r.c +++ b/lib/time_r.c @@ -1,7 +1,6 @@ /* Reentrant time functions like localtime_r. - Copyright (C) 2003, 2006-2007, 2010-2025 Free Software Foundation, - Inc. + Copyright (C) 2003, 2006-2007, 2010-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/lib/verify.h b/lib/verify.h index 4b67aa226eb..96fde0b9c81 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -255,6 +255,11 @@ template # endif # endif /* Define static_assert if needed. */ +# if defined __cplusplus && defined __clang__ && __clang_major__ < 9 +/* clang++ before commit 5c739665a8721228cf6143fd4ef95870a59f55ae had a + two-arguments static_assert but not the one-argument static_assert. */ +# undef static_assert +# endif # if (!defined static_assert \ && __STDC_VERSION__ < 202311 \ && (!defined __cplusplus \ diff --git a/m4/alloca.m4 b/m4/alloca.m4 index 965973acf17..68fc6211def 100644 --- a/m4/alloca.m4 +++ b/m4/alloca.m4 @@ -1,7 +1,7 @@ # alloca.m4 # serial 21 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/codeset.m4 b/m4/codeset.m4 index a96b50abb8f..6bed9deeccc 100644 --- a/m4/codeset.m4 +++ b/m4/codeset.m4 @@ -1,7 +1,7 @@ # codeset.m4 # serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2025 Free -dnl Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2025 Free Software +dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/d-type.m4 b/m4/d-type.m4 index 88e2f240b5f..d52ac301310 100644 --- a/m4/d-type.m4 +++ b/m4/d-type.m4 @@ -1,7 +1,7 @@ # d-type.m4 # serial 12 -dnl Copyright (C) 1997, 1999-2004, 2006, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 1997, 1999-2004, 2006, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/dup2.m4 b/m4/dup2.m4 index d5f4e0e0337..5da3a0b9f61 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 @@ -1,7 +1,6 @@ # dup2.m4 # serial 28 -dnl Copyright (C) 2002, 2005, 2007, 2009-2025 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2005, 2007, 2009-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/endian_h.m4 b/m4/endian_h.m4 index a090ef971f1..f34402fd374 100644 --- a/m4/endian_h.m4 +++ b/m4/endian_h.m4 @@ -1,5 +1,5 @@ # endian_h.m4 -# serial 4 +# serial 6 dnl Copyright 2024-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -34,7 +34,7 @@ AC_DEFUN_ONCE([gl_ENDIAN_H], AC_CACHE_CHECK([if endian.h defines functions and macros], [gl_cv_header_working_endian_h], [gl_cv_header_working_endian_h=no - AC_COMPILE_IFELSE( + AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include @@ -80,6 +80,75 @@ return !(value16_1 + value32_1 + value64_1 HAVE_ENDIAN_H=0 fi + AC_CHECK_HEADERS_ONCE([sys/endian.h]) + if test $ac_cv_header_sys_endian_h = yes; then + HAVE_SYS_ENDIAN_H=1 + dnl Check if sys/endian.h defines uint16_t, uint32_t, and uint64_t. + dnl Note: We don't use the result of this test for now. + AC_CACHE_CHECK([if sys/endian.h defines stdint types], + [gl_cv_header_sys_endian_h_stdint_types], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[uint16_t t1 = 0; + uint32_t t2 = 0; + uint64_t t3 = 0; + return !(t1 + t2 + t3); + ]])], + [gl_cv_header_sys_endian_h_stdint_types=yes], + [gl_cv_header_sys_endian_h_stdint_types=no]) + ]) + dnl Note: We don't use the result of this test for now. + AC_CACHE_CHECK([if sys/endian.h defines functions and macros], + [gl_cv_header_working_sys_endian_h], + [gl_cv_header_working_sys_endian_h=no + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( +[[ +#include +]], +[[ +#if LITTLE_ENDIAN == BIG_ENDIAN +# error "Endian macros not unique." +#endif +#if BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN +# error "Byte order not defined." +#endif + +/* Big endian to host. */ +int value16_1 = be16toh (0.0); +int value32_1 = be32toh (0.0); +int value64_1 = be64toh (0.0); + +/* Host to big endian. */ +int value16_2 = htobe16 (0.0); +int value32_2 = htobe32 (0.0); +int value64_2 = htobe64 (0.0); + +/* Little endian to host. */ +int value16_3 = le16toh (0.0); +int value32_3 = le32toh (0.0); +int value64_3 = le64toh (0.0); + +/* Host to little endian. */ +int value16_4 = htole16 (0.0); +int value32_4 = htole32 (0.0); +int value64_4 = htole64 (0.0); + +/* Make sure the variables get used. */ +return !(value16_1 + value32_1 + value64_1 + + value16_2 + value32_2 + value64_2 + + value16_3 + value32_3 + value64_3 + + value16_4 + value32_4 + value64_4); +]])], + [gl_cv_header_working_sys_endian_h=yes], + [gl_cv_header_working_sys_endian_h=no]) + ]) + else + HAVE_SYS_ENDIAN_H=0 + fi + dnl Check if endian.h should be generated. if test "$gl_cv_header_endian_h_stdint_types" = yes \ && test "$gl_cv_header_working_endian_h" = yes; then @@ -100,5 +169,6 @@ return !(value16_1 + value32_1 + value64_1 fi AC_SUBST([HAVE_ENDIAN_H]) + AC_SUBST([HAVE_SYS_ENDIAN_H]) AC_SUBST([ENDIAN_H_JUST_MISSING_STDINT]) ]) diff --git a/m4/filemode.m4 b/m4/filemode.m4 index eda8397a811..7a66a21124b 100644 --- a/m4/filemode.m4 +++ b/m4/filemode.m4 @@ -1,7 +1,6 @@ # filemode.m4 # serial 9 -dnl Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 index 1f7e6254290..bb7b6e4303d 100644 --- a/m4/fsusage.m4 +++ b/m4/fsusage.m4 @@ -1,7 +1,7 @@ # fsusage.m4 # serial 35 -dnl Copyright (C) 1997-1998, 2000-2001, 2003-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 1997-1998, 2000-2001, 2003-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 index 1332e98a3d2..325ea7fd1dd 100644 --- a/m4/getgroups.m4 +++ b/m4/getgroups.m4 @@ -1,7 +1,7 @@ # getgroups.m4 # serial 25 -dnl Copyright (C) 1996-1997, 1999-2004, 2008-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 1996-1997, 1999-2004, 2008-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/getline.m4 b/m4/getline.m4 index 92b7db7f18e..b97b8011248 100644 --- a/m4/getline.m4 +++ b/m4/getline.m4 @@ -1,8 +1,8 @@ # getline.m4 # serial 33 -dnl Copyright (C) 1998-2003, 2005-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 1998-2003, 2005-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/gettime.m4 b/m4/gettime.m4 index 90e025522fb..87f81cdee3c 100644 --- a/m4/gettime.m4 +++ b/m4/gettime.m4 @@ -1,7 +1,6 @@ # gettime.m4 # serial 15 -dnl Copyright (C) 2002, 2004-2006, 2009-2025 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2004-2006, 2009-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index a4b194e8b73..5cd84cc997c 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,7 +1,7 @@ # gettimeofday.m4 # serial 30 -dnl Copyright (C) 2001-2003, 2005, 2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2001-2003, 2005, 2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index a699c810790..771181cb1bf 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -51,6 +51,7 @@ AC_DEFUN([gl_EARLY], # Code from module at-internal: # Code from module attribute: # Code from module binary-io: + # Code from module bool: # Code from module boot-time: # Code from module builtin-expect: # Code from module byteswap: @@ -70,7 +71,7 @@ AC_DEFUN([gl_EARLY], # Code from module crypto/sha512-buffer: # Code from module d-type: # Code from module diffseq: - # Code from module dirent: + # Code from module dirent-h: # Code from module dirfd: # Code from module double-slash-root: # Code from module dtoastr: @@ -79,7 +80,7 @@ AC_DEFUN([gl_EARLY], # Code from module eloop-threshold: # Code from module endian: # Code from module environ: - # Code from module errno: + # Code from module errno-h: # Code from module euidaccess: # Code from module execinfo: # Code from module extensions: @@ -127,7 +128,7 @@ AC_DEFUN([gl_EARLY], # Code from module ignore-value: # Code from module include_next: # Code from module intprops: - # Code from module inttypes-incomplete: + # Code from module inttypes-h-incomplete: # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) # Code from module lchmod: @@ -177,28 +178,27 @@ AC_DEFUN([gl_EARLY], # Code from module stat-time: # Code from module std-gnu11: # Code from module stdbit-h: - # Code from module stdbool: # Code from module stdc_bit_width: # Code from module stdc_count_ones: # Code from module stdc_leading_zeros: # Code from module stdc_trailing_zeros: - # Code from module stdckdint: - # Code from module stddef: - # Code from module stdint: - # Code from module stdio: + # Code from module stdckdint-h: + # Code from module stddef-h: + # Code from module stdint-h: + # Code from module stdio-h: gl_STDIO_H_EARLY - # Code from module stdlib: + # Code from module stdlib-h: # Code from module stpcpy: - # Code from module string: + # Code from module string-h: # Code from module strnlen: # Code from module strtoimax: # Code from module strtoll: # Code from module symlink: - # Code from module sys_random: - # Code from module sys_select: - # Code from module sys_stat: - # Code from module sys_time: - # Code from module sys_types: + # Code from module sys_random-h: + # Code from module sys_select-h: + # Code from module sys_stat-h: + # Code from module sys_time-h: + # Code from module sys_types-h: AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) # Code from module tempname: # Code from module time-h: @@ -210,7 +210,7 @@ AC_DEFUN([gl_EARLY], # Code from module timespec-add: # Code from module timespec-sub: # Code from module u64: - # Code from module unistd: + # Code from module unistd-h: # Code from module unlocked-io: # Code from module unlocked-io-internal: # Code from module update-copyright: @@ -251,6 +251,7 @@ AC_DEFUN([gl_INIT], gl_ASSERT_H gl_CONDITIONAL_HEADER([assert.h]) AC_PROG_MKDIR_P + gl_C_BOOL gl_PREREQ_READUTMP_H gl___BUILTIN_EXPECT gl_BYTESWAP @@ -525,7 +526,6 @@ AC_DEFUN([gl_INIT], gl_STDBIT_H gl_CONDITIONAL_HEADER([stdbit.h]) AC_PROG_MKDIR_P - gl_C_BOOL AC_REQUIRE([gl_STDBIT_H]) GL_STDC_BIT_WIDTH=1 AC_REQUIRE([gl_STDBIT_H]) diff --git a/m4/group-member.m4 b/m4/group-member.m4 index 046b36be433..9a04aaeefee 100644 --- a/m4/group-member.m4 +++ b/m4/group-member.m4 @@ -1,7 +1,7 @@ # group-member.m4 # serial 14 -dnl Copyright (C) 1999-2001, 2003-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 1999-2001, 2003-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4 index 7e353c16bf9..4436adaa683 100644 --- a/m4/mempcpy.m4 +++ b/m4/mempcpy.m4 @@ -1,7 +1,7 @@ # mempcpy.m4 # serial 14 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/memrchr.m4 b/m4/memrchr.m4 index 8ca0e85b172..8ebc2dd6ead 100644 --- a/m4/memrchr.m4 +++ b/m4/memrchr.m4 @@ -1,7 +1,7 @@ # memrchr.m4 # serial 11 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/mktime.m4 b/m4/mktime.m4 index af0646e7bc5..eca6c4d8924 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,7 +1,7 @@ # mktime.m4 # serial 42 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/nstrftime.m4 b/m4/nstrftime.m4 index 3ebdffd0cb7..bdb139bfc44 100644 --- a/m4/nstrftime.m4 +++ b/m4/nstrftime.m4 @@ -1,7 +1,7 @@ # nstrftime.m4 # serial 40 -dnl Copyright (C) 1996-1997, 1999-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 1996-1997, 1999-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/pathmax.m4 b/m4/pathmax.m4 index a77c861fe52..0c3925df9dd 100644 --- a/m4/pathmax.m4 +++ b/m4/pathmax.m4 @@ -1,7 +1,7 @@ # pathmax.m4 # serial 11 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sig2str.m4 b/m4/sig2str.m4 index 4d57aa8da8c..d49e363f3ae 100644 --- a/m4/sig2str.m4 +++ b/m4/sig2str.m4 @@ -1,7 +1,6 @@ # sig2str.m4 # serial 8 -dnl Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4 index 3935fe2104e..a2ffd6fc4a1 100644 --- a/m4/ssize_t.m4 +++ b/m4/ssize_t.m4 @@ -1,7 +1,6 @@ # ssize_t.m4 # serial 6 -dnl Copyright (C) 2001-2003, 2006, 2010-2025 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/stat-time.m4 b/m4/stat-time.m4 index 62e01671d0d..4aa24e7f8da 100644 --- a/m4/stat-time.m4 +++ b/m4/stat-time.m4 @@ -1,7 +1,7 @@ # stat-time.m4 # serial 1 -dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2025 Free -dnl Software Foundation, Inc. +dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2025 Free Software +dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strnlen.m4 b/m4/strnlen.m4 index 10b2e807c03..afc15cf4816 100644 --- a/m4/strnlen.m4 +++ b/m4/strnlen.m4 @@ -1,7 +1,7 @@ # strnlen.m4 # serial 15 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 index a81fd13fb21..5f5e5178e97 100644 --- a/m4/strtoimax.m4 +++ b/m4/strtoimax.m4 @@ -1,7 +1,6 @@ # strtoimax.m4 # serial 17 -dnl Copyright (C) 2002-2004, 2006, 2009-2025 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002-2004, 2006, 2009-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 index 49c56b1eafc..9ba4768e932 100644 --- a/m4/strtoll.m4 +++ b/m4/strtoll.m4 @@ -1,7 +1,6 @@ # strtoll.m4 # serial 12 -dnl Copyright (C) 2002, 2004, 2006, 2008-2025 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 2002, 2004, 2006, 2008-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/time_h.m4 b/m4/time_h.m4 index 1bb1a4ad294..f4d8e20f5ba 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -1,7 +1,7 @@ # time_h.m4 # serial 27 -dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/timespec.m4 b/m4/timespec.m4 index d077029c9a5..38be9914358 100644 --- a/m4/timespec.m4 +++ b/m4/timespec.m4 @@ -1,7 +1,7 @@ # timespec.m4 # serial 15 -dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. commit bdb13a0e5c5bab0300b1dc2e18956b15f8f59c13 Author: Paul Eggert Date: Wed Jan 1 15:17:45 2025 -0800 Adjust to Gnulib’s recent module renaming * admin/merge-gnulib (GNULIB_MODULES, AVOIDED_MODULES): Change to match Gnulib’s current module names. diff --git a/admin/merge-gnulib b/admin/merge-gnulib index f6d791aef72..458a2c325e3 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -26,7 +26,7 @@ GNULIB_URL=https://git.savannah.gnu.org/git/gnulib.git GNULIB_MODULES=' - alignasof alloca-opt binary-io boot-time builtin-expect byteswap + alignasof alloca-opt binary-io bool boot-time builtin-expect byteswap c-ctype c-strcase canonicalize-lgpl careadlinkat close-stream copy-file-range crypto/md5 crypto/md5-buffer @@ -43,10 +43,10 @@ GNULIB_MODULES=' nanosleep nproc nstrftime pathmax pipe2 pselect pthread_sigmask qcopy-acl readlink readlinkat regex - sig2str sigdescr_np socklen stat-time std-gnu11 stdbool + sig2str sigdescr_np socklen stat-time std-gnu11 stdc_bit_width stdc_count_ones stdc_trailing_zeros - stdckdint stddef stdio - stpcpy strnlen strnlen strtoimax symlink sys_stat sys_time + stdckdint-h stddef-h stdio-h + stpcpy strnlen strnlen strtoimax symlink sys_stat-h sys_time-h tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub update-copyright unlocked-io utimensat vla warnings year2038 @@ -54,13 +54,13 @@ GNULIB_MODULES=' AVOIDED_MODULES=' access btowc chmod close crypto/af_alg dup fchdir fstat gnulib-i18n - iswblank iswctype iswdigit iswxdigit langinfo libgmp-mpq + iswblank iswctype iswdigit iswxdigit langinfo-h libgmp-mpq localename-unsafe-limited lock mbrtowc mbsinit memchr mkdir msvc-inval msvc-nothrow nl_langinfo openat-die opendir pthread-h raise - save-cwd select setenv sigprocmask stat stdarg + save-cwd select setenv sigprocmask stat stdarg-h threadlib tzset unsetenv utime utime-h - wchar wcrtomb wctype wctype-h + wchar-h wcrtomb wctype wctype-h ' GNULIB_TOOL_FLAGS=' commit 78bc5949db489b143f7424540d6cc56fc529c9ea Author: Wilson Snyder Date: Wed Jan 1 08:22:50 2025 -0500 verilog-mode.el update from upstream https://github.com/veripool/verilog-mode * lisp/progmodes/verilog-mode.el (verilog-repair-open-comma): Fix AUTOINPUT, etc. adding comma after attribute (#1884). (verilog-do-indent) Imporve ident of delay control assignments (#1883) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index e9bfa371857..e75721cb729 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -9,7 +9,7 @@ ;; Keywords: languages ;; The "Version" is the date followed by the decimal rendition of the Git ;; commit hex. -;; Version: 2024.10.09.140346409 +;; Version: 2025.01.01.100165202 ;; Yoni Rabkin contacted the maintainer of this ;; file on 19/3/2008, and the maintainer agreed that when a bug is @@ -124,7 +124,7 @@ ;; ;; This variable will always hold the version number of the mode -(defconst verilog-mode-version "2024-10-09-85d8429-vpo-GNU" +(defconst verilog-mode-version "2025-01-01-5f86652-vpo-GNU" "Version of this Verilog mode.") (defconst verilog-mode-release-emacs t "If non-nil, this version of Verilog mode was released with Emacs itself.") @@ -7251,7 +7251,7 @@ Only look at a few lines to determine indent level." (verilog-beg-of-statement-1) (let ((val (if (and (< (point) here) - (verilog-re-search-forward "=[ \t]*" here 'move) + (verilog-re-search-forward "=[ \t]*\\(#[ \t]*[0-9]+[ \t]*\\)?" here 'move) ;; not at a |=>, #=#, or [=n] operator (not (string-match "\\[=.\\|#=#\\||=>" (or (buffer-substring @@ -11389,6 +11389,9 @@ Presumes that any newlines end a list element." (when (and (not (save-excursion ; Not beginning (, or existing , (backward-char 1) (looking-at "[(,]"))) + (not (save-excursion ; Not attribute *) + (backward-char 2) + (looking-at "\\*)"))) (not (save-excursion ; Not `endif, or user define (backward-char 1) (skip-chars-backward "a-zA-Z0-9_`")