Function: table--remove-blank-lines

table--remove-blank-lines is a byte-compiled function defined in table.el.gz.

Signature

(table--remove-blank-lines N)

Documentation

Delete N blank lines from the current line.

For adjusting below area of the table when the table is shortened.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/table.el.gz
(defun table--remove-blank-lines (n)
  "Delete N blank lines from the current line.
For adjusting below area of the table when the table is shortened."
  (move-to-column 0)
  (let ((first-blank t))
    (while (> n 0)
      (setq n (1- n))
      (cond ((looking-at "\\s *\\'")
	     (delete-region (match-beginning 0) (match-end 0))
	     (setq n 0))
	    ((and (looking-at "\\([ \t]*\n[ \t]*\\)\n") first-blank)
	     (delete-region (match-beginning 1) (match-end 1)))
	    ((looking-at "[ \t]*$")
	     (delete-region (match-beginning 0) (match-end 0))
	     (forward-line 1))
	    (t
	     (setq first-blank nil)
	     (forward-line 1))))))