diff options
| author | Kenichi Handa | 2010-05-14 13:15:58 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-05-14 13:15:58 +0900 |
| commit | ccd3ce49e08b4f0c0e1bcbb34e9055ca4002e21c (patch) | |
| tree | 0f53c077154c7cd5f05b339d91905dfd2391679d /lisp/progmodes | |
| parent | 82ebc97b11a369303345927c98e7bc69928c9117 (diff) | |
| parent | 508197067c434b0111bcb6ded742d424bb738ece (diff) | |
| download | emacs-ccd3ce49e08b4f0c0e1bcbb34e9055ca4002e21c.tar.gz emacs-ccd3ce49e08b4f0c0e1bcbb34e9055ca4002e21c.zip | |
merge trunk
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 56fc8032541..10267a6b2dc 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -1501,6 +1501,11 @@ defun." | |||
| 1501 | (interactive "p") | 1501 | (interactive "p") |
| 1502 | (or arg (setq arg 1)) | 1502 | (or arg (setq arg 1)) |
| 1503 | 1503 | ||
| 1504 | (or (not (eq this-command 'c-beginning-of-defun)) | ||
| 1505 | (eq last-command 'c-beginning-of-defun) | ||
| 1506 | (and transient-mark-mode mark-active) | ||
| 1507 | (push-mark)) | ||
| 1508 | |||
| 1504 | (c-save-buffer-state | 1509 | (c-save-buffer-state |
| 1505 | (beginning-of-defun-function end-of-defun-function | 1510 | (beginning-of-defun-function end-of-defun-function |
| 1506 | (start (point)) | 1511 | (start (point)) |
| @@ -1604,6 +1609,11 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'." | |||
| 1604 | (interactive "p") | 1609 | (interactive "p") |
| 1605 | (or arg (setq arg 1)) | 1610 | (or arg (setq arg 1)) |
| 1606 | 1611 | ||
| 1612 | (or (not (eq this-command 'c-end-of-defun)) | ||
| 1613 | (eq last-command 'c-end-of-defun) | ||
| 1614 | (and transient-mark-mode mark-active) | ||
| 1615 | (push-mark)) | ||
| 1616 | |||
| 1607 | (c-save-buffer-state | 1617 | (c-save-buffer-state |
| 1608 | (beginning-of-defun-function end-of-defun-function | 1618 | (beginning-of-defun-function end-of-defun-function |
| 1609 | (start (point)) | 1619 | (start (point)) |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 610fa14489a..eca6d5fbe7b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1480,7 +1480,7 @@ frequently editing existing scripts with different styles.") | |||
| 1480 | ;; mode-command and utility functions | 1480 | ;; mode-command and utility functions |
| 1481 | 1481 | ||
| 1482 | ;;;###autoload | 1482 | ;;;###autoload |
| 1483 | (defun sh-mode () | 1483 | (define-derived-mode sh-mode prog-mode "Shell-script" |
| 1484 | "Major mode for editing shell scripts. | 1484 | "Major mode for editing shell scripts. |
| 1485 | This mode works for many shells, since they all have roughly the same syntax, | 1485 | This mode works for many shells, since they all have roughly the same syntax, |
| 1486 | as far as commands, arguments, variables, pipes, comments etc. are concerned. | 1486 | as far as commands, arguments, variables, pipes, comments etc. are concerned. |
| @@ -1533,11 +1533,6 @@ indicate what shell it is use `sh-alias-alist' to translate. | |||
| 1533 | 1533 | ||
| 1534 | If your shell gives error messages with line numbers, you can use \\[executable-interpret] | 1534 | If your shell gives error messages with line numbers, you can use \\[executable-interpret] |
| 1535 | with your script for an edit-interpret-debug cycle." | 1535 | with your script for an edit-interpret-debug cycle." |
| 1536 | (interactive) | ||
| 1537 | (kill-all-local-variables) | ||
| 1538 | (setq major-mode 'sh-mode | ||
| 1539 | mode-name "Shell-script") | ||
| 1540 | (use-local-map sh-mode-map) | ||
| 1541 | (make-local-variable 'skeleton-end-hook) | 1536 | (make-local-variable 'skeleton-end-hook) |
| 1542 | (make-local-variable 'paragraph-start) | 1537 | (make-local-variable 'paragraph-start) |
| 1543 | (make-local-variable 'paragraph-separate) | 1538 | (make-local-variable 'paragraph-separate) |
| @@ -1613,8 +1608,7 @@ with your script for an edit-interpret-debug cycle." | |||
| 1613 | "sh") | 1608 | "sh") |
| 1614 | (t | 1609 | (t |
| 1615 | sh-shell-file)) | 1610 | sh-shell-file)) |
| 1616 | nil nil) | 1611 | nil nil)) |
| 1617 | (run-mode-hooks 'sh-mode-hook)) | ||
| 1618 | 1612 | ||
| 1619 | ;;;###autoload | 1613 | ;;;###autoload |
| 1620 | (defalias 'shell-script-mode 'sh-mode) | 1614 | (defalias 'shell-script-mode 'sh-mode) |