views:

744

answers:

2

I have used the following as comments in my .emacs

// {{{
// }}}

My .emacs

;; Basic Characteristics// {{{*/
(setq c-basic-offset 4) ; indents 4 chars
(setq tab-width 4)          ; and 4 char wide for TAB
(setq indent-tabs-mode nil) ; And force use of spaces

(turn-on-font-lock)       ; same as syntax on in Vim

(setq inhibit-splash-screen t)         ; hide welcome screen// }}}*/

;;;; For Emacs' org -mode// {{{*/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; The following lines are always needed.  Choose your own keys.
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

(global-font-lock-mode 1)                     ; for all buffers
(add-hook 'org-mode-hook 'turn-on-font-lock)  ; Org buffers only

;; This is needed for Emacs 22, not for 23
(transient-mark-mode 1)

;; To load Lisp files 

;; includes only one folder
;; (add-to-list 'load-path "~/.lisp")
;// }}}*/
;; to include all subdirectories too// {{{*/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 1. color theme
;;; 2. Google hyperlinks

;;; this code includes only one folder
(let ((base "/Users/Masi/.lisp"))
  (add-to-list 'load-path base)
  (dolist (f (directory-files base))
    (let ((name (concat base "/" f)))
      (when (and (file-directory-p name) 
                 (not (equal f ".."))
                 (not (equal f ".")))
        (add-to-list 'load-path name)))))

;// }}}*/
; customize hs-minor-mode// {{{*/
(add-hook 'c-mode-common-hook
  (lambda()
    (local-set-key (kbd "C-c <right>") 'hs-show-block)
    (local-set-key (kbd "C-c <left>")  'hs-hide-block)
    (local-set-key (kbd "C-c <up>")    'hs-hide-all)
    (local-set-key (kbd "C-c <down>")  'hs-show-all)
    (hs-minor-mode t)))
;// }}}*/
;; Folds// {{{*/

; to enable folding mode
(load "folding" 'nomessage 'noerror)
(folding-mode-add-find-file-hook)t

 ;;{{{ LaTeX mode stuff
 (add-hook 'TeX-mode-hook
                   '(lambda ()
                          (LaTeX-math-mode)
                          (turn-on-reftex)))
 ;;// }}}*/

I get the following error

Loading encoded-kb...done


An error has occurred while loading `/Users/Masi/.emacs':

error: Too many arguments

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

In debug mode, it says

Debugger entered--Lisp error: (error "Too many arguments")
  (defvar folding-package-url-location "Latest folding is available at http://cvs.xemacs.org/-xemacs-p (or (boundp 'xemacs-logo)\n                         $
  eval-buffer(#<buffer  *load*<2>> nil "/Users/Masi/.lisp/folding.el" nil t)  ; Reading at buffer position 35362
  load-with-code-conversion("/Users/Masi/.lisp/folding.el" "/Users/Masi/.lisp/folding.el" t t)
  load("folding" nomessage noerror)
  eval-buffer(#<buffer  *load*> nil "/Users/Masi/.emacs" nil t)  ; Reading at buffer position 2224
  load-with-code-conversion("/Users/Masi/.emacs" "/Users/Masi/.emacs" t t)
  load("~/.emacs" t t)
  #[nil "^H\205\276^@   \306=\203^Q^@\307^H\310Q\202A^@ \311=\2033^@\312\307\313\314#\203#^@\315\202A^@\312\307\313\316#\203/^@\317\202A^@\315\202A^@   \32$
  command-line()
  normal-top-level()

My ~/.lisp/folding.el

;;; folding.el --- A folding-editor-like minor mode.

;; This file is not part of Emacs

;; Copyright (C) 2000-2009
;;           Jari Aalto
;; Copyright (C) 1995, 1996, 1997, 1998, 1999
;;           Jari Aalto, Anders Lindgren.
;; Copyright (C) 1994
;;           Jari Aalto
;; Copyright (C) 1992, 1993
;;           Jamie Lokier, All rights reserved.
;;
;; Author:      Jamie Lokier <jamie A T imbolc.ucc dt ie>
;;              Jari Aalto <jari aalto A T cante dt net>
;;              Anders Lindgren <andersl A T csd.uu dt se>
;; Maintainer:  Jari Aalto <jari aalto A T cante dt net>
;; Created:     1992
;; Keywords:    tools
;;
;; [Latest XEmacs CVS tree commit and revision]
;; VCS-Version: $Revision: 3.42 $
;; VCS-URL:     http://savannah.nongnu.org/projects/emacs-tiny-tools/
;; VCS-Date:    $Date: 2007/05/07 10:50:05 $
;;
;; [Latest devel: Savannah emacs-tiny-tools revision]
;; Version:     git 56b3089

(defconst folding-version-time "2009.0220.1404"
  "Last edit time in format YYYY.MMDD.HHMM.")

;;{{{ GPL

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation,
;; or (at your option) any later version.
;;
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with program. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;
;; Visit <http://www.gnu.org/copyleft/gpl.html&gt; for more information

;;}}}

;;; Commentary:

;;{{{ Introduction

;; Preface
;;
;;      This package provides a minor mode, compatible with all major
;;      editing modes, for folding (hiding) parts of the edited text or
;;      program.
;;
;;      Folding mode handles a document as a tree, where each branch
;;      is bounded by special markers `{{{' and `}}}'. A branch can be
;;      placed inside another branch, creating a complete hierarchical
;;      structure.
;;
;;      Folding mode can CLOSE a fold, leaving only the initial `{{{'
;;      and possibly a comment visible.
;;
;;      It can also ENTER a fold, which means that only the current
;;      fold will be visible, all text above `{{{' and below `}}}'
;;      will be invisible.
;;
;;      Please note, that the maintainers do not recommend to use only
;;      folding for you your code layout and navigation. Folding.el is
;;      on its best when it can "chunk" large sections of code inside
;;      folds. The larger the chunks, the more the usability of
;;      folding will increase. Folding.el is not meant to hide
;;      individual functions: you may be better served by hideshow.el
;;      or imenu.el (which can parse the function indexes)

;;}}}
;;{{{ Installation

;;  Installation
;;
;;      To install Folding mode, put this file (folding.el) on your
;;      Emacs `load-path' (or extend the load path to include the
;;      directory containing this file) and optionally byte compile it.
;;
;;      The best way to install folding is the autoload installation,
;;      so that folding is loaded into your emacs only when you turn on
;;      `folding-mode'. This statement speeds up loading your .emacs
;;
;;          (autoload 'folding-mode          "folding" "Folding mode" t)
;;          (autoload 'turn-off-folding-mode "folding" "Folding mode" t)
;;          (autoload 'turn-on-folding-mode  "folding" "Folding mode" t)
;;
;;      But if you always use folding, then perhaps you want more
;;      traditional installation. Here Folding mode starts
;;      automatically when you load a folded file.
;;
;;          ;; (setq folding-default-keys-function
;;          ;;      'folding-bind-backward-compatible-keys)
;;
;;          (if (load "folding" 'nomessage 'noerror)
;;              (folding-mode-add-find-file-hook))
;;
;;      Folding uses a keymap which conforms with the new Emacs
;;      (started 19.29) style. The key bindings are prefixed with
;;      "C-c@" instead of old "C-c". To use the old keyboard bindings,
;;      uncomment the lines in the the above installation example
;;
;;      The same folding marks can be used in `vim' editor command
;;      "set fdm=marker".
;;
;;  Uninstallation
;;
;;      To remove folding, call `M-x' `folding-uninstall'.
;;
;;  To read the manual
;;
;;      At any point you can reach the manual with `M-x'
;;      `finder-commentary' RET folding RET.

;;}}}
;;{{{ DOCUMENTATION

;;  Compatibility
;;
;;      Folding supports following Emacs flavors:
;;
;;          Unix Emacs  19.28+ and Win32 Emacs  19.34+
;;          Unix XEmacs 19.14+ and Win32 XEmacs 21.0+
;;
;;  Compatibility not for old NT Emacs releases
;;
;;      NOTE: folding version starting from 2.47 gets around this bug
;;      by using adviced kill/yank functions. The advice functions are
;;      only instantiated under problematic NT Emacs versions.
;;
;;      Windows NT/9x 19.34 - 20.3.1 (i386-*-nt4.0) versions contained
;;      a bug which affected using folding. At the time the bug was
;;      reported by Trey Jackson <trey A T cs berkeley edu>
;;
;;          If you kill folded area and yank it back, the ^M marks are
;;          removed for some reason.
;;
;;          Before kill
;; packages or modes
;;
;;      Folding.el was designed tofor big files. Sometimes people misunderstand the
;;       better job. Trying to wrap
;;      individual functions insis not where folding is
;;      it's best. Grouping several f logical fold-block
;;      in the other is. So, to choose a our need,
;;      here are some suggestions,:
;;
;;      o  Naation of imenu.el, speedbar.el and
;;         hideshow.el
;;  ng.el
;;      o  For text, `outline-mode' is more non-intrusive.
;;         Look at Emacs NEWS file (`C-x' `n') and you can se: `M-x' `folding-mode'
;;      `RET'. The mode line should cont When loading a document containing fold marks, Folding mode ised. For example when
;;      loading my init file, only the follines
;;      of comments) are visible:
;;
;;          ;;{{{ Ge  ;;{{{ Keyboard...
;;          ;;{{{ Packages...
;;          ;;          ;;{{{ Minor modes...
;;          ;;{{{ Debug...
;;
;t entering,
;;      use `C-c @ C-s', which produces this displa
;;          ;;}}}
;;
;;      To show everything, just as the fook like if
;;      Folding mode hadn't been activated, give thT', normally bound to `C-c' `@'
;;      `C-o'.  To close all foevel, the
;;      command `folding-whole-buffer' could be used.ouse support
;;
;;      Folding mode v2.0 introduced mouse support. Folds can be shown
;;      or hidden by simply clicking ondidn't click on a
;;      fold mark.
;;
;;  The menu
;;
;;      placed in the "Tools" menu. Should no Tools menu exist
;;     he menu will be placed in the menu bar.
;;
;;  ISearch
;;
;;    incremental search (C-s) facilities,
;;      folds will be aut;;
;;  Problems
;;
;;     Uneven fold marks
;;
;;      Oops, I        ;;{{{
;;          ;;}}}
;;
;;     folding-whole-buffer d whole buffer
;;
;;      If you call commands `folding-open-bufd
;;      `folding-whole-buffer' and notice that there are open;;      sections in the buffer, then you have mismatch of foldspen or closing fold mark.
;;
;;  Folding and outline modes
;;
;ame as Outline mode, a major and
;;      minor mode which is pahe Emacs distribution. The two
;;      packages do, however, re other very much.  The main
;;      differences between the twore:
;;
;;      o   Folding mode uses explicit marks, `{{{' and `}}}', to
;;          mark the beginning and the end of a branch.
;;          Outline, on the other other hand, tries to use already
;;          existing marks, like the `\section' string in a TeX
;;          document.
;;
;;      o   Outline mode has no end marker which means that it is
;;          impossible for text to follow a sub-branch.
;;
;;      o   Folding mode use the same markers for branches on all depths,
;;          Outline mode requires that marks should be longer the
;;          further, down in the tree you go, e.g `\chap', \section',
;;          `\subsection', `\subsubsection'. This is needed to
;;          distinguish the next mark at the current or higher levels
;;          from a sub-branch, a problem caused by the lack of
;;        end-markers.
;;
;;      o   Folding mode has mouse suppoyou can navigate through a
;;          folded document by clicksion
;;          of Outline mode has mouse support.)
;;
;;      of Folding is capable of
;;          automatically to open folthe the entire
;;          document must be opened prior isearcutline mode is useful when the document being
;;      edited coers are hard to find, except if you're happy with
;;      one fn per fold.
;;
;;  Future development ideas
;;
;;      The planinning to rewrite the entire package.
;;      Including replacithe program, written using
;;      old Emacs technology (selectys or text-properties for
;;      Emacs and extents for XEmacs.;;
;;      It is not likely that any of this will come true coning
;;      the time required to rewrite the core of the package. Since
;;      the package, in it's current state, is much more powerful than
;;      the original, it would be appropriate to write such package
;;      from scratch instead of doing surgery on this one.

;;}}}

;;{{{ Customization

;;  Customization: general
;;
;;      The behavior of Folding mode is controlled mainly by a set of
;;      Emacs Lisp variables. This section will discuss the most
;;      useful ones, for more details please see the code. The
;;      descriptions below assumes that you know a bit about how to
;;      use simple Emacs Lisp and kt ~/.emacs, your
;;      init file.
;;
;;  Customization: hooks a
;;      function doing the customization. The function is the see
;;      the example section below.)  The following hooks lding mode is activated.
;;      o   `<major mode>-folding-hookjor
;;           mode set to <major mode>. (e.g. When editing C    the hook `c-mode-folding-hook' is called.)
;;      o   `fol        Called when folding mode is loaded into Emacs.
;;
;;  C     it is used by outline-minor-mode. It is not likely that fe try to use folding and outline at the same time.
;;
;;      Ho.  The
;;      variable `folding-default-keys-function' specifiing line to your
;;      init file:
;;
;;          (setq folding-default-keys-function
;;                'folding-bind-backward-compatible-keys)
;;
;;      To define keys similar to the keys used by Outline mode, use:
;;
;;          (setq folding-defaut-keys-function
;;                'folding-bind-outline-compati-keys)
;;
;;  Customization: adding new major modes
;;
;;      To add fold marks for a new major mode, use the function
;;      `folding-add-to-marks-list'. The command also replaces
;;     existing marks. An example:
;;
;;          (folding-add-to-marks-list
;;           'c-mode "/* {{{ " "/* }}} */" " */" t)
;;
;  Customization: ISearch
;;
;;      If you don't like the extension folding.el applies to isearch,
;;      set the variable `folding-isearch-install' to nil before
;;      loading this pacndard
;;      ones, you can do like this:
;;
;;           (setqs-function
;;               '(folding-bind-backward-compatible-   "Folding setup."
;;
;;             (folding-install)  ;; jus;; ............................................... markers ...
;;             ;;  sh/perl/awk code
;;
;;             (defvar f-marks-alist nil)
;;
;;             (let* ((ptr (assq 'text-mode folding-mode-marks-alist)))
;;               (setcdr ptr (list "# {{{" "# }}}")))
;;
;;             ;; .....................rrent-entry)
;;             (define-key folding-mode-prefix-map                        'folding-whole-buffer))
;;
;;  Example:;;          (defun my-folding-load-hook ()
;;            "Foldi;  Change marks for 'text-mode'
;;            (let* ((ptr (assqing-mode-marks-alist)))
;;              (setcdr ptr (list "# {{xample: choosing different fold marks for mode
;;
;;      Suppoerent fold marks for the
;;      major mode: e.g. to alternate             (defun my-folding-text-mode-setup (&optional use-cu             (interactive
;;                (list (y-or-n-p "Us;              (let* ((ptr (assq major-mode folding-mode-marks-          (when (eq major-mode 'text-mode)
;;                                  (setq  begin default-begin  end default-end)))
;;                (setcdr ptr (list begin end))
;;             f these 3 is to be folded at any
;;      one time, using a simpomment types, e.g., "unfold
;;      everything then fold on \x";;
;;          \O   ...  \endO
;;          \L   ...  \endL
;;         "Folding vars setup."
;;            (let ((ptr (assq 'te;;              (define-key folding-mode-prefix-map "C"
;;                         'my-folding-marks-change)))
;;
;;          ctive "P")
;;            (let ((ptr (assq major-mode folding-mome  major-mode))
;;                (setq input
;;              read-string "Latex \\end(X) Marker (default O): "
;;                       (setq input (upcase input))
;;                (turnncat "\\" input) (concat "\\end" input)))
;;                (tu      ;;  End of example
;;
;;  Bugs: Lazy-shot.el conflict in  in the minibuffer and XEmacs freezes.
;;
;;      The strange phat I have this bug only under Solaris
;;      2.5 sparc (binar.6 x86. (XEmacs 20.4, folding 2.35). I will try to access
;;   ;;      the XEmacs people I you can reproduce it.

;;}}}
;;{{{  Documentation

;;  Old documentation
;;
;;      The following s written by Jamie Lokier for the release
;;      of Folding V1t is included here for no particular reason:
;;
;;      Emacs 1 frames, then move in
;;      and out of folds in the buffer. Tnerally in order to
;;      avoid some Emacs display "features"ome of it is specific to
;;      certain versions of Emacs. By ;;
;;  More known bugs
;;
;;      *** Needs folding-fold-regionk out what happens when you
;;      exit a fold with the file dat sometime.
;;
;;  Future features
;;
;;      *** I will add a earlier versions does not count line-numbers in the right
;;  ve.
;;
;;      *** Fold titles should be optionally allowed on invisible text-properties (I hope they are intended to
;;      sible; it isn't implemented like that yet), it
;;      will be ed text without affecting the
;;      text of the buffer. At thrns for line-feeds in the buffer. This isn't such
;;      a gooeven more text-properties, it may be possible to track
;;      and out of folds, and have Folding mode
;;      automatically e necessary to maintain a
;;      sensible display. Because the dified (if
;;      overlays are used to hide text), this is quiorward-char', `folding-goto-line' or
;;      `folding-next-erromight make it possible to
;;      avoid using narrowing. This m3cff7]
;; - Minor documentaton fixes.
;; - Add new `python-mode        [jari 3.36-3.37 2006.1118]
;; - Jeremy Hankins <nowan An org> sent a patch, which
;;   adds variable `folding-narrow-batch affects
;;   mostly `folding-shift-in'. This makes it possader to the beginning for canonnical location.
;;   Updated maid from bibtex-mode.
;;   Changed bib-mode '@comment' => '%'. Clian
;;   Bug#282388
;;
;; Sep  10  2004  21.3             [jari0]
;; - (folding-fold-region): caused to indent bottom fold
;; -mode. Disabled
;;   running `indent-according-to-mode' while i;   Bug reported by Uwe Brauer; oub A T mat dot ucm dot es
;; -whole buffer.
;; - Changed version scheme to date based YYYY.MMed unnecessary 'all rights reserved'.
;; - (folding-check-foldeter, which
;; - protected all email addresses by removing AT-si2.111-2.115]
;; - Merged in changes made by 2003-11-12  Adrian ;   using different expansion macros for XEmacs and Emacs.
;;  rg/xemacs-beta/199810/msg00039.html
;; - (folding-forward-char- 2.112 Renamed.
;;   Was `folding-forward-char'.
;;   (folding-ar-1): 2.112 Renamed.
;;   Was `folding-backward-char'.
;;   (fion with '_p' interactive spec.
;;   (folding-backward-char-macolding-interactive-spec-p): 2.112 New.
;;
;; Sep  11  2003  21.to
;;   lisp-mnt.el and finder.el is installed. Sent patch to Xluded in M-x finder-commentary.
;; - If called like this: `folddiately
;;   `folding-mode', the keybindings were not there any 21  2002  21.2             [jari 2.105-2.106]
;; - Added user n `folding-uninstall'.
;; - Removed `interactive' status: `foldks' and
;;   `folding-uninstall-hooks'
;;
;; Aug  02  2002  20.port. Now beginning and end markers are
;;   highlighted with uding-font-lock-end-mark'. Feature suggested by
;;   <Claude BOUnext-action):New user function.
;;   Code by Scott Evans <gse A
;; - (folding-mouse-call-original): Added `car-safe' to read
; barsook com> fixed the broken XEmacs
;;   isearch support and atch.
;;
;; Jul  19  2001  20.7             [jari 2.92-2.97]
;;t were alone.
;; - XEmacs latex-mode fix. The folds were strangm es
;; - 2.96 Erroneous `:' in `folding-mode-write-file'
;;    should have been `;'. Bug reported by
;;   Brand Michael; mich Small corrections to find-func.el::find-function-search-for-sy08  2001  20.6             [jari 2.88]
;; - Dave Masterson <dmacom> reported that jumping to a
;;   url displayed by the C-h f died. The reason was that the buffer was folded and
;;   find-ted errors.
;;
;; Jan  04  2001  20.6             [jari 2.82]
; `folding-mode-motion-highlight-fold'
;;   and package `mode-motion' Suggested by
;;   Thomas Ruhnau <thomas ruhnau A T intermetall de>
;; - (folding-bind-default-keys): 2.81 New binding C-;   `folding-marks-kill'
;;   (fold-marks-kill): 2.81 New.
;;
;lding-folding-region): 2.80 Renamed to `folding-fold-region'
;;top-mark-p): 2.80 New.
;; - (folding-mark-look-at-bottom-mark-pbottom-mark-p'.
;; - Didn't accept spaces in front of fold mark.80 Added `indent-according-to-mode'
;;   to indent folds as neding-mode'
;; - `folding-keep-hooked' was commented out in `fol;   back.
;;
;; Jul  25  2000  20.6             [jari 2.76-2.78rt for modes:
;;   xrdb-mode, ksh-mode and sql-mode contributedada-mode, asm-mode, awk-mode, cperl-mode, fortran-mode, f90-modn-mode, m4-mode, meta-mode, pascal-mode, prolog-mode,
;;   simu nroff-mode, scribe-mode(*),
;;   sgml-mode
;; - Mode marked wided.
;; - (folding-insert-advertise-folding-mode): 2.76 New. Suggested by
;;   Juhapekka Tolvanen <juhtolv A T st jyu fi>
;; - (folding-bind-default-keys): 2.76
;;   folding-insert-advertis-folding-mode Bound to key "I"
;;
;; Apr  24  1999  20.4       window system where they are really needed.  Someone may use
;;(folding-bind-default-keys): 2.74 Use `folding-bind-terminal-ke-terminal-keys'
;;
;; Feb  13  1999  20.4             [jari 2.7nction 'event-start) event)))
;;
;; Jan  13  1999  20.4        he " " is searched as " *", not requiring a space --> not requiring
;;   a fold name.
;; - (folding-skip-folds): >>feature not not enabled<<
;;   2.69 Do not require trailing " " any more.'
;;   (folding-tidy-inside): >>feature not not enabled<<
;;   2.69 Do not require trailing " " any more.
;; - (folding-install): 2.69 Fixed indentation.
;; - (folding-mark-look-at): 2.69 The "em" missed "*" and thus pressing
;;   mouse-3 at the end-fold didn't collapse the whole fold.
;;
;; Jan  12  1999  20.4             [jari 2.69]
;;   (folding-bind-default-mouse): 2.68
;;   XEmacs and Emacs Mouse binding was different. Now use common
;;   bindings: The S-mouse-2 was superfluous, because mouse-3 already
;;   did that, so the binding was removed.
;;   mouse-3-mouse-2 folding-mouse-pick-move
;;
;;;; Jan  09  1999  20.4    Jan  07  1999  20.4             [jari 2.65-2.66]
;; - The Foldrk-look-at): 2.65 `case-fold-search'
;; - (folding-next-visible65 `case-fold-search'
;; - (folding-skip-folds): 2.65 `case-folh'
;; - (folding-tidy-inside): 2.65 `case-fold-search'
;; - (fo65 `case-fold-search'
;;
;;  Jan  04  1999  20.4             [jally.
;; - (folding-mode): 2.61 Call `folding-set-local-variablple: AucTex setup"
;; - NT Emacs fix wrapped inside `eval-and-c   are now hidden from byte compiler (since the code is not
;; 4  1999  19.34             [jari 2.59-2.61]
;; - New function `olding-all-comment-blocks-in-region):
;;   Check non-whitespace; - (folding-event-posn): 2.63 Got rid of the XEmacs/Emacs
;;  folding-mouse-call-original): 2.63 Got rid of the XEmacs
;;   `;   <smikes A T alumni hmc edu> reported that the `concat' functo "button" event.  Applied patch to use
;;   `format' instead. 19.34             [andersl]
;;  - (folding-install): had extrab  22  1999  19.34             [jari 2.56]
;;  - folding-instalap' is nil and call
;;
;; Feb  19  1999  19.34             [jar;
;; Jan  01  1999  19.34             [jari 2.54]
;; - Byte comfolding-show-all lacked the quote.
;;
;; Dec  30  1998  19.34  bug that hiding
;;   subtree was broken. This turned out to be oblem in fold
;;   handling in general. This release has big reo suggestion by Jesper Pedersen <blackie A T  imada ou dk>
;;  ayed only
;;   while byte compiling file.
;;   (folding-bind-outline-compatible-keys):
;;   Checked the Emacs 20.3 allout.el o-entry'
;;   according to allout.el
;;   (folding-hide): Renamed to `folding-hide-current-entry'
;;   according to allout.el
;that if user
;;   is already on a fold mark, then close currenthat only had
;;   one fold, then calling this function caused enteger and only then move point. This is the
;;   status indicaind-folding-mark'
;;   (folding-find-folding-mark): Fixed. mistntly
;;   moved to point-min.
;;
;; Dec  29  1998  19.34       rted that prefix key
;;   cannot take vector notation [(key)]. is required changing the way
;;   how folding maps the keys. Now uses intermediate keymap
;;   `folding-mode-prefix-map'
;; - `folding-kbd' is new.
;; - `folding-mode' function description has better layout.
;; - `folding-get-mode-marks' is now defsubst.
;;
;; Dec  13  1998  19.34             [jari 2.49-2.50]
;; - Gleb Arshinov <gleb A T CS Stanford EDU> reported that the XEmacs 21.0
;;   `concat' function won't accept integer argument any more and
;;   provided patch for `folding-set-mode-line'.
;;
;; Nov  28  1998  19.34             [jari 2.49-2.50]
;; - Gleb Arshinov <gleb A T CS Stanford EDU> reported that the
;;   zmacs-region-stays must not be set globally but in the functions
;e on tested on XEmacs 21.0 beta
;;   and FSF Emacs 19.34.6 on Ncs-region-stays' to t in XEmacs.
;; - (folding-forward-char): Ueneral): Variables `is-fold' and
;;   `is narrowed' removed, beng
;;   `folding-goto-char', because the narrow case was already taken
;;   cared of in the condition case.
;;
;; Oct  19  1998  19.34             [jari 2.44]
;; -  1998-10-19 Uwe Brauer <o reported that
;;    In Netscape version > 4 the {{{ marks cannjari 2.43]
;; - The "_p" flag does not exist in Emacs 19.34, so seem to open folds any more with Isearch.
;;
;; Oct  5  1998  ;; - Gleb Arshinov <gleb A T cs stanford edu> reported (and suplied patch):
;;   I am using the latest beta of folding.el with XEmacs 21.0 "Finnish
;;   Landrace" [Lucid] (i386-pc-win32) (same bug is present with folding.el
;;   included with XEmacs). Being a big fan of zmacs-region, I was
;;   disappointed to find that folding mode caused my usual way of
;;   selecting regions (e.g. to select a line C-space, C-a, C-e) to break
;;   :( I discovered that the following 3
+1  A: 

It looks like your folding file /Users/Masi/.lisp/folding.el has a problem, we'd need to see the contents of that to determine the error. The reason I say so is that the stack trace goes through a call to load-with-code-conversion - which shows the folding.el file being loaded.

If you take a look at the latest version, found here (version 3.42), the line that begins

(defvar folding-package-url...

is properly formed. However, the stack trace in yours looks like there is some lisp code that somehow made it into the string. Namely the:

(or (boundp 'xemacs-logo)

Try downloading a fresh copy.

Trey Jackson
The code in your link is my folding.el.
Masi
@I could not paste the whole folding.el. It is in your link however still.
Masi
Did you check out the line that has the defvar? For me, it spans 2 lines:(defvar folding-package-url-location "Latest folding is available at http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/text-modes/")and that's it, no (or (boundp 'xemacs-logo)...The lines that have that are a little below and look like:(eval-and-compile (require 'advice) (defvar folding-xemacs-p (or (boundp 'xemacs-logo) (featurep 'xemacs)) "Folding determines which emacs version it is running. t if Xemacs.")-> which is a proper use of defvar.
Trey Jackson
+1  A: 

There's at least one error in the code in your .emacs, here:

; to enable folding mode
(load "folding" 'nomessage 'noerror)
(folding-mode-add-find-file-hook)t

That t is a syntax error as it stands. Might just be a type frpom cut and paste though.

On the error, Trey'd right, and in fact I think I know what the error probably is: somehow the trailing quote mark in the string

"Latest folding is available at http://cvs.xemacs.org/-xemacs-p

has gone missing. From the two of these issues, I suspect your source is corrupt.

Charlie Martin
I solved the problem by deleting the first lines in your answer. It seems that I do not need them. Emacs starts now. Thank you for your help!
Masi