1. 22 May, 2013 1 commit
  2. 08 May, 2013 1 commit
    • Juanma Barranquero's avatar
      Silence byte-compiler warnings. · 5cb15713
      Juanma Barranquero authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header):
      * lisp/faces.el (crm-separator): Silence byte-compiler.
      * lisp/progmodes/gud.el (gdb-speedbar-auto-raise, gud-tooltip-mode)
        (tool-bar-map): Remove unneeded defvars.
      5cb15713
  3. 20 Apr, 2013 1 commit
  4. 25 Feb, 2013 2 commits
    • Stefan Monnier's avatar
    • Eli Zaretskii's avatar
      Implement CLASH_DETECTION for MS-Windows. · 343a2aef
      Eli Zaretskii authored
       src/filelock.c [WINDOWSNT]: Include w32.h.
       (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
       function of that name.  Up-case the macro arguments.
       (IS_LOCK_FILE): New macro.
       (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
       (create_lock_file): New function, with body extracted from
       lock_file_1.
       [WINDOWSNT]: Implement lock files by writing a regular file with
       the lock information as its contents.
       (read_lock_data): New function, on Posix platforms just calls
       emacs_readlinkat.
       [WINDOWSNT]: Read the lock info from the file.
       (current_lock_owner): Call read_lock_data instead of calling
       emacs_readlinkat directly.
       (lock_file) [WINDOWSNT]: Run the file name through
       dostounix_filename.
       src/w32proc.c (sys_kill): Support the case of SIG = 0, in which case
       just check if the process by that PID exists.
       src/w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
       also present, as doing so will fail to error out if the file
       already exists.
       src/makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
      
       nt/inc/ms-w32.h (BOOT_TIME_FILE): Define.
       nt/config.nt (CLASH_DETECTION): Define to 1.
      
       lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Reject files
       that match "\`\.#", to avoid compiling lock files, even if they
       are readable (as they are on MS-Windows).
      
       doc/emacs/files.texi (Interlocking): Don't refer to symlinks as the
       exclusive means of locking files.
      
       etc/NEWS: Mention support for lock files on MS-Windows.
      343a2aef
  5. 23 Feb, 2013 1 commit
  6. 09 Feb, 2013 1 commit
    • Eli Zaretskii's avatar
      Remove all references to buffer-file-type and related features. · 8549f9e8
      Eli Zaretskii authored
       src/xdisp.c (decode_mode_spec): Remove handling of %t.
      
       lisp/net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference
       buffer-file-type.
       lisp/mail/feedmail.el (feedmail-force-binary-write): Doc fix.
       (feedmail-run-the-queue, feedmail-dump-message-to-queue)
       (feedmail-send-it-immediately): Don't bind buffer-file-type, bind
       coding-system-for-write instead.
       lisp/jka-compr.el (jka-compr-write-region): Don't bind
       buffer-file-type.
       lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't bind
       buffer-file-type.
       lisp/files.el (file-name-buffer-file-type-alist): Remove defvar.
       (insert-file-contents-literally): Remove reference to
       file-name-buffer-file-type-alist.
       lisp/dos-w32.el (file-name-buffer-file-type-alist): Deprecate and
       make-obsolete.
       (find-buffer-file-type-match, find-buffer-file-type): Remove.
       (find-buffer-file-type-coding-system): Remove references to
       find-buffer-file-type-match, find-buffer-file-type, and
       buffer-file-type.
       Don't put find-buffer-file-type-coding-system into
       file-coding-system-alist.
       (find-file-binary, find-file-text): Bind coding-system-for-read
       instead of file-name-buffer-file-type-alist.
       lisp/erc/erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type.
      
       doc/emacs/msdog.texi (Text and Binary): Delete the description of
       file-name-buffer-file-type-alist.
      
       doc/lispref/modes.texi (%-Constructs): Remove the description of %t.
       doc/lispref/nonascii.texi (MS-DOS File Types): Delete node.
      
      Fixes: debbugs:12989
      8549f9e8
  7. 01 Jan, 2013 1 commit
  8. 23 Nov, 2012 1 commit
  9. 20 Nov, 2012 1 commit
  10. 09 Nov, 2012 1 commit
  11. 08 Nov, 2012 1 commit
  12. 02 Nov, 2012 1 commit
  13. 11 Oct, 2012 1 commit
  14. 01 Oct, 2012 1 commit
  15. 28 Sep, 2012 1 commit
  16. 20 Sep, 2012 1 commit
  17. 13 Sep, 2012 1 commit
  18. 14 Aug, 2012 3 commits
  19. 26 Jul, 2012 1 commit
    • Stefan Monnier's avatar
      Autoload more carefully from Lisp. Follow aliases for function properties. · 7abaf5cc
      Stefan Monnier authored
      * lisp/subr.el (autoloadp): New function.
      (symbol-file): Use it.
      (function-get): New function.
      * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and
      autoload-do-load.
      * lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function)
      (lisp-indent-function):
      * lisp/emacs-lisp/gv.el (gv-get):
      * lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec):
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
      * lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form):
      Use function-get.
      * lisp/emacs-lisp/cl.el: Don't propagate function properties any more.
      
      * src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
      add argument, tune behavior, and adjust all callers.
      
      * lisp/speedbar.el (speedbar-add-localized-speedbar-support):
      * lisp/emacs-lisp/disass.el (disassemble-internal):
      * lisp/desktop.el (desktop-load-file):
      * lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name)
      (describe-function-1):
      * lisp/emacs-lisp/find-func.el (find-function-noselect):
      * lisp/emacs-lisp/elp.el (elp-instrument-function):
      * lisp/emacs-lisp/advice.el (ad-has-proper-definition):
      * lisp/apropos.el (apropos-safe-documentation, apropos-macrop):
      * lisp/emacs-lisp/debug.el (debug-on-entry):
      * lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand):
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
      * lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.
      7abaf5cc
  20. 13 Jul, 2012 1 commit
    • Chong Yidong's avatar
      Don't warn on toggle-read-only calls. · b68b3337
      Chong Yidong authored
      Clarify the documentation of toggle-read-only, and audit the code tree
      for uses of toggle-read-only; where appropriate, switch to setting the
      variable buffer-read-only or calling toggle-read-only with a (new)
      second arg.
      
      * lisp/files.el (toggle-read-only): Doc fix and code cleanup.  New arg
      to allow printing the message when called from Lisp.
      
      * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
      Remove toggle-read-only.
      
      * lisp/bindings.el (mode-line-toggle-read-only):
      * lisp/dired.el (dired-toggle-read-only):
      * lisp/ibuffer.el (ibuffer-do-toggle-read-only): Call toggle-read-only
      with non-nil second arg.
      
      * lisp/bs.el (bs-toggle-readonly):
      * lisp/buff-menu.el (Buffer-menu-toggle-read-only): Remove
      with-no-warnings around toggle-read-only.
      
      * lisp/ffap.el (ffap--toggle-read-only): Accept a list of buffers.
      Remove with-no-warnings around toggle-read-only.
      (ffap-read-only, ffap-read-only-other-window)
      (ffap-read-only-other-frame): Callers changed.
      
      * lisp/help-mode.el: Don't require view package.
      (help-mode-finish): Set buffer-read-only instead of calling
      toggle-read-only.
      
      * lisp/emacs-lisp/eieio-custom.el (eieio-customize-object):
      * lisp/vc/ediff.el (ediff-set-read-only-in-buf-A): Set buffer-read-only
      directly.
      
      * lisp/gnus/smime.el (smime-certificate-info): Set buffer-read-only directly,
      instead of calling toggle-read-only with a (bogus) argument.
      
      * doc/emacs/buffers.texi (Misc Buffer): Document view-read-only.
      
      * doc/lispref/buffers.texi (Read Only Buffers): Document toggle-read-only
      changes.  Reword to account for the fact that read-only is currently not
      supported in overlay properties.
      b68b3337
  21. 12 Jul, 2012 1 commit
  22. 10 Jul, 2012 1 commit
    • Stefan Monnier's avatar
      Reduce use of (require 'cl). · f58e0fd5
      Stefan Monnier authored
      * admin/bzrmerge.el: Use cl-lib.
      * leim/quail/hangul.el: Don't require CL.
      * leim/quail/ipa.el: Use cl-lib.
      * vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el:
      * vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el:
      * register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el:
      * msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el:
      * international/quail.el, info-xref.el, imenu.el, image-mode.el:
      * font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el:
      * battery.el, avoid.el, abbrev.el: Use cl-lib.
      * vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el:
      * vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el:
      * jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el:
      * emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el:
      * calculator.el, autorevert.el, apropos.el: Don't require CL.
      * emacs-bytecomp.el (byte-recompile-directory, display-call-tree)
      (byte-compile-unfold-bcf, byte-compile-check-variable):
      * emacs-byte-opt.el (byte-compile-trueconstp)
      (byte-compile-nilconstp):
      * emacs-autoload.el (make-autoload): Use pcase.
      * face-remap.el (text-scale-adjust): Simplify pcase patterns.
      f58e0fd5
  23. 04 Jul, 2012 1 commit
  24. 02 Jul, 2012 1 commit
  25. 28 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Make inlining of other-mode interpreted functions work. · c207708c
      Stefan Monnier authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile--refiy-function): New fun.
      (byte-compile): Use it to fix compilation of lexical-binding closures.
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Compile the
      function, if needed.
      
      Fixes: debbugs:11799
      c207708c
  26. 22 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Provide generalized variables in core Elisp. · 2ee3d7f0
      Stefan Monnier authored
      * lisp/emacs-lisp/gv.el: New file.
      * lisp/subr.el (push, pop): Extend to generalized variables.
      * lisp/loadup.el (macroexp): Unload if preloaded and uncompiled.
      * lisp/emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove.
      * lisp/emacs-lisp/cl-macs.el: Require gv.  Use gv-define-setter,
      gv-define-simple-setter, and gv-define-expander.
      Remove setf-methods defined in gv.  Rename cl-setf -> setf.
      (cl-setf, cl-do-pop, cl-get-setf-method): Remove.
      (cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf)
      (cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el.
      (cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with
      gv-letplace.
      (cl-defstruct): Don't define setf-method any more.
      * lisp/emacs-lisp/cl.el (flet): Don't autoload.
      (cl--letf, letf, cl--letf*, letf*, cl--gv-adapt)
      (define-setf-expander, defsetf, define-modify-macro)
      (cl-struct-setf-expander): Move from cl-lib.el.
      * lisp/emacs-lisp/syntax.el:
      * lisp/emacs-lisp/ewoc.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/emacs-lisp/cconv.el:
      * lisp/emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push.
      (timer--time): Use gv-define-simple-setter.
      * lisp/emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let²
      to avoid coding-system problems in subr.el.  Adjust all users.
      (macroexp--maxsize, macroexp-small-p): New functions.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf.
      * lisp/scroll-bar.el (scroll-bar-mode):
      * lisp/simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
      (normal-erase-is-backspace-mode): Don't use the `eq' place.
      * lisp/winner.el (winner-configuration, winner-make-point-alist)
      (winner-set-conf, winner-get-point, winner-set): Don't abuse letf.
      * lisp/files.el (locate-file-completion-table): Avoid list*.
      
      Fixes: debbugs:11657
      2ee3d7f0
  27. 13 Jun, 2012 1 commit
  28. 11 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Use lexical-binding for all of CL, and clean up its namespace. · bb3faf5b
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-lib.el: Use lexical-binding.
      (cl-map-extents, cl-maclisp-member): Remove.
      (cl--set-elt, cl--set-nthcdr, cl--set-buffer-substring)
      (cl--set-substring, cl--block-wrapper, cl--block-throw)
      (cl--compiling-file, cl--mapcar-many, cl--do-subst): Use "cl--" prefix.
      * lisp/emacs-lisp/cl-extra.el: Use lexical-binding.
      (cl--mapcar-many, cl--map-keymap-recursively, cl--map-intervals)
      (cl--map-overlays, cl--set-frame-visible-p, cl--progv-save)
      (cl--progv-before, cl--progv-after, cl--finite-do, cl--set-getf)
      (cl--do-remf, cl--do-prettyprint): Use "cl--" prefix.
      * lisp/emacs-lisp/cl-seq.el: Use lexical-binding.
      (cl--parsing-keywords, cl--check-key, cl--check-test-nokey)
      (cl--check-test, cl--check-match): Use "cl--" prefix and backquotes.
      (cl--alist, cl--sublis-rec, cl--nsublis-rec, cl--tree-equal-rec):
      * lisp/emacs-lisp/cl-macs.el (cl--lambda-list-keywords): Use "cl--" prefix.
      * lisp/edmacro.el (edmacro-mismatch): Simplify to remove dependence on
      CL's internals.
      bb3faf5b
  29. 10 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Reduce use of cl in lisp/emacs-lisp/. · f80efb86
      Stefan Monnier authored
      * lisp/emacs-lisp/timer.el, lisp/emacs-lisp/syntax.el, lisp/emacs-lisp/smie.el:
      * lisp/emacs-lisp/ewoc.el, lisp/emacs-lisp/cconv.el,lisp/emacs-lisp/derived.el:
      * lisp/emacs-lisp/byte-opt.el, lisp/emacs-lisp/autoload.el: Convert to cl-lib.
      * lisp/emacs-lisp/easymenu.el, lisp/emacs-lisp/easy-mmode.el:
      * lisp/emacs-lisp/bytecomp.el: Use pcase instead of `cl'.
      * lisp/emacs-lisp/cl-lib.el: Get rid of special cl-macs auto load.
      f80efb86
  30. 07 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Cleanup cl-macs namespace. Add macro helpers in macroexp.el. · 4dd1c416
      Stefan Monnier authored
      * emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*, macroexp-if)
      (macroexp-let², macroexp--const-symbol-p, macroexp-const-p)
      (macroexp-copyable-p): New functions and macros.
      * emacs-lisp/edebug.el (edebug-unwrap):
      * emacs-lisp/disass.el (disassemble-internal): Use macroexp-progn.
      * emacs-lisp/pcase.el: Use macroexp-let*, macroexp-if, ...
      (pcase--let*): Remove.
      * emacs-lisp/bytecomp.el (byte-compile-const-symbol-p)
      (byte-compile-constp): Remove.  Use macroexp--const-symbol-p and
      macroexp-const-p instead.
      * emacs-lisp/byte-opt.el: Use macroexp-const-p and macroexp-progn.
      
      * emacs-lisp/cl-macs.el: Clean up the name space by using "cl--"
      instead of "cl-" for internal definitions.  Use macroexp-const-p.
      (cl-old-bc-file-form): Remove var.
      (cl-const-exprs-p): Remove fun.
      (cl-labels, cl-macrolet): Use backquote.
      (cl-lexical-let): Use cl-symbol-macrolet.  Don't use cl-defun-expander.
      (cl-defun-expander, cl-byte-compile-compiler-macro): Remove fun.
      (cl-define-setf-expander): Rename from cl-define-setf-method.
      * emacs-lisp/cl.el: Adjust alias for define-setf-method.
      
      * international/mule-cmds.el: Don't require CL.
      (view-hello-file): Don't use `letf'.
      4dd1c416
  31. 05 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Add native compiler-macro support. · 57a7d507
      Stefan Monnier authored
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1):
      Support compiler-macros directly.  Properly follow aliases and apply
      the compiler macros more thoroughly.
      * lisp/emacs-lisp/cl.el: Don't copy compiler-macro properties any more since
      macroexpand now properly follows aliases.
      * lisp/emacs-lisp/cl-macs.el (toplevel, cl-define-compiler-macro)
      (cl-compiler-macroexpand): Use new prop.
      * lisp/emacs-lisp/byte-opt.el (featurep): Optimize earlier.
      * lisp/emacs-lisp/cl-lib.el (custom-print-functions): Add compatibility alias.
      57a7d507
  32. 01 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/bytecomp.el: Fix last change. · 4a5f187a
      Stefan Monnier authored
      (byte-compile-output-docform): Re-add the print-circle bindings.
      (byte-compile-fix-header): Use #$ just because it's shorter.
      (byte-compile-output-file-form): Remove defun/defmacro.
      
      Fixes: debbugs:11594
      4a5f187a
  33. 31 May, 2012 1 commit
  34. 30 May, 2012 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/byte-run.el (defmacro, defun): Move from C. · 61b108cc
      Stefan Monnier authored
      (macro-declaration-function): Move var from C code.
      (macro-declaration-function): Define function with defalias.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1):
      * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't handle
      defun/defmacro any more.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature):
      Provide fallback for unknown arglist.
      (byte-compile-arglist-warn): Change calling convention.
      (byte-compile-output-file-form): Move print-vars binding.
      (byte-compile-output-docform): Simplify accordingly.
      (byte-compile-file-form-defun, byte-compile-file-form-defmacro)
      (byte-compile-defmacro-declaration): Remove.
      (byte-compile-file-form-defmumble): Generalize to defalias.
      (byte-compile-output-as-comment): Return byte-positions.
      Simplify callers accordingly.
      (byte-compile-lambda): Use `assert'.
      (byte-compile-defun, byte-compile-defmacro): Remove.
      (byte-compile-file-form-defalias):
      Use byte-compile-file-form-defmumble.
      (byte-compile-defalias-warn): Remove.
      * src/eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
      Move to byte-run.el.
      (Fautoload): Do the hash-doc more carefully.
      * src/data.c (Fdefalias): Purify definition, except for keymaps.
      (Qdefun): Move from eval.c.
      * src/lisp.h (Qdefun): Remove.
      * src/lread.c (read1): Tiny simplification.
      * lib-src/make-docfile.c: Improve comment style.
      (search_lisp_doc_at_eol): New function.
      (scan_lisp_file): Use it.
      61b108cc
  35. 29 May, 2012 1 commit
    • Stefan Monnier's avatar
      Fix minor corner case bugs in byte compilation and pcase. · 6876a58d
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Don't re-preprocess
      functions from byte-compile-function-environment.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-constp): Treat #'v as a constant.
      (byte-compile-close-variables): Bind byte-compile--outbuffer here...
      (byte-compile-from-buffer): ...rather than here.
      * lisp/emacs-lisp/pcase.el (pcase--expand): Accept different sets of vars in
      different alternative patterns.
      (pcase-codegen): Be more careful to preserve identity.
      (pcase--u1): Don't forget to mark vars as used.
      6876a58d
  36. 19 May, 2012 1 commit
  37. 03 May, 2012 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/bytecomp.el · 2bd785a2
      Stefan Monnier authored
      (byte-compile-file-form-custom-declare-variable): Compile all elements,
      since cconv.el might have introduced :fun-body, internal-make-closure,
      and friends for bytecomp to handle.
      * lisp/custom.el (defcustom): Avoid ((λ ..) ..).
      
      Fixes: debbugs:11391
      2bd785a2