[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/caml f4c7308 168/197: caml.el: Reduce byte-compilatio
From: |
Stefan Monnier |
Subject: |
[nongnu] externals/caml f4c7308 168/197: caml.el: Reduce byte-compilation warnings |
Date: |
Sat, 21 Nov 2020 01:20:00 -0500 (EST) |
branch: externals/caml
commit f4c730814acd12d74ba5496f2c665c5c27dd11d3
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Gabriel Scherer <gabriel.scherer@gmail.com>
caml.el: Reduce byte-compilation warnings
(running-xemacs): Remove. Use (featurep 'xemacs) instead.
(caml-mode-map, caml-at-sexp-close-p): Escape paren-like char constants.
---
caml.el | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/caml.el b/caml.el
index 80a4546..87d534e 100644
--- a/caml.el
+++ b/caml.el
@@ -273,9 +273,6 @@ have caml-electric-indent on, which see.")
(defvar caml-shell-active nil
"Non nil when a subshell is running.")
-(defvar running-xemacs (string-match "XEmacs" emacs-version)
- "Non-nil if we are running in the XEmacs environment.")
-
(defvar caml-mode-map nil
"Keymap used in Caml mode.")
(if caml-mode-map
@@ -291,7 +288,7 @@ have caml-electric-indent on, which see.")
;that way we get out effect even when we do \C-x` in compilation buffer
; (define-key caml-mode-map "\C-x`" 'caml-next-error)
- (if running-xemacs
+ (if (featurep 'xemacs)
(define-key caml-mode-map 'backspace 'backward-delete-char-untabify)
(define-key caml-mode-map "\177" 'backward-delete-char-untabify))
@@ -303,8 +300,8 @@ have caml-electric-indent on, which see.")
(define-key caml-mode-map [?\C-c down-mouse-1] 'caml-types-explore)
;; caml-help
(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)
+ (define-key caml-mode-map [?\C-c?\]] 'ocaml-close-module)
+ (define-key caml-mode-map [?\C-c?\[] 'ocaml-open-module)
(define-key caml-mode-map [?\C-c?\C-h] 'caml-help)
(define-key caml-mode-map [?\C-c?\t] 'caml-complete)
;; others
@@ -319,8 +316,8 @@ have caml-electric-indent on, which see.")
(define-key caml-mode-map "\C-c\C-a" 'caml-find-alternate-file)
(define-key caml-mode-map "\C-c\C-c" 'compile)
(define-key caml-mode-map "\C-c\C-e" 'caml-eval-phrase)
- (define-key caml-mode-map "\C-c\C-\[" 'caml-backward-to-less-indent)
- (define-key caml-mode-map "\C-c\C-\]" 'caml-forward-to-less-indent)
+ (define-key caml-mode-map "\C-c\C-[" 'caml-backward-to-less-indent)
+ (define-key caml-mode-map "\C-c\C-]" 'caml-forward-to-less-indent)
(define-key caml-mode-map "\C-c\C-q" 'caml-indent-phrase)
(define-key caml-mode-map "\C-c\C-r" 'caml-eval-region)
(define-key caml-mode-map "\C-c\C-s" 'caml-show-subshell)
@@ -328,7 +325,7 @@ have caml-electric-indent on, which see.")
(define-key caml-mode-map "\M-\C-q" 'caml-indent-phrase)
(define-key caml-mode-map "\M-\C-x" 'caml-eval-phrase)
- (if running-xemacs nil ; if not running xemacs
+ (if (featurep 'xemacs) nil
(let ((map (make-sparse-keymap "Caml"))
(forms (make-sparse-keymap "Forms")))
(define-key caml-mode-map "\C-c\C-d" 'caml-show-imenu)
@@ -374,7 +371,7 @@ have caml-electric-indent on, which see.")
(define-key forms [begin] '("begin .. end" . caml-insert-begin-form)))))
(defvar caml-mode-xemacs-menu
- (if running-xemacs
+ (if (featurep 'xemacs)
'("Caml"
[ "Indent phrase" caml-indent-phrase :keys "C-M-q" ]
[ "Eval phrase" caml-eval-phrase
@@ -407,7 +404,7 @@ have caml-electric-indent on, which see.")
"Syntax table in use in Caml mode buffers.")
(if caml-mode-syntax-table
()
- (let ((n (if (string-match "XEmacs" (emacs-version)) "" "n")))
+ (let ((n (if (featurep 'xemacs) "" "n")))
(setq caml-mode-syntax-table (make-syntax-table))
; backslash is an escape sequence
(modify-syntax-entry ?\\ "\\" caml-mode-syntax-table)
@@ -472,7 +469,7 @@ have caml-electric-indent on, which see.")
;;; The major mode
(eval-when-compile
- (if (and (boundp 'running-xemacs) running-xemacs) nil
+ (if (featurep 'xemacs) nil
(require 'imenu)))
;;
@@ -522,7 +519,7 @@ have caml-electric-indent on, which see.")
;garrigue 27-11-96
(setq case-fold-search nil)
;garrigue july 97
- (if running-xemacs ; from Xemacs lisp mode
+ (if (featurep 'xemacs)
(if (and (featurep 'menubar)
current-menubar)
(progn
@@ -1243,7 +1240,7 @@ Used to distinguish it from toplevel let construct.")
(defun caml-at-sexp-close-p ()
(or (char-equal ?\) (following-char))
(char-equal ?\] (following-char))
- (char-equal ?} (following-char))))
+ (char-equal ?\} (following-char))))
(defun caml-find-kwop (kwop-regexp &optional min-pos)
"Look back for a caml keyword or operator matching KWOP-REGEXP.
- [nongnu] externals/caml d1fc793 125/197: Added save-excursion to ocaml-link-activate., (continued)
- [nongnu] externals/caml d1fc793 125/197: Added save-excursion to ocaml-link-activate., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 97316f7 130/197: renaming of Objective Caml to OCaml and cleanup of copyright headers, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 42d2eda 126/197: Fixed caml-help (would loose the position of the symbol search for)., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 49653b2 148/197: remove all $Id keywords, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 9b0544f 154/197: fix whitespace and over-long lines, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml da654aa 179/197: Emacs: Modernise font face definitions, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml cd1142f 187/197: Change camlc → ocamlc, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 3fb0de6 188/197: Add octal character literals, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 6e0e050 134/197: PR#5455: .emacs instructions, add lines to recognize ocaml scripts, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 56e93b6 151/197: fix a few problems with whitespace and over-long lines, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml f4c7308 168/197: caml.el: Reduce byte-compilation warnings,
Stefan Monnier <=
- [nongnu] externals/caml a0d389f 058/197: skip structs in let module ... in, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 442bd24 059/197: prepare snapshot, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml ac2a0b2 064/197: ajout option -stypes; depend, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml faa1c81 065/197: ajout choses a faire, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 76f4e2b 116/197: amelioration des annotations, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 64cecd3 128/197: merge changes from 3.12.0 to 3.12.1, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 64a3c02 166/197: Fixing some Emacs startup warnings., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml bce861f 181/197: Emacs: Use built-in detection of comments, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml ac5d007 047/197: caml-indent-phrase, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 3d7f47c 066/197: amelioration .mly .mll, Stefan Monnier, 2020/11/21