]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs--devo--0
authorMiles Bader <miles@gnu.org>
Fri, 3 Aug 2007 05:27:05 +0000 (05:27 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 3 Aug 2007 05:27:05 +0000 (05:27 +0000)
Patches applied:

 * emacs--devo--0  (patch 839-842)

   - Update from CVS
   - Change capitalization of VC backend names for new backends

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-240

22 files changed:
etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/calc/calc-math.el
lisp/cus-edit.el
lisp/emacs-lisp/pp.el
lisp/ibuf-ext.el
lisp/menu-bar.el
lisp/net/telnet.el
lisp/pcvs.el
lisp/progmodes/fortran.el
lisp/progmodes/python.el
lisp/vc-bzr.el
lisp/vc-git.el
lisp/vc-hg.el
lisp/vc-hooks.el
lisp/vc.el
man/ChangeLog
man/cc-mode.texi
src/ChangeLog
src/gtkutil.c
src/mac.c

index 5dded8c4f91a5dc11a9ff2c6a9aa35bc308d4d92..7da5459c40c7514ec966ab6073f47d44a787b00a 100644 (file)
@@ -1,3 +1,7 @@
+2007-08-01  Glenn Morris  <rgm@gnu.org>
+
+       * NEWS: Add fortran-line-length, plus some more sections.
+
 2007-07-25  Glenn Morris  <rgm@gnu.org>
 
        *  Relicense all FSF files to GPLv3 or later.
index cf6019cbfd238b04006c1dc2b8162833875d5def..f56a7a0bf0cfd78ef868dbf46b0fe100a06bdb46 100644 (file)
--- 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.
@@ -139,13 +142,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.
+
 \f
 * Changes in Emacs 23.1 on non-free operating systems
 
index f48ea78a246c40bf50536abcfb0d0dc6459187f6..19014a996f9bbef477d3763b53eaab6372313888 100644 (file)
@@ -1,3 +1,84 @@
+2007-08-03  Miles Bader  <miles@gnu.org>
+
+       * 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  <rgm@gnu.org>
+
+       * 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  <drew.adams@oracle.com>
+
+       * emacs-lisp/pp.el (pp-eval-expression): Add progress message.
+       Make buffer writable.
+
+2007-08-01  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * 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  <dann@ics.uci.edu>
+           Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * 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  Eric Hanchrow  <offby1@blarg.net>  (tiny change)
+
+       * ibuf-ext.el (ibuffer-mark-old-buffers): Docstring fix.
+
+2007-08-01  Glenn Morris  <rgm@gnu.org>
+
+       * 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  <drew.adams@oracle.com>  (tiny change)
+
+       * cus-edit.el (custom-group-value-create, custom-goto-parent): Fix
+       parent groups link.
+
+2007-07-31  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * progmodes/python.el (python-current-defun): Adjust to never fall
+       into infinite loop.
+
+2007-07-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * pcvs.el (cvs-vc-command-advice): Handle the new fileset case.
+
 2007-07-29  Kimit Yada  <kimitto@gmail.com>  (tiny change)
 
        * emacs-lisp/copyright.el (copyright-update-year, copyright-update)
index a442f2b4e035b9f49593b822e46afd66acd9463a..a4dad15c14e571ffef0c92016d7474e10e3a6630 100644 (file)
@@ -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
index ff86711e041a972c19b5b5a14318b142d9a26835..2cfd247a64514e449fa9fe06ac16c23548cee3fe 100644 (file)
@@ -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*"))))
@@ -3878,7 +3885,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 +4487,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)))))
index 21175a03b4d8cc318eba7e216b9f50aafaa6a18f..a5cefff399f0138522f835ed87c59a5eab85c0fb 100644 (file)
@@ -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
index 4f510472d54d1136a9bb402c94af8d0adfd0e920..b077342e5f522ea9e7b801e311abd14d8232dfa6 100644 (file)
@@ -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)
index d9f6405cf57993f2de51e6e8d81d29928c95db8a..6b57976368926c9d434d4bfb54f66c9c5d6cfbbf 100644 (file)
@@ -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]
   '("--"))
