;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: mime-def.el,v 0.64 1997-09-25 13:08:33 morioka Exp $
+;; Version: $Id: mime-def.el,v 0.65 1997-09-25 16:36:10 morioka Exp $
;; Keywords: definition, MIME, multimedia, mail, news
;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
(require 'emu)
+(defun-maybe butlast (x &optional n)
+ "Returns a copy of LIST with the last N elements removed."
+ (if (and n (<= n 0)) x
+ (nbutlast (copy-sequence x) n)))
+
+(defun-maybe nbutlast (x &optional n)
+ "Modifies LIST to remove the last N elements."
+ (let ((m (length x)))
+ (or n (setq n 1))
+ (and (< n m)
+ (progn
+ (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil))
+ x))))
+
(defconst semi-version-name "Hinomiko")
(autoload 'mule-caesar-region "mule-caesar"