emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 9a3078e510 68/77: Fix comments and doc strings


From: Tassilo Horn
Subject: [elpa] externals/auctex 9a3078e510 68/77: Fix comments and doc strings
Date: Fri, 26 Aug 2022 16:06:38 -0400 (EDT)

branch: externals/auctex
commit 9a3078e5104e29bca1971d600c2c68692094787d
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Fix comments and doc strings
    
    * latex.el (TeX-arg-key-val): Explain that KEY-VAL-ALIST can also be a
    function call.
    (LaTeX-modify-environment):
    * context.el (ConTeXt-modify-environment):
    Use better doc strings to mention the argument.
    * font-latex.el (font-latex-find-matching-close): Add supplementary
    comment.
    (font-latex-make-built-in-keywords):
    (font-latex--updated-region-end, font-latex-match-math-envII):
    (font-latex-extend-region-backwards-math):
    * style/tikz.el (TeX-TikZ-relative-point-function-map):
    (TeX-TikZ-draw-arg-function-map, TeX-TikZ-arg-bend):
    * tex.el (TeX-expand-list-builtin):
    (TeX-view-predicate-list, TeX-source-correlate-expand-options):
    (TeX-dialect, TeX-unload-style):
    Fix typos and spacings.
---
 context.el    |  2 +-
 font-latex.el | 22 ++++++++++++----------
 latex.el      |  6 ++++--
 style/tikz.el |  7 +++----
 tex.el        | 12 ++++++------
 5 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/context.el b/context.el
index 653ed3acce..de47b9da23 100644
--- a/context.el
+++ b/context.el
@@ -696,7 +696,7 @@ With optional ARG, modify current environment."
         (ConTeXt-environment-menu environment)))))
 
 (defun ConTeXt-modify-environment (environment)
-  "Modify current environment."
+  "Modify current environment to new ENVIRONMENT."
   (save-excursion
     (ConTeXt-find-matching-stop)
     (re-search-backward (concat (regexp-quote TeX-esc)
diff --git a/font-latex.el b/font-latex.el
index 111d8e9354..4406dea610 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -648,10 +648,10 @@ Generated by `font-latex-make-built-in-keywords'."))
       ;; defvar font-latex-match-*
       ;; We make this variable buffer local later, but don't use
       ;; `defvar-local' here because it shouldn't have nil as its
-      ;; default value.  Its true default value is set by
-      ;; through font-latex-match-*-make in :set specification of
-      ;; defcustom of font-latex-match-*-keywords below.  It's
-      ;; only after that this variable can be buffer local.
+      ;; default value.  Its true default value is set through
+      ;; font-latex-match-*-make in :set specification of defcustom of
+      ;; font-latex-match-*-keywords below.  It's only after that this
+      ;; variable can be buffer local.
       (push `(defvar ,(intern (concat prefix name)) nil
                ,(concat "Regular expression to match " name
                         " keywords.
@@ -1367,7 +1367,7 @@ then call `font-latex-set-syntactic-keywords'.")))
 
 (defvar font-latex--updated-region-end nil
 ;; During font lock operation, matched range sometimes exceeds the
-;; given end limit. So record the actual end in this variable to
+;; given end limit.  So record the actual end in this variable to
 ;; notify the font lock machinery.
 ;; Match functions should do the following two if the end of the
 ;; actual match goes beyond the limit:
@@ -1436,6 +1436,8 @@ ignored during the search."
         ;; XXX: Do not look up syntax-table properties since they may
         ;; be misleading, e.g. in the case of "{foo}^^A" where the
         ;; closing brace gets a comment end syntax.
+        ;; (2022 Mar) The latter half of the above paragraph no longer
+        ;; applies since we changed the way to fontify ^^A comment.
         (parse-sexp-lookup-properties nil))
     (or
      (condition-case nil
@@ -1890,8 +1892,8 @@ The \\begin{equation} incl. arguments in the same line and
         (setq end beg
               beg-of-begin beg))
       ;; Store the position of "\begin{foo}" as (match-beginnig 0) so
-      ;; that `font-lock-multiline' text property covers it. This keeps
-      ;; editing inside multi-line optional argument sane.
+      ;; that `font-lock-multiline' text property covers it.  This
+      ;; keeps editing inside multi-line optional argument sane.
       (store-match-data (list beg-of-begin end beg end))
       t)))
 
@@ -1981,11 +1983,11 @@ Take into account $...$, $$...$$, \\(...\\) and 
\\=\\[...\\], too."
   ;; Check if `font-lock-beg' is inside math mode.
   (goto-char font-lock-beg)
 
-  ;; Workaround bug#41522. Ensure `syntax-table' property is given to
+  ;; Workaround bug#41522.  Ensure `syntax-table' property is given to
   ;; all verbatim-like constructs up to the position before running
   ;; `texmathp' in order to prevent wrong fontification of verbatim
-  ;; face. This is necessary because `texmathp' calls `up-list' inside
-  ;; narrowing.
+  ;; face.  This is necessary because `texmathp' calls `up-list'
+  ;; inside narrowing.
   (syntax-propertize (point))
 
   ;; XXX: Should we make the `texmathp' search honor
diff --git a/latex.el b/latex.el
index eb91e697fe..c77af6d82e 100644
--- a/latex.el
+++ b/latex.el
@@ -857,7 +857,7 @@ position just before \\begin and the position just before
 \\end.")
 
 (defun LaTeX-modify-environment (environment)
-  "Modify current ENVIRONMENT."
+  "Modify current environment to new ENVIRONMENT."
   (let ((goto-end (lambda ()
                     (LaTeX-find-matching-end)
                     (re-search-backward (concat (regexp-quote TeX-esc)
@@ -3247,7 +3247,9 @@ Insert the given value as a TeX macro argument.  If 
OPTIONAL is
 non-nil, insert it as an optional argument.  KEY-VAL-ALIST is an
 alist.  The car of each element should be a string representing a
 key and the optional cdr should be a list with strings to be used
-as values for the key.  Use PROMPT as the prompt string."
+as values for the key.  KEY-VAL-ALIST can be a symbol or a
+function call returning an alist.  Use PROMPT as the prompt
+string."
   (let ((options (TeX-read-key-val optional key-val-alist prompt)))
     (TeX-argument-insert options optional)))
 
diff --git a/style/tikz.el b/style/tikz.el
index 4a2fb583b3..565e6b0aa4 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -53,8 +53,7 @@
                        `((,(concat "+" key) ,value "+")
                          (,(concat "++" key) ,value "++"))))
                    TeX-TikZ-point-function-map))
