[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108167: lisp/textmodes/rst.el: Silen
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108167: lisp/textmodes/rst.el: Silence byte-compiler warnings. |
Date: |
Wed, 09 May 2012 02:57:18 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 108167
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Wed 2012-05-09 02:57:18 +0200
message:
lisp/textmodes/rst.el: Silence byte-compiler warnings.
(rst-re-alist, rst-reset-section-caches): Move around.
(rst-re): Use `characterp', not `char-valid-p'.
(font-lock-beg, font-lock-end): Declare.
modified:
lisp/ChangeLog
lisp/textmodes/rst.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-05-09 00:45:34 +0000
+++ b/lisp/ChangeLog 2012-05-09 00:57:18 +0000
@@ -1,5 +1,10 @@
2012-05-09 Juanma Barranquero <address@hidden>
+ * textmodes/rst.el: Silence byte-compiler warnings.
+ (rst-re-alist, rst-reset-section-caches): Move around.
+ (rst-re): Use `characterp', not `char-valid-p'.
+ (font-lock-beg, font-lock-end): Declare.
+
* progmodes/idlw-shell.el (specs): Remove reference to deleted
variable `idlwave-shell-activate-alt-keybindings' and simplify.
=== modified file 'lisp/textmodes/rst.el'
--- a/lisp/textmodes/rst.el 2012-05-07 19:51:25 +0000
+++ b/lisp/textmodes/rst.el 2012-05-09 00:57:18 +0000
@@ -422,6 +422,17 @@
Each entry consists of the symbol naming the regex and an
argument list for `rst-re'.")
+(defconst rst-re-alist
+ ;; Shadow global value we are just defining so we can construct it step by
+ ;; step
+ (let (rst-re-alist)
+ (dolist (re rst-re-alist-def)
+ (setq rst-re-alist
+ (nconc rst-re-alist
+ (list (list (car re) (apply 'rst-re (cdr re)))))))
+ rst-re-alist)
+ "Alist mapping symbols from `rst-re-alist-def' to regex strings.")
+
;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel
(defun rst-re (&rest args)
"Interpret ARGS as regular expressions and return a regex string.
@@ -459,7 +470,7 @@
re)
((symbolp re)
(cadr (assoc re rst-re-alist)))
- ((char-valid-p re)
+ ((characterp re)
(regexp-quote (char-to-string re)))
((listp re)
(let ((nested
@@ -481,17 +492,6 @@
(error "Unknown object type for building regex: %s" re))))
args)))
-(defconst rst-re-alist
- ;; Shadow global value we are just defining so we can construct it step by
- ;; step
- (let (rst-re-alist)
- (dolist (re rst-re-alist-def)
- (setq rst-re-alist
- (nconc rst-re-alist
- (list (list (car re) (apply 'rst-re (cdr re)))))))
- rst-re-alist)
- "Alist mapping symbols from `rst-re-alist-def' to regex strings.")
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Mode definition.
@@ -1186,7 +1186,7 @@
((looking-at (rst-re 'ttl-beg))
;; Try to use the underline
(let ((r (rst-classify-adornment
- (buffer-substring-no-properties
+ (buffer-substring-no-properties
(line-beginning-position 2) (line-end-position 2))
(line-end-position 2))))
(if r
@@ -1199,12 +1199,6 @@
;; current section adornment in a buffer local cache. Thus they can be used for
;; font-locking and manipulation commands.
-(defun rst-reset-section-caches ()
- "Reset all section cache variables.
-Should be called by interactive functions which deal with sections."
- (setq rst-all-sections nil
- rst-section-hierarchy nil))
-
(defvar rst-all-sections nil
"All section adornments in the buffer as found by `rst-find-all-adornments'.
t when no section adornments were found.")
@@ -1218,6 +1212,12 @@
`rst-all-sections'.")
(make-variable-buffer-local 'rst-section-hierarchy)
+(defun rst-reset-section-caches ()
+ "Reset all section cache variables.
+Should be called by interactive functions which deal with sections."
+ (setq rst-all-sections nil
+ rst-section-hierarchy nil))
+
(defun rst-find-all-adornments ()
"Return all the section adornments in the current buffer.
Return a list of (LINE . ADORNMENT) with ascending LINE where
@@ -3571,6 +3571,9 @@
)
"Keywords to highlight in rst mode.")
+(defvar font-lock-beg)
+(defvar font-lock-end)
+
(defun rst-font-lock-extend-region ()
"Extend the region `font-lock-beg' / `font-lock-end' iff it may
be in the middle of a multiline construct and return non-nil if so."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108167: lisp/textmodes/rst.el: Silence byte-compiler warnings.,
Juanma Barranquero <=