Skip to content

Commit

Permalink
Add `byte-compile-dynamic' cookie.
Browse files Browse the repository at this point in the history
(string-as-unibyte): Use `defsubst-maybe' instead of `defmacro-maybe'.
(string-as-multibyte): Likewise.
(char-int): Use `defalias-maybe'.
(int-char): Likewise.
(char-or-char-int-p): Likewise.
  • Loading branch information
morioka committed Oct 25, 1998
1 parent 56d3a97 commit 8ebbc43
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 128 deletions.
44 changes: 0 additions & 44 deletions ChangeLog
@@ -1,47 +1,3 @@
1998-10-25 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* poem-e20_3.el (characterp): New alias.

* poe-xemacs.el (eval-after-load): New function.

* poem.el (characterp): New alias.
(char-octet): New function.

* poe.el (make-local-hook): New macro.
(add-local-hook): New macro.
(remove-local-hook): New macro.

1998-10-25 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* poem.el, poem-20.el, poem-e20_3.el, poem-e20.el, poem-xm.el: Add
setting of byte-compile-dynamic.

* poem-xm.el (string-to-int-list): Use `defun-maybe'.

* poem.el (string-as-unibyte): Use `defsubst-maybe' instead of
`defmacro-maybe'.
(string-as-multibyte): Likewise.
(char-int): Use `defalias-maybe'.
(int-char): Likewise.
(char-or-char-int-p): Likewise.

1998-10-25 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* poe.el, poe-xemacs.el: Add setting of byte-compile-dynamic.

1998-10-25 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* poe-18.el (data-directory): Use `defvar-maybe'.
(buffer-undo-list): Likewise.

* poe-xemacs.el (face-list): Use `defalias-maybe'.
(line-beginning-position): Likewise.
(line-end-position): Likewise.

* poe.el (defalias-maybe): New macro.

* poe-xemacs.el (dired-other-frame): Use `defun-maybe'.

1998-10-24 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* poe.el (defvar-maybe): New macro.
Expand Down
36 changes: 1 addition & 35 deletions poe-xemacs.el
Expand Up @@ -83,41 +83,7 @@
(concat ancestor (substring filename (match-end 0)))))
)


;;; @ for anything older than XEmacs 20.2
;;;

;; eval-after-load is not defined in XEmacs but after-load-alist is
;; usable. See subr.el in XEmacs.

