annotate lisp/obsolete/mlsupport.el @ 90729:6588c6259dfb

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 545-562) - Update from CVS - Update from erc--emacs--22 - Merge from gnus--rel--5.10 - erc-iswitchb: Temporarily enable iswitchb mode * gnus--rel--5.10 (patch 172-176) - Merge from emacs--devo--0 - Update from CVS - Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice. Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-156
author Miles Bader <miles@gnu.org>
date Sat, 16 Dec 2006 01:29:26 +0000
parents c5406394f567 f7702c5f335d
children 95d0cdf160ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42270
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
1 ;;; mlsupport.el --- run-time support for mocklisp code
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
2
74509
f7702c5f335d Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68640
diff changeset
3 ;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
68640
e8a3fb527b77 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 65102
diff changeset
4 ;; 2006 Free Software Foundation, Inc.
42270
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
5
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
6 ;; Maintainer: FSF
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
7 ;; Keywords: extensions
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
8
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
10
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
14 ;; any later version.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
15
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
19 ;; GNU General Public License for more details.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
20
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
24 ;; Boston, MA 02110-1301, USA.
42270
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
25
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
26 ;;; Commentary:
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
27
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
28 ;; This package provides equivalents of certain primitives from Gosling
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
29 ;; Emacs (including the commercial UniPress versions). These have an
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
30 ;; ml- prefix to distinguish them from native GNU Emacs functions with
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
31 ;; similar names. The package mlconvert.el translates Mocklisp code
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
32 ;; to use these names.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
33
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
34 ;;; Code:
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
35
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
36 (defmacro ml-defun (&rest defs)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
37 (list 'ml-defun-1 (list 'quote defs)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
38
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
39 (defun ml-defun-1 (args)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
40 (while args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
41 (fset (car (car args)) (cons 'mocklisp (cdr (car args))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
42 (setq args (cdr args))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
43
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
44 (defmacro declare-buffer-specific (&rest vars)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
45 (cons 'progn (mapcar (function (lambda (var) (list 'make-variable-buffer-local (list 'quote var)))) vars)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
46
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
47 (defun ml-set-default (varname value)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
48 (set-default (intern varname) value))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
49
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
50 ; Lossage: must make various things default missing args to the prefix arg
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
51 ; Alternatively, must make provide-prefix-argument do something hairy.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
52
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
53 (defun >> (val count) (lsh val (- count)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
54 (defun novalue () nil)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
55
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
56 (defun ml-not (arg) (if (zerop arg) 1 0))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
57
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
58 (defun provide-prefix-arg (arg form)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
59 (funcall (car form) arg))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
60
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
61 (defun define-keymap (name)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
62 (fset (intern name) (make-keymap)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
63
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
64 ;; Make it work to use ml-use-...-map on "esc" and such.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
65 (fset 'esc-map esc-map)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
66 (fset 'ctl-x-map ctl-x-map)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
67
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
68 (defun ml-use-local-map (name)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
69 (use-local-map (intern (concat name "-map"))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
70
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
71 (defun ml-use-global-map (name)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
72 (use-global-map (intern (concat name "-map"))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
73
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
74 (defun local-bind-to-key (name key)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
75 (or (current-local-map)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
76 (use-local-map (make-keymap)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
77 (define-key (current-local-map)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
78 (if (integerp key)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
79 (if (>= key 128)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
80 (concat (char-to-string meta-prefix-char)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
81 (char-to-string (- key 128)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
82 (char-to-string key))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
83 key)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
84 (intern name)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
85
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
86 (defun bind-to-key (name key)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
87 (define-key global-map (if (integerp key) (char-to-string key) key)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
88 (intern name)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
89
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
90 (defun ml-autoload (name file)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
91 (autoload (intern name) file))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
92
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
93 (defun ml-define-string-macro (name defn)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
94 (fset (intern name) defn))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
95
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
96 (defun push-back-character (char)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
97 (setq unread-command-events (list char)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
98
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
99 (defun to-col (column)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
100 (indent-to column 0))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
101
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
102 (defmacro is-bound (&rest syms)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
103 (cons 'and (mapcar (function (lambda (sym) (list 'boundp (list 'quote sym)))) syms)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
104
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
105 (defmacro declare-global (&rest syms)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
106 (cons 'progn (mapcar (function (lambda (sym) (list 'defvar sym nil))) syms)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
107
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
108 (defmacro error-occurred (&rest body)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
109 (list 'condition-case nil (cons 'progn (append body '(nil))) '(error t)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
110
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
111 (defun return-prefix-argument (value)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
112 (setq prefix-arg value))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
113
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
114 (defun ml-prefix-argument ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
115 (if (null current-prefix-arg) 1
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
116 (if (listp current-prefix-arg) (car current-prefix-arg)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
117 (if (eq current-prefix-arg '-) -1
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
118 current-prefix-arg))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
119
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
120 (defun ml-print (varname)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
121 (interactive "vPrint variable: ")
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
122 (if (boundp varname)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
123 (message "%s => %s" (symbol-name varname) (symbol-value varname))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
124 (message "%s has no value" (symbol-name varname))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
125
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
126 (defun ml-set (str val) (set (intern str) val))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
127
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
128 (defun ml-message (&rest args) (message "%s" (apply 'concat args)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
129
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
130 (defun kill-to-end-of-line ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
131 (ml-prefix-argument-loop
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
132 (if (eolp)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
133 (kill-region (point) (1+ (point)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
134 (kill-region (point) (if (search-forward ?\n nil t)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
135 (1- (point)) (point-max))))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
136
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
137 (defun set-auto-fill-hook (arg)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
138 (setq auto-fill-function (intern arg)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
139
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
140 (defun auto-execute (function pattern)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
141 (if (/= (aref pattern 0) ?*)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
142 (error "Only patterns starting with * supported in auto-execute"))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
143 (setq auto-mode-alist (cons (cons (concat "\\." (substring pattern 1)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
144 "\\'")
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
145 function)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
146 auto-mode-alist)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
147
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
148 (defun move-to-comment-column ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
149 (indent-to comment-column))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
150
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
151 (defun erase-region ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
152 (delete-region (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
153
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
154 (defun delete-region-to-buffer (bufname)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
155 (copy-to-buffer bufname (point) (mark))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
156 (delete-region (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
157
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
158 (defun copy-region-to-buffer (bufname)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
159 (copy-to-buffer bufname (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
160
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
161 (defun append-region-to-buffer (bufname)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
162 (append-to-buffer bufname (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
163
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
164 (defun prepend-region-to-buffer (bufname)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
165 (prepend-to-buffer bufname (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
166
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
167 (defun delete-next-character ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
168 (delete-char (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
169
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
170 (defun delete-next-word ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
171 (delete-region (point) (progn (forward-word (ml-prefix-argument)) (point))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
172
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
173 (defun delete-previous-word ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
174 (delete-region (point) (progn (backward-word (ml-prefix-argument)) (point))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
175
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
176 (defun delete-previous-character ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
177 (delete-backward-char (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
178
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
179 (defun forward-character ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
180 (forward-char (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
181
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
182 (defun backward-character ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
183 (backward-char (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
184
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
185 (defun ml-newline ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
186 (newline (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
187
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
188 (defun ml-next-line ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
189 (next-line (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
190
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
191 (defun ml-previous-line ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
192 (previous-line (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
193
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
194 (defun delete-to-kill-buffer ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
195 (kill-region (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
196
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
197 (defun narrow-region ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
198 (narrow-to-region (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
199
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
200 (defun ml-newline-and-indent ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
201 (let ((column (current-indentation)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
202 (newline (ml-prefix-argument))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
203 (indent-to column)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
204
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
205 (defun newline-and-backup ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
206 (open-line (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
207
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
208 (defun quote-char ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
209 (quoted-insert (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
210
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
211 (defun ml-current-column ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
212 (1+ (current-column)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
213
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
214 (defun ml-current-indent ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
215 (1+ (current-indentation)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
216
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
217 (defun region-around-match (&optional n)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
218 (set-mark (match-beginning n))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
219 (goto-char (match-end n)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
220
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
221 (defun region-to-string ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
222 (buffer-substring (min (point) (mark)) (max (point) (mark))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
223
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
224 (defun use-abbrev-table (name)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
225 (let ((symbol (intern (concat name "-abbrev-table"))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
226 (or (boundp symbol)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
227 (define-abbrev-table symbol nil))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
228 (symbol-value symbol)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
229
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
230 (defun define-hooked-local-abbrev (name exp hook)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
231 (define-abbrev local-abbrev-table name exp (intern hook)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
232
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
233 (defun define-hooked-global-abbrev (name exp hook)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
234 (define-abbrev global-abbrev-table name exp (intern hook)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
235
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
236 (defun case-word-lower ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
237 (ml-casify-word 'downcase-region))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
238
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
239 (defun case-word-upper ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
240 (ml-casify-word 'upcase-region))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
241
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
242 (defun case-word-capitalize ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
243 (ml-casify-word 'capitalize-region))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
244
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
245 (defun ml-casify-word (fun)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
246 (save-excursion
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
247 (forward-char 1)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
248 (forward-word -1)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
249 (funcall fun (point)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
250 (progn (forward-word (ml-prefix-argument))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
251 (point)))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
252
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
253 (defun case-region-lower ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
254 (downcase-region (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
255
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
256 (defun case-region-upper ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
257 (upcase-region (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
258
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
259 (defun case-region-capitalize ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
260 (capitalize-region (point) (mark)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
261
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
262 (defvar saved-command-line-args nil)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
263
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
264 (defun argc ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
265 (or saved-command-line-args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
266 (setq saved-command-line-args command-line-args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
267 command-line-args ()))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
268 (length command-line-args))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
269
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
270 (defun argv (i)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
271 (or saved-command-line-args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
272 (setq saved-command-line-args command-line-args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
273 command-line-args ()))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
274 (nth i saved-command-line-args))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
275
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
276 (defun invisible-argc ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
277 (length (or saved-command-line-args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
278 command-line-args)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
279
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
280 (defun invisible-argv (i)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
281 (nth i (or saved-command-line-args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
282 command-line-args)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
283
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
284 (defun exit-emacs ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
285 (interactive)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
286 (condition-case ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
287 (exit-recursive-edit)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
288 (error (kill-emacs))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
289
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
290 ;; Lisp function buffer-size returns total including invisible;
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
291 ;; mocklisp wants just visible.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
292 (defun ml-buffer-size ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
293 (- (point-max) (point-min)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
294
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
295 (defun previous-command ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
296 last-command)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
297
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
298 (defun beginning-of-window ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
299 (goto-char (window-start)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
300
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
301 (defun end-of-window ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
302 (goto-char (window-start))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
303 (vertical-motion (- (window-height) 2)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
304
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
305 (defun ml-search-forward (string)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
306 (search-forward string nil nil (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
307
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
308 (defun ml-re-search-forward (string)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
309 (re-search-forward string nil nil (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
310
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
311 (defun ml-search-backward (string)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
312 (search-backward string nil nil (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
313
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
314 (defun ml-re-search-backward (string)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
315 (re-search-backward string nil nil (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
316
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
317 (defvar use-users-shell 1
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
318 "Mocklisp compatibility variable; 1 means use shell from SHELL env var.
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
319 0 means use /bin/sh.")
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
320
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
321 (defvar use-csh-option-f 1
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
322 "Mocklisp compatibility variable; 1 means pass -f when calling csh.")
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
323
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
324 (defun filter-region (command)
65102
3b647b8b1789 (filter-region, execute-monitor-command): Use `let*' instead of `let'.
Juanma Barranquero <lekktu@gmail.com>
parents: 64751
diff changeset
325 (let* ((shell (if (/= use-users-shell 0) shell-file-name "/bin/sh"))
3b647b8b1789 (filter-region, execute-monitor-command): Use `let*' instead of `let'.
Juanma Barranquero <lekktu@gmail.com>
parents: 64751
diff changeset
326 (csh (equal (file-name-nondirectory shell) "csh")))
42270
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
327 (call-process-region (point) (mark) shell t t nil
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
328 (if (and csh use-csh-option-f) "-cf" "-c")
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
329 (concat "exec " command))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
330
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
331 (defun execute-monitor-command (command)
65102
3b647b8b1789 (filter-region, execute-monitor-command): Use `let*' instead of `let'.
Juanma Barranquero <lekktu@gmail.com>
parents: 64751
diff changeset
332 (let* ((shell (if (/= use-users-shell 0) shell-file-name "/bin/sh"))
3b647b8b1789 (filter-region, execute-monitor-command): Use `let*' instead of `let'.
Juanma Barranquero <lekktu@gmail.com>
parents: 64751
diff changeset
333 (csh (equal (file-name-nondirectory shell) "csh")))
42270
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
334 (call-process shell nil t t
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
335 (if (and csh use-csh-option-f) "-cf" "-c")
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
336 (concat "exec " command))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
337
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
338 (defun use-syntax-table (name)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
339 (set-syntax-table (symbol-value (intern (concat name "-syntax-table")))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
340
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
341 (defun line-to-top-of-window ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
342 (recenter (1- (ml-prefix-argument))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
343
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
344 (defun ml-previous-page (&optional arg)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
345 (let ((count (or arg (ml-prefix-argument))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
346 (while (> count 0)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
347 (scroll-down nil)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
348 (setq count (1- count)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
349 (while (< count 0)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
350 (scroll-up nil)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
351 (setq count (1+ count)))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
352
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
353 (defun ml-next-page ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
354 (previous-page (- (ml-prefix-argument))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
355
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
356 (defun page-next-window (&optional arg)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
357 (let ((count (or arg (ml-prefix-argument))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
358 (while (> count 0)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
359 (scroll-other-window nil)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
360 (setq count (1- count)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
361 (while (< count 0)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
362 (scroll-other-window '-)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
363 (setq count (1+ count)))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
364
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
365 (defun ml-next-window ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
366 (select-window (next-window)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
367
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
368 (defun ml-previous-window ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
369 (select-window (previous-window)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
370
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
371 (defun scroll-one-line-up ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
372 (scroll-up (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
373
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
374 (defun scroll-one-line-down ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
375 (scroll-down (ml-prefix-argument)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
376
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
377 (defun split-current-window ()
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
378 (split-window (selected-window)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
379
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
380 (defun last-key-struck () last-command-char)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
381
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
382 (defun execute-mlisp-line (string)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
383 (eval (read string)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
384
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
385 (defun move-dot-to-x-y (x y)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
386 (goto-char (window-start (selected-window)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
387 (vertical-motion (1- y))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
388 (move-to-column (1- x)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
389
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
390 (defun ml-modify-syntax-entry (string)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
391 (let ((i 5)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
392 (len (length string))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
393 (datastring (substring string 0 2)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
394 (if (= (aref string 0) ?\-)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
395 (aset datastring 0 ?\ ))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
396 (if (= (aref string 2) ?\{)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
397 (if (= (aref string 4) ?\ )
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
398 (aset datastring 0 ?\<)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
399 (error "Two-char comment delimiter: use modify-syntax-entry directly")))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
400 (if (= (aref string 3) ?\})
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
401 (if (= (aref string 4) ?\ )
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
402 (aset datastring 0 ?\>)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
403 (error "Two-char comment delimiter: use modify-syntax-entry directly")))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
404 (while (< i len)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
405 (modify-syntax-entry (aref string i) datastring)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
406 (setq i (1+ i))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
407 (if (and (< i len)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
408 (= (aref string i) ?\-))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
409 (let ((c (aref string (1- i)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
410 (lim (aref string (1+ i))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
411 (while (<= c lim)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
412 (modify-syntax-entry c datastring)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
413 (setq c (1+ c)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
414 (setq i (+ 2 i)))))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
415
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
416
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
417
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
418 (defun ml-substr (string from to)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
419 (let ((length (length string)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
420 (if (< from 0) (setq from (+ from length)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
421 (if (< to 0) (setq to (+ to length)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
422 (substring string from (+ from to))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
423
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
424 (defun ml-concat (&rest args)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
425 (let ((newargs nil) this)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
426 (while args
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
427 (setq this (car args))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
428 (if (numberp this)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
429 (setq this (number-to-string this)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
430 (setq newargs (cons this newargs)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
431 args (cdr args)))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
432 (apply 'concat (nreverse newargs))))
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
433
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
434 (provide 'mlsupport)
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
435
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 42270
diff changeset
436 ;;; arch-tag: b0ad09bc-8cb2-4be0-8888-2e874839bcbc
42270
eb1ac743e2c7 Moved there from lisp/emulation.
Pavel Janík <Pavel@Janik.cz>
parents:
diff changeset
437 ;;; mlsupport.el ends here