4.4BSD/usr/src/contrib/emacs-18.57/lisp/mlsupport.elc


(provide (quote mlsupport))

(defmacro ml-defun (&rest defs) (byte-code "DD" [defs ml-defun-1 quote] 3))

(defun ml-defun-1 (args) (byte-code "@@@ABMA" [args mocklisp] 4))

(defmacro declare-buffer-specific (&rest vars) (byte-code "	\"B" [var vars progn mapcar (lambda (var) (byte-code "DD" [var make-variable-buffer-local quote] 3))] 4))

(defmacro setq-default (var val) (byte-code "D	E" [var val set-default quote] 3))

(defun ml-set-default (varname value) (byte-code "!	\"" [varname value set-default intern] 4))

(defun >> (val count) (byte-code "	[\"" [val count lsh] 3))

(defun novalue nil (byte-code "" [nil] 1))

(defun ml-not (arg) (byte-code "!
‚Ç" [arg zerop 1 0] 2))

(defun provide-prefix-arg (arg form) (byte-code "@	\"" [form arg funcall] 3))

(defun define-keymap (name) (byte-code "! M" [name intern make-keymap] 4))

(defun ml-use-local-map (name) (byte-code "P!!" [name use-local-map intern "-map"] 4))

(defun ml-use-global-map (name) (byte-code "P!!" [name use-global-map intern "-map"] 4))

(defun local-bind-to-key (name key) (byte-code " 	 ! !+Y%	!Z!P(!,
!#" [key meta-prefix-char name current-local-map use-local-map make-keymap define-key integerp 128 char-to-string intern] 13))

(defun bind-to-key (name key) (byte-code "	!	!	
!#" [global-map key name define-key integerp char-to-string intern] 7))

(defun ml-autoload (name file) (byte-code "!	\"" [name file autoload intern] 4))

(defun ml-define-string-macro (name defn) (byte-code "!	M" [name defn intern] 3))

(defun push-back-character (char) (byte-code "	" [unread-command-char char] 2))

(defun to-col (column) (byte-code "\"" [column indent-to 0] 3))

(defmacro is-bound (&rest syms) (byte-code "	\"B" [sym syms and mapcar (lambda (sym) (byte-code "DD" [sym boundp quote] 3))] 4))

(defmacro declare-global (&rest syms) (byte-code "
\"B" [sym nil syms progn mapcar (lambda (sym) (byte-code "E" [sym nil defvar] 3))] 4))

(defmacro error-occurred (&rest body) (byte-code "	\"BF" [nil body condition-case progn append (nil) (error t)] 6))

(defun return-prefix-argument (value) (byte-code "	" [prefix-arg value] 2))

(defun ml-prefix-argument nil (byte-code "?	<@=Â" [current-prefix-arg 1 - -1] 2))

(defun ml-print (varname) (interactive "vPrint variable: ") (byte-code "!!J#!\"" [varname nil boundp message "%s => %s" symbol-name "%s has no value"] 7))

(defun ml-set (str val) (byte-code "!	L" [str val intern] 3))

(defun ml-message (&rest args) (byte-code "\"\"" [args message "%s" apply concat] 5))

(defun kill-to-end-of-line nil (byte-code "l
``T\"`#`Sd\"!" [nil t ml-prefix-argument-loop kill-region search-forward 10] 8))

(defun set-auto-fill-hook (arg) (byte-code "	!" [auto-fill-hook arg intern] 3))

(defun auto-execute (function pattern) (byte-code "H\"!ȈOQ
B	B" [pattern auto-mode-alist function /= 0 42 error "Only patterns starting with * supported in auto-execute" nil "\\." 1 "$"] 6))

(defun move-to-comment-column nil (byte-code "j" [comment-column] 1))

(defun erase-region nil (byte-code "` \"" [delete-region mark] 4))

(defun delete-region-to-buffer (bufname) (byte-code "` #` \"" [bufname copy-to-buffer mark delete-region] 6))

(defun copy-region-to-buffer (bufname) (byte-code "` #" [bufname copy-to-buffer mark] 5))

(defun append-region-to-buffer (bufname) (byte-code "` #" [bufname append-to-buffer mark] 5))

(defun prepend-region-to-buffer (bufname) (byte-code "` #" [bufname prepend-to-buffer mark] 5))

(defun delete-next-character nil (byte-code " !" [delete-char ml-prefix-argument] 3))

(defun delete-next-word nil (byte-code "` !`\"" [delete-region forward-word ml-prefix-argument] 5))

(defun delete-previous-word nil (byte-code "` !`\"" [delete-region backward-word ml-prefix-argument] 5))

(defun delete-previous-character nil (byte-code " !" [delete-backward-char ml-prefix-argument] 3))

(defun forward-character nil (byte-code " !" [forward-char ml-prefix-argument] 3))

(defun backward-character nil (byte-code " !" [backward-char ml-prefix-argument] 3))

(defun ml-newline nil (byte-code " !" [newline ml-prefix-argument] 3))

(defun ml-next-line nil (byte-code " !" [next-line ml-prefix-argument] 3))

(defun ml-previous-line nil (byte-code " !" [previous-line ml-prefix-argument] 3))

(defun delete-to-kill-buffer nil (byte-code "` \"" [kill-region mark] 4))

(defun narrow-region nil (byte-code "` \"" [narrow-to-region mark] 4))

(defun ml-newline-and-indent nil (byte-code "  !j)" [column current-indentation newline ml-prefix-argument] 4))

(defun newline-and-backup nil (byte-code " !" [open-line ml-prefix-argument] 3))

(defun quote-char nil (byte-code " !" [quoted-insert ml-prefix-argument] 3))

(defun ml-current-column nil (byte-code "iT" [] 1))

(defun ml-current-indent nil (byte-code " T" [current-indentation] 2))

(defun region-around-match (&optional n) (byte-code "!!!b" [n set-mark match-beginning match-end] 4))

(defun region-to-string nil (byte-code "` ^` ]\"" [buffer-substring mark] 6))

(defun use-abbrev-table (name) (byte-code "	P!!\"J)" [symbol name nil intern "-abbrev-table" boundp define-abbrev-table] 5))

(defun define-hooked-local-abbrev (name exp hook) (byte-code "	
!#" [name exp hook define-local-abbrev intern] 5))

(defun define-hooked-global-abbrev (name exp hook) (byte-code "	
!#" [name exp hook define-global-abbrev intern] 5))

(defun case-word-lower nil (byte-code "!" [ml-casify-word downcase-region] 2))

(defun case-word-upper nil (byte-code "!" [ml-casify-word upcase-region] 2))

(defun case-word-capitalize nil (byte-code "!" [ml-casify-word capitalize-region] 2))

(defun ml-casify-word (fun) (byte-code "!!` !`#)" [fun forward-char 1 forward-word -1 funcall ml-prefix-argument] 8))

(defun case-region-lower nil (byte-code "` \"" [downcase-region mark] 4))

(defun case-region-upper nil (byte-code "` \"" [upcase-region mark] 4))

(defun case-region-capitalize nil (byte-code "` \"" [capitalize-region mark] 4))

(defvar saved-command-line-args nil)

(defun argc nil (byte-code "		‰	G" [saved-command-line-args command-line-args nil] 2))

(defun argv (i) (byte-code "		‰8" [saved-command-line-args command-line-args nil i] 2))

(defun invisible-argc nil (byte-code "	G" [saved-command-line-args command-line-args] 1))

(defun invisible-argv (i) (byte-code "	
8" [i saved-command-line-args command-line-args] 2))

(defun exit-emacs nil (interactive) (byte-code "" [nil (byte-code " " [exit-recursive-edit] 2) ((error (byte-code " " [kill-emacs] 2)))] 3))

(defun ml-buffer-size nil (byte-code "deZ" [] 2))

(defun previous-command nil (byte-code "" [last-command] 1))

(defun beginning-of-window nil (byte-code " b" [window-start] 2))

(defun end-of-window nil (byte-code " b Z!" [window-start vertical-motion window-height 2] 5))

(defun ml-search-forward (string) (byte-code " $" [string nil search-forward ml-prefix-argument] 6))

(defun ml-re-search-forward (string) (byte-code " $" [string nil re-search-forward ml-prefix-argument] 6))

(defun ml-search-backward (string) (byte-code " $" [string nil search-backward ml-prefix-argument] 6))

(defun ml-re-search-backward (string) (byte-code " $" [string nil re-search-backward ml-prefix-argument] 6))

(defvar use-users-shell 1 "\
Mocklisp compatibility variable; 1 means use shell from SHELL env var.
0 means use /bin/sh.")

(defvar use-csh-option-f 1 "\
Mocklisp compatibility variable; 1 means pass -f when calling csh.")

(defun filter-region (command) (byte-code "	\"
!\"` \")Ђ*P&*" [shell use-users-shell shell-file-name csh t nil use-csh-option-f command /= 0 "/bin/sh" equal file-name-nondirectory "csh" call-process-region mark "-cf" "-c" "exec "] 14))

(defun execute-monitor-command (command) (byte-code "	\"
!\"&ς'P&*" [shell use-users-shell shell-file-name csh nil t use-csh-option-f command /= 0 "/bin/sh" equal file-name-nondirectory "csh" call-process "-cf" "-c" "exec "] 11))

(defun use-syntax-table (name) (byte-code "P!J!" [name set-syntax-table intern "-syntax-table"] 4))

(defun line-to-top-of-window nil (byte-code " S!" [recenter ml-prefix-argument] 3))

(defun ml-previous-page (&optional arg) (byte-code "	 V!SW,!T)" [count arg nil ml-prefix-argument 0 scroll-down scroll-up] 6))

(defun ml-next-page nil (byte-code " [!" [previous-page ml-prefix-argument] 3))

(defun page-next-window (&optional arg) (byte-code "	 V!SW,!T)" [count arg nil ml-prefix-argument 0 scroll-other-window -] 6))

(defun ml-next-window nil (byte-code " !" [select-window next-window] 3))

(defun ml-previous-window nil (byte-code " !" [select-window previous-window] 3))

(defun scroll-one-line-up nil (byte-code " !" [scroll-up ml-prefix-argument] 3))

(defun scroll-one-line-down nil (byte-code " !" [scroll-down ml-prefix-argument] 3))

(defun split-current-window nil (byte-code " !" [split-window selected-window] 3))

(defun last-key-struck nil (byte-code "" [last-command-char] 1))

(defun execute-mlisp-line (string) (byte-code "!!" [string eval read] 3))

(defun move-dot-to-x-y (x y) (byte-code " !bS!	S!" [y x window-start selected-window vertical-motion move-to-column] 5))

(defun ml-modify-syntax-entry (string) (byte-code "
G
O
HUIˈ
HU8
HU2I5!9ˈ
HUW
HUQIT!Xˈ	W
H\"T	Wv
HU
SH
TH
X\"T\\*ˈY+" [i len string datastring c lim 5 0 2 45 32 nil 123 4 60 error "Two-char comment delimiter: use modify-syntax-entry directly" 3 125 62 modify-syntax-entry] 8))

(defun ml-substr (string from to) (byte-code "	G
W
\\ňW!\\\"ň	

\\O)" [length string from to 0 nil] 4))