-  "`TeX-TikZ-point-function-map' with \"+\" and \"++\" as a
-prefix.")
+  "`TeX-TikZ-point-function-map' with \"+\" and \"++\" as a prefix.")
 
 (defconst TeX-TikZ-path-connector-function-map
   '(("--" identity)
@@ -73,7 +72,7 @@ prefix.")
     ("Arc" TeX-TikZ-arg-arc)
     ("Parabola" TeX-TikZ-arg-parabola)
     ("Grid" TeX-TikZ-arg-grid))
-  "An alist of argument names and functoins for TikZ's \draw.")
+  "An alist of argument names and functions for TikZ's \\draw.")
 
 (defun TeX-TikZ-get-opt-arg-string (arg &optional open close)
   "Return a string for optional arguments.
@@ -232,7 +231,7 @@ them as a list of strings, dropping the \\='()\\='."
 (defun TeX-TikZ-arg-bend (optional)
   "Prompt the user for a bend argument.
 If OPTIONAL is non-nil and the user doesn't provide a point,
-  return \"\"."
+return \"\"."
   (let ((point
          (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map
                                     (TeX-argument-prompt optional nil "Bend 
point")
diff --git a/tex.el b/tex.el
index e7a1fd0f26..8e3388bb94 100644
--- a/tex.el
+++ b/tex.el
@@ -638,7 +638,7 @@ string."
                   (concat TeX-command-text " \"\\input\""))
               "")))
     ;; The fourth argument of t directs to supply "\detokenize{}" when
-    ;; necessary. See doc string and comment of
+    ;; necessary.  See doc string and comment of
     ;; `TeX-active-master-with-quotes'.
     ("%T" TeX-active-master-with-quotes t t nil t)
     ("%n" TeX-current-line)
@@ -1085,7 +1085,7 @@ The following built-in predicates are available:
   :type '(alist :key-type symbol :value-type (group sexp)))
 
 ;; XXX: Atril and xreader are forks of Evince and share an almost
-;; identical interface with it. Instead of having different functions
+;; identical interface with it.  Instead of having different functions
 ;; for each program, we keep the original *-evince-* functions and
 ;; make them accept arguments to specify the actual name of the
 ;; program and the desktop environment, that will be used to set up
@@ -1732,8 +1732,8 @@ If this is nil, an empty string will be returned."
           (concat TeX-source-specials-tex-flags
                   (if TeX-source-specials-places
                       ;; -src-specials=WHERE: insert source specials
-                      ;; in certain places of the DVI file. WHERE is a
-                      ;; comma-separated value list: cr display hbox
+                      ;; in certain places of the DVI file.  WHERE is
+                      ;; a comma-separated value list: cr display hbox
                       ;; math par parend vbox
                       (concat "=" (mapconcat #'identity
                                              TeX-source-specials-places ","))))
@@ -2745,7 +2745,7 @@ Used when checking if any files have changed."
 (defconst TeX-dialect :latex
   "Default dialect for use with function `TeX-add-style-hook' for
 argument DIALECT-EXPR when the hook is to be run only on LaTeX
-file, or any mode derived thereof. See variable
+file, or any mode derived thereof.  See variable
 `TeX-style-hook-dialect'." )
 
 (defvar TeX-style-hook-list nil
@@ -2945,7 +2945,7 @@ found in DIALECT-LIST and return the list thereof."
     ret)))
 
 (defun TeX-unload-style (style &optional dialect-list)
-  "Forget that we once loaded STYLE. If DIALECT-LIST is provided
+  "Forget that we once loaded STYLE.  If DIALECT-LIST is provided
 the STYLE is only removed for those dialects in DIALECT-LIST.
 
 See variable `TeX-style-hook-dialect' for supported dialects."



reply via email to

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