From 94fa3dcffa16cfc38909aa4d62a9db7f88066467 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 5 Dec 2008 13:19:36 +0100 Subject: [PATCH] Rename some ill-named function in org-table.el. --- lisp/ChangeLog | 10 ++++++++++ lisp/org-table.el | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a66faa65..27968784b 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,15 @@ 2008-12-05 Carsten Dominik + * org-table.el (org-table-find-row-type): Renamed from + `org-find-row-type'. + (org-table-rewrite-old-row-references): Renamed from + `org-rewrite-old-row-references'. + (org-table-shift-refpart): Renamed from `org-shift-refpart'. + (org-table-cleanup-narrow-column-properties): Renamed from + `org-cleanup-narrow-column-properties'. + +2008-12-05 Carsten Dominik + * org-table.el (org-find-row-type): New arguments DESC and CLINE, for better error messages. (org-table-get-descriptor-line): Supply the new arguments to diff --git a/lisp/org-table.el b/lisp/org-table.el index 18c1e3f90..d9f6c9c0d 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2122,7 +2122,7 @@ not overwrite the stored one." lispp (and (> (length form) 2)(equal (substring form 0 2) "'("))) (if (and lispp literal) (setq lispp 'literal)) ;; Check for old vertical references - (setq form (org-rewrite-old-row-references form)) + (setq form (org-table-rewrite-old-row-references form)) ;; Insert complex ranges (while (and (string-match org-table-range-regexp form) (> (length (match-string 0 form)) 1)) @@ -2296,14 +2296,14 @@ and TABLE is a vector with line types." (if (and (not hn) on (not odir)) (error "should never happen");;(aref org-table-dlines on) (if (and hn (> hn 0)) - (setq i (org-find-row-type table i 'hline (equal hdir "-") nil hn - cline desc))) + (setq i (org-table-find-row-type table i 'hline (equal hdir "-") + nil hn cline desc))) (if on - (setq i (org-find-row-type table i 'dline (equal odir "-") rel on - cline desc))) + (setq i (org-table-find-row-type table i 'dline (equal odir "-") + rel on cline desc))) (+ bline i))))) -(defun org-find-row-type (table i type backwards relative n cline desc) +(defun org-table-find-row-type (table i type backwards relative n cline desc) "FIXME: Needs more documentation." (let ((l (length table))) (while (> n 0) @@ -2321,7 +2321,7 @@ and TABLE is a vector with line types." desc cline) i))) -(defun org-rewrite-old-row-references (s) +(defun org-table-rewrite-old-row-references (s) (if (string-match "&[-+0-9I]" s) (error "Formula contains old &row reference, please rewrite using @-syntax") s)) @@ -2760,10 +2760,10 @@ For example: 28 -> AB." (or (match-end n) (error "Cannot shift reference in this direction")) (goto-char (match-beginning n)) (and (looking-at (regexp-quote (match-string n))) - (replace-match (org-shift-refpart (match-string 0) decr hline) + (replace-match (org-table-shift-refpart (match-string 0) decr hline) t t))) -(defun org-shift-refpart (ref &optional decr hline) +(defun org-table-shift-refpart (ref &optional decr hline) "Shift a refrence part REF. If DECR is set, decrease the references row/column, else increase. If HLINE is set, this may be a hline reference, it certainly is not @@ -3252,7 +3252,7 @@ table editor in arbitrary modes.") (easy-menu-add orgtbl-mode-menu) (run-hooks 'orgtbl-mode-hook)) (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp) - (org-cleanup-narrow-column-properties) + (org-table-cleanup-narrow-column-properties) (org-remove-from-invisibility-spec '(org-cwidth)) (remove-hook 'before-change-functions 'org-before-change-function t) (when (fboundp 'font-lock-remove-keywords) @@ -3261,7 +3261,7 @@ table editor in arbitrary modes.") (easy-menu-remove orgtbl-mode-menu) (force-mode-line-update 'all)))) -(defun org-cleanup-narrow-column-properties () +(defun org-table-cleanup-narrow-column-properties () "Remove all properties related to narrow-column invisibility." (let ((s 1)) (while (setq s (text-property-any s (point-max) -- 2.11.4.GIT