Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/sml-mode/sml-compat.el
ViewVC logotype

Diff of /sml/trunk/sml-mode/sml-compat.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 541, Fri Feb 18 20:35:43 2000 UTC revision 881, Thu Jul 19 20:07:53 2001 UTC
# Line 20  Line 20 
20    
21  ;;; Code:  ;;; Code:
22    
23    (require 'cl)
24    
25  (unless (fboundp 'set-keymap-parents)  (unless (fboundp 'set-keymap-parents)
26    (defun set-keymap-parents (m parents)    (defun set-keymap-parents (m parents)
27      (if (keymapp parents) (setq parents (list parents)))      (if (keymapp parents) (setq parents (list parents)))
# Line 64  Line 66 
66      file)))      file)))
67    
68    
69    
70    (unless (fboundp 'regexp-opt)
71      (defun regexp-opt (strings &optional paren)
72        (let ((open (if paren "\\(" "")) (close (if paren "\\)" "")))
73          (concat open (mapconcat 'regexp-quote strings "\\|") close))))
74    
75    
76    ;;;;
77    ;;;; Custom
78    ;;;;
79    
80    ;; doesn't exist in Emacs < 20.1
81    (unless (fboundp 'set-face-bold-p)
82      (defun set-face-bold-p (face v &optional f)
83        (when v (ignore-errors (make-face-bold face)))))
84    (unless (fboundp 'set-face-italic-p)
85      (defun set-face-italic-p (face v &optional f)
86        (when v (ignore-errors (make-face-italic face)))))
87    
88    ;; doesn't exist in Emacs < 20.1
89    (ignore-errors (require 'custom))
90    (unless (fboundp 'defgroup)
91      (defmacro defgroup (&rest rest) ()))
92    (unless (fboundp 'defcustom)
93      (defmacro defcustom (sym val str &rest rest) `(defvar ,sym ,val ,str)))
94    (unless (fboundp 'defface)
95      (defmacro defface (sym val str &rest rest)
96        `(defvar ,sym (make-face ',sym) ,str)))
97    
98    (defvar :group ':group)
99    (defvar :type ':type)
100    (defvar :copy ':copy)
101    (defvar :dense ':dense)
102    (defvar :inherit ':inherit)
103    (defvar :suppress ':suppress)
104    
105  (provide 'sml-compat)  (provide 'sml-compat)
106    
107  ;;; sml-compat.el ends here  ;;; sml-compat.el ends here

Legend:
Removed from v.541  
changed lines
  Added in v.881

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0