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

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

[nongnu] elpa/proof-general 11c1a5f3bd 1/3: Fix a "Bad bounding indices"


From: ELPA Syncer
Subject: [nongnu] elpa/proof-general 11c1a5f3bd 1/3: Fix a "Bad bounding indices" error on my system
Date: Tue, 28 Nov 2023 13:00:42 -0500 (EST)

branch: elpa/proof-general
commit 11c1a5f3bdffb28a7872f80a3c069856ea2a121f
Author: Gabriel Scherer <gabriel.scherer@gmail.com>
Commit: Gabriel Scherer <gabriel.scherer@gmail.com>

    Fix a "Bad bounding indices" error on my system
    
    Fixes #707
---
 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 db8cbc6e6e..2db3b96d17 100644
--- a/coq/coq-system.el
+++ b/coq/coq-system.el
@@ -550,13 +550,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)
+    (warn "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]