소스 검색

Working on having xrefs move Bible text not commentary text

Fred Gilham 1 주 전
부모
커밋
0bb90b60f8
1개의 변경된 파일143개의 추가작업 그리고 121개의 파일을 삭제
  1. 143 121
      bible.el

+ 143 - 121
bible.el

@@ -40,7 +40,7 @@
 ;; The program also installs a Bible menu with keybindings and other
 ;; commands.
 
-;; You may customize `bible-module' to set a default browsing
+;; You may customize `bible-text' to set a default browsing
 ;; module, as well as `bible-word-study-enabled' to enable word
 ;; study by default.
 
@@ -78,11 +78,6 @@
 
 ;;;; Requirements
 
-;; REVIEW: CL-LIB is just used in this code for cl-search in two
-;; places. But since it is required by DOM and SHR, might as well take
-;; advantage of it. Maybe re-do some of the code below with CL-LIB
-;; constructs? (FMG 10-Mar-2026)
-;; Use cl-sort for backward compatibility. 21-Mar-2026
 (require 'cl-lib)
 (require 'dom)
 (require 'shr)
@@ -101,13 +96,23 @@
   :group 'tools
   :link '(url-link "https://gitbot.homedns.org/fred/bible-mode"))
 
-(defcustom bible-module
+(defcustom bible-text
   "KJV"
-  "Customize default book module for Diatheke to query.
+  "Customize default bible text module for Diatheke to query.
 \(For full list of installed modules, run `diatheke -b system -l bibliography'\)"
   :type '(choice (const :tag "None" nil)
