(define-key map [(control ?=)] 'rst-adjust) ;; (Does not work on the Mac OSX.)
;; Display the hierarchy of decorations implied by the current document contents.
(define-key map [(control c) (control h)] 'rst-display-decorations-hierarchy)
- ;; Homogeneize the decorations in the document.
+ ;; Homogenize the decorations in the document.
(define-key map [(control c) (control s)] 'rst-straighten-decorations)
;; (define-key map [(control c) (control s)] 'rst-straighten-deco-spacing)
;;;###autoload
(define-minor-mode rst-minor-mode
- "ReST Minor Mode.
-Toggle ReST minor mode.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
+ "Toggle ReST minor mode.
+With a prefix argument ARG, enable ReST minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
When ReST minor mode is enabled, the ReST mode keybindings
are installed on top of the major mode bindings. Use this
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Section Decoration Adjusment
-;; ============================
+;; Section Decoration Adjustment
+;; =============================
;;
;; The following functions implement a smart automatic title sectioning feature.
;; The idea is that with the cursor sitting on a section title, we try to get as
(defvar rst-preferred-bullets
'(?- ?* ?+)
- "List of favourite bullets to set for straightening bullets.")
+ "List of favorite bullets to set for straightening bullets.")
(defun rst-straighten-bullets-region (beg end)
"Make all the bulleted list items in the region consistent.
(indent-rigidly
mbeg mend
- ;; Find the next tab after the leftmost columnt.
+ ;; Find the next tab after the leftmost column.
(let ((tab (funcall find-next-fun tabs leftmostcol)))
(if tab
;;------------------------------------------------------------------------------
;; FIXME: these next functions should become part of a larger effort to redo the
-;; bullets in bulletted lists. The enumerate would just be one of the possible
+;; bullets in bulleted lists. The enumerate would just be one of the possible
;; outputs.
;;
;; FIXME: TODO we need to do the enumeration removal as well.
(rst-define-level-faces)))
;; Faces for displaying items on several levels; these definitions define
-;; different shades of grey where the lightest one (i.e. least contrasting) is
+;; different shades of gray where the lightest one (i.e. least contrasting) is
;; used for level 1
(defcustom rst-level-face-max 6
"Maximum depth of levels for which section title faces are defined."
rst-level-face-base-color
(+ (* (1- i) rst-level-face-step-light)
rst-level-face-base-light))))
- (make-empty-face sym)
- (set-face-doc-string sym doc)
- (set-face-background sym col)
- (set sym sym)
- (setq i (1+ i))))))
+ (unless (facep sym)
+ (make-empty-face sym)
+ (set-face-doc-string sym doc)
+ (set-face-background sym col)
+ (set sym sym))
+ (setq i (1+ i))))))
(rst-define-level-faces)