rms@mit-prep (10/06/85)
From: Richard M. Stallman <rms@mit-prep> *** indent.el.~1~ Tue Aug 6 04:21:11 1985 --- indent.el Fri Oct 4 19:37:08 1985 *************** *** 107,113 (forward-line 1)) (move-marker end nil)))) ! (defun indent-relative () "Space out to under next indent point in previous nonblank line. An indent point is a non-whitespace character following whitespace. If the previous nonblank line has no indent points beyond --- 107,118 ----- (forward-line 1)) (move-marker end nil)))) ! (defun indent-relative-maybe () ! "Indent a new line like previous nonblank line." ! (interactive) ! (indent-relative t)) ! ! (defun indent-relative (&optional unindented-ok) "Space out to under next indent point in previous nonblank line. An indent point is a non-whitespace character following whitespace. If the previous nonblank line has no indent points beyond *************** *** 112,118 An indent point is a non-whitespace character following whitespace. If the previous nonblank line has no indent points beyond the column dot starts at, tab-to-tab-stop is done instead." ! (interactive) (if abbrev-mode (expand-abbrev)) (let ((start-column (current-column)) indent) --- 117,123 ----- An indent point is a non-whitespace character following whitespace. If the previous nonblank line has no indent points beyond the column dot starts at, tab-to-tab-stop is done instead." ! (interactive "P") (if abbrev-mode (expand-abbrev)) (let ((start-column (current-column)) indent) *************** *** 122,127 (let ((end (scan-buffer (dot) 1 ?\n))) (move-to-column start-column) (or (looking-at "[ \t]") (skip-chars-forward "^ \t" end)) (skip-chars-forward " \t" end) (or (= (dot) end) (setq indent (current-column)))))) --- 127,133 ----- (let ((end (scan-buffer (dot) 1 ?\n))) (move-to-column start-column) (or (looking-at "[ \t]") + unindented-ok (skip-chars-forward "^ \t" end)) (skip-chars-forward " \t" end) (or (= (dot) end) (setq indent (current-column)))))) *** text-mode.el.~1~ Sat Sep 28 14:13:19 1985 --- text-mode.el Fri Oct 4 19:37:10 1985 *************** *** 78,84 (setq local-abbrev-table text-mode-abbrev-table) (set-syntax-table text-mode-syntax-table) (make-local-variable 'indent-line-function) ! (setq indent-line-function 'indent-relative) (use-local-map indented-text-mode-map) (setq mode-name "Indented Text") (setq major-mode 'indented-text-mode) --- 78,84 ----- (setq local-abbrev-table text-mode-abbrev-table) (set-syntax-table text-mode-syntax-table) (make-local-variable 'indent-line-function) ! (setq indent-line-function 'indent-relative-maybe) (use-local-map indented-text-mode-map) (setq mode-name "Indented Text") (setq major-mode 'indented-text-mode)
rms@mit-prep (10/12/85)
From: Richard M. Stallman <rms@mit-prep> This allows `End:' to be used to terminate a local variable list, as the manual says, not just `end:'. It also allows backslashes to serve as quotes in the names of the local variables. *** files.el.~4~ Wed Oct 9 17:44:57 1985 --- files.el Fri Oct 11 02:06:21 1985 *************** *** 322,328 (skip-chars-forward "^:\n") (if (eolp) (error "Missing colon in local variables entry")) (skip-chars-backward " \t") ! (let ((var (intern (buffer-substring beg (point)))) val) ;; Setting variable named "end" means end of list. (if (eq var 'end) --- 322,329 ----- (skip-chars-forward "^:\n") (if (eolp) (error "Missing colon in local variables entry")) (skip-chars-backward " \t") ! (let* ((str (buffer-substring beg (point))) ! (var (read str)) val) ;; Setting variable named "end" means end of list. (if (string-equal str "end") *************** *** 325,331 (let ((var (intern (buffer-substring beg (point)))) val) ;; Setting variable named "end" means end of list. ! (if (eq var 'end) (setq continue nil) ;; Otherwise read the variable value. (skip-chars-forward "^:") --- 326,332 ----- (var (read str)) val) ;; Setting variable named "end" means end of list. ! (if (string-equal str "end") (setq continue nil) ;; Otherwise read the variable value. (skip-chars-forward "^:")