diff options
| author | Richard M. Stallman | 1992-08-31 21:42:28 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-08-31 21:42:28 +0000 |
| commit | 6ec3899e1629c6f954d12fc7773ddd5a8f1a76be (patch) | |
| tree | eb181b38fa44f07c67c70902a7c3073348d9edf7 | |
| parent | 616ed245e9bc6cca7fb41575193ac6dcf5ea422e (diff) | |
| download | emacs-6ec3899e1629c6f954d12fc7773ddd5a8f1a76be.tar.gz emacs-6ec3899e1629c6f954d12fc7773ddd5a8f1a76be.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/loadup.el | 1 | ||||
| -rw-r--r-- | lisp/mouse.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/c-mode.el | 68 |
3 files changed, 53 insertions, 28 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el index afca23d5e35..7710e47582f 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -116,6 +116,7 @@ | |||
| 116 | (setq name (concat (downcase (substring name 0 (match-beginning 0))) | 116 | (setq name (concat (downcase (substring name 0 (match-beginning 0))) |
| 117 | "-" | 117 | "-" |
| 118 | (substring name (match-end 0))))) | 118 | (substring name (match-end 0))))) |
| 119 | (delete-file (concat (expand-file-name "../etc/DOC-") name)) | ||
| 119 | (copy-file (expand-file-name "../etc/DOC") | 120 | (copy-file (expand-file-name "../etc/DOC") |
| 120 | (concat (expand-file-name "../etc/DOC-") name) | 121 | (concat (expand-file-name "../etc/DOC-") name) |
| 121 | t) | 122 | t) |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 351bab4c864..21dacf84348 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -473,17 +473,17 @@ This does not delete the region; it acts like \\[kill-ring-save]." | |||
| 473 | (defvar help-admin-map '(keymap "Administrivia")) | 473 | (defvar help-admin-map '(keymap "Administrivia")) |
| 474 | 474 | ||
| 475 | (define-key help-menu-map [apropos] | 475 | (define-key help-menu-map [apropos] |
| 476 | (cons "Is there a command that..." help-apropos-map)) | 476 | (cons "@Is there a command that..." help-apropos-map)) |
| 477 | (define-key help-menu-map [keys] | 477 | (define-key help-menu-map [keys] |
| 478 | (cons "Key Commands <==> Functions" help-keys-map)) | 478 | (cons "@Key Commands <==> Functions" help-keys-map)) |
| 479 | (define-key help-menu-map [manuals] | 479 | (define-key help-menu-map [manuals] |
| 480 | (cons "Manual and tutorial" help-manual-map)) | 480 | (cons "@Manual and tutorial" help-manual-map)) |
| 481 | (define-key help-menu-map [misc] | 481 | (define-key help-menu-map [misc] |
| 482 | (cons "Odds and ends" help-misc-map)) | 482 | (cons "@Odds and ends" help-misc-map)) |
| 483 | (define-key help-menu-map [modes] | 483 | (define-key help-menu-map [modes] |
| 484 | (cons "Modes" help-modes-map)) | 484 | (cons "@Modes" help-modes-map)) |
| 485 | (define-key help-menu-map [admin] | 485 | (define-key help-menu-map [admin] |
| 486 | (cons "Administrivia" help-admin-map)) | 486 | (cons "@Administrivia" help-admin-map)) |
| 487 | 487 | ||
| 488 | (define-key help-apropos-map "c" '("Command Apropos" . command-apropos)) | 488 | (define-key help-apropos-map "c" '("Command Apropos" . command-apropos)) |
| 489 | (define-key help-apropos-map "a" '("Apropos" . apropos)) | 489 | (define-key help-apropos-map "a" '("Apropos" . apropos)) |
diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index 3d135f83d81..fc4f4fa9da7 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el | |||
| @@ -240,12 +240,17 @@ If point is inside a comment, the current paragraph of the comment | |||
| 240 | is filled, preserving the comment indentation or line-starting decorations." | 240 | is filled, preserving the comment indentation or line-starting decorations." |
| 241 | (interactive "P") | 241 | (interactive "P") |
| 242 | (let ((first-line | 242 | (let ((first-line |
| 243 | ;; Check for obvious entry to comment. | ||
| 243 | (save-excursion | 244 | (save-excursion |
| 244 | (beginning-of-line) | 245 | (beginning-of-line) |
| 245 | (skip-chars-forward " \t") | 246 | (skip-chars-forward " \t") |
| 246 | (looking-at comment-start-skip)))) | 247 | (looking-at comment-start-skip)))) |
| 247 | (if (or first-line | 248 | (if (or first-line |
| 248 | (eq (calculate-c-indent) t)) | 249 | ;; t if we enter a comment between start of function and this line. |
| 250 | (eq (calculate-c-indent) t) | ||
| 251 | ;; See if we enter a comment between beg-of-line and here. | ||
| 252 | (nth 4 (parse-partial-sexp (save-excursion (beginning-of-line) (point)) | ||
| 253 | (point) 0))) | ||
| 249 | ;; Inside a comment: fill one comment paragraph. | 254 | ;; Inside a comment: fill one comment paragraph. |
| 250 | (let ((fill-prefix | 255 | (let ((fill-prefix |
| 251 | ;; The prefix for each line of this paragraph | 256 | ;; The prefix for each line of this paragraph |
| @@ -272,8 +277,12 @@ is filled, preserving the comment indentation or line-starting decorations." | |||
| 272 | (concat paragraph-separate | 277 | (concat paragraph-separate |
| 273 | "\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[^ \t/*]"))) | 278 | "\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[^ \t/*]"))) |
| 274 | (save-restriction | 279 | (save-restriction |
| 280 | (recursive-edit) | ||
| 275 | ;; Don't fill the comment together with the code following it. | 281 | ;; Don't fill the comment together with the code following it. |
| 276 | (narrow-to-region (point-min) | 282 | (narrow-to-region (save-excursion |
| 283 | (search-backward "/*") | ||
| 284 | (beginning-of-line) | ||
| 285 | (point)) | ||
| 277 | (save-excursion | 286 | (save-excursion |
| 278 | (search-forward "*/" nil 'move) | 287 | (search-forward "*/" nil 'move) |
| 279 | (forward-line 1) | 288 | (forward-line 1) |
| @@ -515,26 +524,41 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 515 | (save-excursion | 524 | (save-excursion |
| 516 | (re-search-backward "^[^ \^L\t\n#]" nil 'move) | 525 | (re-search-backward "^[^ \^L\t\n#]" nil 'move) |
| 517 | (let (comment lim) | 526 | (let (comment lim) |
| 518 | (if (and (looking-at "\\sw\\|\\s_") | 527 | ;; Recognize the DEFUN macro in Emacs. |
| 519 | (looking-at "[^\"\n=]*(") | 528 | (if (save-excursion |
| 520 | (progn | 529 | ;; Move down to the (putative) argnames line. |
| 521 | (goto-char (1- (match-end 0))) | 530 | (while (not (looking-at " *(")) |
| 522 | (setq lim (point)) | 531 | (forward-line 1)) |
| 523 | (forward-sexp 1) | 532 | ;; Go back to the DEFUN, if it is one. |
| 524 | (skip-chars-forward " \t\f") | 533 | (condition-case nil |
| 525 | (and (< (point) indent-point) | 534 | (backward-sexp 1) |
| 526 | (not (memq (following-char) | 535 | (error)) |
| 527 | '(?\, ?\;))))) | 536 | (beginning-of-line) |
| 528 | ;; Make sure the "function decl" we found | 537 | (setq tem (point)) |
| 529 | ;; is not inside a comment. | 538 | (looking-at "DEFUN\\b")) |
| 530 | (progn | 539 | c-argdecl-indent |
| 531 | (beginning-of-line) | 540 | (if (and (looking-at "\\sw\\|\\s_") |
| 532 | (while (and (not comment) | 541 | (looking-at "[^\"\n=]*(") |
| 533 | (search-forward "/*" lim t)) | 542 | (progn |
| 534 | (setq comment | 543 | (goto-char (1- (match-end 0))) |
| 535 | (not (search-forward "*/" lim t)))) | 544 | (setq lim (point)) |
| 536 | (not comment))) | 545 | (condition-case nil |
| 537 | c-argdecl-indent 0))))) | 546 | (forward-sexp 1) |
| 547 | (error)) | ||
| 548 | (skip-chars-forward " \t\f") | ||
| 549 | (and (< (point) indent-point) | ||
| 550 | (not (memq (following-char) | ||
| 551 | '(?\, ?\;))))) | ||
| 552 | ;; Make sure the "function decl" we found | ||
| 553 | ;; is not inside a comment. | ||
| 554 | (progn | ||
| 555 | (beginning-of-line) | ||
| 556 | (while (and (not comment) | ||
| 557 | (search-forward "/*" lim t)) | ||
| 558 | (setq comment | ||
| 559 | (not (search-forward "*/" lim t)))) | ||
| 560 | (not comment))) | ||
| 561 | c-argdecl-indent 0)))))) | ||
| 538 | basic-indent))) | 562 | basic-indent))) |
| 539 | 563 | ||
| 540 | ;; ;; Now add a little if this is a continuation line. | 564 | ;; ;; Now add a little if this is a continuation line. |