From b6e9189c676a8003a69e3157fa98530614029205 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 31 Jul 2007 15:23:27 +0000 Subject: [PATCH 01/22] (cvs-vc-command-advice): Handle the new fileset case. --- lisp/ChangeLog | 4 ++++ lisp/pcvs.el | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f48ea78a246..c295150db71 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-31 Stefan Monnier + + * pcvs.el (cvs-vc-command-advice): Handle the new fileset case. + 2007-07-29 Kimit Yada (tiny change) * emacs-lisp/copyright.el (copyright-update-year, copyright-update) diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 901110bbfa3..5c79f7a5fb9 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -2354,7 +2354,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (add-hook 'vc-post-command-functions 'cvs-vc-command-advice) -(defun cvs-vc-command-advice (command file flags) +(defun cvs-vc-command-advice (command files flags) (when (and (equal command "cvs") (progn (while (and (stringp (car flags)) @@ -2383,9 +2383,10 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (and (equal (car flags) "add") (goto-char (point-min)) (looking-at ".*to add this file permanently\n\\'")) - (insert "cvs add: scheduling file `" - (file-name-nondirectory file) - "' for addition\n")) + (dolist (file (if (listp files) files (list file))) + (insert "cvs add: scheduling file `" + (file-name-nondirectory file) + "' for addition\n"))) ;; VC never (?) does `cvs -n update' so dcd=nil ;; should probably always be the right choice. (cvs-parse-process nil subdir)))))))) From 65a9c8e243ee1b950927ee9af46ea511e14c5211 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 31 Jul 2007 16:28:24 +0000 Subject: [PATCH 02/22] (xg_tool_bar_callback): Generate a single TOOL_BAR_EVENT. --- src/ChangeLog | 4 ++++ src/gtkutil.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b8054295979..d50f9fbe518 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-07-31 Stefan Monnier + + * gtkutil.c (xg_tool_bar_callback): Generate a single TOOL_BAR_EVENT. + 2007-07-30 Katsumi Yamaoka * puresize.h (BASE_PURESIZE): Increase to 1130000. diff --git a/src/gtkutil.c b/src/gtkutil.c index d463e0e6d79..f52e68b1230 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3372,11 +3372,6 @@ xg_tool_bar_callback (w, client_data) key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); XSETFRAME (frame, f); - event.kind = TOOL_BAR_EVENT; - event.frame_or_window = frame; - event.arg = frame; - kbd_buffer_store_event (&event); - event.kind = TOOL_BAR_EVENT; event.frame_or_window = frame; event.arg = key; From 47968e06dabbd4d8f77036cb9cf5d633d728d241 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Wed, 1 Aug 2007 00:47:25 +0000 Subject: [PATCH 03/22] Fix infinite loop in python.el --- lisp/ChangeLog | 5 +++++ lisp/progmodes/python.el | 34 +++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c295150db71..fceef2353de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-31 Paul Pogonyshev + + * progmodes/python.el (python-current-defun): Adjust to never fall + into infinite loop. + 2007-07-31 Stefan Monnier * pcvs.el (cvs-vc-command-advice): Handle the new fileset case. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index c3caa7e397c..9bef41a0878 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1005,7 +1005,7 @@ don't move and return nil. Otherwise return t." (set-text-properties 0 (length function-name) nil function-name) function-name)) - + ;;;; Imenu. (defvar python-recursing) @@ -1828,21 +1828,25 @@ of current line." (save-excursion ;; Move up the tree of nested `class' and `def' blocks until we ;; get to zero indentation, accumulating the defined names. - (let ((start t) - (accum) + (let ((accum) (length -1)) - (while (and (or start (> (current-indentation) 0)) - (or (null length-limit) - (null (cdr accum)) - (< length length-limit))) - (setq start nil) - (python-beginning-of-block) - (end-of-line) - (beginning-of-defun) - (when (looking-at (rx (0+ space) (or "def" "class") (1+ space) - (group (1+ (or word (syntax symbol)))))) - (push (match-string 1) accum) - (setq length (+ length 1 (length (car accum)))))) + (catch 'done + (while (or (null length-limit) + (null (cdr accum)) + (< length length-limit)) + (setq start nil) + (let ((started-from (point))) + (python-beginning-of-block) + (end-of-line) + (beginning-of-defun) + (when (= (point) started-from) + (throw 'done nil))) + (when (looking-at (rx (0+ space) (or "def" "class") (1+ space) + (group (1+ (or word (syntax symbol)))))) + (push (match-string 1) accum) + (setq length (+ length 1 (length (car accum))))) + (when (= (current-indentation) 0) + (throw 'done nil)))) (when accum (when (and length-limit (> length length-limit)) (setcar accum "..")) From d84fcc304f91c9a201ded5cc87342014e881d51b Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Wed, 1 Aug 2007 01:17:51 +0000 Subject: [PATCH 04/22] Fix parent groups link --- lisp/ChangeLog | 5 +++++ lisp/cus-edit.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fceef2353de..d98ca272e16 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-31 Drew Adams + + * cus-edit.el (custom-group-value-create, custom-goto-parent): Fix + parent groups link. + 2007-07-31 Paul Pogonyshev * progmodes/python.el (python-current-defun): Adjust to never fall diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index ff86711e041..78b402c9c0a 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -3878,7 +3878,7 @@ If GROUPS-ONLY non-nil, return only those members that are groups." ;;; was made to display a group. (when (eq level 1) (if (custom-add-parent-links widget - "Parent group:") + "Parent groups:") (insert "\n")))) ;; Create level indicator. (insert-char ?\ (* custom-buffer-indent (1- level))) @@ -4480,7 +4480,7 @@ If several parents are listed, go to the first of them." (interactive) (save-excursion (goto-char (point-min)) - (if (search-forward "\nGo to parent group: " nil t) + (if (search-forward "\nParent groups: " nil t) (let* ((button (get-char-property (point) 'button)) (parent (downcase (widget-get button :tag)))) (customize-group parent))))) From f3e82d6997144e6925c86dedd0f2f828d8a3cd29 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Aug 2007 06:17:55 +0000 Subject: [PATCH 05/22] *** empty log message *** --- lisp/ChangeLog | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d98ca272e16..dd1f8eeb22a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,24 @@ +2007-08-01 Glenn Morris + + * progmodes/fortran.el: Remove leading `*' from all defcustom doc + strings. + (fortran-tab-mode-default): Remove needless autoload. + (fortran-tab-mode-string): Add help-echo and mouse properties, and + mark as risky. + (fortran-line-length): New buffer-local variable, safe if integer. + (fortran-if-start-re, fortran-end-prog-re1, fortran-end-prog-re): + Change from variables to constants. + (fortran-font-lock-syntactic-keywords): Delete as a variable, + replace with a new function definition. + (fortran-mode): Use fortran-line-length, and + fortran-font-lock-syntactic-keywords as a function. Add a + hack-local-variables-hook function. + (fortran-line-length, fortran-hack-local-variables): New + functions. + (fortran-window-create, fortran-strip-sequence-nos): Doc fix. Use + fortran-line-length rather than 72. + (fortran-window-create-momentarily): Doc fix. + 2007-07-31 Drew Adams * cus-edit.el (custom-group-value-create, custom-goto-parent): Fix From 694cf05e5b5b503af94b63dfe51c44859d76d7b7 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Aug 2007 06:18:16 +0000 Subject: [PATCH 06/22] Remove leading `*' from all defcustom doc strings. (fortran-tab-mode-default): Remove needless autoload. (fortran-tab-mode-string): Add help-echo and mouse properties, and mark as risky. (fortran-line-length): New buffer-local variable, safe if integer. (fortran-if-start-re, fortran-end-prog-re1, fortran-end-prog-re): Change from variables to constants. (fortran-font-lock-syntactic-keywords): Delete as a variable, replace with a new function definition. (fortran-mode): Use fortran-line-length, and fortran-font-lock-syntactic-keywords as a function. Add a hack-local-variables-hook function. (fortran-line-length, fortran-hack-local-variables): New functions. (fortran-window-create, fortran-strip-sequence-nos): Doc fix. Use fortran-line-length rather than 72. (fortran-window-create-momentarily): Doc fix. --- lisp/progmodes/fortran.el | 164 +++++++++++++++++++++++++++----------- 1 file changed, 117 insertions(+), 47 deletions(-) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index b9865613765..37db236c99f 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1,7 +1,8 @@ ;;; fortran.el --- Fortran mode for GNU Emacs ;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; 2002, 2003, 2004, 2005, 2006, 2007 +;; Free Software Foundation, Inc. ;; Author: Michael D. Prange ;; Maintainer: Glenn Morris @@ -78,42 +79,52 @@ :group 'fortran) -;;;###autoload (defcustom fortran-tab-mode-default nil - "*Default tabbing/carriage control style for empty files in Fortran mode. + "Default tabbing/carriage control style for empty files in Fortran mode. A non-nil value specifies tab-digit style of continuation control. A value of nil specifies that continuation lines are marked with a character in column 6." :type 'boolean :group 'fortran-indent) -(defcustom fortran-tab-mode-string "/t" - "*String to appear in mode line in TAB format buffers." +;; TODO add more detail of what tab mode is to doc string. +(defcustom fortran-tab-mode-string + (propertize "/t" 'help-echo "This buffer is in Fortran TAB mode" + 'mouse-face 'mode-line-highlight + 'local-map + (make-mode-line-mouse-map 'mouse-1 + (lambda () + (interactive) + (describe-variable + 'fortran-tab-mode-string)))) + "String to appear in mode line in TAB format buffers." :type 'string :group 'fortran-indent) +(put 'fortran-tab-mode-string 'risky-local-variable t) + (defcustom fortran-do-indent 3 - "*Extra indentation applied to DO blocks." + "Extra indentation applied to DO blocks." :type 'integer :group 'fortran-indent) (defcustom fortran-if-indent 3 - "*Extra indentation applied to IF, SELECT CASE and WHERE blocks." + "Extra indentation applied to IF, SELECT CASE and WHERE blocks." :type 'integer :group 'fortran-indent) (defcustom fortran-structure-indent 3 - "*Extra indentation applied to STRUCTURE, UNION, MAP and INTERFACE blocks." + "Extra indentation applied to STRUCTURE, UNION, MAP and INTERFACE blocks." :type 'integer :group 'fortran-indent) (defcustom fortran-continuation-indent 5 - "*Extra indentation applied to continuation lines." + "Extra indentation applied to continuation lines." :type 'integer :group 'fortran-indent) (defcustom fortran-comment-indent-style 'fixed - "*How to indent comments. + "How to indent comments. nil forces comment lines not to be touched; `fixed' indents to `fortran-comment-line-extra-indent' columns beyond `fortran-minimum-statement-indent-fixed' (if `indent-tabs-mode' nil), or @@ -124,13 +135,13 @@ nil forces comment lines not to be touched; :group 'fortran-indent) (defcustom fortran-comment-line-extra-indent 0 - "*Amount of extra indentation for text within full-line comments." + "Amount of extra indentation for text within full-line comments." :type 'integer :group 'fortran-indent :group 'fortran-comment) (defcustom fortran-comment-line-start "C" - "*Delimiter inserted to start new full-line comment. + "Delimiter inserted to start new full-line comment. You might want to change this to \"*\", for instance." :version "21.1" :type 'string @@ -147,7 +158,7 @@ You might want to change this to \"*\", for instance." (defcustom fortran-directive-re "^[ \t]*#.*" - "*Regexp to match a directive line. + "Regexp to match a directive line. The matching text will be fontified with `font-lock-keyword-face'. The matching line will be given zero indentation." :version "22.1" @@ -155,12 +166,12 @@ The matching line will be given zero indentation." :group 'fortran-indent) (defcustom fortran-minimum-statement-indent-fixed 6 - "*Minimum statement indentation for fixed format continuation style." + "Minimum statement indentation for fixed format continuation style." :type 'integer :group 'fortran-indent) (defcustom fortran-minimum-statement-indent-tab (max tab-width 6) - "*Minimum statement indentation for TAB format continuation style." + "Minimum statement indentation for TAB format continuation style." :type 'integer :group 'fortran-indent) @@ -168,30 +179,30 @@ The matching line will be given zero indentation." ;; of length one rather than a single character. ;; The code in this file accepts either format for compatibility. (defcustom fortran-comment-indent-char " " - "*Single-character string inserted for Fortran comment indentation. + "Single-character string inserted for Fortran comment indentation. Normally a space." :type 'string :group 'fortran-comment) (defcustom fortran-line-number-indent 1 - "*Maximum indentation for Fortran line numbers. + "Maximum indentation for Fortran line numbers. 5 means right-justify them within their five-column field." :type 'integer :group 'fortran-indent) (defcustom fortran-check-all-num-for-matching-do nil - "*Non-nil causes all numbered lines to be treated as possible DO loop ends." + "Non-nil causes all numbered lines to be treated as possible DO loop ends." :type 'boolean :group 'fortran) (defcustom fortran-blink-matching-if nil - "*Non-nil causes \\[fortran-indent-line] on ENDIF to blink on matching IF. + "Non-nil causes \\[fortran-indent-line] on ENDIF to blink on matching IF. Also, from an ENDDO statement blink on matching DO [WHILE] statement." :type 'boolean :group 'fortran) (defcustom fortran-continuation-string "$" - "*Single-character string used for Fortran continuation lines. + "Single-character string used for Fortran continuation lines. In fixed format continuation style, this character is inserted in column 6 by \\[fortran-split-line] to begin a continuation line. Also, if \\[fortran-indent-line] finds this at the beginning of a @@ -201,16 +212,17 @@ appropriate style. Normally $." :group 'fortran) (defcustom fortran-comment-region "c$$$" - "*String inserted by \\[fortran-comment-region] at start of each \ + "String inserted by \\[fortran-comment-region] at start of each \ line in region." :type 'string :group 'fortran-comment) (defcustom fortran-electric-line-number t - "*Non-nil causes line numbers to be moved to the correct column as typed." + "Non-nil causes line numbers to be moved to the correct column as typed." :type 'boolean :group 'fortran) +;; TODO use fortran-line-length, somehow. (defcustom fortran-column-ruler-fixed "0 4 6 10 20 30 40 5\ 0 60 70\n\ @@ -222,6 +234,7 @@ See the variable `fortran-column-ruler-tab' for TAB format mode." :type 'string :group 'fortran) +;; TODO use fortran-line-length, somehow. (defcustom fortran-column-ruler-tab "0 810 20 30 40 5\ 0 60 70\n\ @@ -239,11 +252,38 @@ See the variable `fortran-column-ruler-fixed' for fixed format mode." :group 'fortran) (defcustom fortran-break-before-delimiters t - "*Non-nil causes filling to break lines before delimiters. + "Non-nil causes filling to break lines before delimiters. Delimiters are characters matching the regexp `fortran-break-delimiters-re'." :type 'boolean :group 'fortran) +;; TODO 0 as no-limit, as per g77. +(defcustom fortran-line-length 72 + "Maximum number of characters in a line of fixed-form Fortran code. +Characters beyond this point are treated as comments. Setting +this variable directly (after fortran mode is loaded) does not +take effect. Use either \\[customize] (which affects all Fortran +buffers and the default) or the function +`fortran-line-length' (which can also operate on just the current +buffer). This corresponds to the g77 compiler option +`-ffixed-line-length-N'." + :type 'integer + :initialize 'custom-initialize-default + :set (lambda (symbol value) + ;; Do all fortran buffers, and the default. + (fortran-line-length value t)) + :version "23.1" + :group 'fortran) + +(put 'fortran-line-length 'safe-local-variable 'integerp) +(make-variable-buffer-local 'fortran-line-length) + +(defcustom fortran-mode-hook nil + "Hook run when entering Fortran mode." + :type 'hook + :group 'fortran) + + (defconst fortran-break-delimiters-re "[-+*/><=, \t]" "Regexp matching delimiter characters at which lines may be broken. There are certain tokens comprised entirely of characters @@ -259,22 +299,16 @@ characters matching the regexp `fortran-break-delimiters-re' that should not be split by filling. Each element is assumed to be two characters long.") -(defcustom fortran-mode-hook nil - "Hook run when entering Fortran mode." - :type 'hook - :group 'fortran) - - -(defvar fortran-if-start-re "\\(\\(\\sw\\|\\s_\\)+:[ \t]*\\)?if[ \t]*(" +(defconst fortran-if-start-re "\\(\\(\\sw\\|\\s_\\)+:[ \t]*\\)?if[ \t]*(" "Regexp matching the start of an IF statement.") -(defvar fortran-end-prog-re1 +(defconst fortran-end-prog-re1 "end\ \\([ \t]*\\(program\\|subroutine\\|function\\|block[ \t]*data\\)\\>\ \\([ \t]*\\(\\sw\\|\\s_\\)+\\)?\\)?" "Regexp possibly matching the end of a subprogram.") -(defvar fortran-end-prog-re +(defconst fortran-end-prog-re (concat "^[ \t0-9]*" fortran-end-prog-re1) "Regexp possibly matching the end of a subprogram, from the line start. See also `fortran-end-prog-re1'.") @@ -402,11 +436,13 @@ Consists of level 3 plus all other intrinsics not already highlighted.") ;; (We can do so for F90-style). Therefore an unmatched quote in a ;; standard comment will throw fontification off on the wrong track. ;; So we do syntactic fontification with regexps. -(defvar fortran-font-lock-syntactic-keywords - '(("^[cd\\*]" 0 (11)) - ("^[^cd\\*\t\n].\\{71\\}\\([^\n]+\\)" 1 (11))) - "`font-lock-syntactic-keywords' for Fortran. -These get fixed-format comments fontified.") +(defun fortran-font-lock-syntactic-keywords () + "Return a value for `font-lock-syntactic-keywords' in Fortran mode. +This varies according to the value of `fortran-line-length'. +This is used to fontify fixed-format Fortran comments." + `(("^[cd\\*]" 0 (11)) + (,(format "^[^cd\\*\t\n].\\{%d\\}\\([^\n]+\\)" fortran-line-length) + 1 (11)))) (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 "Default expressions to highlight in Fortran mode.") @@ -582,6 +618,8 @@ Used in the Fortran entry in `hs-special-modes-alist'.") ["Widen" widen t] "--" ["Temporary column ruler" fortran-column-ruler t] + ;; May not be '72', depending on fortran-line-length, but this + ;; seems ok for a menu item. ["72-column window" fortran-window-create t] ["Full Width Window" (enlarge-window-horizontally (- (frame-width) (window-width))) @@ -780,7 +818,7 @@ with no args, if that value is non-nil." (set (make-local-variable 'normal-auto-fill-function) 'fortran-auto-fill) (set (make-local-variable 'indent-tabs-mode) (fortran-analyze-file-format)) (setq mode-line-process '(indent-tabs-mode fortran-tab-mode-string)) - (set (make-local-variable 'fill-column) 72) + (set (make-local-variable 'fill-column) fortran-line-length) (set (make-local-variable 'fill-paragraph-function) 'fortran-fill-paragraph) (set (make-local-variable 'font-lock-defaults) '((fortran-font-lock-keywords @@ -791,7 +829,7 @@ with no args, if that value is non-nil." nil t ((?/ . "$/") ("_$" . "w")) fortran-beginning-of-subprogram)) (set (make-local-variable 'font-lock-syntactic-keywords) - fortran-font-lock-syntactic-keywords) + (fortran-font-lock-syntactic-keywords)) (set (make-local-variable 'imenu-case-fold-search) t) (set (make-local-variable 'imenu-generic-expression) fortran-imenu-generic-expression) @@ -804,9 +842,38 @@ with no args, if that value is non-nil." #'fortran-current-defun) (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search) (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr) + (add-hook 'hack-local-variables-hook 'fortran-hack-local-variables nil t) (run-mode-hooks 'fortran-mode-hook)) +(defun fortran-line-length (nchars &optional global) + "Set the length of fixed-form Fortran lines to NCHARS. +This normally only affects the current buffer, which must be in +Fortran mode. If the optional argument GLOBAL is non-nil, it +affects all Fortran buffers, and also the default." + (interactive "p") + (let (new) + (mapcar (lambda (buff) + (with-current-buffer buff + (when (eq major-mode 'fortran-mode) + (setq fortran-line-length nchars + fill-column fortran-line-length + new (fortran-font-lock-syntactic-keywords)) + ;; Refontify only if necessary. + (unless (equal new font-lock-syntactic-keywords) + (setq font-lock-syntactic-keywords + (fortran-font-lock-syntactic-keywords)) + (if font-lock-mode (font-lock-mode 1)))))) + (if global + (buffer-list) + (list (current-buffer)))) + (if global + (setq-default fortran-line-length nchars)))) + +(defun fortran-hack-local-variables () + "Fortran mode adds this to `hack-local-variables-hook'." + (fortran-line-length fortran-line-length)) + (defun fortran-gud-find-expr () ;; Consider \n as punctuation (end of expression). (with-syntax-table fortran-gud-syntax-table @@ -940,7 +1007,7 @@ The next key typed is executed unless it is SPC." nil "Type SPC or any command to erase ruler.")) (defun fortran-window-create () - "Make the window 72 columns wide. + "Make the window `fortran-line-length' (default 72) columns wide. See also `fortran-window-create-momentarily'." (interactive) (let ((window-min-width 2)) @@ -951,13 +1018,13 @@ See also `fortran-window-create-momentarily'." (scroll-bar-width (- (nth 2 window-edges) (car window-edges) (window-width)))) - (split-window-horizontally (+ 72 scroll-bar-width))) + (split-window-horizontally (+ fortran-line-length scroll-bar-width))) (other-window 1) (switch-to-buffer " fortran-window-extra" t) (select-window (previous-window)))) (defun fortran-window-create-momentarily (&optional arg) - "Momentarily make the window 72 columns wide. + "Momentarily make the window `fortran-line-length' (default 72) columns wide. Optional ARG non-nil and non-unity disables the momentary feature. See also `fortran-window-create'." (interactive "p") @@ -1065,7 +1132,8 @@ Auto-indent does not happen if a numeric ARG is used." (string-match "^\\s-*\\(\\'\\|\\s<\\)" (buffer-substring (match-end 0) (min (line-end-position) - (+ 72 (line-beginning-position))))))) + (+ fortran-line-length + (line-beginning-position))))))) ;; Note that you can't just check backwards for `subroutine' &c in ;; case of un-marked main programs not at the start of the file. @@ -1996,13 +2064,15 @@ Always returns non-nil (to prevent `fill-paragraph' being called)." (fortran-indent-line))) (defun fortran-strip-sequence-nos (&optional do-space) - "Delete all text in column 72 and up (assumed to be sequence numbers). -Normally also deletes trailing whitespace after stripping such text. -Supplying prefix arg DO-SPACE prevents stripping the whitespace." + "Delete all text in column `fortran-line-length' (default 72) and up. +This is assumed to be sequence numbers. Normally also deletes +trailing whitespace after stripping such text. Supplying prefix +arg DO-SPACE prevents stripping the whitespace." (interactive "*p") (save-excursion (goto-char (point-min)) - (while (re-search-forward "^.\\{72\\}\\(.*\\)" nil t) + (while (re-search-forward (format "^.\\{%d\\}\\(.*\\)" fortran-line-length) + nil t) (replace-match "" nil nil nil 1) (unless do-space (delete-horizontal-space))))) From dbcbec02bfd2b0a2fbc76f0731dd891b9c22b15c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Aug 2007 06:25:04 +0000 Subject: [PATCH 07/22] *** empty log message *** --- etc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 5dded8c4f91..7da5459c40c 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2007-08-01 Glenn Morris + + * NEWS: Add fortran-line-length, plus some more sections. + 2007-07-25 Glenn Morris * Relicense all FSF files to GPLv3 or later. From d15f7b6830987dac9a9674e55e12d8ad01b1f9b8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Aug 2007 06:25:23 +0000 Subject: [PATCH 08/22] Add fortran-line-length, plus some more sections. --- etc/NEWS | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cf6019cbfd2..09877e9518c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -139,13 +139,20 @@ Running processes on a remote host can be controlled by settings in When the variable `file-precious-flag' is set, the success of a remote file copy is checked via the file's checksum. -** comint-mode uses `start-file-process' now (see Lisp Changes). +** Miscellaneous programming mode changes + +*** The variable `fortran-line-length' can change the fixed-form line-length. + +** Miscellaneous + +*** comint-mode uses `start-file-process' now (see Lisp Changes). If `default-directory' is a remote file name, subprocesses are started on the corresponding remote system. -** C-x C-q in dired-mode now runs the command wdired-change-to-wdired-mode, +*** C-x C-q in dired-mode now runs the command wdired-change-to-wdired-mode, and C-x C-q in wdired-mode exits it with asking a question about saving changes. + * Changes in Emacs 23.1 on non-free operating systems From 7233f464f59425748c3ea51d06ba199e5ec816ae Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 1 Aug 2007 09:13:34 +0000 Subject: [PATCH 09/22] *** empty log message *** --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 703b3d3441f..80ddad0085d 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2007-08-01 Alan Mackenzie + + * cc-mode.texi (Mailing Lists and Bug Reports): Correct "-no-site-file" + to "--no-site-file". + 2007-07-29 Michael Albinus * tramp.texi (Frequently Asked Questions): Point to mode line From 373a5a1b388ee0213552c0468e026a076879da84 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 1 Aug 2007 09:16:24 +0000 Subject: [PATCH 10/22] (Mailing Lists and Bug Reports): Correct "-no-site-file" to "--no-site-file". --- man/cc-mode.texi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/man/cc-mode.texi b/man/cc-mode.texi index 3cb670b3b53..423892d7d30 100644 --- a/man/cc-mode.texi +++ b/man/cc-mode.texi @@ -540,7 +540,7 @@ section @ref{Minor Modes}. @item Making the @key{RET} key indent the new line The standard Emacs binding for @key{RET} just adds a new line. If you want it to reindent the new line as well, rebind the key. Note that -the action of rebinding will fail if the pertinent keymap doesn't yet +the action of rebinding would fail if the pertinent keymap didn't yet exist---we thus need to delay the action until after @ccmode{} has been loaded. Put the following code into your @file{.emacs}: @@ -881,8 +881,8 @@ lines. @ccmode{} contains some useful commands for moving around in C code. @table @asis -@item @kbd{C-M-a} -@itemx @kbd{C-M-e} +@item @kbd{C-M-a} (@code{c-beginning-of-defun}) +@itemx @kbd{C-M-e} (@code{c-end-of-defun}) @findex c-beginning-of-defun @findex c-end-of-defun @@ -6911,11 +6911,11 @@ to include any code that appears @emph{before} your bug example, if you think it might affect our ability to reproduce it. Please try to produce the problem in an Emacs instance without any -customizations loaded (i.e. start it with the @samp{-q -no-site-file} +customizations loaded (i.e. start it with the @samp{-q --no-site-file} arguments). If it works correctly there, the problem might be caused by faulty customizations in either your own or your site -configuration. In that case, we'd appreciate if you isolate the Emacs -Lisp code that triggers the bug and include it in your report. +configuration. In that case, we'd appreciate it if you isolate the +Emacs Lisp code that triggers the bug and include it in your report. @cindex bug report mailing list Bug reports should be sent to @email{bug-cc-mode@@gnu.org}. You can From cb223bba1d6ce91c2da8a976898eca6bc4b36309 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Wed, 1 Aug 2007 17:13:45 +0000 Subject: [PATCH 11/22] * vc.el: Document new VC operation `extra-menu'. * vc-hooks.el (vc-default-extra-menu): New function. * menu-bar.el (menu-bar-vc-filter): New function. (menu-bar-tools-menu): Use it as a filter. --- etc/NEWS | 3 +++ lisp/ChangeLog | 10 ++++++++++ lisp/menu-bar.el | 14 +++++++++++++- lisp/vc-hooks.el | 3 +++ lisp/vc.el | 13 +++++++++++-- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 09877e9518c..f56a7a0bf0c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -96,6 +96,9 @@ considered for update. *** The VC mode-line entry now has a tooltip. +*** VC backends can provide extra menu entries to be added to the "Version Control" menu. +This can be used to add menu entries for backend specific functions. + *** VC has some support for Bazaar (bzr). ** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd1f8eeb22a..123c2cdc479 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2007-08-01 Dan Nicolaescu + Stefan Monnier + + * vc.el: Document new VC operation `extra-menu'. + + * vc-hooks.el (vc-default-extra-menu): New function. + + * menu-bar.el (menu-bar-vc-filter): New function. + (menu-bar-tools-menu): Use it as a filter. + 2007-08-01 Glenn Morris * progmodes/fortran.el: Remove leading `*' from all defcustom doc diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index d9f6405cf57..6b579763689 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1165,7 +1165,19 @@ mail status in mode line")) (define-key menu-bar-tools-menu [pcl-cvs] '(menu-item "PCL-CVS" cvs-global-menu)) (define-key menu-bar-tools-menu [vc] - (list 'menu-item "Version Control" vc-menu-map)) + (list 'menu-item "Version Control" vc-menu-map + :filter 'menu-bar-vc-filter)) + +(defun menu-bar-vc-filter (orig-binding) + (let ((ext-binding + (if vc-mode (vc-call 'extra-menu buffer-file-name)))) + ;; Give the VC backend a chance to add menu entries + ;; specific for that backend. + (if (null ext-binding) + orig-binding + (append orig-binding + '((ext-menu-separator "---")) + ext-binding)))) (define-key menu-bar-tools-menu [separator-compare] '("--")) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index a8b6297caa2..18083f22e05 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -950,6 +950,9 @@ Used in `find-file-not-found-functions'." (define-key vc-menu-map [vc-next-action] '("Check In/Out" . vc-next-action)) (define-key vc-menu-map [vc-register] '("Register" . vc-register))) +(defun vc-default-extra-menu (backend) + nil) + ;; These are not correct and it's not currently clear how doing it ;; better (with more complicated expressions) might slow things down ;; on older systems. diff --git a/lisp/vc.el b/lisp/vc.el index 5030fb64471..78e098d874f 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -387,7 +387,7 @@ ;; ;; Only required if `annotate-command' is defined for the backend, ;; AND you'd like the current time considered to be anything besides -;; (vs-annotate-convert-time (current-time)) -- i.e. the current +;; (vc-annotate-convert-time (current-time)) -- i.e. the current ;; time with hours, minutes, and seconds included. Probably safe to ;; ignore. Return the current-time, in units of fractional days. ;; @@ -480,11 +480,20 @@ ;; ;; Operation called in current buffer when opening a file. This can ;; be used by the backend to setup some local variables it might need. -; +;; ;; - find-file-not-found-hook () ;; ;; Operation called in current buffer when opening a non-existing file. ;; By default, this asks the user if she wants to check out the file. +;; +;; - extra-menu () +;; +;; Return a menu keymap, the items in the keymap will appear at the +;; end of the Version Control menu. The goal is to allow backends +;; to specify extra menu items that appear in the VC menu. This way +;; you can provide menu entries for functionality that is specific +;; to your backend and which does not map to any of the VC generic +;; concepts. ;;; Code: From a466449c4f77dea61a46132ad4087c7432a421be Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Wed, 1 Aug 2007 17:39:23 +0000 Subject: [PATCH 12/22] Docstring fix --- lisp/ChangeLog | 4 ++++ lisp/ibuf-ext.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 123c2cdc479..ca217d97927 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,10 @@ * menu-bar.el (menu-bar-vc-filter): New function. (menu-bar-tools-menu): Use it as a filter. +2007-08-01 Eric Hanchrow + + * ibuf-ext.el (ibuffer-mark-old-buffers): Docstring fix. + 2007-08-01 Glenn Morris * progmodes/fortran.el: Remove leading `*' from all defcustom doc diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 4f510472d54..b077342e5f5 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1482,7 +1482,7 @@ You can then feed the file name(s) to other commands with \\[yank]." ;;;###autoload (defun ibuffer-mark-old-buffers () - "Mark buffers which have not been viewed in `ibuffer-old-time' days." + "Mark buffers which have not been viewed in `ibuffer-old-time' hours." (interactive) (ibuffer-mark-on-buffer #'(lambda (buf) From cdf5c17ae8c53ab4c9f51dea78df080001ae1fe2 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Wed, 1 Aug 2007 21:43:11 +0000 Subject: [PATCH 13/22] Adjust load-path --- src/ChangeLog | 5 +++++ src/mac.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d50f9fbe518..32d0a243aa0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-01 Seiji Zenitani + + * mac.c (init_mac_osx_environment): Adjust load-path on self-contained + build. + 2007-07-31 Stefan Monnier * gtkutil.c (xg_tool_bar_callback): Generate a single TOOL_BAR_EVENT. diff --git a/src/mac.c b/src/mac.c index a64c3d208e3..ba0650c6051 100644 --- a/src/mac.c +++ b/src/mac.c @@ -5327,12 +5327,12 @@ init_mac_osx_environment () q[0] = '\0'; strcpy (p, app_bundle_pathname); - strcat (p, "/Contents/Resources/lisp"); + strcat (p, "/Contents/Resources/site-lisp"); if (stat (p, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR) strcat (q, p); strcpy (p, app_bundle_pathname); - strcat (p, "/Contents/Resources/leim"); + strcat (p, "/Contents/Resources/lisp"); if (stat (p, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR) { if (q[0] != '\0') @@ -5341,7 +5341,7 @@ init_mac_osx_environment () } strcpy (p, app_bundle_pathname); - strcat (p, "/Contents/Resources/site-lisp"); + strcat (p, "/Contents/Resources/leim"); if (stat (p, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR) { if (q[0] != '\0') From b01fc8d8c489f249d64685cd7527351fce77f1f5 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Wed, 1 Aug 2007 22:21:02 +0000 Subject: [PATCH 14/22] Adjust load-path comment --- src/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mac.c b/src/mac.c index ba0650c6051..e81db1479b9 100644 --- a/src/mac.c +++ b/src/mac.c @@ -5318,8 +5318,8 @@ init_mac_osx_environment () /* P should have sufficient room for the pathname of the bundle plus the subpath in it leading to the respective directories. Q should have three times that much room because EMACSLOADPATH can - have the value "::". */ + have the value "::". */ p = (char *) alloca (app_bundle_pathname_len + 50); q = (char *) alloca (3 * app_bundle_pathname_len + 150); if (!getenv ("EMACSLOADPATH")) From 54ed9a2d8694219e98b7e92897e1bebf23dfb963 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Thu, 2 Aug 2007 00:04:44 +0000 Subject: [PATCH 15/22] Adjust load-path comment --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 32d0a243aa0..f26f918c941 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,4 @@ -2007-08-01 Seiji Zenitani +2007-08-01 Ryo Yoshitake (tiny change) * mac.c (init_mac_osx_environment): Adjust load-path on self-contained build. From a5860c9b23c5cb4d479aebcc752f79b7957a42a5 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Thu, 2 Aug 2007 00:23:02 +0000 Subject: [PATCH 16/22] Insert tiny change --- lisp/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca217d97927..2dce1ef6b8e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,7 +8,7 @@ * menu-bar.el (menu-bar-vc-filter): New function. (menu-bar-tools-menu): Use it as a filter. -2007-08-01 Eric Hanchrow +2007-08-01 Eric Hanchrow (tiny change) * ibuf-ext.el (ibuffer-mark-old-buffers): Docstring fix. @@ -33,7 +33,7 @@ fortran-line-length rather than 72. (fortran-window-create-momentarily): Doc fix. -2007-07-31 Drew Adams +2007-07-31 Drew Adams (tiny change) * cus-edit.el (custom-group-value-create, custom-goto-parent): Fix parent groups link. From 17cc361e49c954651e1417cef9cb20fcac293876 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 2 Aug 2007 04:10:17 +0000 Subject: [PATCH 17/22] (math-sqrt-raw,math-sin-raw-2,math-cos-raw-2,math-arctan-raw) (math-ln-raw): Use native Emacs functions, when appropriate. --- lisp/ChangeLog | 6 ++++++ lisp/calc/calc-math.el | 31 ++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2dce1ef6b8e..98512182cad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-01 Jay Belanger + + * calc/calc-math.el (math-sqrt-raw,math-sin-raw-2) + (math-cos-raw-2,math-arctan-raw,math-ln-raw): + Use native Emacs functions, when appropriate. + 2007-08-01 Dan Nicolaescu Stefan Monnier diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index a442f2b4e03..a4dad15c14e 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -529,13 +529,16 @@ If this can't be done, return NIL." (defun math-sqrt-raw (a &optional guess) ; [F F F] (if (not (Math-posp a)) (math-sqrt a) - (if (null guess) - (let ((ldiff (- (math-numdigs (nth 1 a)) 6))) - (or (= (% (+ (nth 2 a) ldiff) 2) 0) (setq ldiff (1+ ldiff))) - (setq guess (math-make-float (math-isqrt-small - (math-scale-int (nth 1 a) (- ldiff))) - (/ (+ (nth 2 a) ldiff) 2))))) - (math-sqrt-float-iter a guess))) + (cond + ((math-use-emacs-fn 'sqrt a)) + (t + (if (null guess) + (let ((ldiff (- (math-numdigs (nth 1 a)) 6))) + (or (= (% (+ (nth 2 a) ldiff) 2) 0) (setq ldiff (1+ ldiff))) + (setq guess (math-make-float (math-isqrt-small + (math-scale-int (nth 1 a) (- ldiff))) + (/ (+ (nth 2 a) ldiff) 2))))) + (math-sqrt-float-iter a guess))))) (defun math-sqrt-float-iter (a guess) ; [F F F] (math-working "sqrt" guess) @@ -1201,11 +1204,13 @@ If this can't be done, return NIL." ((math-lessp-float x (math-neg (math-pi-over-4))) (math-neg (math-cos-raw-2 (math-add (math-pi-over-2) x) orgx))) ((math-nearly-zerop-float x orgx) '(float 0 0)) + ((math-use-emacs-fn 'sin x)) (calc-symbolic-mode (signal 'inexact-result nil)) (t (math-sin-series x 6 4 x (math-neg-float (math-sqr-float x))))))) (defun math-cos-raw-2 (x orgx) ; [F F] (cond ((math-nearly-zerop-float x orgx) '(float 1 0)) + ((math-use-emacs-fn 'cos x)) (calc-symbolic-mode (signal 'inexact-result nil)) (t (let ((xnegsqr (math-neg-float (math-sqr-float x)))) (math-sin-series @@ -1319,6 +1324,7 @@ If this can't be done, return NIL." ((Math-integer-negp (nth 1 x)) (math-neg-float (math-arctan-raw (math-neg-float x)))) ((math-zerop x) x) + ((math-use-emacs-fn 'atan x)) (calc-symbolic-mode (signal 'inexact-result nil)) ((math-equal-int x 1) (math-pi-over-4)) ((math-equal-int x -1) (math-neg (math-pi-over-4))) @@ -1737,10 +1743,13 @@ If this can't be done, return NIL." '(float 0 0)) (calc-symbolic-mode (signal 'inexact-result nil)) ((math-posp (nth 1 x)) ; positive and real - (let ((xdigs (1- (math-numdigs (nth 1 x))))) - (math-add-float (math-ln-raw-2 (list 'float (nth 1 x) (- xdigs))) - (math-mul-float (math-float (+ (nth 2 x) xdigs)) - (math-ln-10))))) + (cond + ((math-use-emacs-fn 'log x)) + (t + (let ((xdigs (1- (math-numdigs (nth 1 x))))) + (math-add-float (math-ln-raw-2 (list 'float (nth 1 x) (- xdigs))) + (math-mul-float (math-float (+ (nth 2 x) xdigs)) + (math-ln-10))))))) ((math-zerop x) (math-reject-arg x "*Logarithm of zero")) ((eq calc-complex-mode 'polar) ; negative and real From 52f55ab02b3f9b97a3894b7651b9ffffa2755eba Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 3 Aug 2007 03:15:33 +0000 Subject: [PATCH 18/22] Drew Adams (pp-eval-expression): Add progress message. Make buffer writable. --- lisp/ChangeLog | 15 +++++++++++++++ lisp/emacs-lisp/pp.el | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 98512182cad..b103e096e10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2007-08-03 Glenn Morris + + * cus-edit.el (customize-apropos): Make the error message indicate + what kind of thing the user was trying to customize. + + * net/telnet.el (telnet-mode): Set comint-use-prompt-regexp to t. + + * progmodes/fortran.el (fortran-font-lock-syntactic-keywords): Fix + off-by-one error in previous change. + +2007-08-03 Drew Adams + + * emacs-lisp/pp.el (pp-eval-expression): Add progress message. + Make buffer writable. + 2007-08-01 Jay Belanger * calc/calc-math.el (math-sqrt-raw,math-sin-raw-2) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 21175a03b4d..a5cefff399f 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -103,6 +103,7 @@ Also add the value to the front of the list in the variable `values'." (interactive (list (read-from-minibuffer "Eval: " nil read-expression-map t 'read-expression-history))) + (message "Evaluating...") (setq values (cons (eval expression) values)) (let* ((old-show-function temp-buffer-show-function) ;; Use this function to display the buffer. @@ -126,13 +127,16 @@ Also add the value to the front of the list in the variable `values'." (progn (select-window window) (run-hooks 'temp-buffer-show-hook)) - (select-window old-selected))) + (select-window old-selected) + (message "Evaluating...done. \ +See buffer *Pp Eval Output*."))) (message "%s" (buffer-substring (point-min) (point))) )))))) (with-output-to-temp-buffer "*Pp Eval Output*" (pp (car values)) (with-current-buffer standard-output (emacs-lisp-mode) + (setq buffer-read-only nil) (set (make-local-variable 'font-lock-verbose) nil))))) ;;;###autoload From 62ce2ec5dc6b20be08a36962f88a18eb690b8707 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 3 Aug 2007 03:19:36 +0000 Subject: [PATCH 19/22] (fortran-font-lock-syntactic-keywords): Fix off-by-one error in previous change. --- lisp/progmodes/fortran.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 37db236c99f..97f4c1c2616 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -441,7 +441,7 @@ Consists of level 3 plus all other intrinsics not already highlighted.") This varies according to the value of `fortran-line-length'. This is used to fontify fixed-format Fortran comments." `(("^[cd\\*]" 0 (11)) - (,(format "^[^cd\\*\t\n].\\{%d\\}\\([^\n]+\\)" fortran-line-length) + (,(format "^[^cd\\*\t\n].\\{%d\\}\\([^\n]+\\)" (1- fortran-line-length)) 1 (11)))) (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 From 3b7a686f5450b7ebda37082050064fb8c5726ec0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 3 Aug 2007 03:20:00 +0000 Subject: [PATCH 20/22] (telnet-mode): Set comint-use-prompt-regexp to t. --- lisp/net/telnet.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index c7b37050ed2..28f7d1ddb46 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -247,7 +247,8 @@ It has most of the same commands as comint-mode. There is a variable ``telnet-interrupt-string'' which is the character sent to try to stop execution of a job on the remote host. Data is sent to the remote host when RET is typed." - (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern)) + (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern) + (setq comint-use-prompt-regexp t)) ;;;###autoload (add-hook 'same-window-regexps "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)") From da435d1cf2b1a368bdd266eecbb8c632f656d614 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 3 Aug 2007 03:21:49 +0000 Subject: [PATCH 21/22] (customize-apropos): Make the error message indicate what kind of thing the user was trying to customize. --- lisp/cus-edit.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 78b402c9c0a..2cfd247a645 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1376,7 +1376,14 @@ that are not customizable options, as well as faces and groups (get symbol 'variable-documentation)))) (push (list symbol 'custom-variable) found))))) (if (not found) - (error "No customizable items matching %s" regexp) + (error "No %s matching %s" + (if (eq all t) + "items" + (format "customizable %s" + (if (memq all '(options faces groups)) + (symbol-name all) + "items"))) + regexp) (custom-buffer-create (custom-sort-items found t custom-buffer-order-groups) "*Customize Apropos*")))) From 4211679b08d6a9c369cb22f085b9bb61d5d4eeda Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 3 Aug 2007 04:57:05 +0000 Subject: [PATCH 22/22] Change capitalization of VC backend names for new backends Revision: emacs@sv.gnu.org/emacs--devo--0--patch-842 --- lisp/ChangeLog | 11 +++++++++++ lisp/vc-bzr.el | 12 ++++++------ lisp/vc-git.el | 10 +++++----- lisp/vc-hg.el | 6 +++--- lisp/vc-hooks.el | 4 ++-- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b103e096e10..19014a996f9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2007-08-03 Miles Bader + + * vc-hooks.el (vc-handled-backends): Change capitalization of VC + backend names for new backends to `Git', `Hg', and `Bzr'. + * vc-hg.el (vc-hg-dired-state-info): Use `Hg' as VC backend name, + not `HG'. + * vc-git.el (vc-git-dired-state-info): Use `Git' as VC backend + name, not `GIT'. + * vc-bzr.el (vc-bzr-dir-state, vc-bzr-dired-state-info) + (vc-bzr-unload-hook): Use `Bzr' as VC backend name, not `BZR'. + 2007-08-03 Glenn Morris * cus-edit.el (customize-apropos): Make the error message indicate diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 6a8f930f00f..b2011a7176e 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -63,7 +63,7 @@ ;; Clear up the cache to force vc-call to check again and discover ;; new functions when we reload this file. -(put 'BZR 'vc-functions nil) +(put 'Bzr 'vc-functions nil) (defgroup vc-bzr nil "VC bzr backend." @@ -197,7 +197,7 @@ Return nil if there isn't one." 'implicit) (defun vc-bzr-create-repo () - "Create a new BZR repository." + "Create a new Bzr repository." (vc-bzr-command "init" nil 0 nil)) (defun vc-bzr-register (files &optional rev comment) @@ -440,7 +440,7 @@ Optional argument LOCALP is always ignored." (vc-file-setprop file 'vc-state 'up-to-date) ;; XXX: is this correct? what happens if one ;; mixes different SCMs in the same dir? - (vc-file-setprop file 'vc-backend 'BZR)))) + (vc-file-setprop file 'vc-backend 'Bzr)))) ;; `bzr status' reports on added/modified/renamed and unknown/ignored files (setq at-start t) (with-temp-buffer @@ -492,18 +492,18 @@ Optional argument LOCALP is always ignored." (if bzr-state (concat "(" (symbol-name bzr-state) ")") ;; else fall back to default vc representation - (vc-default-dired-state-info 'BZR file))))) + (vc-default-dired-state-info 'Bzr file))))) ;; In case of just `(load "vc-bzr")', but that's probably the wrong ;; way to do it. -(add-to-list 'vc-handled-backends 'BZR) +(add-to-list 'vc-handled-backends 'Bzr) (eval-after-load "vc" '(add-to-list 'vc-directory-exclusion-list ".bzr" t)) (defconst vc-bzr-unload-hook (lambda () - (setq vc-handled-backends (delq 'BZR vc-handled-backends)) + (setq vc-handled-backends (delq 'Bzr vc-handled-backends)) (remove-hook 'vc-post-command-functions 'vc-bzr-post-command-function))) (provide 'vc-bzr) diff --git a/lisp/vc-git.el b/lisp/vc-git.el index e4a9d26105a..156b2866eb9 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -30,11 +30,11 @@ ;;; Installation: -;; To install: put this file on the load-path and add GIT to the list +;; To install: put this file on the load-path and add Git to the list ;; of supported backends in `vc-handled-backends'; the following line, ;; placed in your ~/.emacs, will accomplish this: ;; -;; (add-to-list 'vc-handled-backends 'GIT) +;; (add-to-list 'vc-handled-backends 'Git) ;;; Todo: ;; - check if more functions could use vc-git-command instead @@ -214,12 +214,12 @@ (if (eq git-state 'edited) "(modified)" ;; fall back to the default VC representation - (vc-default-dired-state-info 'GIT file)))) + (vc-default-dired-state-info 'Git file)))) ;;; STATE-CHANGING FUNCTIONS (defun vc-git-create-repo () - "Create a new GIT repository." + "Create a new Git repository." (vc-git-command "init" nil 0 nil)) (defun vc-git-register (files &optional rev comment) @@ -287,7 +287,7 @@ (defvar log-view-file-re) (defvar log-view-font-lock-keywords) -(define-derived-mode vc-git-log-view-mode log-view-mode "GIT-Log-View" +(define-derived-mode vc-git-log-view-mode log-view-mode "Git-Log-View" (require 'add-log) ;; we need the faces add-log ;; Don't have file markers, so use impossible regexp. (set (make-local-variable 'log-view-file-re) "^File:[ \t]+\\(.+\\)") diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index d8a7ec0dd46..1415f8d9499 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -256,7 +256,7 @@ (defvar log-view-file-re) (defvar log-view-font-lock-keywords) -(define-derived-mode vc-hg-log-view-mode log-view-mode "HG-Log-View" +(define-derived-mode vc-hg-log-view-mode log-view-mode "Hg-Log-View" (require 'add-log) ;; we need the faces add-log ;; Don't have file markers, so use impossible regexp. (set (make-local-variable 'log-view-file-re) "^File:[ \t]+\\(.+\\)") @@ -399,7 +399,7 @@ COMMENT is ignored." ;; (vc-hg-command nil nil file "remove")) (defun vc-hg-checkin (files rev comment) - "HG-specific version of `vc-backend-checkin'. + "Hg-specific version of `vc-backend-checkin'. REV is ignored." (vc-hg-command nil 0 files "commit" "-m" comment)) @@ -436,7 +436,7 @@ REV is the revision to check out into WORKFILE." (if (equal (vc-workfile-version file) "0") "(added)" "(modified)") ;; fall back to the default VC representation - (vc-default-dired-state-info 'HG file)))) + (vc-default-dired-state-info 'Hg file)))) ;; Modelled after the similar function in vc-bzr.el (defun vc-hg-revert (file &optional contents-done) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 18083f22e05..09001e59691 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -62,8 +62,8 @@ interpreted as hostnames." :type 'regexp :group 'vc) -(defcustom vc-handled-backends '(RCS CVS SVN SCCS BZR GIT HG Arch MCVS) - ;; BZR, GIT, HG, Arch and MCVS come last because they are per-tree +(defcustom vc-handled-backends '(RCS CVS SVN SCCS Bzr Git Hg Arch MCVS) + ;; Bzr, Git, Hg, Arch and MCVS come last because they are per-tree ;; rather than per-dir. "List of version control backends for which VC will be used. Entries in this list will be tried in order to determine whether a