diff options
author | Miles Bader <miles@gnu.org> | 2004-12-14 07:34:55 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2004-12-14 07:34:55 +0000 |
commit | dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5 (patch) | |
tree | c3da6c32ac0401833eb29b6a4be9cf93febf248e /lisp/emacs-lisp | |
parent | 56cc8ca9b68886dc4aae4c8ef44ad5e62b59db49 (diff) | |
parent | 734c576596678065b39591128d88609bc6fc5aad (diff) | |
download | emacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.tar.gz emacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.tar.bz2 emacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.zip |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-719
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733
Update from CVS: man/calc.texi: Fix some TeX definitions.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77
Update from CVS
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 12 | ||||
-rw-r--r-- | lisp/emacs-lisp/elint.el | 158 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 38 |
3 files changed, 107 insertions, 101 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index cc2be890657..7b022e9f118 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -919,7 +919,7 @@ is the starting location. If this is nil, `point-min' is used instead." (progn (goto-char wrong) (if (not take-notes) - (error (checkdoc-error-text msg))))) + (error "%s" (checkdoc-error-text msg))))) (checkdoc-show-diagnostics) (if (interactive-p) (message "No style warnings.")))) @@ -952,7 +952,7 @@ if there is one." (e (checkdoc-file-comments-engine)) (checkdoc-generate-compile-warnings-flag (or take-notes checkdoc-generate-compile-warnings-flag))) - (if e (error (checkdoc-error-text e))) + (if e (error "%s" (checkdoc-error-text e))) (checkdoc-show-diagnostics) e)) @@ -990,7 +990,7 @@ Optional argument TAKE-NOTES causes all errors to be logged." (if (not (interactive-p)) e (if e - (error (checkdoc-error-text e)) + (error "%s" (checkdoc-error-text e)) (checkdoc-show-diagnostics))) (goto-char p)) (if (interactive-p) (message "Checking interactive message text...done."))) @@ -1033,15 +1033,15 @@ space at the end of each line." (msg (checkdoc-this-string-valid))) (if msg (if no-error (message (checkdoc-error-text msg)) - (error (checkdoc-error-text msg))) + (error "%s" (checkdoc-error-text msg))) (setq msg (checkdoc-message-text-search beg end)) (if msg (if no-error (message (checkdoc-error-text msg)) - (error (checkdoc-error-text msg))) + (error "%s" (checkdoc-error-text msg))) (setq msg (checkdoc-rogue-space-check-engine beg end)) (if msg (if no-error (message (checkdoc-error-text msg)) - (error (checkdoc-error-text msg)))))) + (error "%s" (checkdoc-error-text msg)))))) (if (interactive-p) (message "Checkdoc: done.")))))) ;;; Ispell interface for forcing a spell check diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index bf9c1d39f95..9454bfc9da3 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -50,6 +50,85 @@ "*The buffer to insert lint messages in.") ;;; +;;; Data +;;; + +(defconst elint-standard-variables + '(abbrev-mode auto-fill-function buffer-auto-save-file-name + buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format + buffer-file-name buffer-file-number buffer-file-truename + buffer-file-type buffer-invisibility-spec buffer-offer-save + buffer-read-only buffer-saved-size buffer-undo-list + cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column + default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column + header-line-format indicate-buffer-boundaries indicate-empty-lines + left-fringe-width + left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode + mark-active mark-ring mode-line-buffer-identification + mode-line-format mode-line-modified mode-line-process mode-name + overwrite-mode + point-before-scroll right-fringe-width right-margin-width + scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display + selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar) + "Standard buffer local vars.") + +(defconst elint-unknown-builtin-args + '((while test &rest forms) + (insert-before-markers-and-inherit &rest text) + (catch tag &rest body) + (and &rest args) + (funcall func &rest args) + (insert &rest args) + (vconcat &rest args) + (run-hook-with-args hook &rest args) + (message-or-box string &rest args) + (save-window-excursion &rest body) + (append &rest args) + (logior &rest args) + (progn &rest body) + (insert-and-inherit &rest args) + (message-box string &rest args) + (prog2 x y &rest body) + (prog1 first &rest body) + (insert-before-markers &rest args) + (call-process-region start end program &optional delete + destination display &rest args) + (concat &rest args) + (vector &rest args) + (run-hook-with-args-until-success hook &rest args) + (track-mouse &rest body) + (unwind-protect bodyform &rest unwindforms) + (save-restriction &rest body) + (quote arg) + (make-byte-code &rest args) + (or &rest args) + (cond &rest clauses) + (start-process name buffer program &rest args) + (run-hook-with-args-until-failure hook &rest args) + (if cond then &rest else) + (apply function &rest args) + (format string &rest args) + (encode-time second minute hour day month year zone &rest args) + (min &rest args) + (logand &rest args) + (logxor &rest args) + (max &rest args) + (list &rest args) + (message string &rest args) + (defvar symbol init doc) + (call-process program &optional infile destination display &rest args) + (with-output-to-temp-buffer bufname &rest body) + (nconc &rest args) + (save-excursion &rest body) + (run-hooks &rest hooks) + (/ x y &rest zs) + (- x &rest y) + (+ &rest args) + (* &rest args) + (interactive &optional args)) + "Those built-ins for which we can't find arguments.") + +;;; ;;; ADT: top-form ;;; @@ -724,85 +803,6 @@ If no documentation could be found args will be `unknown'." (if list list (elint-find-builtins)))) -;;; -;;; Data -;;; - -(defconst elint-standard-variables - '(abbrev-mode auto-fill-function buffer-auto-save-file-name - buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format - buffer-file-name buffer-file-number buffer-file-truename - buffer-file-type buffer-invisibility-spec buffer-offer-save - buffer-read-only buffer-saved-size buffer-undo-list - cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column - default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column - header-line-format indicate-buffer-boundaries indicate-empty-lines - left-fringe-width - left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode - mark-active mark-ring mode-line-buffer-identification - mode-line-format mode-line-modified mode-line-process mode-name - overwrite-mode - point-before-scroll right-fringe-width right-margin-width - scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display - selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar) - "Standard buffer local vars.") - -(defconst elint-unknown-builtin-args - '((while test &rest forms) - (insert-before-markers-and-inherit &rest text) - (catch tag &rest body) - (and &rest args) - (funcall func &rest args) - (insert &rest args) - (vconcat &rest args) - (run-hook-with-args hook &rest args) - (message-or-box string &rest args) - (save-window-excursion &rest body) - (append &rest args) - (logior &rest args) - (progn &rest body) - (insert-and-inherit &rest args) - (message-box string &rest args) - (prog2 x y &rest body) - (prog1 first &rest body) - (insert-before-markers &rest args) - (call-process-region start end program &optional delete - destination display &rest args) - (concat &rest args) - (vector &rest args) - (run-hook-with-args-until-success hook &rest args) - (track-mouse &rest body) - (unwind-protect bodyform &rest unwindforms) - (save-restriction &rest body) - (quote arg) - (make-byte-code &rest args) - (or &rest args) - (cond &rest clauses) - (start-process name buffer program &rest args) - (run-hook-with-args-until-failure hook &rest args) - (if cond then &rest else) - (apply function &rest args) - (format string &rest args) - (encode-time second minute hour day month year zone &rest args) - (min &rest args) - (logand &rest args) - (logxor &rest args) - (max &rest args) - (list &rest args) - (message string &rest args) - (defvar symbol init doc) - (call-process program &optional infile destination display &rest args) - (with-output-to-temp-buffer bufname &rest body) - (nconc &rest args) - (save-excursion &rest body) - (run-hooks &rest hooks) - (/ x y &rest zs) - (- x &rest y) - (+ &rest args) - (* &rest args) - (interactive &optional args)) - "Those built-ins for which we can't find arguments.") - (provide 'elint) ;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 87b3fcff96c..090f793c700 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -73,17 +73,18 @@ move forward across N balanced expressions." "Set mark ARG sexps from point. The place mark goes is the same place \\[forward-sexp] would move to with the same argument. -If this command is repeated, it marks the next ARG sexps after the ones -already marked." +If this command is repeated or mark is active in Transient Mark mode, +it marks the next ARG sexps after the ones already marked." (interactive "P") - (cond ((and (eq last-command this-command) (mark t)) + (cond ((or (and (eq last-command this-command) (mark t)) + (and transient-mark-mode mark-active)) (setq arg (if arg (prefix-numeric-value arg) - (if (> (mark) (point)) 1 -1))) + (if (< (mark) (point)) -1 1))) (set-mark (save-excursion - (goto-char (mark)) - (forward-sexp arg) - (point)))) + (goto-char (mark)) + (forward-sexp arg) + (point)))) (t (push-mark (save-excursion @@ -191,9 +192,11 @@ open-parenthesis, and point ends up at the beginning of the line. If variable `beginning-of-defun-function' is non-nil, its value is called as a function to find the defun's beginning." (interactive "p") - (and (eq this-command 'beginning-of-defun) - (or inhibit-mark-movement (eq last-command 'beginning-of-defun) - (push-mark))) + (or inhibit-mark-movement + (not (eq this-command 'beginning-of-defun)) + (eq last-command 'beginning-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) (and (beginning-of-defun-raw arg) (progn (beginning-of-line) t))) @@ -242,9 +245,11 @@ matches the open-parenthesis that starts a defun; see function If variable `end-of-defun-function' is non-nil, its value is called as a function to find the defun's end." (interactive "p") - (and (eq this-command 'end-of-defun) - (or inhibit-mark-movement (eq last-command 'end-of-defun) - (push-mark))) + (or inhibit-mark-movement + (not (eq this-command 'end-of-defun)) + (eq last-command 'end-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) (if (or (null arg) (= arg 0)) (setq arg 1)) (if end-of-defun-function (if (> arg 0) @@ -289,10 +294,11 @@ is called as a function to find the defun's end." (defun mark-defun () "Put mark at end of this defun, point at beginning. The defun marked is the one that contains point or follows point. -If this command is repeated, marks more defuns after the ones -already marked." +If this command is repeated or mark is active in Transient Mark mode, +it marks more defuns after the ones already marked." (interactive) - (cond ((and (eq last-command this-command) (mark t)) + (cond ((or (and (eq last-command this-command) (mark t)) + (and transient-mark-mode mark-active)) (set-mark (save-excursion (goto-char (mark)) |