emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vc-version-other-window


From: Nick Roberts
Subject: vc-version-other-window
Date: Thu, 7 Oct 2004 00:21:36 +1300

vc-version-other-window seems to be losing small chunk(s) of files. To
reproduce it, retrieve the working version of gdb-ui.el or fortran.el with
this command (see a diff below). I think an earlier thread discussed a similar
problem with a different command. I've not noticed this problem before but I'm
baffled because it seems to also happen with an old Emacs (21.2).

Nick


diff -c fortran.el fortran.el.~1.112~

*** fortran.el  2004-05-01 07:51:20.000000000 +1200
--- fortran.el.~1.112~  2004-10-06 19:15:45.000000000 +1300
***************
*** 120,242 ****
    :type  '(radio (const :tag "Untouched" nil) (const fixed) (const relative))
    :group 'fortran-indent)
  
! (defcustom fortran-comment-line-extra-indent 0
!   "*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.
! You might want to change this to \"*\", for instance."
!   :version "21.1"
!   :type    'string
!   :group   'fortran-comment)
! 
! ;; This used to match preprocessor lines too, but that messes up
! ;; filling and doesn't seem to be necessary.
! (defcustom fortran-comment-line-start-skip
!   "^[CcDd*!]\\(\\([^ \t\n]\\)\\2+\\)?[ \t]*"
!   "*Regexp to match the start of a full-line comment."
!   :version "21.1"
!   :type    'regexp
!   :group   'fortran-comment)
! 
! (defcustom fortran-directive-re
!   "^[ \t]*#.*"
!   "*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 "21.4"
!   :type    'regexp
!   :group   'fortran-indent)
! 
! (defcustom fortran-minimum-statement-indent-fixed 6
!   "*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."
!   :type  'integer
!   :group 'fortran-indent)
! 
! ;; Note that this is documented in the v18 manuals as being a string
! ;; 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.
! Normally a space."
!   :type  'string
!   :group 'fortran-comment)
! 
! (defcustom fortran-line-number-indent 1
!   "*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."
!   :type  'boolean
!   :group 'fortran)
! 
! (defcustom fortran-blink-matching-if nil
!   "*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.
! 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
! line, it will convert the line into a continuation line of the
! appropriate style. Normally $."
!   :type  'string
!   :group 'fortran)
! 
! (defcustom fortran-comment-region "c$$$"
!   "*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."
!   :type  'boolean
!   :group 'fortran)
! 
! (defcustom fortran-column-ruler-fixed
!   "0   4 6  10        20        30        40        5\
! 0        60        70\n\
! \[   ]|{   |    |    |    |    |    |    |    |    \
! \|    |    |    |    |}\n"
!   "String displayed above current line by \\[fortran-column-ruler].
! This variable is used in fixed format mode.
! See the variable `fortran-column-ruler-tab' for TAB format mode."
!   :type  'string
!   :group 'fortran)
! 
! (defcustom fortran-column-ruler-tab
!   "0       810        20        30        40        5\
! 0        60        70\n\
! \[   ]|  { |    |    |    |    |    |    |    |    \
! \|    |    |    |    |}\n"
!   "String displayed above current line by \\[fortran-column-ruler].
! This variable is used in TAB format mode.
! See the variable `fortran-column-ruler-fixed' for fixed format mode."
!   :type  'string
!   :group 'fortran)
! 
! (defcustom fortran-analyze-depth 100
!   "Number of lines to scan to identify fixed or TAB format style."
!   :type  'integer
!   :group 'fortran)
! 
! (defcustom fortran-break-before-delimiters t
!   "*Non-nil causes filling to break lines before delimiters.
  Delimiters are characters matching the regexp `fortran-break-delimiters-re'."
    :type  'boolean
    :group 'fortran)
--- 120,126 ----
    :type  '(radio (const :tag "Untouched" nil) (const fixed) (const relative))
    :group 'fortran-indent)
  
! (defcustom fortran
  Delimiters are characters matching the regexp `fortran-break-delimiters-re'."
    :type  'boolean
    :group 'fortran)
***************
*** 329,634 ****
                              "gt" "ne" "true" "false")
                            'paren) "\\.")
             ;; do/goto keywords and targets, and goto tags.
!            '("\\<\\(do\\|go *to\\)\\>[ \t]*\\([0-9]+\\)?"
!              (1 font-lock-keyword-face)
!              (2 font-lock-constant-face nil t))
!            '("^ *\\([0-9]+\\)" . font-lock-constant-face)))
!   "Medium level highlighting for Fortran mode.")
! 
! (defvar fortran-font-lock-keywords-3
!   (append
!    fortran-font-lock-keywords-1
!    ;; All type specifiers plus their declared items.
!    (list
!     (list (concat fortran-type-types "[ \t(/]*\\(*\\)?")
!           ;; Type specifier.
!           '(1 font-lock-type-face)
!           ;; Declaration item (or just /.../ block name).
!           `(font-lock-match-c-style-declaration-item-and-skip-to-next
!             ;; Start after any *(...) expression.
!             (condition-case nil
!                 (and (match-beginning ,(1+ (regexp-opt-depth
!                                             fortran-type-types)))
!                      (forward-sexp)
!                      (forward-sexp))
!               (error nil))
!             ;; No need to clean up.
!             nil
!             ;; Fontify as a variable name, functions fontified elsewhere.
!             (1 font-lock-variable-name-face nil t))))
!    ;; Things extra to `fortran-font-lock-keywords-3' (must be done first).
!    (list
!     ;; Goto-like `err=label'/`end=label' in read/write statements.
!     '(", *\\(e\\(nd\\|rr\\)\\)\\> *\\(= *\\([0-9]+\\)\\)?"
!       (1 font-lock-keyword-face) (4 font-lock-constant-face nil t))
!     ;; Standard continuation character and in a TAB-formatted line.
!     '("^ \\{5\\}\\([^ 0\n]\\)" 1 font-lock-string-face)
!     '("^\t\\([1-9]\\)"         1 font-lock-string-face))
!    `((,fortran-directive-re (0 font-lock-keyword-face t)))
!    ;; `fortran-font-lock-keywords-2' without types (see above).
!    (cdr (nthcdr (length fortran-font-lock-keywords-1)
!                 fortran-font-lock-keywords-2)))
!   "Gaudy level highlighting for Fortran mode.")
! 
! ;; Comments are real pain in Fortran because there is no way to
! ;; represent the standard comment syntax in an Emacs syntax table.
! ;; (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.")
! 
! (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1
!   "Default expressions to highlight in Fortran mode.")
! 
! (defvar fortran-imenu-generic-expression
!   ;; These patterns could be confused by sequence nos. in cols 72+ and
!   ;; don't allow continuations everywhere.
!   (list
!    (list
!     nil
!     ;; [This will be fooled by `end function' allowed by G77.  Also,
!     ;; it assumes sensible whitespace is employed.]
!     (concat
!      ;; leading whitespace:
!      "^\\s-+\\("
!      ;; function declaration with optional type, e.g. `real',
!      ;; `real*4', character(*), `double precision':
!      "\\(\\sw\\|\\s-\\|[*()+]\\)*"
!      "\\<function\\|subroutine\\|entry\\|block\\s-*data\\|program\\)"
!      ;; Possible statement continuation:
!      "[ \t" fortran-continuation-string "]+"
!      ;; Variable to index:
!      "\\(\\sw+\\)")
!     3)
!    ;; Un-named block data.
!    '(nil "^\\s-+\\(block\\s-*data\\)\\s-*$" 1))
!   "Value for `imenu-generic-expression' in Fortran mode.")
! 
! 
! (defvar fortran-mode-syntax-table
!   (let ((table (make-syntax-table)))
!     ;; We might like `;' to be punctuation (g77 multi-statement
!     ;; lines), but that screws abbrevs.
!     (modify-syntax-entry ?\; "w"  table)
!     (modify-syntax-entry ?\r " "  table)
!     (modify-syntax-entry ?+  "."  table)
!     (modify-syntax-entry ?-  "."  table)
!     (modify-syntax-entry ?=  "."  table)
!     (modify-syntax-entry ?*  "."  table)
!     (modify-syntax-entry ?/  "."  table)
!     (modify-syntax-entry ?\' "\"" table)
!     (modify-syntax-entry ?\" "\"" table)
!     ;; Consistent with GNU Fortran -- see the manual.
!     (modify-syntax-entry ?\\ "\\" table)
!     ;; This might be better as punctuation, as for C, but this way you
!     ;; can treat floating-point numbers as symbols.
!     (modify-syntax-entry ?.  "_"  table) ; e.g. `a.ne.b'
!     (modify-syntax-entry ?_  "_"  table)
!     (modify-syntax-entry ?$  "_"  table) ; esp. VMSisms
!     (modify-syntax-entry ?\! "<"  table)
!     (modify-syntax-entry ?\n ">"  table)
!     table)
!   "Syntax table used in Fortran mode.")
! 
! (defvar fortran-gud-syntax-table
!   (let ((st (make-syntax-table fortran-mode-syntax-table)))
!     (modify-syntax-entry ?\n "." st)
!     st)
!   "Syntax table used to parse Fortran expressions for printing in GUD.")
! 
! (defvar fortran-mode-map
!   (let ((map (make-sparse-keymap)))
!     (define-key map ";"        'fortran-abbrev-start)
!     (define-key map "\C-c;"    'fortran-comment-region)
!     (define-key map "\M-;"     'fortran-indent-comment)
!     (define-key map "\M-\n"    'fortran-split-line)
!     (define-key map "\M-\C-q"  'fortran-indent-subprogram)
!     (define-key map "\C-c\C-w" 'fortran-window-create-momentarily)
!     (define-key map "\C-c\C-r" 'fortran-column-ruler)
!     (define-key map "\C-c\C-p" 'fortran-previous-statement)
!     (define-key map "\C-c\C-n" 'fortran-next-statement)
!     (define-key map "\C-c\C-d" 'fortran-join-line) ; like f90
!     (define-key map "\M-^"     'fortran-join-line) ; subvert 
delete-indentation
!     (define-key map "0" 'fortran-electric-line-number)
!     (define-key map "1" 'fortran-electric-line-number)
!     (define-key map "2" 'fortran-electric-line-number)
!     (define-key map "3" 'fortran-electric-line-number)
!     (define-key map "4" 'fortran-electric-line-number)
!     (define-key map "5" 'fortran-electric-line-number)
!     (define-key map "6" 'fortran-electric-line-number)
!     (define-key map "7" 'fortran-electric-line-number)
!     (define-key map "8" 'fortran-electric-line-number)
!     (define-key map "9" 'fortran-electric-line-number)
! 
!     (easy-menu-define fortran-menu map "Menu for Fortran mode."
!       `("Fortran"
!         ["Manual" (info "(emacs)Fortran")]
!         ("Customization"
!          ,(custom-menu-create 'fortran)
!          ["Set"  Custom-set t]
!          ["Save" Custom-save t]
!          ["Reset to Current" Custom-reset-current t]
!          ["Reset to Saved"   Custom-reset-saved t]
!          ["Reset to Standard Settings" Custom-reset-standard t]
!          )
!         "--"
!         ["Comment Region" fortran-comment-region mark-active]
!         ["Uncomment Region"
!          (fortran-comment-region (region-beginning) (region-end) 1)
!          mark-active]
!         ["Indent Region"     indent-region mark-active]
!         ["Indent Subprogram" fortran-indent-subprogram t]
!         "--"
!         ["Beginning of Subprogram" fortran-beginning-of-subprogram t]
!         ["End of Subprogram"       fortran-end-of-subprogram       t]
!         ("Mark"
!          ["Subprogram" mark-defun      t]
!          ["IF Block"   fortran-mark-if t]
!          ["DO Block"   fortran-mark-do t]
!          )
!         ["Narrow to Subprogram" narrow-to-defun t]
!         ["Widen" widen t]
!         "--"
!         ["Temporary column ruler" fortran-column-ruler  t]
!         ["72-column window"       fortran-window-create t]
!         ["Full Width Window"
!          (enlarge-window-horizontally (- (frame-width) (window-width)))
!          (< (window-width) (frame-width))]
!         ["Momentary 72-column window" fortran-window-create-momentarily t]
!         "--"
!         ["Break Line at Point"    fortran-split-line t]
!         ["Join Line"              fortran-join-line  t]
!         ["Fill Statement/Comment" fill-paragraph     t]
!         "--"
!         ["Toggle auto-fill"   auto-fill-mode :selected auto-fill-function
!          :style toggle]
!         ["Toggle abbrev-mode" abbrev-mode    :selected abbrev-mode
!          :style toggle]
!         ["Add imenu Menu" imenu-add-menubar-index
!          :active   (not (lookup-key (current-local-map) [menu-bar index]))
!          :included (fboundp 'imenu-add-to-menubar)]))
!     map)
!   "Keymap used in Fortran mode.")
! 
! 
! (defvar fortran-mode-abbrev-table
!   (let (abbrevs-changed)
!     (define-abbrev-table 'fortran-mode-abbrev-table nil)
!     ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible.
!     ;; Only use `apply' to quieten the byte-compiler.
!     (mapcar
!      (function (lambda (element)
!                  (condition-case nil
!                      (apply 'define-abbrev fortran-mode-abbrev-table
!                             (append element '(nil 0 t)))
!                    (wrong-number-of-arguments
!                     (apply 'define-abbrev fortran-mode-abbrev-table
!                            (append element '(nil 0)))))))
!      '((";au"   "automatic"         )
!        (";b"    "byte"              )
!        (";bd"   "block data"        )
!        (";ch"   "character"         )
!        (";cl"   "close"             )
!        (";c"    "continue"          )
!        (";cm"   "common"            )
!        (";cx"   "complex"           )
!        (";df"   "define"            )
!        (";di"   "dimension"         )
!        (";do"   "double"            )
!        (";dc"   "double complex"    )
!        (";dp"   "double precision"  )
!        (";dw"   "do while"          )
!        (";e"    "else"              )
!        (";ed"   "enddo"             )
!        (";el"   "elseif"            )
!        (";en"   "endif"             )
!        (";eq"   "equivalence"       )
!        (";ew"   "endwhere"          )
!        (";ex"   "external"          )
!        (";ey"   "entry"             )
!        (";f"    "format"            )
!        (";fa"   ".false."           )
!        (";fu"   "function"          )
!        (";g"    "goto"              )
!        (";im"   "implicit"          )
!        (";ib"   "implicit byte"     )
!        (";ic"   "implicit complex"  )
!        (";ich"  "implicit character")
!        (";ii"   "implicit integer"  )
!        (";il"   "implicit logical"  )
!        (";ir"   "implicit real"     )
!        (";inc"  "include"           )
!        (";in"   "integer"           )
!        (";intr" "intrinsic"         )
!        (";l"    "logical"           )
!        (";n"    "namelist"          )
!        (";o"    "open"              )   ; was ;op
!        (";pa"   "parameter"         )
!        (";pr"   "program"           )
!        (";ps"   "pause"             )
!        (";p"    "print"             )
!        (";rc"   "record"            )
!        (";re"   "real"              )
!        (";r"    "read"              )
!        (";rt"   "return"            )
!        (";rw"   "rewind"            )
!        (";s"    "stop"              )
!        (";sa"   "save"              )
!        (";st"   "structure"         )
!        (";sc"   "static"            )
!        (";su"   "subroutine"        )
!        (";tr"   ".true."            )
!        (";ty"   "type"              )
!        (";vo"   "volatile"          )
!        (";w"    "write"             )
!        (";wh"   "where"             )))
!     fortran-mode-abbrev-table))
! 
! 
! 
! ;;;###autoload
! (defun fortran-mode ()
!   "Major mode for editing Fortran code in fixed format.
! For free format code, use `f90-mode'.
! 
! \\[fortran-indent-line] indents the current Fortran line correctly.
! Note that DO statements must not share a common CONTINUE.
! 
! Type ;? or ;\\[help-command] to display a list of built-in abbrevs for\
!  Fortran keywords.
! 
! Key definitions:
! \\{fortran-mode-map}
! 
! Variables controlling indentation style and extra features:
! 
! `comment-start'
!   To use comments starting with `!', set this to the string \"!\".
! `fortran-do-indent'
!   Extra indentation within DO blocks (default 3).
! `fortran-if-indent'
!   Extra indentation within IF blocks (default 3).
! `fortran-structure-indent'
!   Extra indentation within STRUCTURE, UNION, MAP and INTERFACE blocks.
!   (default 3)
! `fortran-continuation-indent'
!   Extra indentation applied to continuation statements (default 5).
! `fortran-comment-line-extra-indent'
!   Amount of extra indentation for text in full-line comments (default 0).
! `fortran-comment-indent-style'
!   How to indent the text in full-line comments. Allowed values are:
!   nil       don't change the indentation
!   fixed     indent to `fortran-comment-line-extra-indent' beyond the
!               value of either
!                 `fortran-minimum-statement-indent-fixed' (fixed format) or
!                 `fortran-minimum-statement-indent-tab' (TAB format),
!               depending on the continuation format in use.
!   relative  indent to `fortran-comment-line-extra-indent' beyond the
!             indentation for a line of code.
    (default 'fixed)
  `fortran-comment-indent-char'
    Single-character string to be inserted instead of space for
--- 213,219 ----
                              "gt" "ne" "true" "false")
                            'paren) "\\.")
             ;; do/goto keywords and targets, and goto tags.
!            '("\\<\\(do\\|go *to\\)\\>[ \
    (default 'fixed)
  `fortran-comment-indent-char'
    Single-character string to be inserted instead of space for




reply via email to

[Prev in Thread] Current Thread [Next in Thread]