emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/strokes.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/strokes.el
Date: Wed, 20 Jul 2005 19:07:38 -0400

Index: emacs/lisp/strokes.el
diff -c emacs/lisp/strokes.el:1.22 emacs/lisp/strokes.el:1.23
*** emacs/lisp/strokes.el:1.22  Mon Jul  4 23:08:58 2005
--- emacs/lisp/strokes.el       Wed Jul 20 23:07:38 2005
***************
*** 243,251 ****
  
  (defcustom strokes-grid-resolution 9
    "*Integer defining dimensions of the stroke grid.
! The grid is a square grid, where STROKES-GRID-RESOLUTION defaults to
  `9', making a 9x9 grid whose coordinates go from (0 . 0) on the top
! left to ((STROKES-GRID-RESOLUTION - 1) . (STROKES-GRID-RESOLUTION - 1))
  on the bottom right.  The greater the resolution, the more intricate
  your strokes can be.
  NOTE: This variable should be odd and MUST NOT be less than 3 and need
--- 243,251 ----
  
  (defcustom strokes-grid-resolution 9
    "*Integer defining dimensions of the stroke grid.
! The grid is a square grid, where `strokes-grid-resolution' defaults to
  `9', making a 9x9 grid whose coordinates go from (0 . 0) on the top
! left to ((strokes-grid-resolution - 1) . (strokes-grid-resolution - 1))
  on the bottom right.  The greater the resolution, the more intricate
  your strokes can be.
  NOTE: This variable should be odd and MUST NOT be less than 3 and need
***************
*** 259,265 ****
    :group 'strokes)
  
  (defcustom strokes-file (convert-standard-filename "~/.strokes")
!   "*File containing saved strokes for stroke-mode (default is ~/.strokes)."
    :type 'file
    :group 'strokes)
  
--- 259,265 ----
    :group 'strokes)
  
  (defcustom strokes-file (convert-standard-filename "~/.strokes")
!   "*File containing saved strokes for Strokes mode (default is ~/.strokes)."
    :type 'file
    :group 'strokes)
  
***************
*** 284,300 ****
    "Last stroke entered by the user.
  Its value gets set every time the function
  `strokes-fill-stroke' gets called,
! since that is the best time to set the variable")
  
  (defvar strokes-global-map '()
    "Association list of strokes and their definitions.
  Each entry is (STROKE . COMMAND) where STROKE is itself a list of
  coordinates (X . Y) where X and Y are lists of positions on the
  normalized stroke grid, with the top left at (0 . 0).  COMMAND is the
! corresponding interactive function")
  
  (defvar strokes-load-hook nil
!   "Function or functions to be called when `strokes' is loaded.")
  
  ;;; ### NOT IMPLEMENTED YET ###
  ;;(defvar edit-strokes-menu
--- 284,300 ----
    "Last stroke entered by the user.
  Its value gets set every time the function
  `strokes-fill-stroke' gets called,
! since that is the best time to set the variable.")
  
  (defvar strokes-global-map '()
    "Association list of strokes and their definitions.
  Each entry is (STROKE . COMMAND) where STROKE is itself a list of
  coordinates (X . Y) where X and Y are lists of positions on the
  normalized stroke grid, with the top left at (0 . 0).  COMMAND is the
! corresponding interactive function.")
  
  (defvar strokes-load-hook nil
!   "Functions to be called when Strokes is loaded.")
  
  ;;; ### NOT IMPLEMENTED YET ###
  ;;(defvar edit-strokes-menu
***************
*** 473,482 ****
  
  (defun strokes-get-grid-position (stroke-extent position &optional 
grid-resolution)
    "Map POSITION to a new grid position.
! Do so  based on its STROKE-EXTENT and GRID-RESOLUTION.
  STROKE-EXTENT as a list \(\(XMIN . YMIN\) \(XMAX . YMAX\)\).
  If POSITION is a `strokes-lift', then it is itself returned.
! Optional GRID-RESOLUTION may be used in place of STROKES-GRID-RESOLUTION.
  The grid is a square whose dimension is [0,GRID-RESOLUTION)."
    (cond ((consp position)             ; actual pixel location
         (let ((grid-resolution (or grid-resolution strokes-grid-resolution))
--- 473,482 ----
  
  (defun strokes-get-grid-position (stroke-extent position &optional 
grid-resolution)
    "Map POSITION to a new grid position.
! Do so based on its STROKE-EXTENT and GRID-RESOLUTION.
  STROKE-EXTENT as a list \(\(XMIN . YMIN\) \(XMAX . YMAX\)\).
  If POSITION is a `strokes-lift', then it is itself returned.
! Optional GRID-RESOLUTION may be used in place of `strokes-grid-resolution'.
  The grid is a square whose dimension is [0,GRID-RESOLUTION)."
    (cond ((consp position)             ; actual pixel location
         (let ((grid-resolution (or grid-resolution strokes-grid-resolution))
***************
*** 566,572 ****
  (defun strokes-renormalize-to-grid (positions &optional grid-resolution)
    "Map POSITIONS to a new grid whose dimensions are based on GRID-RESOLUTION.
  POSITIONS is a list of positions and stroke-lifts.
! Optional GRID-RESOLUTION may be used in place of STROKES-GRID-RESOLUTION.
  The grid is a square whose dimension is [0,GRID-RESOLUTION)."
    (or grid-resolution (setq grid-resolution strokes-grid-resolution))
    (let ((stroke-extent (strokes-get-stroke-extent positions)))
--- 566,572 ----
  (defun strokes-renormalize-to-grid (positions &optional grid-resolution)
    "Map POSITIONS to a new grid whose dimensions are based on GRID-RESOLUTION.
  POSITIONS is a list of positions and stroke-lifts.
! Optional GRID-RESOLUTION may be used in place of `strokes-grid-resolution'.
  The grid is a square whose dimension is [0,GRID-RESOLUTION)."
    (or grid-resolution (setq grid-resolution strokes-grid-resolution))
    (let ((stroke-extent (strokes-get-stroke-extent positions)))
***************
*** 726,732 ****
  This function will display the stroke interactively as it is being
  entered in the strokes buffer if the variable
  `strokes-use-strokes-buffer' is non-nil.
! Optional EVENT is acceptable as the starting event of the stroke"
    (save-excursion
      (let ((pix-locs nil)
          (grid-locs nil)
--- 726,732 ----
  This function will display the stroke interactively as it is being
  entered in the strokes buffer if the variable
  `strokes-use-strokes-buffer' is non-nil.
! Optional EVENT is acceptable as the starting event of the stroke."
    (save-excursion
      (let ((pix-locs nil)
          (grid-locs nil)
***************
*** 790,796 ****
  Note that a complex stroke allows the user to pen-up and pen-down.  This
  is implemented by allowing the user to paint with button 1 or button 2 and
  then complete the stroke with button 3.
! Optional EVENT is acceptable as the starting event of the stroke"
    (save-excursion
      (save-window-excursion
        (set-window-configuration strokes-window-configuration)
--- 790,796 ----
  Note that a complex stroke allows the user to pen-up and pen-down.  This
  is implemented by allowing the user to paint with button 1 or button 2 and
  then complete the stroke with button 3.
! Optional EVENT is acceptable as the starting event of the stroke."
    (save-excursion
      (save-window-excursion
        (set-window-configuration strokes-window-configuration)
***************
*** 892,902 ****
  
  ;;;###autoload
  (defun strokes-help ()
!   "Get instruction on using the `strokes' package."
    (interactive)
    (with-output-to-temp-buffer "*Help with Strokes*"
      (princ
!      "This is help for the strokes package.
  
  ------------------------------------------------------------
  
--- 892,903 ----
  
  ;;;###autoload
  (defun strokes-help ()
!   "Get instruction on using the Strokes package."
    (interactive)
    (with-output-to-temp-buffer "*Help with Strokes*"
      (princ
!      (substitute-command-keys
!       "This is help for the strokes package.
  
  ------------------------------------------------------------
  
***************
*** 986,992 ****
  You will be prompted to save them when you exit Emacs, or you can save
  them with
  
! > M-x strokes-save-strokes
  
  Your strokes get loaded automatically when you enable `strokes-mode'.
  You can also load in your user-defined strokes with
--- 987,993 ----
  You will be prompted to save them when you exit Emacs, or you can save
  them with
  
! > M-x strokes-prompt-user-save-strokes
  
  Your strokes get loaded automatically when you enable `strokes-mode'.
  You can also load in your user-defined strokes with
***************
*** 1024,1030 ****
    variable which many people wanted to see was
    `strokes-use-strokes-buffer' which allows the user to use strokes
    silently--without displaying the strokes.  All variables can be set
!   by customizing the group `strokes' via \[customize-group].")
      (set-buffer standard-output)
      (help-mode)
      (print-help-return-message)))
--- 1025,1031 ----
    variable which many people wanted to see was
    `strokes-use-strokes-buffer' which allows the user to use strokes
    silently--without displaying the strokes.  All variables can be set
!   by customizing the group `strokes' via \\[customize-group]."))
      (set-buffer standard-output)
      (help-mode)
      (print-help-return-message)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]