diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1998-04-08 11:36:04 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1998-04-08 11:36:04 +0000 |
commit | b63c9d417ea3cd3bcd6cf8f0dc17154a29b579ca (patch) | |
tree | 2b5e5e16824333ba97dff5d6deb53601fe096d5f | |
parent | 077c8f688d23f1f9a08045326fb8ac35f43a1a47 (diff) |
Fichier oublie
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1913 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | emacs/caml-compat.el | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/emacs/caml-compat.el b/emacs/caml-compat.el new file mode 100644 index 000000000..dfe0ed78f --- /dev/null +++ b/emacs/caml-compat.el @@ -0,0 +1,28 @@ +;; function definitions for old versions of emacs + +;; indent-line-to + +(if (not (fboundp 'indent-line-to)) + (defun indent-line-to (column) + "Indent current line to COLUMN. + +This function removes or adds spaces and tabs at beginning of line +only if necessary. It leaves point at end of indentation." + (if (= (current-indentation) column) + (back-to-indentation) + (beginning-of-line 1) + (delete-horizontal-space) + (indent-to column)))) + +;; buffer-substring-no-properties + +(cond + ((fboundp 'buffer-substring-no-properties)) + ((fboundp 'buffer-substring-without-properties) + (defalias 'buffer-substring-no-properties + 'buffer-substring-without-properties)) + (t + (defalias 'buffer-substring-no-properties 'buffer-substring))) + +(provide 'caml-compat) + |