commit/XEmacs: kehoea: Add some circularity checking, bytecode.c,
eval.c, keymap.c
7 years
Bitbucket
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/1f54a2879725/
Changeset: 1f54a2879725
User: kehoea
Date: 2017-12-02 08:28:51+00:00
Summary: Add some circularity checking, bytecode.c, eval.c, keymap.c
src/ChangeLog addition:
2017-12-02 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecode.c (set_compiled_function_arglist):
Check that NEW_ is a true list, avoid having a circular list in
the compiled funcction down the line.
* debug.c (Fset_debug_classes_to_check):
Use EXTERNAL_LIST_LOOP_3() looping through CLASSES for circularity
checking, leave the type checking to it.
* eval.c (Fmultiple_value_prog1):
ARGS is an external list, check for circularity and
well-formedness.
* keymap.c (Fsingle_key_description):
If KEY is a cons, loop using EXTERNAL_LIST_LOOP_3(), giving us
type and circularity checking.
tests/ChangeLog addition:
2017-12-02 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/keymap-tests.el:
Test circularity checkcing in #'single-key-description.
Affected #: 7 files
diff -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 -r 1f54a2879725779c7da8c8a3b22de821a595e049 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
+2017-12-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecode.c (set_compiled_function_arglist):
+ Check that NEW_ is a true list, avoid having a circular list in
+ the compiled funcction down the line.
+ * debug.c (Fset_debug_classes_to_check):
+ Use EXTERNAL_LIST_LOOP_3() looping through CLASSES for circularity
+ checking, leave the type checking to it.
+ * eval.c (Fmultiple_value_prog1):
+ ARGS is an external list, check for circularity and
+ well-formedness.
+ * keymap.c (Fsingle_key_description):
+ If KEY is a cons, loop using EXTERNAL_LIST_LOOP_3(), giving us
+ type and circularity checking.
+
2017-11-30 Aidan Kehoe <kehoea(a)parhasard.net>
* keymap.c (describe_command):
diff -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 -r 1f54a2879725779c7da8c8a3b22de821a595e049 src/bytecode.c
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -2681,7 +2681,7 @@
static void
set_compiled_function_arglist (Lisp_Compiled_Function *f, Lisp_Object new_)
{
- CHECK_LIST (new_);
+ CHECK_TRUE_LIST (new_);
f->arglist = new_;
/* Recalculate the optimized version of the function, since this depends
diff -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 -r 1f54a2879725779c7da8c8a3b22de821a595e049 src/debug.c
--- a/src/debug.c
+++ b/src/debug.c
@@ -135,16 +135,12 @@
*/
(classes))
{
- Lisp_Object rest;
-
- CHECK_LIST (classes);
-
/* Make sure all objects in the list are valid. If anyone is not
valid, reject the entire list without doing anything. */
- LIST_LOOP (rest, classes)
+ EXTERNAL_LIST_LOOP_3 (elt, classes, rest)
{
- if (NILP (xemacs_debug_loop (X_VALIDATE, XCAR (rest), Qnil)))
- sferror ("Invalid object in class list", Qunbound);
+ if (NILP (xemacs_debug_loop (X_VALIDATE, elt, Qnil)))
+ sferror ("Invalid object in class list", elt);
}
LIST_LOOP (rest, classes)
diff -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 -r 1f54a2879725779c7da8c8a3b22de821a595e049 src/eval.c
--- a/src/eval.c
+++ b/src/eval.c
@@ -5081,7 +5081,7 @@
GCPRO1 (val);
{
- LIST_LOOP_2 (form, XCDR (args))
+ EXTERNAL_LIST_LOOP_2 (form, XCDR (args))
Feval (form);
}
diff -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 -r 1f54a2879725779c7da8c8a3b22de821a595e049 src/keymap.c
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3593,10 +3593,8 @@
{
DECLARE_EISTRING (bufp);
- Lisp_Object rest;
- LIST_LOOP (rest, key)
+ EXTERNAL_LIST_LOOP_3 (keysym, key, rest)
{
- Lisp_Object keysym = XCAR (rest);
if (EQ (keysym, Qcontrol)) eicat_ascii (bufp, "C-");
else if (EQ (keysym, Qctrl)) eicat_ascii (bufp, "C-");
else if (EQ (keysym, Qmeta)) eicat_ascii (bufp, "M-");
diff -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 -r 1f54a2879725779c7da8c8a3b22de821a595e049 tests/ChangeLog
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/keymap-tests.el:
+ Test circularity checkcing in #'single-key-description.
+
2017-11-23 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/format-tests.el (args-out-of-range):
diff -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 -r 1f54a2879725779c7da8c8a3b22de821a595e049 tests/automated/keymap-tests.el
--- a/tests/automated/keymap-tests.el
+++ b/tests/automated/keymap-tests.el
@@ -133,4 +133,10 @@
pi))
(Check-Error wrong-type-argument (command-remapping 'describe-function-at-point
nil pi)))
+
+;; Not quite a keymap test, but this function is in keymap.c, so add a test
+;; here:
+(Check-Error circular-list (single-key-description '#1=(control shift . #1#)))
+
+;;; end of keymap-tests.el
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
commit/XEmacs: kehoea: Avoid a distracting warning about custom
groups, about.el
7 years
Bitbucket
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/86ddcb2cb737/
Changeset: 86ddcb2cb737
User: kehoea
Date: 2017-12-01 19:46:24+00:00
Summary: Avoid a distracting warning about custom groups, about.el
lisp/ChangeLog addition:
2017-12-01 Aidan Kehoe <kehoea(a)parhasard.net>
* about.el (about): New custom group for this file.
* about.el (about-headline-face):
* about.el (about-link-face):
Provide and use a custom group for these faces, avoiding a
distracting warning when viewing the about page.
Affected #: 2 files
diff -r dabe2da63f45bf454afdd10dd4e9b475a2ac8f06 -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2017-12-01 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * about.el (about): New custom group for this file.
+ * about.el (about-headline-face):
+ * about.el (about-link-face):
+ Provide and use a custom group for these faces, avoiding a
+ distracting warning when viewing the about page.
+
2017-11-16 Aidan Kehoe <kehoea(a)parhasard.net>
* x-faces.el (x-library-search-path):
diff -r dabe2da63f45bf454afdd10dd4e9b475a2ac8f06 -r 86ddcb2cb737db4e9518b1db0b7e4332a3d1b4d1 lisp/about.el
--- a/lisp/about.el
+++ b/lisp/about.el
@@ -49,13 +49,9 @@
(require 'wid-edit)
-;; People in this list have their individual links from the main page,
-;; or from the `Legion' page. If they have an image, it should be
-;; named after the CAR of the list element (baw -> baw.png).
-;;
-;; If you add to this list, you'll want to update
-;; `about-personal-info' and `about-hackers', and add the name to one
-;; of the three mutually exclusive lists just below.
+;; It's unlikely anyone will customise this, but the warning about a
+;; non-existent group for the faces is distracting.
+(defgroup about nil "Customization group for the `About the Authors' page.")
(defface about-headline-face
'((((class color) (background dark))
@@ -71,7 +67,8 @@
(((class grayscale) (background dark))
(:foreground "DimGray" :bold t))
(t (:bold t)))
- "Face used for color-highlighted headlines in the About page.")
+ "Face used for color-highlighted headlines in the About page."
+ :group 'about)
(defface about-link-face
'((((class color) (background dark))
@@ -86,7 +83,16 @@
(((class grayscale) (background dark))
(:foreground "LightGray" :bold t :italic t :underline t))
(t (:underline t)))
- "Face used for links in the About page.")
+ "Face used for links in the About page."
+ :group 'about)
+
+;; People in this list have their individual links from the main page,
+;; or from the `Legion' page. If they have an image, it should be
+;; named after the CAR of the list element (baw -> baw.png).
+;;
+;; If you add to this list, you'll want to update
+;; `about-personal-info' and `about-hackers', and add the name to one
+;; of the three mutually exclusive lists just below.
(defvar xemacs-hackers
'(
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.