emacs-devel
[Top][All Lists]
Advanced

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

Re: table.el


From: Tak Ota
Subject: Re: table.el
Date: Sun, 25 Nov 2001 22:44:17 -0800 (PST)

From: Werner LEMBERG <address@hidden>
Date: Sun, 25 Nov 2001 19:06:37 +0100 (CET)
Subject: Re: table.el

> . Is it possible to change the method how default values during a
>   call to `table-insert' are given?  Currently, I get e.g.
> 
>     `Number of columns: 1'
> 
>   If I press `2', I get `12' instead of the expected `2'.  What about
>   this:
> 
>     `Number of columns (1): '

I think anything rational is possible under emacs:) Would you try the
following patch?  I placed the `:' before the default value
parenthesis since it seems to be the standard way in emacs elsewhere.
It seems to work as you explained above, however I have to do some
more work to fix the broken compatibility with XEmacs.  Somehow XEmacs
implementation of `read-from-minibuffer' is subtly different that it
takes blank input into the history.  I hate XEmacs.

I'd appreciate if you could point out other parts of the code which
also requires the same change.

-Tak


*** table.el~   Thu Nov  8 23:30:30 2001
--- table.el    Sun Nov 25 22:32:12 2001
***************
*** 2,17 ****
  
  ;; Copyright (C) 2000, 2001 Takaaki "Tak" Ota
  
  ;; Emacs Lisp Archive Entry
  ;; Filename:      table.el
! ;; Version:       1.5.49
  ;; Keywords:      wp, convenience
  ;; Author:        Takaaki Ota <address@hidden>
  ;; Maintainer:    Takaaki Ota <address@hidden>
  ;; Created:       Sat Jul 08 2000 13:28:45 (PST)
! ;; Revised:       Sun Aug 26 2001 12:45:32 (PDT)
  ;; Description:   create and edit WYSIWYG text based embedded tables
  ;; Compatibility: Emacs20.2, Emacs20.7, Emacs21.0.104, XEmacs21.1.9(some 
known issues)
  ;; URL:           http://table.sourceforge.net/
  
  (defconst table-version "1.5.49"
--- 2,17 ----
  
  ;; Copyright (C) 2000, 2001 Takaaki "Tak" Ota
  
  ;; Emacs Lisp Archive Entry
  ;; Filename:      table.el
! ;; Version:       1.5.50
  ;; Keywords:      wp, convenience
  ;; Author:        Takaaki Ota <address@hidden>
  ;; Maintainer:    Takaaki Ota <address@hidden>
  ;; Created:       Sat Jul 08 2000 13:28:45 (PST)
! ;; Revised:       Sun Nov 25 2001 22:32:11 (PST)
  ;; Description:   create and edit WYSIWYG text based embedded tables
  ;; Compatibility: Emacs20.2, Emacs20.7, Emacs21.0.104, XEmacs21.1.9(some 
known issues)
  ;; URL:           http://table.sourceforge.net/
  
  (defconst table-version "1.5.49"
***************
*** 1845,1861 ****
     (progn
       (barf-if-buffer-read-only)
       (if (table--probe-cell)
         (error "Can't insert a table inside a table"))
       (mapcar (lambda (prompt-history)
!              (read-from-minibuffer (car prompt-history)
!                                    (car (symbol-value (cdr prompt-history)))
!                                    nil nil (cdr prompt-history)))
!            '(("Number of columns: " . table-columns-history)
!              ("Number of rows: " . table-rows-history)
!              ("Cell width(s): " . table-cell-width-history)
!              ("Cell height(s): " . table-cell-height-history)))))
    (let ((table-inhibit-advice t))
      (table--make-cell-map)
      ;; reform the arguments.
      (if (null cell-width) (setq cell-width (car table-cell-width-history)))
      (if (null cell-height) (setq cell-height (car table-cell-height-history)))
--- 1845,1861 ----
     (progn
       (barf-if-buffer-read-only)
       (if (table--probe-cell)
         (error "Can't insert a table inside a table"))
       (mapcar (lambda (prompt-history)
!              (read-from-minibuffer (format (car prompt-history) (car 
(symbol-value (cdr prompt-history))))
!                                    "" nil nil (cdr prompt-history))
!              (car (symbol-value (cdr prompt-history))))
!            '(("Number of columns: (%s) " . table-columns-history)
!              ("Number of rows: (%s) " . table-rows-history)
!              ("Cell width(s): (%s) " . table-cell-width-history)
!              ("Cell height(s): (%s) " . table-cell-height-history)))))
    (let ((table-inhibit-advice t))
      (table--make-cell-map)
      ;; reform the arguments.
      (if (null cell-width) (setq cell-width (car table-cell-width-history)))
      (if (null cell-height) (setq cell-height (car table-cell-height-history)))



reply via email to

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