diff --git a/lisp/org-table.el b/lisp/org-table.el index 6cec76332..8eb38ef68 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1429,7 +1429,7 @@ non-nil, the one above is used." (cond ((or (> (aref org-table-dlines min) line) (< (aref org-table-dlines max) line)) nil) - ((= (aref org-table-dlines max) line) max) + ((= line (aref org-table-dlines max)) max) (t (catch 'exit (while (> (- max min) 1) (let* ((mean (/ (+ max min) 2)) @@ -1437,7 +1437,10 @@ non-nil, the one above is used." (cond ((= v line) (throw 'exit mean)) ((> v line) (setq max mean)) (t (setq min mean))))) - (if above min max)))))) + (cond ((= line (aref org-table-dlines max)) max) + ((= line (aref org-table-dlines min)) min) + (above min) + (t max))))))) ;;;###autoload (defun org-table-delete-column ()