index c7b37050ed267d3ffa5d23aff46d4887d5621645..28f7d1ddb46a480aee5ebcb218e946c7066245c0 100644 (file)
@@ -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]*>\\)")
 
index 901110bbfa387872b2f1c401e893ab3dcefa43f0..5c79f7a5fb9227a661b4bc8b2d47d321968ddb25 100644 (file)
@@ -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))))))))
index b9865613765275c0c206cdace977181c04ba4d22..97f4c1c2616fc0d6e3d110cb6b8f03de9013fa72 100644 (file)
@@ -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 <prange@erl.mit.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
   :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)
+
+\f
 (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)
-
-\f
-(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]+\\)" (1- 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))
 
 \f
+(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)))))
 
index c3caa7e397c1f9975c398011cd8cfbe2f6e1aa29..9bef41a0878e7ba838fa6c45073e9202056792f2 100644 (file)
@@ -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 ".."))
index 6a8f930f00f7004d6783bf5addc795d857131c40..b2011a7176e87e63a34b25f31b90218c1f66b6be 100644 (file)
@@ -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)
index e4a9d26105a687712ac0e5b501d4d23b038f43b8..156b2866eb9cb138de33e7fb3ab8fed1b4a51050 100644 (file)
 
 ;;; 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
     (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)
 (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]+\\(.+\\)")
index d8a7ec0dd46f7e797b67c9e7830fe0ef4da6d338..1415f8d94992477dedaba79272d86d6127daa0a8 100644 (file)
 (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)
index a8b6297caa2d458e106bbb689096a9edc3e90b96..09001e59691720e140de03767e3c13b1e1fe7725 100644 (file)
@@ -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
@@ -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.
index 5030fb6447122345d698d7c69918f0cb39895856..78e098d874ffb12b51903add0c4c516babec4d23 100644 (file)
 ;;
 ;;   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.
 ;;
 ;;
 ;;   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:
 
index 703b3d3441f78da77249d8acc5ab8f07d45d1ddc..80ddad0085dd7fbf82e46ad460bf2568ba04832d 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-01  Alan Mackenzie  <acm@muc.de>
+
+       * cc-mode.texi (Mailing Lists and Bug Reports): Correct "-no-site-file"
+       to "--no-site-file".
+
 2007-07-29  Michael Albinus  <michael.albinus@gmx.de>
 
        * tramp.texi (Frequently Asked Questions): Point to mode line
index 3cb670b3b53ddea10bd6e442867c2e446dff2700..423892d7d303c29cee9188efcbb6e422773c8498 100644 (file)
@@ -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
index 8c6d978a09f490cdfc24a2bfcfba52064841b659..7e0edb14fd3de823f828a393d1601841072d7802 100644 (file)
@@ -1,3 +1,12 @@
+2007-08-01  Ryo Yoshitake  <ryo@shiftmode.net>  (tiny change)
+
+       * mac.c (init_mac_osx_environment): Adjust load-path on self-contained
+       build.
+
+2007-07-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * gtkutil.c (xg_tool_bar_callback): Generate a single TOOL_BAR_EVENT.
+
 2007-07-30  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * puresize.h (BASE_PURESIZE): Increase to 1130000.
index d463e0e6d79d8629932c97883dabb8f328fccb2d..f52e68b1230e5770ec9c510b7865c918459e143c 100644 (file)
@@ -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;
index a64c3d208e3648e4d0539e003eba0e0ff65f201e..e81db1479b96ae6beae906a8a98c03964388d696 100644 (file)
--- 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 "<path to lisp dir>:<path to leim dir>:<path to
-     site-lisp dir>".  */
+     have the value "<path to site-lisp dir>:<path to lisp dir>:<path
+     to leim dir>".  */
   p = (char *) alloca (app_bundle_pathname_len + 50);
   q = (char *) alloca (3 * app_bundle_pathname_len + 150);
   if (!getenv ("EMACSLOADPATH"))
@@ -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')