emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] externals/caml c525bf8 121/197: clean up spaces and tabs


From: Stefan Monnier
Subject: [nongnu] externals/caml c525bf8 121/197: clean up spaces and tabs
Date: Sat, 21 Nov 2020 01:19:50 -0500 (EST)

branch: externals/caml
commit c525bf8dab2dc804e38b6ecd9061a058d0808134
Author: Damien Doligez <damien.doligez-inria.fr>
Commit: Damien Doligez <damien.doligez-inria.fr>

    clean up spaces and tabs
    
    git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
 .cvsignore       |   1 -
 Makefile         |  36 ++++++++---------
 caml-compat.el   |   1 -
 caml-font-old.el |   2 +-
 caml-font.el     |   8 ++--
 caml-help.el     | 119 ++++++++++++++++++++++++++++---------------------------
 inf-caml.el      |  22 +++++-----
 7 files changed, 94 insertions(+), 95 deletions(-)

diff --git a/.cvsignore b/.cvsignore
index e7e261f..ea6381f 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,2 +1 @@
 ocamltags
-
diff --git a/Makefile b/Makefile
index 4f3aa37..9519b39 100644
--- a/Makefile
+++ b/Makefile
@@ -30,28 +30,28 @@ SCRIPTDIR = $(BINDIR)
 
 # Command for byte-compiling the files
 COMPILECMD=(progn \
-              (setq load-path (cons "." load-path)) \
-              (byte-compile-file "caml-xemacs.el") \
+             (setq load-path (cons "." load-path)) \
+             (byte-compile-file "caml-xemacs.el") \
              (byte-compile-file "caml-emacs.el") \
-              (byte-compile-file "caml.el") \
-              (byte-compile-file "inf-caml.el") \
-              (byte-compile-file "caml-help.el") \
-              (byte-compile-file "caml-types.el") \
-              (byte-compile-file "camldebug.el"))
+             (byte-compile-file "caml.el") \
+             (byte-compile-file "inf-caml.el") \
+             (byte-compile-file "caml-help.el") \
+             (byte-compile-file "caml-types.el") \
+             (byte-compile-file "camldebug.el"))
 
 install:
        @if test "$(EMACSDIR)" = ""; then \
-          set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \
-                   2>/dev/null | \
-                   sed -n -e '/\/site-lisp/s/"//gp'`; \
-          if test "$$2" = ""; then \
-            echo "Cannot determine Emacs site-lisp directory"; \
-            exit 2; \
-          fi; \
-          $(MAKE) EMACSDIR="$$2" simple-install; \
-        else \
-          $(MAKE) simple-install; \
-        fi
+         set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \
+                  2>/dev/null | \
+                  sed -n -e '/\/site-lisp/s/"//gp'`; \
+         if test "$$2" = ""; then \
+           echo "Cannot determine Emacs site-lisp directory"; \
+           exit 2; \
+         fi; \
+         $(MAKE) EMACSDIR="$$2" simple-install; \
+       else \
+         $(MAKE) simple-install; \
+       fi
 
 # install the .el files, but do not compile them.
 install-el:
