ocaml / caml-compat.el

;; 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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.