diff options
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 1 | ||||
| -rw-r--r-- | lisp/simple.el | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index bab4e9de04d..921737df870 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -2994,6 +2994,7 @@ For example, invoke \"emacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" | |||
| 2994 | (make-obsolete-variable 'unread-command-event | 2994 | (make-obsolete-variable 'unread-command-event |
| 2995 | "use unread-command-events; this is now a list of events.") | 2995 | "use unread-command-events; this is now a list of events.") |
| 2996 | (make-obsolete-variable 'suspend-hook 'suspend-hooks) | 2996 | (make-obsolete-variable 'suspend-hook 'suspend-hooks) |
| 2997 | (make-obsolete-variable 'comment-indent-hook 'comment-indent-function) | ||
| 2997 | 2998 | ||
| 2998 | (provide 'byte-compile) | 2999 | (provide 'byte-compile) |
| 2999 | 3000 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index adc10d59f1a..9c3a8ecd26e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1491,7 +1491,12 @@ at the place matched by the close of the first pair.") | |||
| 1491 | "*String to insert to end a new comment. | 1491 | "*String to insert to end a new comment. |
| 1492 | Should be an empty string if comments are terminated by end-of-line.") | 1492 | Should be an empty string if comments are terminated by end-of-line.") |
| 1493 | 1493 | ||
| 1494 | (defconst comment-indent-hook | 1494 | (defconst comment-indent-hook nil |
| 1495 | "Obsolete variable for function to compute desired indentation for a comment. | ||
| 1496 | This function is called with no args with point at the beginning of | ||
| 1497 | the comment's starting delimiter.") | ||
| 1498 | |||
| 1499 | (defconst comment-indent-function | ||
| 1495 | '(lambda () comment-column) | 1500 | '(lambda () comment-column) |
| 1496 | "Function to compute desired indentation for a comment. | 1501 | "Function to compute desired indentation for a comment. |
| 1497 | This function is called with no args with point at the beginning of | 1502 | This function is called with no args with point at the beginning of |
| @@ -1521,7 +1526,9 @@ the comment's starting delimiter.") | |||
| 1521 | (setq begpos (point)) | 1526 | (setq begpos (point)) |
| 1522 | ;; Compute desired indent. | 1527 | ;; Compute desired indent. |
| 1523 | (if (= (current-column) | 1528 | (if (= (current-column) |
| 1524 | (setq indent (funcall comment-indent-hook))) | 1529 | (if comment-indent-hook |
| 1530 | (funcall comment-indent-hook) | ||
| 1531 | (funcall comment-indent-function))) | ||
| 1525 | (goto-char begpos) | 1532 | (goto-char begpos) |
| 1526 | ;; If that's different from current, change it. | 1533 | ;; If that's different from current, change it. |
| 1527 | (skip-chars-backward " \t") | 1534 | (skip-chars-backward " \t") |