diff --git a/caml-compat.el b/caml-compat.el
index 3a48449..8ba7a99 100644
--- a/caml-compat.el
+++ b/caml-compat.el
@@ -39,4 +39,3 @@ only if necessary.  It leaves point at end of indentation."
   (defalias 'buffer-substring-no-properties 'buffer-substring)))
 
 (provide 'caml-compat)
-
diff --git a/caml-font-old.el b/caml-font-old.el
index fe57213..8faa542 100644
--- a/caml-font-old.el
+++ b/caml-font-old.el
@@ -114,7 +114,7 @@
    ((fboundp 'global-font-lock-mode)
     (make-local-variable 'font-lock-defaults)
     (setq font-lock-defaults
-         '(caml-font-lock-keywords nil nil ((?' . "w") (?_ . "w")))))
+          '(caml-font-lock-keywords nil nil ((?' . "w") (?_ . "w")))))
    (t
     (setq font-lock-keywords caml-font-lock-keywords)))
   (make-local-variable 'font-lock-keywords-only)
diff --git a/caml-font.el b/caml-font.el
index e796abd..f287ffa 100644
--- a/caml-font.el
+++ b/caml-font.el
@@ -1,6 +1,6 @@
 ;; caml-font: font-lock support for OCaml files
 ;;
-;; rewrite and clean-up. 
+;; rewrite and clean-up.
 ;; Changes:
 ;; - fontify strings and comments using syntactic font lock
 ;; - define a `font-lock-syntactic-face-function' to fontify ocamldoc comments
@@ -31,7 +31,7 @@
 
 (unless (facep 'font-lock-preprocessor-face)
   (defvar font-lock-preprocessor-face
-    (copy-face 'font-lock-builtin-face 
+    (copy-face 'font-lock-builtin-face
                'font-lock-preprocessor-face)))
 
 (defconst caml-font-lock-keywords
@@ -92,7 +92,7 @@
 (defun caml-font-set-font-lock ()
   (setq font-lock-defaults
         '(caml-font-lock-keywords
-          nil nil nil nil 
+          nil nil nil nil
           (font-lock-syntactic-face-function . caml-font-syntactic-face)))
   (font-lock-mode 1))
 (add-hook 'caml-mode-hook 'caml-font-set-font-lock)
@@ -106,7 +106,7 @@
 (defun inferior-caml-set-font-lock ()
   (setq font-lock-defaults
         '(inferior-caml-font-lock-keywords
-          nil nil nil nil 
+          nil nil nil nil
           (font-lock-syntactic-face-function . caml-font-syntactic-face)))
   (font-lock-mode 1))
 (add-hook 'inferior-caml-mode-hooks 'inferior-caml-set-font-lock)
diff --git a/caml-help.el b/caml-help.el
index 92735ac..e651718 100644
--- a/caml-help.el
+++ b/caml-help.el
@@ -27,27 +27,27 @@
 ;;   - dump some databaes: Info, Lib, ...
 ;;   - accept a search path for local libraries instead of current dir
 ;;     (then distinguish between different modules lying in different
-;;     directories) 
+;;     directories)
 ;;   - improve the construction for info files.
 ;;
-;;  Abstract over 
+;;  Abstract over
 ;;   - the viewing method and the database, so that the documentation for
-;;     and identifier could be search in 
+;;     and identifier could be search in
 ;;       * info / html / man / mli's sources
 ;;       * viewed in emacs or using an external previewer.
 ;;
 ;;  Take all identifiers (labels, Constructors, exceptions, etc.)
-;;       
+;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
 (eval-and-compile
-  (if (and (boundp 'running-xemacs) running-xemacs) 
+  (if (and (boundp 'running-xemacs) running-xemacs)
       (require 'caml-xemacs)
     (require 'caml-emacs)))
 
 ;; Loading or building databases.
-;; 
+;;
 
 ;; variables to be customized
 
@@ -73,7 +73,7 @@
              "ocamlc -where")))))
     ocaml-lib-path)
 
-      
+
 
 ;; General purpose auxiliary functions
 
@@ -92,17 +92,17 @@
           (if (stringp path)
               (if (file-directory-p path) path nil)
             (mapconcat '(lambda (d) (if (file-directory-p d) d))
-                       path " "))) 
+                       path " ")))
          (command
           (and path-string
                (concat "find " path-string
                        " '(' " filter " ')' "
                        (if depth (concat " -maxdepth " (int-to-string depth)))
-                       (if split nil " -printf '%\p '") 
+                       (if split nil " -printf '%\p '")
                        )))
           (files
            (and command (shell-command-to-string command))))
-         (if (and split (stringp files)) (split-string files "\n") files) 
+         (if (and split (stringp files)) (split-string files "\n") files)
          ))
 
 ;; Specialized auxiliary functions
@@ -111,7 +111,7 @@
 ;; Global table of modules contents of modules loaded lazily.
 
 (defvar ocaml-module-alist 'lazy
-  "A-list of modules with how and where to find help information. 
+  "A-list of modules with how and where to find help information.
   'delay means non computed yet")
 
 (defun ocaml-add-mli-modules (modules tag &optional path)
@@ -209,7 +209,7 @@
       alist)
       ))
 
-;; Local list of visible modules. 
+;; Local list of visible modules.
 
 (defvar ocaml-visible-modules 'lazy
   "A-list of open modules, local to every file.")
@@ -249,8 +249,8 @@ When call interactively, make completion over known 
modules."
   (message "%S" (mapcar 'car (ocaml-visible-modules))))
 
 (defun ocaml-close-module (arg)
-  "*Close module of name ARG when ARG is a string. 
-When call interactively, make completion over visible modules. 
+  "*Close module of name ARG when ARG is a string.
+When call interactively, make completion over visible modules.
 Otherwise if ARG is true, close all modules and reset to default. "
   (interactive "P")
   (if (= (prefix-numeric-value arg) 4)
@@ -268,27 +268,27 @@ Otherwise if ARG is true, close all modules and reset to 
default. "
                        ocaml-visible-modules))
       ))
   (message "%S" (mapcar 'car (ocaml-visible-modules))))
-           
+
 
 ;; Look for identifiers around point
 
 (defun ocaml-qualified-identifier (&optional show)
-  "Search for a qualified identifier (Path. entry) around point. 
+  "Search for a qualified identifier (Path. entry) around point.
 
 Entry may be nil.
-Currently, the path may only be nil or a single Module. 
-For paths is of the form Module.Path', it returns Module 
-and always nil for entry. 
+Currently, the path may only be nil or a single Module.
+For paths is of the form Module.Path', it returns Module
+and always nil for entry.
 
-If defined Module and Entry are represented by a region in the buffer, 
-and are nil otherwise. 
+If defined Module and Entry are represented by a region in the buffer,
+and are nil otherwise.
 
-For debugging purposes, it returns the string Module.entry if called 
-with an optional non-nil argument. 
+For debugging purposes, it returns the string Module.entry if called
+with an optional non-nil argument.
 "
   (save-excursion
     (let ((module) (entry))
-      (if (looking-at "[ \n]") (skip-chars-backward " ")) 
+      (if (looking-at "[ \n]") (skip-chars-backward " "))
       (if (re-search-backward
            
"\\([^A-Za-z0-9_.']\\|\\`\\)\\([A-Za-z0-9_']*[.]\\)*[A-Za-z0-9_']*\\="
            (- (point) 100) t)
