Changeset 6704


Ignore:
Timestamp:
Jun 12, 2007, 12:46:41 PM (17 years ago)
Author:
Gary Byers
Message:

Remove some old stuff; be quieter about unknown function arglists
in arglist-on-space.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ide-1.0/ccl/hemlock/src/lispmode.lisp

    r6661 r6704  
    17271727
    17281728
    1729 ;;;; Matching parenthesis display.
    1730 
    1731 (defhvar "Paren Pause Period"
    1732   "This is how long commands that deal with \"brackets\" shows the cursor at
    1733    the matching \"bracket\" for this number of seconds."
    1734   :value 0.5)
    1735 
    1736 (defcommand "Lisp Insert )" (p)
    1737   "Inserts a \")\" and briefly positions the cursor at the matching \"(\"."
    1738   "Inserts a \")\" and briefly positions the cursor at the matching \"(\"."
    1739   (declare (ignore p))
    1740   (let ((point (current-point)))
    1741     (insert-character point #\))
    1742     (pre-command-parse-check point)
    1743     (when (valid-spot point nil)
    1744       (with-mark ((m point))
    1745         (if (list-offset m -1)
    1746             (let ((pause (value paren-pause-period))
    1747                   (win (current-window)))
    1748               (if pause
    1749                   (unless (show-mark m win pause)
    1750                     (clear-echo-area)
    1751                     (message "~A" (line-string (mark-line m))))
    1752                   (unless (displayed-p m (current-window))
    1753                     (clear-echo-area)
    1754                     (message "~A" (line-string (mark-line m))))))
    1755             (editor-error))))))
    1756 
    1757 ;;; Since we use paren highlighting in Lisp mode, we do not want paren
    1758 ;;; flashing too.
    1759 ;;;
    1760 (defhvar "Paren Pause Period"
    1761   "This is how long commands that deal with \"brackets\" shows the cursor at
    1762    the matching \"bracket\" for this number of seconds."
    1763   :value nil
    1764   :mode "Lisp")
    1765 ;;;
    1766 (defhvar "Highlight Open Parens"
    1767   "When non-nil, causes open parens to be displayed in a different font when
    1768    the cursor is directly to the right of the corresponding close paren."
    1769   :value t
    1770   :mode "Lisp")
    1771 
    1772 
    1773 (defhvar "Open Paren Finder Function"
    1774   "Should be a function that takes a mark for input and returns either NIL
    1775    if the mark is not after a close paren, or two (temporary) marks
    1776    surrounding the corresponding open paren."
    1777   :mode "Lisp"
    1778   :value 'lisp-open-paren-finder-function)
    1779 
    1780 (defun lisp-open-paren-finder-function (mark)
    1781   (when (eq (character-attribute :lisp-syntax (previous-character mark))
    1782             :close-paren)
    1783     (with-mark ((mark mark))
    1784       (pre-command-parse-check mark)
    1785       (if (not (and (valid-spot mark nil) (list-offset mark -1)))
    1786           (values nil nil)
    1787           (values mark (mark-after (copy-mark mark)))))))
    1788 
    1789 
    17901729
    17911730
     
    18111750  :mode "Lisp")
    18121751
    1813 (defun string-to-arglist (string buffer
     1752(defun string-to-arglist (string buffer &optional quiet-if-unknown
    18141753  (let* ((name
    18151754          (let* ((*package* (or
     
    18181757                             *package*)))
    18191758            (read-from-string string))))
    1820     (when (and (typep name 'symbol))
     1759    (when (typep name 'symbol)
    18211760      (multiple-value-bind (arglist win)
    18221761          (ccl::arglist-string name)
    1823         (format nil "~S : ~A" name (if win (or arglist "()") "(unknown)"))))))
     1762        (if (or win (not quiet-if-unknown))
     1763          (format nil "~S : ~A" name (if win (or arglist "()") "(unknown)")))))))
    18241764
    18251765(defcommand "Current Function Arglist" (p)
     
    18541794                  (let* ((fun-name (region-to-string (region mark1 mark2)))
    18551795                         (arglist-string
    1856                           (string-to-arglist fun-name (current-buffer))))
     1796                          (string-to-arglist fun-name (current-buffer) t)))
    18571797                    (when arglist-string
    18581798                      (message arglist-string))))
Note: See TracChangeset for help on using the changeset viewer.