Changeset 15604


Ignore:
Timestamp:
Jan 24, 2013, 12:29:34 PM (6 years ago)
Author:
gfoy
Message:

Show Documentation workaround for inappropriately setting the file as modified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cocoa-ide-contrib/foy/hemlock-commands-cm/hemlock-commands-new.lisp

    r14985 r15604  
    1313;;;
    1414;;;      Mod History, most recent first:
     15;;;      1/24/13 Workaround for Show Documentation.
    1516;;;      9/2/9   Added "Show Callers" command.
    1617;;;      8/31/9  version 0.1b1
     
    122123       (concatenate 'string doc "    (MCL)")
    123124       :text-view text-view :symbol sym) t)))
    124  
     125
     126;;; This is inappropriately marking the buffer as modified.  Added a workaround.
    125127(defCommand "Symbol Documentation" (p)
    126128  "Display the documentation for the symbol at point."
    127129  (declare (ignore p))
    128   (let* ((sym (parse-symbol))
     130  (let* ((buffer-modified-p (hemlock-interface::buffer-modified (hemlock-interface::current-buffer)))
     131         (sym (parse-symbol))
    129132         (hemlock-view (hi::current-view))
    130133         (pane (when hemlock-view (hi::hemlock-view-pane hemlock-view)))
     
    140143                         (format nil "No documentation found for ~S" sym) nil nil)))))
    141144            (t
    142              (hi::editor-error "Could not parse a valid symbol at point.")))))
     145             (hi::editor-error "Could not parse a valid symbol at point.")))
     146    (unless buffer-modified-p
     147      (setf (hemlock-interface::buffer-modified (hemlock-interface::current-buffer)) nil))))
    143148
    144149(hi::bind-key "Symbol Documentation" #k"control-x control-d")
Note: See TracChangeset for help on using the changeset viewer.