@@ -314,7 +314,7 @@ with an optional non-nil argument.
   (let ((list
          (or
           (and module
-               (list 
+               (list
                 (or (assoc module (ocaml-module-alist))
                     (error "Unknown module %s" module))))
           (ocaml-visible-modules))))
@@ -333,19 +333,19 @@ with an optional non-nil argument.
       )))
 
 (defun caml-complete (arg)
-  "Does completion for OCaml identifiers qualified. 
+  "Does completion for OCaml identifiers qualified.
 
-It attemps to recognize an qualified identifier Module . entry 
+It attemps to recognize an qualified identifier Module . entry
 around point using function \\[ocaml-qualified-identifier].
 
 If Module is defined, it does completion for identifier in Module.
 
-If Module is undefined, it does completion in visible modules. 
-Then, if completion fails, it does completion among  all modules 
+If Module is undefined, it does completion in visible modules.
+Then, if completion fails, it does completion among  all modules
 where identifier is defined."
   (interactive "p")
   (let* ((module-entry (ocaml-qualified-identifier)) (entry)
-         (module) 
+         (module)
          (beg) (end) (pattern))
     (if (car module-entry)
         (progn
@@ -364,7 +364,7 @@ where identifier is defined."
                    (progn (setq entry (cdr module-entry)) t))
               (error "Unknown module %s" module))))
     (if (consp (cdr module-entry))
-        (progn         
+        (progn
           (setq beg (cadr module-entry))
           (setq end (cddr module-entry)))
       (if (and module
@@ -408,7 +408,7 @@ where identifier is defined."
                        (delete-region (caar module-entry) end)
                      (delete-region beg end))
                    (insert module "." pattern))))
