(setq i (1+ i)))
(modify-syntax-entry ?\s " " table)
;; Non-break space acts as whitespace.
- (modify-syntax-entry ?\x8a0 " " table)
+ (modify-syntax-entry ?\xa0 " " table)
(modify-syntax-entry ?\t " " table)
(modify-syntax-entry ?\f " " table)
(modify-syntax-entry ?\n "> " table)
(defvar lisp-doc-string-elt-property 'doc-string-elt
"The symbol property that holds the docstring position info.")
-(defconst lisp-prettify-symbols-alist '(("lambda" . ?λ))
+(defconst lisp-prettify-symbols-alist
+ '(("lambda" . ?λ)
+ ("sqrt" . ?√)
+ ("not" . ?¬))
"Alist of symbol/\"pretty\" characters to be displayed.")
;;;; Font-lock support.
lisp-el-font-lock-keywords-1
`( ;; Regexp negated char group.
("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)
+ ;; Erroneous structures.
+ (,(concat "(" el-errs-re "\\_>")
+ (1 font-lock-warning-face))
;; Control structures. Common Lisp forms.
(lisp--el-match-keyword . 1)
;; Exit/Feature symbols as constants.
"[ \t']*\\(" lisp-mode-symbol-regexp "\\)?")
(1 font-lock-keyword-face)
(2 font-lock-constant-face nil t))
- ;; Erroneous structures.
- (,(concat "(" el-errs-re "\\_>")
- (1 font-lock-warning-face prepend))
;; Words inside \\[] tend to be for `substitute-command-keys'.
(,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]")
(1 font-lock-constant-face prepend))
- ;; Words inside ‘’ and '' and `' tend to be symbol names.
- (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
+ ;; Words inside ‘’ and `' tend to be symbol names.
+ (,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
lisp-mode-symbol-regexp "\\)['’]")
(1 font-lock-constant-face prepend))
;; Constant values.
;; Erroneous structures.
(,(concat "(" cl-errs-re "\\_>")
(1 font-lock-warning-face))
- ;; Words inside ‘’ and '' and `' tend to be symbol names.
- (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
+ ;; Words inside ‘’ and `' tend to be symbol names.
+ (,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
lisp-mode-symbol-regexp "\\)['’]")
(1 font-lock-constant-face prepend))
;; Constant values.
;;
;; The `fill-column' is temporarily bound to
;; `emacs-lisp-docstring-fill-column' if that value is an integer.
- (let ((paragraph-start (concat paragraph-start
- "\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)"))
+ (let ((paragraph-start
+ (concat paragraph-start
+ (format "\\|\\s-*\\([(;%s\"]\\|`(\\|#'(\\)"
+ ;; If we're inside a string (like the doc
+ ;; string), don't consider a colon to be
+ ;; a paragraph-start character.
+ (if (nth 3 (syntax-ppss))
+ ""
+ ":"))))
(paragraph-separate
(concat paragraph-separate "\\|\\s-*\".*[,\\.]$"))
(fill-column (if (and (integerp emacs-lisp-docstring-fill-column)