(defun-maybe eval-after-load (file form)
"Arrange that, if FILE is ever loaded, FORM will be run at that time.
This makes or adds to an entry on `after-load-alist'.
If FILE is already loaded, evaluate FORM right now.
It does nothing if FORM is already on the list for FILE.
FILE should be the name of a library, with no directory name."
;; Make sure there is an element for FILE.
(or (assoc file after-load-alist)
(setq after-load-alist (cons (list file) after-load-alist)))
;; Add FORM to the element if it isn't there.
(let ((elt (assoc file after-load-alist)))
(or (member form (cdr elt))
(progn
(nconc elt (list form))
;; If the file has been loaded already, run FORM right away.
(and (assoc file load-history)
(eval form)))))
form)

;; (defun-maybe eval-after-load (file form)
;; (or (assoc file after-load-alist)
;; (setq after-load-alist (cons (list file) after-load-alist)))
;; (let ((elt (assoc file after-load-alist)))
;; (or (member form (cdr elt))
;; (nconc elt (list form))))
;; form)



;;; @ Emacs 20.3 emulation
;;;

Expand Down
31 changes: 2 additions & 29 deletions poe.el
Expand Up @@ -143,7 +143,7 @@
;;; @ Emacs 19.29 emulation
;;;

(defvar-maybe path-separator ":"
(defvar path-separator ":"
"Character used to separate concatenated paths.")

(defun-maybe buffer-substring-no-properties (start end)
Expand Down Expand Up @@ -177,38 +177,11 @@ STRING should be given if the last search was by `string-match' on STRING.
(defun read-string (prompt &optional initial-input history)
"Read a string from the minibuffer, prompting with string PROMPT.
If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
The third arg HISTORY, is dummy for compatibility.
The third arg HISTORY, is dummy for compatibility. [emu.el]
See `read-from-minibuffer' for details of HISTORY argument."
(si:read-string prompt initial-input))
))

(defun-maybe rassoc (key list)
"Return non-nil if KEY is `equal' to the cdr of an element of LIST.
The value is actually the element of LIST whose cdr equals KEY."
(catch 'found
(while list
(if (equal (cdr (car list)) key)
(throw 'found (car list))
)
(setq list (cdr list)))
))

(defmacro-maybe make-local-hook (hook))

;; They are not Emacs features

(defmacro-maybe add-local-hook (hook function &optional append)
(if (fboundp 'make-local-hook)
(list 'add-hook hook function append 'local)
(list 'add-hook hook function append)
))

(defmacro remove-local-hook (hook function)
(if (fboundp 'make-local-hook)
(list 'remove-hook hook function 'local)
(list 'remove-hook hook function)
))


;;; @ Emacs 19.30 emulation
;;;
Expand Down
3 changes: 1 addition & 2 deletions poem-20.el
@@ -1,5 +1,4 @@
;;; -*-byte-compile-dynamic: t;-*-
;;; poem-20.el --- poem submodule for Emacs 20 and XEmacs-mule
;;; poem-20.el --- poem implementation for Emacs 20 and XEmacs-mule

;; Copyright (C) 1997,1998 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion poem-e20.el
@@ -1,4 +1,4 @@
;;; poem-e20.el --- poem submodule for Emacs 20; -*-byte-compile-dynamic: t;-*-
;;; poem-e20.el --- poem implementation for XEmacs-mule

;; Copyright (C) 1998 Free Software Foundation, Inc.

Expand Down
5 changes: 1 addition & 4 deletions poem-e20_3.el
@@ -1,5 +1,4 @@
;;; -*-byte-compile-dynamic: t;-*-
;;; poem-e20_3.el --- poem submodule for Emacs 20.3
;;; poem-e20_3.el --- poem implementation for Emacs 20.3.

;; Copyright (C) 1998 Free Software Foundation, Inc.

Expand Down Expand Up @@ -40,8 +39,6 @@
"Return index of character succeeding CHAR whose index is INDEX."
`(1+ ,index))

(defalias-maybe 'characterp 'char-valid-p)


;;; @ string
;;;
Expand Down
4 changes: 2 additions & 2 deletions poem-xm.el
@@ -1,4 +1,4 @@
;;; poem-xm.el --- poem module for XEmacs-mule; -*-byte-compile-dynamic: t;-*-
;;; poem-xm.el --- poem implementation for XEmacs-mule

;; Copyright (C) 1998 Free Software Foundation, Inc.

Expand Down Expand Up @@ -163,7 +163,7 @@ but the contents viewed as characters do change.
;;; @ string
;;;

(defun-maybe string-to-int-list (str)
(defun string-to-int-list (str)
(mapcar #'char-int str))

(defalias 'looking-at-as-unibyte 'looking-at)
Expand Down
11 changes: 0 additions & 11 deletions poem.el
Expand Up @@ -70,19 +70,8 @@ If STRING is multibyte, the result is STRING itself.

(defalias-maybe 'int-char 'identity)

(defalias-maybe 'characterp 'integerp)

(defalias-maybe 'char-or-char-int-p 'integerp)

(defun-maybe char-octet (ch &optional n)
"Return the octet numbered N (should be 0 or 1) of char CH.
N defaults to 0 if omitted. [XEmacs-mule emulating function]"
(or (nth (if n
(1+ n)
1)
(split-char ch))
0))


;;; @ end
;;;
Expand Down

0 comments on commit 8ebbc43

Please sign in to comment.