Revision 633bb2a5030e80a46a92b1bff9afd053fd180262 authored by No author on 19 December 2007, 16:14:16 UTC, committed by No author on 19 December 2007, 16:14:16 UTC
git-svn-id: http://caml.inria.fr/svn/ocaml/release/3.10.1-rc1@8734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 96a30de
Raw File
caml-compat.el
;(***********************************************************************)
;(*                                                                     *)
;(*                           Objective Caml                            *)
;(*                                                                     *)
;(*           Xavier Leroy, projet Cristal, INRIA Rocquencourt          *)
;(*                                                                     *)
;(*  Copyright 1998 Institut National de Recherche en Informatique et   *)
;(*  en Automatique.  All rights reserved.  This file is distributed    *)
;(*  under the terms of the GNU General Public License.                 *)
;(*                                                                     *)
;(***********************************************************************)

;(* $Id$ *)

;; 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)

back to top