-                 (string :tag "Module abbreviation (e.g. \"KJV\")"))
-  :local t
+                 (string :tag "Bible text (e.g. \"KJV\")"))
+  :local nil
+  :group 'bible)
+
+
+(defcustom bible-commentary
+  "Clarke"
+  "Customize default commentary module for Diatheke to query.
+\(For full list of installed modules, run `diatheke -b system -l bibliography'\)"
+  :type '(choice (const :tag "None" nil)
+                 (string :tag "Commentary (e.g. \"Clarke\")"))
+  :local nil
   :group 'bible)
 
 ;; TODO: Not implememted yet (FMG 5-Mar-2026)
@@ -205,6 +210,16 @@ See `bible--display-lemma-hebrew'."
 
 ;;;; Variable definitions
 
+(defvar bible-mode-line-format
+  '("%e" mode-line-front-space
+    mode-line-frame-identification mode-line-buffer-identification "   "
+    bible--current-book-name " " (:eval (number-to-string bible--current-chapter))
+    "  "
+    "  " mode-line-modes mode-line-misc-info
+    mode-line-end-spaces)
+  "Mode line format for bible buffers.")
+
+
 (defconst bible--verse-regexp "\\(I \\|1 \\|II \\|2 \\|III \\|3 \\)??[a-zA-Z]+?[ \t\n][0-9]+[:][0-9]+")
 
 (defvar bible--texts (lazy-completion-table bible--texts bible--list-biblical-texts))
@@ -241,79 +256,86 @@ See `bible--display-lemma-hebrew'."
     ("3 John"           . 1))
   "A-list of name / chapter count for Bible books.")
 
+;; These abbreviations are used to follow cross-references in commentaries and lexicons.
 ;; Abbreviations from NETnote module and Clarke module (commentaries).
-;; TODO: Add abbreviations found in other documents/commentaries? (FMG 5-Mar-2026)
+;; Abbreviations from some lexicons.
+;; Standard abbreviations come first.
 (defvar bible--book-name-abbreviations
   '(;; Old Testament
-    ("Ge" . "Genesis") ("Gen" . "Genesis")
-    ("Ex" . "Exodus") ("Exo" . "Exodus")
-    ("Le" . "Leviticus") ("Lev" . "Leviticus")
-    ("Nu" . "Numbers") ("Num" . "Numbers")
-    ("De" . "Deuteronomy") ("Deu" . "Deuteronomy")
-    ("Js" . "Joshua") ("Jos" . "Joshua")
-    ("Jg" . "Judges") ("Jdg" . "Judges") ("Judg" . "Judges")
+    ("Gen" . "Genesis") ("Ge" . "Genesis")
+    ("Exod" . "Exodus") ("Ex" . "Exodus") ("Exo" . "Exodus")
+    ("Lev" . "Leviticus") ("Le" . "Leviticus")
+    ("Num" . "Numbers") ("Nu" . "Numbers")
+    ("Deut" . "Deuteronomy") ("De" . "Deuteronomy") ("Deu" . "Deuteronomy")
+    ("Josh" . "Joshua") ("Js" . "Joshua") ("Jos" . "Joshua")
+    ("Judg" . "Judges") ("Jg" . "Judges") ("Jdg" . "Judges")
     ("Ru" . "Ruth") ("Rut" . "Ruth")
-    ("1 Samuel" . "I Samuel")  ("I Sa" . "I Samuel")   ("1 Sa" . "I Samuel")  ("1Sam" . "I Samuel")
-    ("2 Samuel" . "II Samuel") ("II Sa" . "II Samuel") ("2 Sa" . "II Samuel") ("2Sam" . "II Samuel")
-    ("1 Kings"  . "I Kings")   ("I Ki"  . "I Kings")   ("1 Ki" . "I Kings")
-    ("2 Kings"  . "II Kings")  ("II Ki" . "II Kings")  ("2 Ki" . "II Kings")
-    ("1 Chronicles" . "I Chronicles")  ("I Ch"  . "I Chronicles")  ("1 Ch" . "I Chronicles")
-    ("2 Chronicles" . "II Chronicles") ("II Ch" . "II Chronicles") ("2 Ch" . "II Chronicles")
+    ("1 Sam" . "I Samuel") ("1 Samuel" . "I Samuel")  ("I Sa" . "I Samuel")   ("1 Sa" . "I Samuel")  ("1Sam" . "I Samuel")
+    ("2 Sam" . "II Samuel") ("2 Samuel" . "II Samuel") ("II Sa" . "II Samuel") ("2 Sa" . "II Samuel") ("2Sam" . "II Samuel")
+    ("1 Kgs" . "I Kings") ("1 Kings"  . "I Kings") ("I Ki"  . "I Kings") ("1 Ki" . "I Kings") ("1Ki" . "I Kings")
+    ("2 Kgs" . "II Kings") ("2 Kings"  . "II Kings") ("II Ki" . "II Kings") ("2 Ki" . "II Kings") ("2Ki" . "II Kings")
+    ("1 Chr" . "I Chronicles") ("1 Chronicles" . "I Chronicles") ("I Ch"  . "I Chronicles") ("1 Ch" . "I Chronicles")
+    ("2 Chr" . "II Chronicles") ("2 Chronicles" . "II Chronicles") ("II Ch" . "II Chronicles") ("2 Ch" . "II Chronicles")
     ("Ezr" . "Ezra")
-    ("Ne"  . "Nehemiah") ("Neh"  . "Nehemiah")
-    ("Es"  . "Esther") ("Est"  . "Esther")
+    ("Neh"  . "Nehemiah") ("Ne"  . "Nehemiah")
+    ("Esth"  . "Esther") ("Es"  . "Esther") ("Est"  . "Esther")
     ("Jb"  . "Job")
     ("Ps"  . "Psalms") ("Psa" . "Psalms")
-    ("Pr"  . "Proverbs") ("Pro" . "Proverbs") 
-    ("Ec"  . "Ecclesiastes") ("Ecc"  . "Ecclesiastes")
-    ("So"  . "Song of Solomon") ("Sol"  . "Song of Solomon")
-    ("Is"  . "Isaiah") ("Isa" . "Isaiah")
-    ("Je"  . "Jeremiah") ("Jer" . "Jeremiah")
-    ("La"  . "Lamentations") ("Lam"  . "Lamentations")
-    ("Ez"  . "Ezekiel") ("Eze"  . "Ezekiel")
-    ("Da"  . "Daniel") ("Dan" . "Daniel")
-    ("Ho"  . "Hosea") ("Hos"  . "Hosea")
+    ("Prov" . "Proverbs") ("Pr"  . "Proverbs") ("Pro" . "Proverbs")
+    ("Eccl"  . "Ecclesiastes") ("Ec"  . "Ecclesiastes") ("Ecc"  . "Ecclesiastes")
+    ("Song"  . "Song of Solomon") ("So"  . "Song of Solomon") ("Sol"  . "Song of Solomon")
+    ("Isa" . "Isaiah") ("Is"  . "Isaiah")
+    ("Jer" . "Jeremiah") ("Je"  . "Jeremiah")
+    ("Lam"  . "Lamentations") ("La"  . "Lamentations")
+    ("Ezek" . "Ezekiel") ("Ez"  . "Ezekiel") ("Eze" . "Ezekiel")
+    ("Dan" . "Daniel") ("Da"  . "Daniel")
+    ("Hos"  . "Hosea") ("Ho"  . "Hosea")
     ("Joe" . "Joel")
     ("Am"  . "Amos") ("Amo"  . "Amos")
-    ("Ob"  . "Obadiah") ("Oba"  . "Obadiah")
+    ("Obad"  . "Obadiah") ("Ob"  . "Obadiah") ("Oba"  . "Obadiah")
     ("Jon" . "Jonah")
-    ("Mi"  . "Micah") ("Mic"  . "Micah")
-    ("Na"  . "Nahum") ("Nah"  . "Nahum")
-    ("Ha"  . "Habakkuk") ("Hab"  . "Habakkuk")
-    ("Zep" . "Zephaniah")
+    ("Mic"  . "Micah") ("Mi"  . "Micah")
+    ("Nah"  . "Nahum") ("Na"  . "Nahum")
+    ("Hab"  . "Habakkuk") ("Ha"  . "Habakkuk")
+    ("Zeph" . "Zephaniah") ("Zep" . "Zephaniah")
     ("Hag" . "Haggai")
-    ("Ze"  . "Zechariah") ("Zac"  . "Zechariah")
+    ("Zech"  . "Zechariah") ("Ze"  . "Zechariah") ("Zac"  . "Zechariah") ;; Is the last one correct??
     ("Mal" . "Malachi")
 
     ;; New Testament
-    ;; Added AbbottSmith lexicon abbreviations to allow proper following of cross references in lexicon buffers.
     ("Mt" . "Matthew") ("Mat" . "Matthew") ("Matt" . "Matthew")
     ("Mk" . "Mark") ("Mar" . "Mark")
     ("Lk" . "Luke") ("Luk" . "Luke")
-    ("Jo" . "John") ("Joh" . "John")
+    ("Jn" . "John") ("Jo" . "John") ("Joh" . "John") 
     ("Ac" . "Acts") ("Act" . "Acts")
-    ("Ro" . "Romans") ("Rom" . "Romans")
-    ("1 Corintihans" . "I Corinthians") ("I Co" . "I Corinthians") ("1 Co" . "I Corinthians") ("ICor" . "I Corinthians") ("1Cor" . "I Corinthians")
-    ("2 Corinthians" . "II Corinthians") ("II Co" . "II Corinthians") ("2 Co" . "II Corinthians") ("IICor" . "II Corinthians") ("2Cor" . "II Corinthians")
-    ("Ga" . "Galatians") ("Gal" . "Galatians")
+    ("Rom" . "Romans") ("Ro" . "Romans")
+    ("1 Cor" . "I Corinthians") ("1 Corintihans" . "I Corinthians") ("I Co" . "I Corinthians") ("1 Co" . "I Corinthians")
+    ("ICor" . "I Corinthians") ("1Cor" . "I Corinthians")
+    ("2 Cor" . "II Corinthians") ("2 Corinthians" . "II Corinthians") ("II Co" . "II Corinthians") ("2 Co" . "II Corinthians")
+    ("IICor" . "II Corinthians") ("2Cor" . "II Corinthians")
+    ("Gal" . "Galatians") ("Ga" . "Galatians")
     ("Eph" . "Ephesians")
-    ("Phl" . "Philippians") ("Phil" . "Philippians")
+    ("Phil" . "Philippians") ("Phl" . "Philippians")
     ("Col" . "Colossians")
-    ("1 Thessalonians" . "I Thessalonians")  ("I Th" . "I Thessalonians") ("1 Th" . "I Thessalonians") ("IThess" . "I Thessalonians") ("1Thes" . "I Thessalonians")
-    ("2 Thessalonians" . "II Thessalonians") ("II Th" . "II Thessalonians") ("2 Th" . "II Thessalonians") ("IIThess" . "II Thessalonians") ("2Thes" . "II Thessalonians")
-    ("1 Timothy" . "I Timothy")   ("I Ti"  . "I Timothy")  ("1 Ti" . "I Timothy")  ("ITim" . "I Timothy") ("1Tim" . "I Timothy")
-    ("2 Timothy" . "II Timothy")  ("II Ti" . "II Timothy") ("2 Ti" . "II Timothy") ("IITim" . "II Timothy") ("2Tim" . "II Timothy")
+    ("1 Thess" . "I Thessalonians") ("1 Thessalonians" . "I Thessalonians") ("I Th" . "I Thessalonians") ("1 Th" . "I Thessalonians")
+    ("IThess" . "I Thessalonians") ("1Thes" . "I Thessalonians") ("1Thess" . "I Thessalonians")
+    ("2 Thess" . "II Thessalonians") ("2 Thessalonians" . "II Thessalonians") ("II Th" . "II Thessalonians") ("2 Th" . "II Thessalonians")
+    ("IIThess" . "II Thessalonians") ("2Thes" . "II Thessalonians") ("2Thess" . "II Thessalonians")
+    ("1 Tim" . "I Timothy") ("1 Timothy" . "I Timothy")   ("I Ti"  . "I Timothy")  ("1 Ti" . "I Timothy")  ("ITim" . "I Timothy")
+    ("1Tim" . "I Timothy")
+    ("2 Tim" . "II Timothy") ("2 Timothy" . "II Timothy") ("II Ti" . "II Timothy") ("2 Ti" . "II Timothy") ("IITim" . "II Timothy")
+    ("2Tim" . "II Timothy")
     ("Tit" . "Titus")
-    ("Phm" . "Philemon") ("Phlm" . "Philemon") ("Plm" . "Philemon")
-    ("He" . "Hebrews") ("Heb" . "Hebrews")
-    ("Ja" . "James") ("Jas" . "James") ("Jam" . "James")
-    ("1 Peter" . "I Peter") ("I Pe" . "I Peter") ("1 Pe" . "I Peter") ("IPet" . "I Peter") ("1Pet" . "I Peter")
-    ("2 Peter" . "II Peter")  ("II Pe" . "II Peter") ("2 Pe" . "II Peter") ("IIPet" . "II Peter") ("2Pet" . "II Peter")
-    ("1 John" . "I John") ("I Jo" . "I John") ("1 Jo" . "I John") ("IJohn" . "I John") ("1Jn" . "I John")
-    ("2 John" . "II John") ("II Jo"  . "II John") ("2 Jo" . "II John") ("IIJohn" . "II John") ("2Jn" . "I John")
-    ("3 John" . "III John") ("III Jo" . "III John") ("3 Jo" . "III John") ("IIIJohn" . "III John") ("3Jn" . "I John")
+    ("Phlm" . "Philemon") ("Phm" . "Philemon") ("Plm" . "Philemon")
+    ("Heb" . "Hebrews") ("He" . "Hebrews")
+    ("Jas" . "James") ("Ja" . "James") ("Jam" . "James")
+    ("1 Pet" . "I Peter") ("1 Peter" . "I Peter") ("I Pe" . "I Peter") ("1 Pe" . "I Peter") ("IPet" . "I Peter") ("1Pet" . "I Peter")
+    ("2 Pet" . "II Peter") ("2 Peter" . "II Peter") ("II Pe" . "II Peter") ("2 Pe" . "II Peter") ("IIPet" . "II Peter") ("2Pet" . "II Peter")
+    ("1 Jn" . "I John") ("1 John" . "I John") ("I Jo" . "I John") ("1 Jo" . "I John") ("IJohn" . "I John") ("1Jn" . "I John")
+    ("2 Jn" . "I John") ("2 John" . "II John") ("II Jo"  . "II John") ("2 Jo" . "II John") ("IIJohn" . "II John") ("2Jn" . "I John")
+    ("3 Jn" . "I John") ("3 John" . "III John") ("III Jo" . "III John") ("3 Jo" . "III John") ("IIIJohn" . "III John") ("3Jn" . "I John")
     ("Ju" . "Jude") ("Jde" . "Jude")
-    ("Re" . "Revelation of John") ("Rev" . "Revelation of John"))
+    ("Rev" . "Revelation of John") ("Re" . "Revelation of John"))
   "A-list of abbreviations for Bible books.")
 
 ;;;;; Book / chapter
@@ -444,8 +466,10 @@ See `bible--display-lemma-hebrew'."
 (define-key bible-search-mode-map "w" 'bible-toggle-word-study)
 (define-key bible-search-mode-map "n" 'bible-next-search-item)
 (define-key bible-search-mode-map "p" 'bible-previous-search-item)
-(define-key bible-search-mode-map (kbd "RET") 'bible-search-mode-follow-verse)
-(define-key bible-search-mode-map [mouse-1] 'bible-search-mode-follow-verse)
+;;(define-key bible-search-mode-map (kbd "RET") 'bible-search-mode-follow-verse)
+;;(define-key bible-search-mode-map [mouse-1] 'bible-search-mode-follow-verse)
+(define-key bible-search-mode-map (kbd "RET") 'bible-search-mode-follow-xref)
+(define-key bible-search-mode-map [mouse-1] 'bible-search-mode-follow-xref)
 
 ;;;;; Term display
 
@@ -610,7 +634,7 @@ This command is run by clicking on text, not directly by the user."
 \\{bible-term-greek-mode-map}")
 
 
-(define-derived-mode bible-module-select-mode special-mode "Select Module"
+(define-derived-mode bible-text-select-mode special-mode "Select Module"
   (buffer-disable-undo)
   (font-lock-mode t)
   (setq buffer-read-only t))
@@ -626,11 +650,11 @@ starting verse reference for the buffer. If no optional location
 arguments are supplied, Genesis 1:1 is used. Optional argument MODULE
 specifies the module to use."
   (interactive)
-  (with-current-buffer (get-buffer-create (generate-new-buffer-name (concat "*bible*")))
+  (with-current-buffer (get-buffer-create (generate-new-buffer-name "*bible*"))
     (bible)
-    (when module
-      (setq-default bible-module module))
-    (setq-local bible-module (default-value 'bible-module))
+    (setq-local mode-line-format bible-mode-line-format)
+    (when module (setq-default bible-text module))
+    (setq-local bible-text (default-value 'bible-text))
     (bible--set-location
      (assoc (or book-name "Genesis") bible--books)
      (or chapter 1)
@@ -706,18 +730,19 @@ specifies the module to use."
 (defun bible-select-text ()
   "Ask user for a new text module for the current `bible' buffer."
   (interactive)
-  (let ((module (completing-read "Text: " bible--texts)))
-    (unless (string= module "")
-      (setq-default bible-module module)
-      (bible--display module))))
+  (let ((text (completing-read "Text: " bible--texts)))
+    (unless (string= text "")
+      (setq-default bible-text text)
+      (setq-local bible-text text)
+      (bible--display))))
 
 (defun bible-select-commentary ()
   "Ask user for a new text module for the current `bible' buffer."
   (interactive)
-  (let ((module (completing-read "Commentary: " bible--commentaries)))
-    (unless (string= module "")
-      (setq-default bible-module module)
-      (bible--display module))))
+  (let ((commentary (completing-read "Commentary: " bible--commentaries)))
+    (unless (string= commentary "")
+      (setq-local bible-text commentary)
+      (bible--display))))
 
 (defun bible-toggle-word-study ()
   "Toggle the inclusion of word study for the active `bible' buffer."
@@ -737,7 +762,7 @@ specifies the module to use."
   (split-window-right)
   (balance-windows)
   (other-window 1)
-  (bible-open bible--current-book-name bible--current-chapter 1 bible-module))
+  (bible-open bible--current-book-name bible--current-chapter 1 bible-text))
 
 (defun bible-search (query)
   "Search for a QUERY: a word or phrase.
@@ -748,7 +773,7 @@ or `multiword'.  `lucene' is the default search.
   (interactive "sBible Search: ")
   (when (> (length query) 0)
     (let ((searchmode (completing-read "Search Mode: " '("lucene" "phrase" "regex" "multiword") nil t "lucene")))
-      (bible--open-search query searchmode (buffer-local-value 'bible-module (current-buffer))))))
+      (bible--open-search query searchmode (buffer-local-value 'bible-text (current-buffer))))))
 
 (defun bible-search-mode-follow-verse ()
   "Follow the hovered verse in a `bible-search-mode' buffer.
@@ -760,13 +785,14 @@ Create a new `bible' buffer positioned at the selected verse."
          verse)
     (string-match bible--verse-regexp text)
     (setq text (match-string 0 text))
+    (message "Text match is %s" text)
     (string-match "I?I?I? ?[A-Z]?[a-z]* " text)
     (setq book (match-string 0 text))
     (string-match "[0-9]?[0-9]?[0-9]?:" text)
     (setq chapter (substring (match-string 0 text) 0 (1- (length (match-string 0 text)))))
     (string-match ":[0-9]?[0-9]?[0-9]?" text)
     (setq verse (substring (match-string 0 text) 1))
-    (bible-open (string-trim book) (string-to-number chapter) (string-to-number verse)) bible-module))
+    (bible-open (string-trim book) (string-to-number chapter) (string-to-number verse)) bible-text))
 
 (defun bible-search-mode-follow-xref ()
   "Follow the hovered verse in a bible term buffer.
@@ -794,7 +820,7 @@ Handle abbreviations from lexicon module (AbbottSmith)."
     (setq book (or (alist-get book-abbrev bible--book-name-abbreviations nil nil #'string-equal-ignore-case) (car verse-ref))
           chapter (car chapter-verse)
           verse (cadr chapter-verse))
-    (bible-open (string-trim book) (string-to-number chapter) (string-to-number verse) bible-module)))
+    (bible-open (string-trim book) (string-to-number chapter) (string-to-number verse) (default-value 'bible-text))))
 
 ;; These can be called interactively if you know the Strong's number
 ;; you want to look up.
@@ -818,7 +844,7 @@ Handle abbreviations from lexicon module (AbbottSmith)."
          (chapter (when book-data (completing-read "Chapter: " (bible--list-number-range 1 (cdr book-data)) nil t "1" nil "1")))
          (verse (when chapter (read-from-minibuffer "Verse: ")))
          (query (concat (car book-data) " " chapter ":" verse))
-         (args (list bible-sword-query nil (current-buffer) t "-b" bible-module "-f" "plain" "-k" query)))
+         (args (list bible-sword-query nil (current-buffer) t "-b" bible-text "-f" "plain" "-k" query)))
     (apply #'call-process args)))
 
 ;; Choose a Bible text.
@@ -837,7 +863,7 @@ Handle abbreviations from lexicon module (AbbottSmith)."
 FILTER is the Diatheke filter argument. FORMAT is either plain or
 the default of internal. MODULE is the text module to use. Returns
 string containing query result."
-  (let ((module (or module bible-module)))
+  (let ((module (or module bible-text)))
     (with-temp-buffer
       (let ((args (list bible-sword-query nil (current-buffer) t "-b" module)))
 	(if filter
@@ -855,7 +881,7 @@ string containing query result."
 Optional argument FORMAT is either plain or the default of internal.
 MODULE is the text module to use and defaults to the current module."
   (with-temp-buffer
-    (let ((args (list bible-sword-query nil (current-buffer) t "-b" (or module bible-module))))
+    (let ((args (list bible-sword-query nil (current-buffer) t "-b" (or module bible-text))))
       (setq args (append args (list "-s" (pcase searchtype
                                            ("lucene" "lucene")
                                            ("phrase" "phrase")
@@ -1180,7 +1206,7 @@ in buffer)."
                 ;;       articles with nouns. Deal with this.
                 ;;       (FMG 5-Mar-2026)
                 (let ((lexeme-list
-                       (if (string= bible-module "KJV")
+                       (if (string= bible-text "KJV")
                            (reverse lexemes) ; Use the last `strong:' entry.
 			 lexemes)))
 		  (catch 'loop
@@ -1196,7 +1222,7 @@ in buffer)."
                    (put-text-property refstart refend 'keymap bible-hebrew-keymap)))
             ;; Add help-echo, strongs reference for tooltips if match.
             (when matched
-              (setq bible-has-lexemes t)
+              (setq bible-has-lexemes " Lex")
               (put-text-property refstart refend 'help-echo 'bible--show-lex-morph)
               (put-text-property refstart refend 'strong matched))))
         ;; morphology
@@ -1210,7 +1236,7 @@ in buffer)."
                  (string-match "oshm:.*" morpheme)) ; OSHM Hebrew morphology
                 (setq matched (match-string 0 morpheme)))
             (when matched
-              (setq bible-has-morphemes t)
+              (setq bible-has-morphemes " Morph")
               (put-text-property refstart refend 'morph matched)
               (put-text-property refstart refend 'help-echo 'bible--show-lex-morph))))
         ;; Insert lemma into buffer. Lemma tag will be part of lemma/savelm item.
@@ -1348,12 +1374,12 @@ In processing subnodes, each case will prepend a space if it needs it."
                       (add-face-text-property (- (point) (length word)) (point) '(:foreground "salmon"))
                     (add-face-text-property (- (point) (length word)) (point) '(:foreground "gray50")))))))))))
 
-(defun bible--display (&optional module verse)
+(defun bible--display (&optional _module verse)
   "Render a page (chapter) of a Bible module.
-Defaults to using `bible-module'.
+Defaults to using `bible-text'.
 If optional argument MODULE is supplied, use that module for display.
 If optional argument VERSE is supplied, set cursor at verse."
-  (when module (setq-local bible-module module))
+;;  (when module (setq-local bible-text module))
   (let ((buffer-read-only nil)
         (bible-has-lexemes nil)
         (bible-has-morphemes nil))
@@ -1366,7 +1392,7 @@ If optional argument VERSE is supplied, set cursor at verse."
         (erase-buffer)
 	(setq-local bible-chapter-title nil)
         ;; Looking for the "body" tag in the DOM node.
-	(bible--insert-domnode-recursive (dom-by-tag html-dom-tree 'body) nil)
+	(bible--insert-domnode-recursive (dom-by-tag html-dom-tree 'body))
         (goto-char (point-min))))
     (save-excursion
       (let ((search-string (concat " *" (car bible--current-book) " " (number-to-string bible--current-chapter) ":")))
@@ -1378,7 +1404,7 @@ If optional argument VERSE is supplied, set cursor at verse."
             (add-face-text-property (match-beginning 0) (match-end 0) '(:foreground "purple"))))))
     (save-excursion
       ;; Remove the module name from the buffer.
-      (while (re-search-forward (concat "^.*" bible-module ".*$") nil t)
+      (while (re-search-forward (concat "^.*" bible-text ".*$") nil t)
         (replace-match "" nil t)))
     (save-excursion
       ;; Fix divine name lossage.
@@ -1412,11 +1438,7 @@ If optional argument VERSE is supplied, set cursor at verse."
       (while (re-search-forward "  *" nil t) ; More than one space in a row
         (replace-match " ")))
     ;; Set the mode line of the biffer.
-    (setq mode-name (concat "Bible (" bible--current-book-name " " (number-to-string bible--current-chapter) ") "
-                            bible-module
-                            (when bible-has-lexemes " Lex")
-                            (when bible-has-morphemes " Morph")
-                            ")"))
+    (setq mode-name (concat bible-text (when bible-has-lexemes " Lex") (when bible-has-morphemes " Morph")))
     (force-mode-line-update))
     ;; If optional verse specification go to that verse.
     (when verse
@@ -1473,9 +1495,9 @@ If optional argument VERSE is supplied, set cursor at verse."
   (bible--get-biblical-modules) ; Make sure the lists are fresh.
   bible--commentaries)
 
-(defconst bible-module-map (make-keymap))
-(define-key bible-module-map [mouse-1] 'bible-pick-module)
-(define-key bible-module-map (kbd "RET") 'bible-pick-module)
+(defconst bible-text-map (make-keymap))
+(define-key bible-text-map [mouse-1] 'bible-pick-module)
+(define-key bible-text-map (kbd "RET") 'bible-pick-module)
 
 
 (defun bible-display-available-texts ()
@@ -1483,7 +1505,7 @@ If optional argument VERSE is supplied, set cursor at verse."
   (interactive)
   (bible--get-biblical-modules) ; Make sure lists are fresh.
   (with-current-buffer (get-buffer-create "Texts")
-    (bible-module-select-mode)
+    (bible-text-select-mode)
     (let ((buffer-read-only nil))
       (erase-buffer)
       (setq-local tab-stop-list '(25))
@@ -1495,7 +1517,7 @@ If optional argument VERSE is supplied, set cursor at verse."
                        'face 'bold
                        'module name
                        'help-echo (concat "Select " name)
-                       'keymap bible-module-map))
+                       'keymap bible-text-map))
           (move-to-tab-stop)
           (insert (format "%s\n" description)))))
     (goto-char (point-min))
@@ -1506,7 +1528,7 @@ If optional argument VERSE is supplied, set cursor at verse."
   (interactive)
   (bible--get-biblical-modules) ; Make sure lists are fresh.
   (with-current-buffer (get-buffer-create "Commentaries")
-    (bible-module-select-mode)
+    (bible-text-select-mode)
     (let ((buffer-read-only nil))
       (erase-buffer)
       (setq-local tab-stop-list '(25))
@@ -1518,7 +1540,7 @@ If optional argument VERSE is supplied, set cursor at verse."
                        'face 'bold
                        'module name
                        'help-echo (concat "Select " name)
-                       'keymap bible-module-map))
+                       'keymap bible-text-map))
           (move-to-tab-stop)
           (insert (format "%s\n" description)))))
     (goto-char (point-min))
@@ -1550,7 +1572,7 @@ If optional argument VERSE is supplied, set cursor at verse."
         (query-verses "")
         (buffer-read-only nil))
 ;;    (message "display-search %s" module)
-    (setq-default bible-module module)
+    (setq-default bible-text module)
     (erase-buffer)
     (while match
       (setq match (string-match ".+?:[0-9]?[0-9]?" results (+ match (length matchstr)))
@@ -1577,7 +1599,7 @@ If optional argument VERSE is supplied, set cursor at verse."
       (insert (bible--exec-diatheke query-verses nil nil module)))
     (let* ((html-dom-tree (libxml-parse-html-region (point-min) (point-max))))
       (erase-buffer)
-      (bible--insert-domnode-recursive (dom-by-tag html-dom-tree 'body) nil))
+      (bible--insert-domnode-recursive (dom-by-tag html-dom-tree 'body)))
     (goto-char (point-min))
     ;; Remove module name from buffer.
     (save-excursion
@@ -1595,24 +1617,24 @@ If optional argument VERSE is supplied, set cursor at verse."
 ;; ;; REVIEW: Do something here? (FMG 5-Mar-2026)
 ;;  )
 
-(defun bible--fixup-lexicon-display (termtype)
+(defun bible--fixup-lexicon-display (_termtype)
   "Fixup the display of a lexical entry whose language is given by TERMTYPE."
   (let ((buffer-read-only nil))
     (goto-char (point-min))
-    (save-excursion
-      ;; This enables clicking on Strong's numbers in some lexicon definitions.
-      (while (search-forward-regexp "[0-9]+" nil t)
-        (let ((match (match-string 0))
-              (start (match-beginning 0))
-              (end (match-end 0)))
-          (cond ((eq termtype 'hebrew)
-                 (put-text-property start end 'strong (concat "strong:H" match))
-                 (put-text-property start end 'keymap bible-hebrew-keymap)
-                 (add-face-text-property start end `(:foreground "blue")))
-                ((eq termtype 'greek)
-                 (put-text-property start end 'strong (concat "strong:G" match))
-                 (put-text-property start end 'keymap bible-greek-keymap)
-                 (add-face-text-property start end `(:foreground "blue")))))))
+    ;;; (save-excursion
+    ;;;   ;; This enables clicking on Strong's numbers in some lexicon definitions.
+    ;;;   (while (search-forward-regexp "[0-9]+" nil t)
+    ;;;     (let ((match (match-string 0))
+    ;;;           (start (match-beginning 0))
+    ;;;           (end (match-end 0)))
+    ;;;       (cond ((eq termtype 'hebrew)
+    ;;;              (put-text-property start end 'strong (concat "strong:H" match))
+    ;;;              (put-text-property start end 'keymap bible-hebrew-keymap)
+    ;;;              (add-face-text-property start end `(:foreground "blue")))
+    ;;;             ((eq termtype 'greek)
+    ;;;              (put-text-property start end 'strong (concat "strong:G" match))
+    ;;;              (put-text-property start end 'keymap bible-greek-keymap)
+    ;;;              (add-face-text-property start end `(:foreground "blue")))))))
     ;; This enables clicking on verse references.
     (save-excursion
       (while (search-forward-regexp bible--verse-regexp nil t)
@@ -1666,7 +1688,7 @@ This code is customized for the BDBGlosses_Strongs lexicon."
   (setq-local bible--current-book book)
   (setq-local bible--current-book-name (car book))
   (setq-local bible--current-chapter chapter)
-  (bible--display bible-module verse))
+  (bible--display bible-text verse))
 
 ;;;; Utilities