Skip to content

Commit

Permalink
add missing internal api for emacs 23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chen bin committed Dec 1, 2011
1 parent 356bd43 commit ad2c6a9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions init.el
@@ -1,3 +1,13 @@
;make .emacs.d support emacs 23.1 and above

;only emacs 23.3 and above has string-prefix-p defined
(if (not (fboundp 'string-prefix-p) )
(defun string-prefix-p (shorter longer)
(let ((n (mismatch shorter longer))
(l (length shorter)))
(if (or (not n) (= n l)) l nil)))
)

;; -*- coding: utf-8 -*-
(add-to-list 'load-path (expand-file-name "~/.emacs.d"))

Expand Down

0 comments on commit ad2c6a9

Please sign in to comment.