User: aidan
Date: 09/08/14 12:50:34
Modified: packages/xemacs-packages/mmm-mode ChangeLog mmm-cmds.el
Log:
Don't use #'multiple-value-bind on lists, mmm-mode.el
Revision Changes Path
1.13 +10 -0 XEmacs/packages/xemacs-packages/mmm-mode/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mmm-mode/ChangeLog,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- ChangeLog 2008/12/27 12:15:06 1.12
+++ ChangeLog 2009/08/14 10:50:32 1.13
@@ -1,3 +1,13 @@
+2009-08-13 Aidan Kehoe <[email protected]>
+
+ * mmm-cmds.el:
+ * mmm-cmds.el (mmm-destructuring-bind): New.
+ Macro that corresponds to `destructuring-bind', but that does not
+ error if the structures do not match.
+ * mmm-cmds.el (mmm-insert-by-key):
+ Use it, instead of `multiple-value-bind', to avoid unwanted
+ interactions with actual working multiple-value implementations.
+
2008-12-27 Norbert Koch <[email protected]>
* Makefile (VERSION): XEmacs package 1.03 released.
1.4 +7 -3 XEmacs/packages/xemacs-packages/mmm-mode/mmm-cmds.el
Index: mmm-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mmm-mode/mmm-cmds.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- mmm-cmds.el 2008/12/22 14:02:24 1.3
+++ mmm-cmds.el 2009/08/14 10:50:32 1.4
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <[email protected]>
-;; Version: $Id: mmm-cmds.el,v 1.3 2008/12/22 14:02:24 mharnisch Exp $
+;; Version: $Id: mmm-cmds.el,v 1.4 2009/08/14 10:50:32 aidan Exp $
;;{{{ GPL
@@ -42,6 +42,10 @@
"Execute `body'."
`(progn ,@body))))
+(defmacro mmm-destructuring-bind (args expr &rest body)
+ "Like `destructuring-bind', but don't error if ARGS don't fit EXPR."
+ `(loop for ,args = ,expr return (progn ,@body)))
+
;; APPLYING CLASSES
;;{{{ Applying Predefined Classes
@@ -272,7 +276,7 @@ KEY must be a list \(MODIFIERS... . BASI
symbols such as shift, control, etc. and BASIC-KEY is a character code
or a symbol such as tab, return, etc. Note that if there are no
MODIFIERS, the dotted list becomes simply BASIC-KEY."
- (multiple-value-bind (class skel str) (mmm-get-insertion-spec key)
+ (mmm-destructuring-bind (class skel str) (mmm-get-insertion-spec key)
(when skel
(let ((after-change-functions nil)
(old-undo buffer-undo-list) undo)
@@ -280,7 +284,7 @@ MODIFIERS, the dotted list becomes simpl
;; have to do it.
(if mmm-xemacs (setq skeleton-positions nil))
(skeleton-proxy-new skel str arg)
- (destructuring-bind (back end beg front) skeleton-positions
+ (mmm-destructuring-bind (back end beg front) skeleton-positions
;; TODO: Find a way to trap invalid-parent signals from
;; make-region and undo the skeleton insertion.
(let ((match-submode (plist-get class :match-submode))
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.