From eb5c9d4f9a96c9089c3c48111fb0652d84ff187e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 4 Aug 2007 02:31:05 +0000 Subject: (cperl-compilation-error-regexp-alist): Remove duplicate defvar preventing initialization. (cperl-mode): Fix compilation-error-regexp-alist-alist setting. --- lisp/progmodes/cperl-mode.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index d1dc0e875c4..3badfed5d4f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1497,9 +1497,16 @@ the last)." (defvar cperl-use-major-mode 'cperl-mode) (defvar cperl-font-lock-multiline-start nil) (defvar cperl-font-lock-multiline nil) -(defvar cperl-compilation-error-regexp-alist nil) (defvar cperl-font-locking nil) +;; NB as it stands the code in cperl-mode assumes this only has one +;; element. If Xemacs 19 support were dropped, this could all be simplified. +(defvar cperl-compilation-error-regexp-alist + ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). + '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" + 2 3)) + "Alist that specifies how to match errors in perl output.") + ;;;###autoload (defun cperl-mode () "Major mode for editing Perl code. @@ -1786,7 +1793,7 @@ or as help on variables `cperl-tips', `cperl-problems', (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x (make-local-variable 'compilation-error-regexp-alist-alist) (set 'compilation-error-regexp-alist-alist - (cons (cons 'cperl cperl-compilation-error-regexp-alist) + (cons (cons 'cperl (car cperl-compilation-error-regexp-alist)) (symbol-value 'compilation-error-regexp-alist-alist))) (if (fboundp 'compilation-build-compilation-error-regexp-alist) (let ((f 'compilation-build-compilation-error-regexp-alist)) @@ -5702,13 +5709,6 @@ indentation and initial hashes. Behaves usually outside of comment." (t 5))) ; should not happen -(defvar cperl-compilation-error-regexp-alist - ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). - '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" - 2 3)) - "Alist that specifies how to match errors in perl output.") - - (defun cperl-windowed-init () "Initialization under windowed version." (cond ((featurep 'ps-print) -- cgit v1.2.3 From e9bfd3a3f9953520b99e4dac4cc0e59b6a9fc83c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 4 Aug 2007 02:32:43 +0000 Subject: (cperl-compilation-error-regexp-alist): Remove duplicate defvar preventing initialization. (cperl-mode): Fix compilation-error-regexp-alist-alist setting. --- lisp/progmodes/cperl-mode.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index d1dc0e875c4..3badfed5d4f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1497,9 +1497,16 @@ the last)." (defvar cperl-use-major-mode 'cperl-mode) (defvar cperl-font-lock-multiline-start nil) (defvar cperl-font-lock-multiline nil) -(defvar cperl-compilation-error-regexp-alist nil) (defvar cperl-font-locking nil) +;; NB as it stands the code in cperl-mode assumes this only has one +;; element. If Xemacs 19 support were dropped, this could all be simplified. +(defvar cperl-compilation-error-regexp-alist + ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). + '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" + 2 3)) + "Alist that specifies how to match errors in perl output.") + ;;;###autoload (defun cperl-mode () "Major mode for editing Perl code. @@ -1786,7 +1793,7 @@ or as help on variables `cperl-tips', `cperl-problems', (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x (make-local-variable 'compilation-error-regexp-alist-alist) (set 'compilation-error-regexp-alist-alist - (cons (cons 'cperl cperl-compilation-error-regexp-alist) + (cons (cons 'cperl (car cperl-compilation-error-regexp-alist)) (symbol-value 'compilation-error-regexp-alist-alist))) (if (fboundp 'compilation-build-compilation-error-regexp-alist) (let ((f 'compilation-build-compilation-error-regexp-alist)) @@ -5702,13 +5709,6 @@ indentation and initial hashes. Behaves usually outside of comment." (t 5))) ; should not happen -(defvar cperl-compilation-error-regexp-alist - ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). - '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" - 2 3)) - "Alist that specifies how to match errors in perl output.") - - (defun cperl-windowed-init () "Initialization under windowed version." (cond ((featurep 'ps-print) -- cgit v1.2.3 From b14d552b33dcf0a2b85d91e7b385a07585a141b4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 7 Aug 2007 17:00:44 +0000 Subject: (tcl-indent-level, tcl-continued-indent-level): Add safe-local-variable prop. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/tcl.el | 2 ++ 2 files changed, 7 insertions(+) (limited to 'lisp/progmodes') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 147d95e2c54..8d25f687b2b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-07 Tom Tromey + + * progmodes/tcl.el (tcl-indent-level, tcl-continued-indent-level): + Add safe-local-variable property. + 2007-08-07 Chong Yidong * image-mode.el (image-toggle-display): Use image-refresh. diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index c7576a27114..f9fd7beffd2 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -126,11 +126,13 @@ "*Indentation of Tcl statements with respect to containing block." :type 'integer :group 'tcl) +(put 'tcl-indent-level 'safe-local-variable 'integerp) (defcustom tcl-continued-indent-level 4 "*Indentation of continuation line relative to first line of command." :type 'integer :group 'tcl) +(put 'tcl-continued-indent-level 'safe-local-variable 'integerp) (defcustom tcl-auto-newline nil "*Non-nil means automatically newline before and after braces you insert." -- cgit v1.2.3 From c94d5f81aaef23672bf1be040c9388f8fe9f88e5 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Tue, 7 Aug 2007 20:10:15 +0000 Subject: (compilation-start): Pass nil as startfile to comint-exec. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/compile.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e7387459f25..8574be35565 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-07 Sam Steingold + + * progmodes/compile.el (compilation-start): Pass nil as startfile + to comint-exec. + 2007-08-07 Chong Yidong * longlines.el (longlines-decoded): New variable. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index caf0e94b927..d7283037b6f 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -170,7 +170,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (maven ;; Maven is a popular build tool for Java. Maven is Free Software. "\\(.*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]" 1 2 3) - + (bash "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) @@ -1136,7 +1136,7 @@ Returns the compilation buffer created." (if (file-remote-p default-directory) "/bin/sh" shell-file-name) - `("-c" ,command)))) + nil `("-c" ,command)))) (start-file-process-shell-command (downcase mode-name) outbuf command)))) ;; Make the buffer's mode line show process state. -- cgit v1.2.3 From 0dad3dfecc893cb8807154f8d6e5559e922ddc72 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 8 Aug 2007 05:57:54 +0000 Subject: (compilation-set-window-height): Use window-full-width-p instead of comparing frame-width and window-width. (compilation-find-buffer): Remove extra argument in call to compilation-buffer-internal-p. --- lisp/progmodes/compile.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 529194ffa7e..fcb20ede56d 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1153,7 +1153,7 @@ exited abnormally with code %d\n" "Set the height of WINDOW according to `compilation-window-height'." (let ((height (buffer-local-value 'compilation-window-height (window-buffer window)))) (and height - (= (window-width window) (frame-width (window-frame window))) + (window-full-width-p window) ;; If window is alone in its frame, aside from a minibuffer, ;; don't change its height. (not (eq window (frame-root-window (window-frame window)))) @@ -1611,12 +1611,10 @@ Use this command in a compilation log buffer. Sets the mark at point there." (defun compilation-find-buffer (&optional avoid-current) "Return a compilation buffer. -If AVOID-CURRENT is nil, and -the current buffer is a compilation buffer, return it. -If AVOID-CURRENT is non-nil, return the current buffer -only as a last resort." - (if (and (compilation-buffer-internal-p (current-buffer)) - (not avoid-current)) +If AVOID-CURRENT is nil, and the current buffer is a compilation buffer, +return it. If AVOID-CURRENT is non-nil, return the current buffer only +as a last resort." + (if (and (compilation-buffer-internal-p) (not avoid-current)) (current-buffer) (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))) -- cgit v1.2.3 From e7f767c25e3d7abd0a456c838d8c1747649aebff Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:34:30 +0000 Subject: Replace `iff' in doc-strings and comments. --- lisp/ChangeLog | 6 ++++++ lisp/gnus/gmm-utils.el | 2 +- lisp/gnus/gnus-async.el | 2 +- lisp/gnus/gnus-msg.el | 8 ++++---- lisp/gnus/gnus-score.el | 2 +- lisp/gnus/gnus-util.el | 2 +- lisp/gnus/imap.el | 2 +- lisp/gnus/mailcap.el | 6 +++--- lisp/gnus/nnimap.el | 2 +- lisp/net/tramp.el | 4 ++-- lisp/obsolete/fast-lock.el | 2 +- lisp/progmodes/antlr-mode.el | 6 +++--- lisp/progmodes/cc-awk.el | 2 +- lisp/progmodes/cc-engine.el | 2 +- lisp/progmodes/cc-vars.el | 2 +- lisp/progmodes/cperl-mode.el | 4 ++-- lisp/progmodes/cpp.el | 6 ++++-- lisp/progmodes/etags.el | 8 ++++---- lisp/progmodes/fortran.el | 2 +- lisp/progmodes/gdb-ui.el | 12 ++++++++---- lisp/progmodes/gud.el | 2 +- lisp/progmodes/hideshow.el | 6 +++--- lisp/progmodes/octave-mod.el | 10 +++++----- lisp/progmodes/python.el | 8 ++++---- lisp/progmodes/which-func.el | 2 +- lisp/progmodes/xscheme.el | 4 ++-- 26 files changed, 63 insertions(+), 51 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a40681aba8..65df7d26b15 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-08 Glenn Morris + + * emacs-lisp/checkdoc.el (checkdoc-ispell-lisp-words): Remove `iff'. + + * Replace `iff' in doc-strings and comments. + 2007-08-08 Martin Rudalics * dired.el (dired-pop-to-buffer): diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index d7e3c344b0e..71a0662f35a 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el @@ -79,7 +79,7 @@ ARGS are passed to `message'." ;;;###autoload (defun gmm-widget-p (symbol) - "Non-nil iff SYMBOL is a widget." + "Non-nil if SYMBOL is a widget." (get symbol 'widget-type)) ;; Copy of the `nnmail-lazy' code from `nnmail.el': diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 3493d51950d..a06724855c5 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el @@ -320,7 +320,7 @@ It should return non-nil if the article is to be prefetched." (pop alist)))))) (defun gnus-async-prefetched-article-entry (group article) - "Return the entry for ARTICLE in GROUP iff it has been prefetched." + "Return the entry for ARTICLE in GROUP if it has been prefetched." (let ((entry (save-excursion (gnus-async-set-buffer) (assq (intern (format "%s-%d" group article) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index c9aedab7019..f8e4a7a67d0 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -260,15 +260,15 @@ See also the `mml-default-encrypt-method' variable." This is done because new users often reply by mistake when reading news. This can also be a function receiving the group name as the only -parameter which should return non-nil iff a confirmation is needed, or -a regexp, in which case a confirmation is asked for iff the group name +parameter, which should return non-nil if a confirmation is needed; or +a regexp, in which case a confirmation is asked for if the group name matches the regexp." :version "22.1" :group 'gnus-message :type '(choice (const :tag "No" nil) (const :tag "Yes" t) - (regexp :tag "Iff group matches regexp") - (function :tag "Iff function evaluates to non-nil"))) + (regexp :tag "If group matches regexp") + (function :tag "If function evaluates to non-nil"))) (defcustom gnus-confirm-treat-mail-like-news nil diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index e833c8ccc6a..f7ba9222937 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -381,7 +381,7 @@ If nil, the user will be asked for a match type." (const :tag "ask" nil))) (defcustom gnus-score-default-fold nil - "Use case folding for new score file entries iff not nil." + "Non-nil means use case folding for new score file entries." :group 'gnus-score-default :type 'boolean) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index d065acd75ea..74aacdd2860 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1108,7 +1108,7 @@ Return the modified alist." `(setq ,alist (delq (,fun ,key ,alist) ,alist)))) (defun gnus-globalify-regexp (re) - "Return a regexp that matches a whole line, iff RE matches a part of it." + "Return a regexp that matches a whole line, if RE matches a part of it." (concat (unless (string-match "^\\^" re) "^.*") re (unless (string-match "\\$$" re) ".*$"))) diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index abe1c7e1c9e..f60801e9ba8 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -1581,7 +1581,7 @@ is non-nil return these properties." (imap-mailbox-get-1 'search imap-current-mailbox))))) (defun imap-message-flag-permanent-p (flag &optional mailbox buffer) - "Return t iff FLAG can be permanently (between IMAP sessions) saved on articles, in MAILBOX on server in BUFFER." + "Return t if FLAG can be permanently (between IMAP sessions) saved on articles, in MAILBOX on server in BUFFER." (with-current-buffer (or buffer (current-buffer)) (or (member "\\*" (imap-mailbox-get 'permanentflags mailbox)) (member flag (imap-mailbox-get 'permanentflags mailbox))))) diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 422b99d0e0f..e8b624aa546 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -538,7 +538,7 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus results))) (defun mailcap-mailcap-entry-passes-test (info) - "Return non-nil iff mailcap entry INFO passes its test clause. + "Return non-nil if mailcap entry INFO passes its test clause. Also return non-nil if no test clause is present." (let ((test (assq 'test info)) ; The test clause status) @@ -631,7 +631,7 @@ Also return non-nil if no test clause is present." (defvar mailcap-viewer-test-cache nil) (defun mailcap-viewer-passes-test (viewer-info type-info) - "Return non-nil iff viewer specified by VIEWER-INFO passes its test clause. + "Return non-nil if viewer specified by VIEWER-INFO passes its test clause. Also return non-nil if it has no test clause. TYPE-INFO is an argument to supply to the test." (let* ((test-info (assq 'test viewer-info)) @@ -704,7 +704,7 @@ If TEST is not given, it defaults to t." ;;; (defun mailcap-viewer-lessp (x y) - "Return t iff viewer X is more desirable than viewer Y." + "Return t if viewer X is more desirable than viewer Y." (let ((x-wild (string-match "[*?]" (or (cdr-safe (assq 'type x)) ""))) (y-wild (string-match "[*?]" (or (cdr-safe (assq 'type y)) ""))) (x-lisp (not (stringp (or (cdr-safe (assq 'viewer x)) "")))) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 235039c3ee9..ba23280658a 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1645,7 +1645,7 @@ be used in a STORE FLAGS command." result))) (defun nnimap-mark-permanent-p (mark &optional group) - "Return t iff MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." + "Return t if MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) (when nnimap-debug diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 09167d674eb..33026451722 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2436,7 +2436,7 @@ target of the symlink differ." res-size ;; 8. File modes, as a string of ten letters or dashes as in ls -l. res-filemodes - ;; 9. t iff file's gid would change if file were deleted and + ;; 9. t if file's gid would change if file were deleted and ;; recreated. Will be set in `tramp-convert-file-attributes' t ;; 10. inode number. @@ -7028,7 +7028,7 @@ Not actually used. Use `(format \"%o\" i)' instead?" (and (tramp-file-name-p obj) (aref obj 4))) (defun tramp-tramp-file-p (name) - "Return t iff NAME is a tramp file." + "Return t if NAME is a tramp file." (save-match-data (string-match tramp-file-name-regexp name))) diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index a2405b0edb2..569771143e3 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -523,7 +523,7 @@ See `fast-lock-cache-directories'." ;; Just a directory. directory) (t - ;; A directory iff the file name matches the regexp. + ;; A directory if the file name matches the regexp. (let ((bufile (expand-file-name buffer-file-truename)) (case-fold-search nil)) (when (save-match-data (string-match (car directory) bufile)) diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 7fbeeab6eea..594b628ad44 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -568,7 +568,7 @@ The standard value contains the following functions as READ-FN: general value, or `antlr-read-boolean' with ARGs = \(PROMPT TABLE) which reads a boolean value or a member of TABLE. PROMPT is the prompt when asking for a new value. If non-nil, TABLE is a table for completion or -a function evaluating to such a table. The return value is quoted iff +a function evaluating to such a table. The return value is quoted if AS-STRING is non-nil and is either t or a symbol which is a member of `antlr-options-style'.") @@ -2203,8 +2203,8 @@ part SUPER in the result of `antlr-file-dependencies'. CLASSES is the part \(CLASS-SPEC ...) in the result of `antlr-directory-dependencies'. The result looks like \(OPTION WITH-UNKNOWN GLIB ...). OPTION is the -complete \"-glib\" option. WITH-UNKNOWN has value t iff there is none -or more than one grammar file for at least one super grammar. +complete \"-glib\" option. WITH-UNKNOWN is t if there is none or more +than one grammar file for at least one super grammar. Each GLIB looks like \(GRAMMAR-FILE \. EVOCAB). GRAMMAR-FILE is a file in which a super-grammar is defined. EVOCAB is the value of the export diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 997e6c44f1a..33467671170 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -478,7 +478,7 @@ (defun c-awk-get-NL-prop-prev-line (&optional do-lim) ;; Get the c-awk-NL-prop text-property from the previous line, calculating - ;; it if necessary. Return nil iff we're already at BOB. + ;; it if necessary. Return nil if we're at BOB. ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM. ;; ;; This function might do hidden buffer changes. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 44463a07f15..97dcc61460f 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -5116,7 +5116,7 @@ comment at the start of cc-engine.el for more info." ;; Foo::Foo (int b) : Base (b) {} ;; car ^ ^ point ;; - ;; The cdr of the return value is non-nil iff a + ;; The cdr of the return value is non-nil if a ;; `c-typedef-decl-kwds' specifier is found in the declaration, ;; i.e. the declared identifier(s) are types. ;; diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index a80833c0043..76b0e5a898c 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -186,7 +186,7 @@ the value set here overrides the style system (there is a variable (bq-process type))))))))) (defun c-valid-offset (offset) - "Return non-nil iff OFFSET is a valid offset for a syntactic symbol. + "Return non-nil if OFFSET is a valid offset for a syntactic symbol. See `c-offsets-alist'." (or (eq offset '+) (eq offset '-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 3badfed5d4f..cd7dabb8825 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3558,7 +3558,7 @@ modify syntax-type text property if the situation is too hard." (modify-syntax-entry starter (if (eq starter ?\\) "\\" ".") st) (if ender (modify-syntax-entry ender "." st)))) ;; i: have 2 args, after end of the first arg - ;; i2: start of the second arg, if any (before delim iff `ender'). + ;; i2: start of the second arg, if any (before delim if `ender'). ;; ender: the last arg bounded by parens-like chars, the second one of them ;; starter: the starting delimiter of the first arg ;; go-forward: has 2 args, and the second part is empty @@ -8090,7 +8090,7 @@ prototype \\&SUB Returns prototype of the function given a reference. (defun cperl-beautify-regexp-piece (b e embed level) ;; b is before the starting delimiter, e before the ending ;; e should be a marker, may be changed, but remains "correct". - ;; EMBED is nil iff we process the whole REx. + ;; EMBED is nil if we process the whole REx. ;; The REx is guaranteed to have //x ;; LEVEL shows how many levels deep to go ;; position at enter and at leave is not defined diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index e85c4752412..05b8b59c00f 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -623,7 +623,8 @@ You can also use the keyboard accelerators indicated like this: [K]ey." (defun cpp-edit-toggle-known (arg) "Toggle writable status for known conditionals. -With optional argument ARG, make them writable iff ARG is positive." +With optional argument ARG, make them writable if ARG is positive, +otherwise make them unwritable." (interactive "@P") (if (or (and (null arg) cpp-known-writable) (<= (prefix-numeric-value arg) 0)) @@ -633,7 +634,8 @@ With optional argument ARG, make them writable iff ARG is positive." (defun cpp-edit-toggle-unknown (arg) "Toggle writable status for unknown conditionals. -With optional argument ARG, make them writable iff ARG is positive." +With optional argument ARG, make them writable if ARG is positive, +otherwise make them unwritable." (interactive "@P") (if (or (and (null arg) cpp-unknown-writable) (<= (prefix-numeric-value arg) 0)) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 196c22b4a08..96af63849a4 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -256,10 +256,10 @@ One argument, the tag info returned by `snarf-tag-function'.") (defvar tags-included-tables-function nil "Function to do the work of `tags-included-tables' (which see).") (defvar verify-tags-table-function nil - "Function to return t iff current buffer contains valid tags file.") + "Function to return t if current buffer contains valid tags file.") ;; Initialize the tags table in the current buffer. -;; Returns non-nil iff it is a valid tags table. On +;; Returns non-nil if it is a valid tags table. On ;; non-nil return, the tags table state variable are ;; made buffer-local and initialized to nil. (defun initialize-new-tags-table () @@ -417,7 +417,7 @@ file the tag was in." (defun tags-verify-table (file) "Read FILE into a buffer and verify that it is a valid tags table. Sets the current buffer to one visiting FILE (if it exists). -Returns non-nil iff it is a valid table." +Returns non-nil if it is a valid table." (if (get-file-buffer file) ;; The file is already in a buffer. Check for the visited file ;; having changed since we last used it. @@ -1219,8 +1219,8 @@ where they were found." (verify-tags-table-function . etags-verify-tags-table) )))) -;; Return non-nil iff the current buffer is a valid etags TAGS file. (defun etags-verify-tags-table () + "Return non-nil if the current buffer is a valid etags TAGS file." ;; Use eq instead of = in case char-after returns nil. (eq (char-after (point-min)) ?\f)) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index b9865613765..16992c54523 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1763,7 +1763,7 @@ If ALL is nil, only match comments that start in column > 0." ;; From: ralf@up3aud1.gwdg.de (Ralf Fassel) ;; Test if TAB format continuation lines work. (defun fortran-is-in-string-p (where) - "Return non-nil iff WHERE (a buffer position) is inside a Fortran string." + "Return non-nil if WHERE (a buffer position) is inside a Fortran string." (save-excursion (goto-char where) (cond diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 8f6be334465..c4d14462245 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -347,7 +347,8 @@ for `gdba'." (defun gdb-many-windows (arg) "Toggle the number of windows in the basic arrangement. -With arg, display additional buffers iff arg is positive." +With prefix argument ARG, display additional buffers if ARG is positive, +otherwise use a single window." (interactive "P") (setq gdb-many-windows (if (null arg) @@ -363,7 +364,8 @@ With arg, display additional buffers iff arg is positive." (defun gdb-use-separate-io-buffer (arg) "Toggle separate IO for debugged program. -With arg, use separate IO iff arg is positive." +With prefix argument ARG, use separate IO if ARG is positive, +otherwise do not." (interactive "P") (setq gdb-use-separate-io-buffer (if (null arg) @@ -664,7 +666,8 @@ line, and no execution takes place." (defun gdb-speedbar-auto-raise (arg) "Toggle automatic raising of the speedbar for watch expressions. -With arg, automatically raise speedbar iff arg is positive." +With prefix argument ARG, automatically raise speedbar if ARG is +positive, otherwise don't automatically raise it." (interactive "P") (setq gdb-speedbar-auto-raise (if (null arg) @@ -1381,7 +1384,8 @@ directives." (defun gdb-find-source-frame (arg) "Toggle trying to find a source frame further up stack. -With arg, look for a source frame further up stack iff arg is positive." +With prefix argument ARG, look for a source frame further up +stack if ARG is positive, otherwise don't look further up." (interactive "P") (setq gdb-find-source-frame (if (null arg) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ec5b901f691..06bdd6a0b5f 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3353,7 +3353,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") (defun gud-tooltip-dereference (&optional arg) "Toggle whether tooltips should show `* expr' or `expr'. -With arg, dereference expr iff arg is positive." +With arg, dereference expr if ARG is positive, otherwise do not derereference." (interactive "P") (setq gud-tooltip-dereference (if (null arg) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 3f2580a5d4b..fb990d6bf3a 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -262,7 +262,7 @@ One of the following symbols: t -- open both code and comment blocks nil -- open neither code nor comment blocks -This has effect iff `search-invisible' is set to `open'." +This has effect only if `search-invisible' is set to `open'." :type '(choice (const :tag "open only code blocks" code) (const :tag "open only comment blocks" comment) (const :tag "open both code and comment blocks" t) @@ -515,7 +515,7 @@ Optional arg REPOS-END means reposition at end." (goto-char (if repos-end end beg))) (defun hs-hide-block-at-point (&optional end comment-reg) - "Hide block iff on block beginning. + "Hide block if on block beginning. Optional arg END means reposition at end. Optional arg COMMENT-REG is a list of the form (BEGIN END) and specifies the limits of the comment, or nil if the block is not @@ -679,7 +679,7 @@ Return point, or nil if original point was not in a block." (goto-char maxp)) (defmacro hs-life-goes-on (&rest body) - "Evaluate BODY forms iff variable `hs-minor-mode' is non-nil. + "Evaluate BODY forms if variable `hs-minor-mode' is non-nil. In the dynamic context of this macro, `inhibit-point-motion-hooks' and `case-fold-search' are both t." `(when hs-minor-mode diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index adc1b44edaa..3da3434cda2 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -567,24 +567,24 @@ including a reproducible test case and send the message." (describe-function major-mode)) (defsubst octave-in-comment-p () - "Returns t if point is inside an Octave comment, nil otherwise." + "Return t if point is inside an Octave comment." (interactive) (save-excursion (nth 4 (parse-partial-sexp (line-beginning-position) (point))))) (defsubst octave-in-string-p () - "Returns t if point is inside an Octave string, nil otherwise." + "Return t if point is inside an Octave string." (interactive) (save-excursion (nth 3 (parse-partial-sexp (line-beginning-position) (point))))) (defsubst octave-not-in-string-or-comment-p () - "Returns t iff point is not inside an Octave string or comment." + "Return t if point is not inside an Octave string or comment." (let ((pps (parse-partial-sexp (line-beginning-position) (point)))) (not (or (nth 3 pps) (nth 4 pps))))) (defun octave-in-block-p () - "Returns t if point is inside an Octave block, nil otherwise. + "Return t if point is inside an Octave block. The block is taken to start at the first letter of the begin keyword and to end after the end keyword." (let ((pos (point))) @@ -599,7 +599,7 @@ to end after the end keyword." (< pos (point))))) (defun octave-in-defun-p () - "Returns t iff point is inside an Octave function declaration. + "Return t if point is inside an Octave function declaration. The function is taken to start at the `f' of `function' and to end after the end keyword." (let ((pos (point))) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ca18f772970..7c1abaf223d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -348,7 +348,7 @@ comments and strings, or that point is within brackets/parens." (error nil)))))))) (defun python-comment-line-p () - "Return non-nil iff current line has only a comment." + "Return non-nil if current line has only a comment." (save-excursion (end-of-line) (when (eq 'comment (syntax-ppss-context (syntax-ppss))) @@ -356,7 +356,7 @@ comments and strings, or that point is within brackets/parens." (looking-at (rx (or (syntax comment-start) line-end)))))) (defun python-blank-line-p () - "Return non-nil iff current line is blank." + "Return non-nil if current line is blank." (save-excursion (beginning-of-line) (looking-at "\\s-*$"))) @@ -850,7 +850,7 @@ multi-line bracketed expressions." "Skip out of any nested brackets. Skip forward if FORWARD is non-nil, else backward. If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. -Return non-nil iff skipping was done." +Return non-nil if skipping was done." (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) (forward (if forward -1 1))) (unless (zerop depth) @@ -1191,7 +1191,7 @@ local value.") (define-key map "\C-c\C-l" 'python-load-file) (define-key map "\C-c\C-v" 'python-check) ;; Note that we _can_ still use these commands which send to the - ;; Python process even at the prompt iff we have a normal prompt, + ;; Python process even at the prompt provided we have a normal prompt, ;; i.e. '>>> ' and not '... '. See the comment before ;; python-send-region. Fixme: uncomment these if we address that. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 922de2d54c6..7d953be1d5c 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -232,7 +232,7 @@ It creates the Imenu index for the buffer, if necessary." When Which Function mode is enabled, the current function name is continuously displayed in the mode line, in certain major modes. -With prefix ARG, turn Which Function mode on iff arg is positive, +With prefix ARG, turn Which Function mode on if arg is positive, and off otherwise." :global t :group 'which-func (if which-function-mode diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 0beca9e985e..a820ca4cede 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -868,7 +868,7 @@ Control returns to the top level rep loop." (sleep-for 1))) (defun xscheme-process-running-p () - "True iff there is a Scheme process whose status is `run'." + "True if there is a Scheme process whose status is `run'." (let ((process (get-process xscheme-process-name))) (and process (eq (process-status process) 'run)))) @@ -882,7 +882,7 @@ Control returns to the top level rep loop." (and buffer (get-buffer-window buffer)))) (defun xscheme-process-buffer-current-p () - "True iff the current buffer is the Scheme process buffer." + "True if the current buffer is the Scheme process buffer." (eq (xscheme-process-buffer) (current-buffer))) ;;;; Process Filter Operations -- cgit v1.2.3 From be9471017088eaf3e7bde1c042c299079336d235 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 11 Aug 2007 03:02:05 +0000 Subject: (compilation-buffer-name): Don't check compilation-arguments. It is superfluous, and the variable isn't even set when this function is called. --- lisp/progmodes/compile.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index d7283037b6f..2bed6ce39a6 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -979,8 +979,7 @@ Otherwise, construct a buffer name from MODE-NAME." (funcall name-function mode-name)) (compilation-buffer-name-function (funcall compilation-buffer-name-function mode-name)) - ((and (eq mode-command major-mode) - (eq major-mode (nth 1 compilation-arguments))) + ((eq mode-command major-mode) (buffer-name)) (t (concat "*" (downcase mode-name) "*")))) @@ -1032,7 +1031,7 @@ Returns the compilation buffer created." (with-current-buffer (setq outbuf (get-buffer-create - (compilation-buffer-name name-of-mode mode name-function))) + (compilation-buffer-name name-of-mode mode name-function))) (let ((comp-proc (get-buffer-process (current-buffer)))) (if comp-proc (if (or (not (eq (process-status comp-proc) 'run)) -- cgit v1.2.3 From 39a8a2a7995123fab281a5bedd2b6ee35460a8cb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 17:53:21 +0000 Subject: (gud): Change to group `processes'. --- lisp/progmodes/gud.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 2131aebe2a8..f4c31ac203a 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -59,7 +59,7 @@ (defgroup gud nil "Grand Unified Debugger mode for gdb and other debuggers under Emacs. Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), jdb." - :group 'unix + :group 'processes :group 'tools) -- cgit v1.2.3 From 0e898f3d959b86b180ff6d9d15bc6fc542600191 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 17:55:05 +0000 Subject: (sh): Delete group `unix'. --- lisp/ChangeLog | 15 +++++++++++++++ lisp/progmodes/sh-script.el | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'lisp/progmodes') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0717e8f2570..3104d7110de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-12 Richard Stallman + + * progmodes/sh-script.el (sh): Delete group `unix'. + + * progmodes/gud.el (gud): Change to group `processes'. + 2007-08-11 Glenn Morris * progmodes/compile.el (compilation-buffer-name): Don't check @@ -97,6 +103,15 @@ It calls comment-line-break-function if there are comments. (do-auto-fill): Use that. +2007-08-07 Ivan Kanis + + * time.el (display-time-world-mode, display-time-world-display) + (display-time-world, display-time-world-list) + (display-time-world-time-format, display-time-world-buffer-name) + (display-time-world-timer-enable) + (display-time-world-timer-second, display-time-world-mode-map): + New. + 2007-08-07 Sean O'Rourke * complete.el (PC-lisp-complete-symbol): Complete symbol around point. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index f6ef646069b..c3948280f76 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -212,7 +212,6 @@ (defgroup sh nil "Shell programming utilities." - :group 'unix :group 'languages) (defgroup sh-script nil -- cgit v1.2.3 From a988c1c2396bd51bed71af9cb64444ba787c10f1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 18:01:29 +0000 Subject: (flymake-err-line-patterns): Fix infloop in javac regexp. --- lisp/progmodes/flymake.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 0ce53f43937..99e5fb53823 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -927,7 +927,7 @@ Convert it to flymake internal format." ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1) ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1) ;; ant/javac - (" *\\(\\[javac\\]\\)? *\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" + (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" 2 4 nil 5)) ;; compilation-error-regexp-alist) (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) -- cgit v1.2.3 From 00b733b76ddba1c9e7ffc005134aac129195518a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 18:02:39 +0000 Subject: (gud-common-init): Use new name split-string-and-unquote. --- lisp/progmodes/gud.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 06bdd6a0b5f..d5632ffe09f 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2462,7 +2462,7 @@ comint mode, which see." ;; for local variables in the debugger buffer. (defun gud-common-init (command-line massage-args marker-filter &optional find-file) - (let* ((words (string->strings command-line)) + (let* ((words (split-string-and-unquote command-line)) (program (car words)) (dir default-directory) ;; Extract the file name from WORDS -- cgit v1.2.3 From cdf71ff2ef86e20d8892da4a938a93e1a0c5377b Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 13 Aug 2007 09:28:31 +0000 Subject: (gdb-send): Handle CTRL-D more carefully. --- lisp/progmodes/gdb-ui.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index c4d14462245..716b79138f9 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1132,10 +1132,10 @@ This filter may simply queue input for a later time." (let ((item (concat string "\n"))) (if gdb-enable-debug (push (cons 'send item) gdb-debug-log)) (process-send-string proc item))) - (if (and (string-match "\\\\$" string) - (not comint-input-sender-no-newline)) ;;Try to catch C-d. + (if (string-match "\\\\\\'" string) (setq gdb-continuation (concat gdb-continuation string "\n")) - (let ((item (concat gdb-continuation string "\n"))) + (let ((item (concat gdb-continuation string + (if (not comint-input-sender-no-newline) "\n")))) (gdb-enqueue-input item) (setq gdb-continuation nil))))) -- cgit v1.2.3 From f020b5c9c57cbefa65a379309662eabef14eec8b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:10:47 +0000 Subject: (ada-gnatls-args): Fix docstring. (ada-treat-cmd-string): Improve error message. (ada-do-file-completion): Call `ada-require-project-file', so project variables are set properly. (ada-prj-find-prj-file): Delete Emacs 20.2 support. (ada-gnatfind-buffer-name): New constant. (ada-find-any-references): Use new constant. Set buffer name properly in compilation-start. Toggle read-only properly. (ada-find-in-src-path): Fix spelling error in docstring. --- lisp/progmodes/ada-xref.el | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index e8db3d51c2a..c37d11910d4 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -71,7 +71,7 @@ Set to 0, if you don't use crunched filenames. This should be a string." :type 'string :group 'ada) (defcustom ada-gnatls-args '("-v") - "*Arguments to pass to `gnatfind' to find location of the runtime. + "*Arguments to pass to `gnatls' to find location of the runtime. Typical use is to pass `--RTS=soft-floats' on some systems that support it. You can also add `-I-' if you do not want the current directory to be included. @@ -322,7 +322,6 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command." (reverse ada-xref-runtime-library-ali-path)) )) - (defun ada-treat-cmd-string (cmd-string) "Replace meta-sequences like ${...} in CMD-STRING with the appropriate value. Assumes project exists. @@ -345,7 +344,7 @@ replaced by the name including the extension." ;; Check if there is an environment variable with the same name (if (null value) (if (not (setq value (getenv name))) - (message "%s" (concat "No environment variable " name " found")))) + (message "%s" (concat "No project or environment variable " name " found")))) (cond ((null value) @@ -535,6 +534,11 @@ All the directories are returned as absolute directories." Completion is attempted in all the directories in the source path, as defined in the project file." ;; FIXME: doc arguments + + ;; This function is not itself interactive, but it is called as part + ;; of the prompt of interactive functions, so we require a project + ;; file. + (ada-require-project-file) (let (list (dirs (ada-xref-get-src-dir-field))) @@ -663,9 +667,6 @@ is non-nil, prompt the user to select one. If none are found, return ada-prj-file-extension)) (dir (file-name-directory current-file)) - ;; on Emacs 20.2, directory-files does not work if - ;; parse-sexp-lookup-properties is set - (parse-sexp-lookup-properties nil) (prj-files (directory-files dir t (concat ".*" (regexp-quote @@ -905,6 +906,8 @@ If ARG is t, the contents of the old *gnatfind* buffer is preserved." (interactive "d\nP") (ada-find-references pos arg t)) +(defconst ada-gnatfind-buffer-name "*gnatfind*") + (defun ada-find-any-references (entity &optional file line column local-only append) "Search for references to any entity whose name is ENTITY. @@ -943,23 +946,25 @@ buffer `*gnatfind*', if there is one." (setq command (concat command " -P" ada-prj-default-project-file)) (setq command (concat command " -p" ada-prj-default-project-file)))) - (if (and append (get-buffer "*gnatfind*")) + (if (and append (get-buffer ada-gnatfind-buffer-name)) (save-excursion (set-buffer "*gnatfind*") (setq old-contents (buffer-string)))) (let ((compilation-error "reference")) - (compilation-start command)) + (compilation-start command 'compilation-mode (lambda (mode) ada-gnatfind-buffer-name))) ;; Hide the "Compilation" menu (save-excursion - (set-buffer "*gnatfind*") + (set-buffer ada-gnatfind-buffer-name) (local-unset-key [menu-bar compilation-menu]) (if old-contents (progn (goto-char 1) + (set 'buffer-read-only nil) (insert old-contents) + (set 'buffer-read-only t) (goto-char (point-max))))) ) ) @@ -1940,7 +1945,7 @@ This function attempts to find the possible declarations for the identifier anywhere in the object path. This command requires the external `egrep' program to be available. -This works well when one is using an external librarie and wants to find +This works well when one is using an external library and wants to find the declaration and documentation of the subprograms one is using." ;; FIXME: what does this function do? (let (list -- cgit v1.2.3 From b0cf7916dcc9887d01ab0e7e698a5e8fc5a80016 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:12:50 +0000 Subject: (vhdl-update-progress-info): Avoid divide by zero error. --- lisp/progmodes/vhdl-mode.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index a1bd32a313d..0d909a4a3ff 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -6982,10 +6982,13 @@ only-lines." (when (and vhdl-progress-info (not noninteractive) (< vhdl-progress-interval (- (nth 1 (current-time)) (aref vhdl-progress-info 2)))) - (message (concat string "... (%2d%s)") - (/ (* 100 (- pos (aref vhdl-progress-info 0))) - (- (aref vhdl-progress-info 1) - (aref vhdl-progress-info 0))) "%") + (let ((delta (- (aref vhdl-progress-info 1) + (aref vhdl-progress-info 0)))) + (if (= 0 delta) + (message (concat string "... (100%s)") "%") + (message (concat string "... (%2d%s)") + (/ (* 100 (- pos (aref vhdl-progress-info 0))) + delta) "%"))) (aset vhdl-progress-info 2 (nth 1 (current-time))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 0fad0ff9f7ba9c21c4d745e71d4aef27833c3b8a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:38:37 +0000 Subject: (ada-gnatls-args): Fix docstring. (ada-treat-cmd-string): Improve error message. (ada-do-file-completion): Call `ada-require-project-file', so project variables are set properly. (ada-prj-find-prj-file): Delete Emacs 20.2 support. (ada-gnatfind-buffer-name): New constant. (ada-find-any-references): Use new constant. Set buffer name properly in compilation-start. Toggle read-only properly. (ada-find-in-src-path): Fix spelling error in docstring. --- lisp/progmodes/ada-xref.el | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index e8db3d51c2a..c37d11910d4 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -71,7 +71,7 @@ Set to 0, if you don't use crunched filenames. This should be a string." :type 'string :group 'ada) (defcustom ada-gnatls-args '("-v") - "*Arguments to pass to `gnatfind' to find location of the runtime. + "*Arguments to pass to `gnatls' to find location of the runtime. Typical use is to pass `--RTS=soft-floats' on some systems that support it. You can also add `-I-' if you do not want the current directory to be included. @@ -322,7 +322,6 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command." (reverse ada-xref-runtime-library-ali-path)) )) - (defun ada-treat-cmd-string (cmd-string) "Replace meta-sequences like ${...} in CMD-STRING with the appropriate value. Assumes project exists. @@ -345,7 +344,7 @@ replaced by the name including the extension." ;; Check if there is an environment variable with the same name (if (null value) (if (not (setq value (getenv name))) - (message "%s" (concat "No environment variable " name " found")))) + (message "%s" (concat "No project or environment variable " name " found")))) (cond ((null value) @@ -535,6 +534,11 @@ All the directories are returned as absolute directories." Completion is attempted in all the directories in the source path, as defined in the project file." ;; FIXME: doc arguments + + ;; This function is not itself interactive, but it is called as part + ;; of the prompt of interactive functions, so we require a project + ;; file. + (ada-require-project-file) (let (list (dirs (ada-xref-get-src-dir-field))) @@ -663,9 +667,6 @@ is non-nil, prompt the user to select one. If none are found, return ada-prj-file-extension)) (dir (file-name-directory current-file)) - ;; on Emacs 20.2, directory-files does not work if - ;; parse-sexp-lookup-properties is set - (parse-sexp-lookup-properties nil) (prj-files (directory-files dir t (concat ".*" (regexp-quote @@ -905,6 +906,8 @@ If ARG is t, the contents of the old *gnatfind* buffer is preserved." (interactive "d\nP") (ada-find-references pos arg t)) +(defconst ada-gnatfind-buffer-name "*gnatfind*") + (defun ada-find-any-references (entity &optional file line column local-only append) "Search for references to any entity whose name is ENTITY. @@ -943,23 +946,25 @@ buffer `*gnatfind*', if there is one." (setq command (concat command " -P" ada-prj-default-project-file)) (setq command (concat command " -p" ada-prj-default-project-file)))) - (if (and append (get-buffer "*gnatfind*")) + (if (and append (get-buffer ada-gnatfind-buffer-name)) (save-excursion (set-buffer "*gnatfind*") (setq old-contents (buffer-string)))) (let ((compilation-error "reference")) - (compilation-start command)) + (compilation-start command 'compilation-mode (lambda (mode) ada-gnatfind-buffer-name))) ;; Hide the "Compilation" menu (save-excursion - (set-buffer "*gnatfind*") + (set-buffer ada-gnatfind-buffer-name) (local-unset-key [menu-bar compilation-menu]) (if old-contents (progn (goto-char 1) + (set 'buffer-read-only nil) (insert old-contents) + (set 'buffer-read-only t) (goto-char (point-max))))) ) ) @@ -1940,7 +1945,7 @@ This function attempts to find the possible declarations for the identifier anywhere in the object path. This command requires the external `egrep' program to be available. -This works well when one is using an external librarie and wants to find +This works well when one is using an external library and wants to find the declaration and documentation of the subprograms one is using." ;; FIXME: what does this function do? (let (list -- cgit v1.2.3 From 86444e1bf0767b5daf853e390f3ac30b3c01e47f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:39:45 +0000 Subject: (vhdl-update-progress-info): Avoid divide by zero error. --- lisp/progmodes/vhdl-mode.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lisp/progmodes') diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index a1bd32a313d..0d909a4a3ff 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -6982,10 +6982,13 @@ only-lines." (when (and vhdl-progress-info (not noninteractive) (< vhdl-progress-interval (- (nth 1 (current-time)) (aref vhdl-progress-info 2)))) - (message (concat string "... (%2d%s)") - (/ (* 100 (- pos (aref vhdl-progress-info 0))) - (- (aref vhdl-progress-info 1) - (aref vhdl-progress-info 0))) "%") + (let ((delta (- (aref vhdl-progress-info 1) + (aref vhdl-progress-info 0)))) + (if (= 0 delta) + (message (concat string "... (100%s)") "%") + (message (concat string "... (%2d%s)") + (/ (* 100 (- pos (aref vhdl-progress-info 0))) + delta) "%"))) (aset vhdl-progress-info 2 (nth 1 (current-time))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3