-                     
+
               ((not (string-equal pattern completion))
                (delete-region beg end)
                (goto-char beg)
@@ -426,10 +426,10 @@ where identifier is defined."
 
 (defvar ocaml-info-prefix "ocaml-lib"
   "Prefix of ocaml info files describing library modules.
-Suffix .info will be added to info files. 
+Suffix .info will be added to info files.
 Additional suffix .gz may be added if info files are compressed.
 ")
-;; 
+;;
 
 (defun ocaml-hevea-info-add-entries (entries dir name)
   (let*
@@ -470,9 +470,9 @@ Additional suffix .gz may be added if info files are 
compressed.
     entries))
 
 (defun ocaml-hevea-info ()
-  "The default way to create an info data base from the value 
-of \\[Info-default-directory-list] and the base name \\[ocaml-info-name] 
-of files to look for. 
+  "The default way to create an info data base from the value
+of \\[Info-default-directory-list] and the base name \\[ocaml-info-name]
+of files to look for.
 
 This uses info files produced by HeVeA.
 "
@@ -512,8 +512,8 @@ This uses info files produced by HeVeA.
     entries))
 
 (defun ocaml-ocamldoc-info ()
-  "The default way to create an info data base from the value 
-of \\[Info-default-directory-list] and the base name \\[ocaml-info-name] 
+  "The default way to create an info data base from the value
+of \\[Info-default-directory-list] and the base name \\[ocaml-info-name]
 of files to look for.
 
 This uses info files produced by ocamldoc."
@@ -531,18 +531,18 @@ This uses info files produced by ocamldoc."
 ;; Continuing
 
 (defvar ocaml-info-alist 'ocaml-ocamldoc-info
-  "A-list binding module names to info entries: 
+  "A-list binding module names to info entries:
 
   nil means do not use info.
 
   A function to build the list lazily (at the first call). The result of
 the function call will be assign permanently to this variable for future
 uses. We provide two default functions \\[ocaml-info-default-function]
-(info produced by HeVeA is the default) and \\[ocaml-info-default-function] 
-(info produced by ocamldoc). 
+(info produced by HeVeA is the default) and \\[ocaml-info-default-function]
+(info produced by ocamldoc).
 
   Otherwise, this value should be an alist binding module names to info
-entries of the form to \"(entry)section\" be taken by the \\[info] 
+entries of the form to \"(entry)section\" be taken by the \\[info]
 command. An entry may be an info module or a complete file name."
 )
 
@@ -571,7 +571,7 @@ command. An entry may be an info module or a complete file 
name."
 (defun ocaml-buffer-substring (region)
   (and region (buffer-substring-no-properties (car region) (cdr region))))
 
-;; Help function. 
+;; Help function.
 
 
 (defun ocaml-goto-help (&optional module entry same-window)
@@ -588,7 +588,7 @@ current buffer using \\[ocaml-qualified-identifier]."
               (or (assoc module (ocaml-module-alist))
                   (and (file-exists-p
                         (concat (ocaml-uncapitalize module) ".mli"))
-                       (ocaml-get-or-make-module module))))                  
+                       (ocaml-get-or-make-module module))))
              (location (cdr (cadr module-info))))
         (cond
          (location
@@ -630,27 +630,28 @@ current buffer using \\[ocaml-qualified-identifier]."
     ))
 
 (defun caml-help (arg)
-  "Find documentation for OCaml qualified identifiers. 
+  "Find documentation for OCaml qualified identifiers.
 
 It attemps to recognize an qualified identifier of the form
 ``Module . entry'' around point using function `ocaml-qualified-identifier'.
 
 If Module is undetermined it is temptatively guessed from the identifier name
-and according to visible modules. If this is still unsucessful,  the user is 
-then prompted for a Module name. 
+and according to visible modules. If this is still unsucessful,  the user is
+then prompted for a Module name.
 
 The documentation for Module is first seach in the info manual if available,
-then in the ``module.mli'' source file. The entry is then searched in the 
documentation. 
+then in the ``module.mli'' source file. The entry is then searched in the
+documentation.
 
-Visible modules are computed only once, at the first call. 
+Visible modules are computed only once, at the first call.
 Modules can be made visible explicitly with `ocaml-open-module' and
-hidden with `ocaml-close-module'. 
+hidden with `ocaml-close-module'.
 
 Prefix arg 0 forces recompilation of visible modules (and their content)
-from the file content. 
+from the file content.
 
 Prefix arg 4 prompts for Module and identifier instead of guessing values
-from the possition of point in the current buffer. 
+from the possition of point in the current buffer.
 "
   (interactive "p")
   (let ((module) (entry) (module-entry))
@@ -709,7 +710,7 @@ from the possition of point in the current buffer.
 (defvar ocaml-links nil
   "Local links in the current of last info node or interface file.
 
-The car of the list is a key that indentifies the module to prevent 
+The car of the list is a key that indentifies the module to prevent
 recompilation when next help command is relative to the same module.
 The cdr is a list of elments, each of which is an string and a pair of
 buffer positions."
@@ -717,7 +718,7 @@ buffer positions."
 (make-variable-buffer-local 'ocaml-links)
 
 (defun ocaml-info-links (section)
-  (cdr 
+  (cdr
    (if (and ocaml-links section (equal (car ocaml-links) section))
        ocaml-links
      (save-excursion
@@ -793,19 +794,19 @@ buffer positions."
                         (put-text-property (match-beginning 1) (match-end 1)
                                            'face 'ocaml-link-face)))
                   )
-              ;; need to restore flag if buffer was unmodified. 
+              ;; need to restore flag if buffer was unmodified.
               (unless modified-p (set-buffer-modified-p nil))
               ))
           ))))
 
