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

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

[nongnu] elpa/proof-general 879444ca37 3/3: Merge pull request #708 from


From: ELPA Syncer
Subject: [nongnu] elpa/proof-general 879444ca37 3/3: Merge pull request #708 from gasche/bad-bounding-indices
Date: Tue, 28 Nov 2023 13:00:42 -0500 (EST)

branch: elpa/proof-general
commit 879444ca374dc67e89f305b03d5e764bab863c55
Merge: db2280f03a d2d2e8a8ef
Author: monnier <monnier@iro.umontreal.ca>
Commit: GitHub <noreply@github.com>

    Merge pull request #708 from gasche/bad-bounding-indices
    
    Fix "Bad bounding indices" error on invalid _CoqProject
---
 coq/coq-system.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/coq/coq-system.el b/coq/coq-system.el
index 6196f43507..5031404e28 100644
--- a/coq/coq-system.el
+++ b/coq/coq-system.el
@@ -551,13 +551,14 @@ alreadyopen is t if buffer already existed."
 (defun coq--read-one-option-from-project-file (switch arity raw-args)
   "Cons SWITCH with ARITY arguments from RAW-ARGS.
 If ARITY is nil, return SWITCH."
-  (if arity
-      (let ((arguments
-             (condition-case-unless-debug nil
-                 (cl-subseq raw-args 0 arity)
-               (warn "Invalid _CoqProject: not enough arguments for %S" 
switch))))
-        (cons switch arguments))
-    switch))
+  (cond
+   ((not arity) switch)
+   ((< (length raw-args) arity)
+    (message "Invalid _CoqProject: not enough arguments for %S" switch)
+    switch)
+   (t
+    (let ((arguments (cl-subseq raw-args 0 arity)))
+      (cons switch arguments)))))
 
 (defun coq--read-options-from-project-file (contents)
   "Read options from CONTENTS of _CoqProject.



reply via email to

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