~mwshinn/+junk/notes

« back to all changes in this revision

Viewing changes to notes2-mode.el

  • Committer: Max Shinn
  • Date: 2014-10-17 18:35:47 UTC
  • mfrom: (42.1.3 notes-bin)
  • Revision ID: trombonechamp@gmail.com-20141017183547-8n5g1g1uywdwiiym
Merged

Show diffs side-by-side

added added

removed removed

Lines of Context:
990
990
  :group 'faces)
991
991
 
992
992
(defface notes2-italic-face
993
 
  '((t (:inherit italic)))
 
993
  '((t (:inherit italic :slant italic)))
994
994
  "Face for italic text."
995
995
  :group 'notes2-faces)
996
996
 
1130
1130
  :group 'notes2-faces)
1131
1131
 
1132
1132
(defface notes2-math-face
1133
 
  '((t (:inherit font-lock-string-face)))
 
1133
  '((t (:inherit font-lock-string-face :family "FreeMono"))) ; Make sure it can display math chars
1134
1134
  "Face for LaTeX expressions."
1135
1135
  :group 'notes2-faces)
1136
1136
 
1205
1205
  "\\(\\~\\|[^\\]\\)\\(\\(~+\\)\\(\\(.\\|\n[^\n]\\)*?[^~]\\)\\3\\)\\([^~]\\|\\~\\)"
1206
1206
  "Regular expression for matching strikeouts.")
1207
1207
 
 
1208
(defconst notes2-regex-revisioncomment
 
1209
  "\\({\\|[^\\]\\)\\(\\(<-{+\\)\\(\\(.\\|\n[^\n]\\)*?[^}]\\)}\\)\\([^}]\\|\\}\\)"
 
1210
  "Regular expression for matching strikeouts.")
 
1211
 
1208
1212
(defconst notes2-regex-pre
1209
1213
  "^\\(    \\|\t\\).*$"
1210
1214
  "Regular expression for matching preformatted text sections.")
1237
1241
  "Regular expression for matching TODO notation.")
1238
1242
 
1239
1243
(defconst notes2-regex-italic
1240
 
  "\\(\\/\\|[^\\]\\)\\(\\(/+\\)\\(\\(.\\|\n[^\n]\\)*?[^/]\\)\\3\\)\\([^/]\\|\\/\\)"
 
1244
  "\\(^\\|[ \t`]\\)\\(\\([/]\\)\\([^ \n\t\\]\\|[^ \n\t]\\(?:.\\|\n[^\n]\\)*?[^\\ ]\\)\\(\\3\\)\\)\\($\\|[ \t.?,'!]\\)"
1241
1245
  "Regular expression for matching italic text.")
1242
1246
 
1243
1247
(defconst notes2-regex-underline
1302
1306
   ;(cons 'notes2-match-pre-blocks '((0 notes2-pre-face)))
1303
1307
   ;(cons 'notes2-match-code 'notes2-inline-code-face)
1304
1308
   (cons notes2-regex-code 'notes2-inline-code-face)
1305
 
   (cons notes2-regex-highlight '(2 notes2-highlight-face))
1306
 
   (cons notes2-regex-strikeout '(2 notes2-strikeout-face))
1307
1309
   (cons 'notes2-match-comments '((0 notes2-comment-face)))
1308
1310
   (cons notes2-regex-title 'notes2-title-face)
1309
1311
   (cons notes2-regex-math-inline '(2 notes2-math-face))
 
1312
   (cons notes2-regex-highlight '(2 notes2-highlight-face))
 
1313
   (cons notes2-regex-strikeout '(2 notes2-strikeout-face))
 
1314
   (cons notes2-regex-revisioncomment '(2 notes2-comment-face))
1310
1315
   (cons notes2-regex-header-6-atx '((1 notes2-header-delimiter-face)
1311
1316
                                       (2 notes2-header-face-6)
1312
1317
                                       (3 notes2-header-delimiter-face)))
1329
1334
                                                (2 notes2-metadata-value-face)))
1330
1335
   (cons notes2-regex-multinotes2-metadata-end '((1 notes2-metadata-key-face)
1331
1336
                                              (2 notes2-metadata-value-face)))
1332
 
   (cons notes2-regex-hr 'notes2-header-face)
 
1337
   (cons notes2-regex-important '(1 notes2-important-face))
1333
1338
   (cons notes2-regex-angle-image 'notes2-link-face)
1334
1339
   (cons notes2-regex-reference 'notes2-reference-face)
1335
1340
   (cons notes2-regex-list '(2 notes2-list-face))
1340
1345
   (cons notes2-regex-bold '(2 notes2-bold-face))
1341
1346
   (cons notes2-regex-italic '(2 notes2-italic-face))
1342
1347
   (cons notes2-regex-underline '(2 notes2-underline-face))
1343
 
   (cons notes2-regex-important '((1 notes2-important-face t)))
 
1348
   (cons notes2-regex-hr 'notes2-header-face)
1344
1349
   )
1345
1350
  "Syntax highlighting for Notes2 files.")
1346
1351