(setq comment (substring type (match-beginning 2)))
(setq type (substring type 0 (match-beginning 1))))
;; strip of trailing group-comment
- (string-match "\\(\\(\\s-*\\S-+\\)+\\)\\s-*" type)
- (setq type (substring type 0 (match-end 1)))
+ (when (string-match "\\S-\\s-*\\'" type)
+ (setq type (substring type 0 (1+ (match-beginning 0)))))
;; parse initialization expression
(setq init nil)
(when (vhdl-parse-string ":=[ \t\n\r\f]*" t)
(setq comment (substring type (match-beginning 2)))
(setq type (substring type 0 (match-beginning 1))))
;; strip of trailing group-comment
- (string-match "\\(\\(\\s-*\\S-+\\)+\\)\\s-*" type)
- (setq type (substring type 0 (match-end 1)))
+ (when (string-match "\\S-\\s-*\\'" type)
+ (setq type (substring type 0 (1+ (match-beginning 0)))))
(vhdl-forward-syntactic-ws)
(setq end-of-list (vhdl-parse-string ")" t))
(vhdl-parse-string "\\s-*;\\s-*")
(setq comment (substring type (match-beginning 2)))
(setq type (substring type 0 (match-beginning 1))))
;; strip off trailing group-comment
- (string-match "\\(\\(\\s-*\\S-+\\)+\\)\\s-*" type)
- (setq type (substring type 0 (match-end 1)))
+ (when (string-match "\\S-\\s-*\\'" type)
+ (setq type (substring type 0 (1+ (match-beginning 0)))))
;; parse initialization expression
(setq init nil)
(when (vhdl-parse-string ":=[ \t\n\r\f]*" t)
(setq return-comment (substring return-type (match-beginning 2)))
(setq return-type (substring return-type 0 (match-beginning 1))))
;; strip of trailing group-comment
- (string-match "\\(\\(\\s-*\\S-+\\)+\\)\\s-*" return-type)
- (setq return-type (substring return-type 0 (match-end 1)))
+ (when (string-match "\\S-\\s-*\\'" return-type)
+ (setq return-type
+ (substring return-type 0 (1+ (match-beginning 0)))))
;; parse return comment
(unless return-comment
(setq return-comment (and (vhdl-parse-string "--\\s-*\\([^\n]*\\)" t)
;; Added `%' for TeX comments.
;; RMS: deleted the code to match `1.' and `(1)'.
;; Update mail-mode's paragraph-separate if you change this.
- (purecopy "[ \t]*\\([-–!|#%;>*·•‣⁃◦]+[ \t]*\\)*")
+ (purecopy "[-–!|#%;>*·•‣⁃◦ \t]*")
"Regexp to match text at start of line that constitutes indentation.
If Adaptive Fill mode is enabled, a prefix matching this pattern
on the first and second lines of a paragraph is used as the