-  
+
 
 ;; bindings ---now in caml.el
 
 ; (and
 ;  (boundp 'caml-mode-map)
 ;  (keymapp caml-mode-map)
-;  (progn 
+;  (progn
 ;    (define-key caml-mode-map [?\C-c?i] 'ocaml-add-path)
 ;    (define-key caml-mode-map [?\C-c?]] 'ocaml-close-module)
 ;    (define-key caml-mode-map [?\C-c?[] 'ocaml-open-module)
@@ -822,7 +823,7 @@ buffer positions."
 ;         (define-key map [open] '("Open module for help" . ocaml-open-module))
 ;         (define-key map [help] '("Help for identifier" . caml-help))
 ;         (define-key map [complete] '("Complete identifier" . caml-complete))
-;         ) 
+;         )
 ;    ))))
 
 
diff --git a/inf-caml.el b/inf-caml.el
index a213ee4..f2291f9 100644
--- a/inf-caml.el
+++ b/inf-caml.el
@@ -80,7 +80,7 @@ be sent from another buffer in Caml mode.
 (defconst inferior-caml-buffer-name
   (concat "*" inferior-caml-buffer-subname "*"))
 
-;; for compatibility with xemacs 
+;; for compatibility with xemacs
 
 (defun caml-sit-for (second &optional mili redisplay)
    (if (and (boundp 'running-xemacs) running-xemacs)
@@ -170,7 +170,7 @@ Input and output via buffer `*inferior-caml*'."
     )
 )
 
-;; patched by Didier to move cursor after evaluation 
+;; patched by Didier to move cursor after evaluation
 
 (defun inferior-caml-eval-region (start end)
   "Send the current region to the inferior Caml process."
@@ -231,15 +231,15 @@ output can be retreived later, asynchronously.")
 
 (defun inferior-caml-eval-phrase (arg &optional min max)
   "Send the phrase containing the point to the CAML process.
-With prefix-arg send as many phrases as its numeric value, 
+With prefix-arg send as many phrases as its numeric value,
 If an error occurs during evalutaion, stop at this phrase and
-repport the error. 
+repport the error.
 
 Return nil if noerror and position of error if any.
 
 If arg's numeric value is zero or negative, evaluate the current phrase
-or as many as prefix arg, ignoring evaluation errors. 
-This allows to jump other erroneous phrases. 
+or as many as prefix arg, ignoring evaluation errors.
+This allows to jump other erroneous phrases.
 
 Optional arguments min max defines a region within which the phrase
 should lies."
@@ -327,12 +327,12 @@ should lies."
              (progn
                (move-overlay caml-error-overlay beg end (current-buffer))
                (beep) (if wait (read-event) (caml-sit-for 60)))
-           (delete-overlay caml-error-overlay)))))  
+           (delete-overlay caml-error-overlay)))))
 
 ;; wait some amount for ouput, that is, until inferior-caml-output is set
 ;; to true. Hence, interleaves sitting for shorts delays and checking the
-;; flag. Give up after some time. Typing into the source buffer will cancel 
-;; waiting, i.e. may report 'No result yet' 
+;; flag. Give up after some time. Typing into the source buffer will cancel
+;; waiting, i.e. may report 'No result yet'
 
 (defun caml-wait-output (&optional before after)
   (let ((c 1))
@@ -351,11 +351,11 @@ should lies."
                            caml-previous-output (- pos 2))))
 
 ;; additional bindings
-  
+
 ;(let ((map (lookup-key caml-mode-map [menu-bar caml])))
 ;  (define-key map [indent-buffer] '("Indent buffer" . caml-indent-buffer))
 ;  (define-key map [eval-buffer] '("Eval buffer" . caml-eval-buffer))
-;) 
+;)
 ;(define-key caml-mode-map "\C-c\C-b" 'caml-eval-buffer)
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]