Skip to content

Commit

Permalink
fake emacs24.3 API
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Apr 17, 2014
1 parent 203250b commit a675d95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions init-compat.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
;;----------------------------------------------------------------------------
;; Provide a version of Emacs 24's 'string-prefix-p in older emacsen
;;----------------------------------------------------------------------------
(unless (fboundp 'delete-all-overlays)
(defun delete-all-overlays ()
(remove-overlays)))

(unless (fboundp 'string-prefix-p)
(defun string-prefix-p (str1 str2 &optional ignore-case)
"Return non-nil if STR1 is a prefix of STR2.
Expand Down

0 comments on commit a675d95

Please sign in to comment.