aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Merten2012-06-16 11:33:58 +0200
committerStefan Merten2012-06-16 11:33:58 +0200
commit7ae2ea10755f41f24d0fc849d2d4addc4b570511 (patch)
tree393dafe8b18355ca2707d4c1616c2a47c7957a40
parent29b83cecea5cbb09a715282824feb568f03cdf54 (diff)
downloademacs-7ae2ea10755f41f24d0fc849d2d4addc4b570511.tar.gz
emacs-7ae2ea10755f41f24d0fc849d2d4addc4b570511.zip
Added and corrected some comments.
(rst-re-alist-def): Improve symbol syntax. (rst-mode-syntax-table): Correct syntax entries.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/textmodes/rst.el26
2 files changed, 18 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 243a47180cb..19be4b9fe5e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-06-16 Stefan Merten <smerten@oekonux.de>
2
3 * textmodes/rst.el: Added and corrected some comments.
4 (rst-re-alist-def): Improve symbol syntax.
5 (rst-mode-syntax-table): Correct syntax entries.
6
12012-06-15 Juanma Barranquero <lekktu@gmail.com> 72012-06-15 Juanma Barranquero <lekktu@gmail.com>
2 8
3 * makefile.w32-in (COMPILE_FIRST): Synch with makefile.in changes 9 * makefile.w32-in (COMPILE_FIRST): Synch with makefile.in changes
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index c09d2a60cce..b6f02dfda80 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -103,6 +103,9 @@
103 103
104;;; Code: 104;;; Code:
105 105
106;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*-
107;; lexical-binding: t -*-" in the first line.
108
106;; Only use of macros is allowed - may be replaced by `cl-lib' some time. 109;; Only use of macros is allowed - may be replaced by `cl-lib' some time.
107(eval-when-compile 110(eval-when-compile
108 (require 'cl)) 111 (require 'cl))
@@ -150,10 +153,7 @@ Comparison done with `equal'."
150 (equal elem e))) 153 (equal elem e)))
151 seq))) 154 seq)))
152 155
153;; FIXME: Check whether complicated `defconst's can be embedded in 156;; FIXME: Embed complicated `defconst's in `eval-when-compile'.
154;; `eval-when-compile'.
155
156;; FIXME: Check whether `lambda's can be embedded in `function'.
157 157
158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
159;; Versions 159;; Versions
@@ -171,7 +171,7 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match."
171;; Use CVSHeader to really get information from CVS and not other version 171;; Use CVSHeader to really get information from CVS and not other version
172;; control systems. 172;; control systems.
173(defconst rst-cvs-header 173(defconst rst-cvs-header
174 "$CVSHeader: sm/rst_el/rst.el,v 1.282 2012-06-06 19:16:55 stefan Exp $") 174 "$CVSHeader: sm/rst_el/rst.el,v 1.285 2012-06-11 20:38:23 stefan Exp $")
175(defconst rst-cvs-rev 175(defconst rst-cvs-rev
176 (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" 176 (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+"
177 " .*" rst-cvs-header "0.0") 177 " .*" rst-cvs-header "0.0")
@@ -203,7 +203,6 @@ SVN revision is the upstream (docutils) revision.")
203 "%Revision: 1.256 %") 203 "%Revision: 1.256 %")
204 "CVS revision of this file in the official version.") 204 "CVS revision of this file in the official version.")
205 205
206;; FIXME: Version differences due to SVN checkin must not change this.
207(defconst rst-version 206(defconst rst-version
208 (if (equal rst-official-cvs-rev rst-cvs-rev) 207 (if (equal rst-official-cvs-rev rst-cvs-rev)
209 rst-official-version 208 rst-official-version
@@ -412,7 +411,8 @@ in parentheses follows the development revision and the time stamp.")
412 ; tag. 411 ; tag.
413 412
414 ;; Symbol (`sym') 413 ;; Symbol (`sym')
415 (sym-tag (:shy "\\sw+" (:shy "\\s_\\sw+") "*")) 414 (sym-prt "[-+.:_]") ; Non-word part of a symbol.
415 (sym-tag (:shy "\\sw+" (:shy sym-prt "\\sw+") "*"))
416 416
417 ;; URIs (`uri') 417 ;; URIs (`uri')
418 (uri-tag (:alt ,@rst-uri-schemes)) 418 (uri-tag (:alt ,@rst-uri-schemes))
@@ -599,6 +599,7 @@ well but give an additional message."
599 ;; Same as mark-defun sgml-mark-current-element. 599 ;; Same as mark-defun sgml-mark-current-element.
600 [?\C-c ?\C-m]) 600 [?\C-c ?\C-m])
601 ;; Move backward/forward between section titles. 601 ;; Move backward/forward between section titles.
602 ;; FIXME: Also bind similar to outline mode.
602 (rst-define-key map [?\C-\M-a] 'rst-backward-section 603 (rst-define-key map [?\C-\M-a] 'rst-backward-section
603 ;; Same as beginning-of-defun. 604 ;; Same as beginning-of-defun.
604 [?\C-c ?\C-n]) 605 [?\C-c ?\C-n])
@@ -696,23 +697,20 @@ This inherits from Text mode.")
696;; Syntax table. 697;; Syntax table.
697(defvar rst-mode-syntax-table 698(defvar rst-mode-syntax-table
698 (let ((st (copy-syntax-table text-mode-syntax-table))) 699 (let ((st (copy-syntax-table text-mode-syntax-table)))
699 ;; FIXME: This must be rethought; at the very least ?. should not be a
700 ;; symbol for `dabbrev' to work properly.
701 (modify-syntax-entry ?$ "." st) 700 (modify-syntax-entry ?$ "." st)
702 (modify-syntax-entry ?% "." st) 701 (modify-syntax-entry ?% "." st)
703 (modify-syntax-entry ?& "." st) 702 (modify-syntax-entry ?& "." st)
704 (modify-syntax-entry ?' "." st) 703 (modify-syntax-entry ?' "." st)
705 (modify-syntax-entry ?* "." st) 704 (modify-syntax-entry ?* "." st)
706 (modify-syntax-entry ?+ "_" st) 705 (modify-syntax-entry ?+ "." st)
707 (modify-syntax-entry ?. "_" st) 706 (modify-syntax-entry ?- "." st)
708 (modify-syntax-entry ?/ "." st) 707 (modify-syntax-entry ?/ "." st)
709 (modify-syntax-entry ?: "_" st)
710 (modify-syntax-entry ?< "." st) 708 (modify-syntax-entry ?< "." st)
711 (modify-syntax-entry ?= "." st) 709 (modify-syntax-entry ?= "." st)
712 (modify-syntax-entry ?> "." st) 710 (modify-syntax-entry ?> "." st)
713 (modify-syntax-entry ?\\ "\\" st) 711 (modify-syntax-entry ?\\ "\\" st)
712 (modify-syntax-entry ?_ "." st)
714 (modify-syntax-entry ?| "." st) 713 (modify-syntax-entry ?| "." st)
715 (modify-syntax-entry ?_ "_" st)
716 (modify-syntax-entry ?\u00ab "." st) 714 (modify-syntax-entry ?\u00ab "." st)
717 (modify-syntax-entry ?\u00bb "." st) 715 (modify-syntax-entry ?\u00bb "." st)
718 (modify-syntax-entry ?\u2018 "." st) 716 (modify-syntax-entry ?\u2018 "." st)
@@ -1816,7 +1814,7 @@ in order to adapt it to our preferred style."
1816 ;; Apply the new style. 1814 ;; Apply the new style.
1817 (apply 'rst-update-section (nth (car lm) rst-preferred-adornments)) 1815 (apply 'rst-update-section (nth (car lm) rst-preferred-adornments))
1818 1816
1819 ;; Reset the market to avoid slowing down editing until it gets GC'ed. 1817 ;; Reset the marker to avoid slowing down editing until it gets GC'ed.
1820 (set-marker (cdr lm) nil) 1818 (set-marker (cdr lm) nil)
1821 ) 1819 )
1822 ))) 1820 )))