Skip to content

Commit

Permalink
* display quotes in sentence
Browse files Browse the repository at this point in the history
closes #125
  • Loading branch information
odanoburu committed Jul 26, 2019
1 parent 403860e commit 6c6644c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions sensetion.el
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ number of selected tokens."
;; this is used to highlight their constituent tokens and edit
;; them properly
(sel-keys (make-hash-table :test 'equal))
(ignoring? nil))
(ignoring? nil)
(last-quote nil))
(cl-labels
((sel-tk-props (tk &optional ix)
(cl-list* 'sensetion--selected t
Expand Down Expand Up @@ -641,8 +642,16 @@ number of selected tokens."
(when (eq (sensetion--tk-tag tk) :ignore)
(setf ignoring? t)))
"")
((or :qf :ex :mwf :def :classif) "")
(_ (error "Token of kind %s does not exist" kind))))))
(:qf
(when-let ((quote-rend (sensetion--tk-rend tk)))
(setf last-quote quote-rend))
(pcase last-quote
(:dq "\" ")
(:sq "' ")))
((or :ex :mwf :def :classif)
"")
(_
(error "Token of kind %s does not exist" kind))))))
;;
(let* ((tks (sensetion--synset-tokens synset))
(tks-colloc (seq-map-indexed #'token-colloc tks))
Expand Down

0 comments on commit 6c6644c

Please sign in to comment.