From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: table.el 1.6.3 Date: Thu, 21 Mar 2002 22:01:35 -0800 (PST) Organization: Sony Electronics Inc. Sender: emacs-devel-admin@gnu.org Message-ID: <20020321.220135.01365190.Takaaki.Ota@am.sony.com> References: <20020319.212249.60850794.Takaaki.Ota@am.sony.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1016777019 25882 127.0.0.1 (22 Mar 2002 06:03:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 22 Mar 2002 06:03:39 +0000 (UTC) Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16oI9K-0006jL-00 for ; Fri, 22 Mar 2002 07:03:38 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16oIFs-0005Yc-00 for ; Fri, 22 Mar 2002 07:10:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16oI8x-0005FS-00; Fri, 22 Mar 2002 01:03:15 -0500 Original-Received: from mail6.fw-sj.sony.com ([160.33.82.73]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16oI7Q-0005CN-00 for ; Fri, 22 Mar 2002 01:01:40 -0500 Original-Received: from mail2.sjc.in.sel.sony.com (mail2.sjc.in.sel.sony.com [43.134.1.111]) by mail6.fw-sj.sony.com (8.8.8/8.8.8) with ESMTP id GAA07683 for ; Fri, 22 Mar 2002 06:01:39 GMT Original-Received: by mail2.sjc.in.sel.sony.com id GAA11829; Fri, 22 Mar 2002 06:01:37 GMT Original-To: emacs-devel@gnu.org In-Reply-To: <20020319.212249.60850794.Takaaki.Ota@am.sony.com> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew version 3.0.54 on Emacs 21.2.50.1 / Mule 5.0 (SAKAKI) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2114 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2114 Tue, 19 Mar 2002 21:22:49 -0800: Tak Ota wrote: > Attached is the latest table.el that does not use function advice > anymore. It depends on the new command remap feature therefore won't > run correctly in the previous versions of emacs. > > So far I find one problem. Somehow when point goes inside a table > cell the table menu does not appear in the menu bar. For this part > the same code works fine under emacs-21.1.90 although command remap is > missing. Has the menu mechanism in keymap changed under 21.3? Following is a patch from table.el 1.6.1 to 1.6.3. The version 1.6.3 fixes the table cell filling problem introduced by the new definition of `paragraph-start'. The table menu problem is now fixed in the latest keyboard.c from the CVS by Kim F. Storm. -Tak *** table-1.6.1.el Thu Mar 21 21:48:01 2002 --- table.el Thu Mar 21 21:49:23 2002 *************** *** 4,20 **** ;; Emacs Lisp Archive Entry ;; Filename: table.el ! ;; Version: 1.6.1 ;; Keywords: wp, convenience ;; Author: Takaaki Ota ;; Maintainer: Takaaki Ota ;; Created: Sat Jul 08 2000 13:28:45 (PST) ! ;; Revised: Wed Mar 13 2002 21:20:00 (PST) ;; Description: create and edit WYSIWYG text based embedded tables ;; Compatibility: Require Emacs 21.3 or lator ;; URL: http://table.sourceforge.net/ ! (defconst table-version "1.6.1" "Table version number. The latest version is available from http://table.sourceforge.net/") --- 4,20 ---- ;; Emacs Lisp Archive Entry ;; Filename: table.el ! ;; Version: 1.6.3 ;; Keywords: wp, convenience ;; Author: Takaaki Ota ;; Maintainer: Takaaki Ota ;; Created: Sat Jul 08 2000 13:28:45 (PST) ! ;; Revised: Thu Mar 21 2002 17:52:43 (PST) ;; Description: create and edit WYSIWYG text based embedded tables ;; Compatibility: Require Emacs 21.3 or lator ;; URL: http://table.sourceforge.net/ ! (defconst table-version "1.6.3" "Table version number. The latest version is available from http://table.sourceforge.net/") *************** *** 868,873 **** --- 868,875 ---- ;;; Internal variables and constants ;;; No need of user configuration + (defconst table-paragraph-start "[ \t\n\f]" + "*Regexp for beginning of a line that starts OR separates paragraphs.") (defconst table-cache-buffer-name " *table cell cache*" "Cell cache buffer name.") (defvar table-cell-info-lu-coordinate nil *************** *** 4317,4322 **** --- 4319,4357 ---- (car (table--get-coordinate (cdr (table--horizontal-cell-list nil t)))) (1+ (cdr (table--get-coordinate (cdr (table--vertical-cell-list nil t)))))))) + (defun table-call-interactively (function &optional recoard-flag keys) + "Call FUNCTION, or a table version of it if applicable. + See `call-interactively' for full description of the arguments." + (let ((table-func (intern-soft (format "*table--cell-%s" function)))) + (call-interactively + (if (and table-func + (table--point-in-cell-p)) + table-func + function) recoard-flag keys))) + + (defun table-funcall (function &rest arguments) + "Call FUNCTION, or a table version of it if applicable. + See `funcall' for full description of the arguments." + (let ((table-func (intern-soft (format "*table--cell-%s" function)))) + (apply + (if (and table-func + (table--point-in-cell-p)) + table-func + function) + arguments))) + + (defmacro table-apply (function &rest arguments) + "Call FUNCTION, or a table version of it if applicable. + See `apply' for full description of the arguments." + (let ((table-func (make-symbol "table-func"))) + `(let ((,table-func (intern-soft (format "*table--cell-%s" ,function)))) + (apply + (if (and ,table-func + (table--point-in-cell-p)) + ,table-func + ,function) + ,@arguments)))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Utility functions *************** *** 4558,4564 **** (if (memq justify valign-symbols) (table--valign) (table--remove-eol-spaces beg end 'bol) ! (fill-region beg end table-cell-info-justify))) (setq table-inhibit-auto-fill-paragraph t) (set-marker end nil))) (table--update-cell 'now)) --- 4593,4600 ---- (if (memq justify valign-symbols) (table--valign) (table--remove-eol-spaces beg end 'bol) ! (let ((paragraph-start table-paragraph-start)) ! (fill-region beg end table-cell-info-justify)))) (setq table-inhibit-auto-fill-paragraph t) (set-marker end nil))) (table--update-cell 'now)) *************** *** 5399,5405 **** (table--remove-eol-spaces (point-min) (point-max)) (if table-fixed-width-mode (table--fill-region-strictly marker-beg marker-end) ! (fill-region marker-beg marker-end justify nil t)) (goto-char marker-point) (set-marker marker-beg nil) (set-marker marker-end nil) --- 5435,5442 ---- (table--remove-eol-spaces (point-min) (point-max)) (if table-fixed-width-mode (table--fill-region-strictly marker-beg marker-end) ! (let ((paragraph-start table-paragraph-start)) ! (fill-region marker-beg marker-end justify nil t))) (goto-char marker-point) (set-marker marker-beg nil) (set-marker marker-end nil) *************** *** 5422,5428 **** end t) (delete-region (match-beginning 1) (match-end 1))) ;; then fill as normal ! (fill-region beg end nil nil t) ;; now fix up (goto-char beg) (while (let ((col (move-to-column fill-column t))) --- 5459,5466 ---- end t) (delete-region (match-beginning 1) (match-end 1))) ;; then fill as normal ! (let ((paragraph-start table-paragraph-start)) ! (fill-region beg end nil nil t)) ;; now fix up (goto-char beg) (while (let ((col (move-to-column fill-column t))) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel