~ubuntu-branches/ubuntu/trusty/agda/trusty

« back to all changes in this revision

Viewing changes to src/data/emacs-mode/annotation.el

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2011-11-23 10:12:59 UTC
  • mfrom: (12.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20111123101259-zhs3e4ynpck20hmu
Tags: 2.3.0-1
* [c0e4746] Imported Upstream version 2.3.0. New/changed features include:
  + New more liberal syntax for mutually recursive definitions
  + Pattern matching on lambdas
  + New syntax for updating (some fields of) records
  + Universe polymorphism is now enabled by default
  + New type of hidden function argument: instance arguments
  + Dependent irrelevant function types and records with irrelevant fields
  + See http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Version-2-3-0
    for a full list
* [369ed3a] Update BDs in line with cabal requirements in new upstream
* [3798aee] Remove all patches. They are all now upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
  (incf start annotations-offset)
83
83
  (incf end annotations-offset)
84
84
  (when (and (<= (point-min) start)
85
 
             (<= start end)
 
85
             (< start end)
86
86
             (<= end (point-max)))
87
87
    (let ((faces (delq nil
88
88
                       (mapcar (lambda (ann)
104
104
        (add-to-list 'props 'mouse-face)
105
105
        (add-to-list 'props 'help-echo))
106
106
      (when props
107
 
        (add-text-properties start end
108
 
                             `(annotation-annotated   t
109
 
                               annotation-annotations ,props))))))
 
107
        (let ((pos start)
 
108
              mid)
 
109
          (while (< pos end)
 
110
            (setq mid (next-single-property-change pos
 
111
                         'annotation-annotations nil end))
 
112
            (let* ((old-props (get-text-property pos 'annotation-annotations))
 
113
                   (all-props (union old-props props)))
 
114
              (add-text-properties pos mid
 
115
                 `(annotation-annotated t annotation-annotations ,all-props))
 
116
              (setq pos mid))))))))
110
117
 
111
118
(defmacro annotation-preserve-mod-p-and-undo (&rest code)
112
119
  "Run CODE preserving both the undo data and the modification bit."