(defun rhtml-erb-delim-type (start-delim)
"Return `exec', `out', `comment' or nil dependin on the type of delimeter this is."
- (flet ((match? (regex)
+ (cl-flet ((match? (regex)
(eq (string-match regex start-delim) 0)))
(cond ((match? rhtml-erb-exec-tag-open-re)
'exec)
(throw 'done regions))
;; erb tag
(push (list
- (case (char-after (+ tag-start 2))
+ (cl-case (char-after (+ tag-start 2))
(?= 'out) (?# 'comment) (t 'exec))
tag-start (point))
regions))))))
;; erb tag
(push (list
- (case (char-after (+ tag-start 2))
+ (cl-case (char-after (+ tag-start 2))
(?= 'out) (?# 'comment) (t 'exec))
tag-start (point))
regions))))))
(skip-chars-forward " \t\r\n"))
;;
-(provide 'rhtml-erb)
\ No newline at end of file
+(provide 'rhtml-erb)
followed by a newline will have a dash added while all other blocks will
have the dash removed."
(interactive "cDashize mode: s) strip, a) add, x) auto (default)")
- (let ((real-mode (case mode
+ (let ((real-mode (cl-case mode
((?s strip) 'strip)
((?a add) 'add))))
(mapc (lambda (i)
(let ((end (nth 2 i)))
(save-excursion
(goto-char (- end 2))
- (case (or real-mode
+ (cl-case (or real-mode
(if (eq (char-after end) ?\n)
'add
'strip))
(save-excursion (goto-char (cdr lcon)) (looking-at "<!--")))
(setq lcon (cons 'comment (+ (cdr lcon) 2))))
- (case (car lcon)
+ (cl-case (car lcon)
(string
;; Go back to previous non-empty line.
;; /PST
(point)))
(goto-char (1+ tag-start))
- (case (char-after)
+ (cl-case (char-after)
(?! ; declaration
(setq tag-type 'decl))
(?? ; processing-instruction
;;(rhtml-disable-sgml-hacks)
;;;
-(provide 'rhtml-sgml-hacks)
\ No newline at end of file
+(provide 'rhtml-sgml-hacks)