diff options
| author | Stefan Monnier | 2004-03-22 15:31:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-03-22 15:31:46 +0000 |
| commit | 4f9d876485650e75947e8672f3a238df63777ee2 (patch) | |
| tree | 96c6fd0c27e6b10048cc2b867fa48e95d19b6f5a | |
| parent | de00302bfd7dcf36a709a77c750eeb0e1bf8c2ad (diff) | |
| download | emacs-4f9d876485650e75947e8672f3a238df63777ee2.tar.gz emacs-4f9d876485650e75947e8672f3a238df63777ee2.zip | |
(lisp-mode-variables): Don't set
normal-auto-fill-function and comment-indent-function.
The default values now work just as well.
Don't set font-lock-beginning-of-syntax-function since we already set
syntax-begin-function.
(lisp-outline-level): Put ;;;###autoload at same level as (.
(prin1-char): Quote special chars.
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 6b50318d3e6..853498b0c8c 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -173,8 +173,6 @@ | |||
| 173 | ;; because lisp-fill-paragraph should do the job. | 173 | ;; because lisp-fill-paragraph should do the job. |
| 174 | ;; I believe that newcomment's auto-fill code properly deals with it -stef | 174 | ;; I believe that newcomment's auto-fill code properly deals with it -stef |
| 175 | ;;(set (make-local-variable 'adaptive-fill-mode) nil) | 175 | ;;(set (make-local-variable 'adaptive-fill-mode) nil) |
| 176 | (make-local-variable 'normal-auto-fill-function) | ||
| 177 | (setq normal-auto-fill-function 'lisp-mode-auto-fill) | ||
| 178 | (make-local-variable 'indent-line-function) | 176 | (make-local-variable 'indent-line-function) |
| 179 | (setq indent-line-function 'lisp-indent-line) | 177 | (setq indent-line-function 'lisp-indent-line) |
| 180 | (make-local-variable 'indent-region-function) | 178 | (make-local-variable 'indent-region-function) |
| @@ -195,8 +193,6 @@ | |||
| 195 | (setq comment-add 1) ;default to `;;' in comment-region | 193 | (setq comment-add 1) ;default to `;;' in comment-region |
| 196 | (make-local-variable 'comment-column) | 194 | (make-local-variable 'comment-column) |
| 197 | (setq comment-column 40) | 195 | (setq comment-column 40) |
| 198 | (make-local-variable 'comment-indent-function) | ||
| 199 | (setq comment-indent-function 'lisp-comment-indent) | ||
| 200 | ;; Don't get confused by `;' in doc strings when paragraph-filling. | 196 | ;; Don't get confused by `;' in doc strings when paragraph-filling. |
| 201 | (set (make-local-variable 'comment-use-global-state) t) | 197 | (set (make-local-variable 'comment-use-global-state) t) |
| 202 | (make-local-variable 'imenu-generic-expression) | 198 | (make-local-variable 'imenu-generic-expression) |
| @@ -207,14 +203,14 @@ | |||
| 207 | (setq font-lock-defaults | 203 | (setq font-lock-defaults |
| 208 | '((lisp-font-lock-keywords | 204 | '((lisp-font-lock-keywords |
| 209 | lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) | 205 | lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) |
| 210 | nil nil (("+-*/.<>=!?$%_&~^:" . "w")) beginning-of-defun | 206 | nil nil (("+-*/.<>=!?$%_&~^:" . "w")) nil |
| 211 | (font-lock-mark-block-function . mark-defun) | 207 | (font-lock-mark-block-function . mark-defun) |
| 212 | (font-lock-syntactic-face-function | 208 | (font-lock-syntactic-face-function |
| 213 | . lisp-font-lock-syntactic-face-function)))) | 209 | . lisp-font-lock-syntactic-face-function)))) |
| 214 | 210 | ||
| 215 | (defun lisp-outline-level () | 211 | (defun lisp-outline-level () |
| 216 | "Lisp mode `outline-level' function." | 212 | "Lisp mode `outline-level' function." |
| 217 | (if (looking-at "(") | 213 | (if (looking-at "(\\|;;;###autoload") |
| 218 | 1000 | 214 | 1000 |
| 219 | (looking-at outline-regexp) | 215 | (looking-at outline-regexp) |
| 220 | (- (match-end 0) (match-beginning 0)))) | 216 | (- (match-end 0) (match-beginning 0)))) |
| @@ -453,14 +449,18 @@ alternative printed representations that can be displayed." | |||
| 453 | If CHAR is not a character, return nil." | 449 | If CHAR is not a character, return nil." |
| 454 | (and (integerp char) | 450 | (and (integerp char) |
| 455 | (char-valid-p (event-basic-type char)) | 451 | (char-valid-p (event-basic-type char)) |
| 456 | (concat | 452 | (let ((c (event-basic-type char))) |
| 457 | "?" | 453 | (concat |
| 458 | (mapconcat | 454 | "?" |
| 459 | (lambda (modif) | 455 | (mapconcat |
| 460 | (cond ((eq modif 'super) "\\s-") | 456 | (lambda (modif) |
| 461 | (t (string ?\\ (upcase (aref (symbol-name modif) 0)) ?-)))) | 457 | (cond ((eq modif 'super) "\\s-") |
| 462 | (event-modifiers char) "") | 458 | (t (string ?\\ (upcase (aref (symbol-name modif) 0)) ?-)))) |
| 463 | (string (event-basic-type char))))) | 459 | (event-modifiers char) "") |
| 460 | (cond | ||
| 461 | ((memq c '(?\; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c)) | ||
| 462 | ((eq c 127) "\\C-?") | ||
| 463 | (t (string c))))))) | ||
| 464 | 464 | ||
| 465 | (defun eval-last-sexp-1 (eval-last-sexp-arg-internal) | 465 | (defun eval-last-sexp-1 (eval-last-sexp-arg-internal) |
| 466 | "Evaluate sexp before point; print value in minibuffer. | 466 | "Evaluate sexp before point; print value in minibuffer. |
| @@ -671,8 +671,8 @@ which see." | |||
| 671 | ;; This function just forces a more costly detection of comments (using | 671 | ;; This function just forces a more costly detection of comments (using |
| 672 | ;; parse-partial-sexp from beginning-of-defun). I.e. It avoids the problem of | 672 | ;; parse-partial-sexp from beginning-of-defun). I.e. It avoids the problem of |
| 673 | ;; taking a `;' inside a string started on another line for a comment starter. | 673 | ;; taking a `;' inside a string started on another line for a comment starter. |
| 674 | ;; Note: `newcomment' gets it right in 99% of the cases if you're using | 674 | ;; Note: `newcomment' gets it right now since we set comment-use-global-state |
| 675 | ;; font-lock, anyway, so we could get rid of it. -stef | 675 | ;; so we could get rid of it. -stef |
| 676 | (defun lisp-mode-auto-fill () | 676 | (defun lisp-mode-auto-fill () |
| 677 | (if (> (current-column) (current-fill-column)) | 677 | (if (> (current-column) (current-fill-column)) |
| 678 | (if (save-excursion | 678 | (if (save-excursion |