1. 11 Jan, 2011 2 commits
    • Stefan Monnier's avatar
      * lisp/progmodes/prolog.el: Fix up coding conventions and such. · 04380ff1
      Stefan Monnier authored
      (prolog-indent-width): Use the same default as in
      previous prolog.el rather than tab-width which depends on which buffer
      is current when the file is loaded.
      (prolog-electric-newline-flag): Only enable if electric-indent-mode
      is not available.
      (prolog-emacs): Remove.  Use (featurep 'xemacs) instead.
      (prolog-known-systems): Remove.
      (prolog-mode-syntax-table, prolog-inferior-mode-map):
      Move initialization into declaration.
      (prolog-mode-map): Move initialization into declaration.
      Remove system-specific mode-map vars, since they referred to the same
      keymap anyway.
      (prolog-mode-variables): Obey the user's preference w.r.t
      adaptive-fill-mode.  Prefer symbol-value to `eval'.
      (prolog-mode-keybindings-edit): Add compatibility bindings.
      (prolog-mode): Use define-derived-mode.  Don't handle mercury here.
      (mercury-mode-map): New var.
      (mercury-mode, prolog-inferior-mode): Use define-derived-mode.
      (prolog-ensure-process, prolog-process-insert-string)
      (prolog-consult-compile): Use with-current-buffer.
      (prolog-guess-fill-prefix): Simplify data flow.
      (prolog-replace-in-string): New function to use instead of
      replace-in-string.
      (prolog-enable-sicstus-sd): Don't abuse `eval'.
      (prolog-uncomment-region): Use `uncomment-region' when available.
      (prolog-electric-colon, prolog-electric-dash): Use `eolp'.
      (prolog-int-to-char, prolog-char-to-int): New functions to use instead
      of int-to-char and char-to-int.
      (prolog-mode-hook, prolog-inferior-mode-hook): Don't force font-lock.
      04380ff1
    • Stefan Bruda's avatar
      e2019526
  2. 10 Dec, 2010 1 commit
    • Stefan Monnier's avatar
      Derive from prog-mode, use derived-mode-p, and fix up various · 175069ef
      Stefan Monnier authored
      minor style issues in lisp/progmodes.
      
      * lisp/progmodes/vhdl-mode.el (vhdl-write-file-hooks-init)
      (vhdl-hs-minor-mode, vhdl-ps-print-init): Fix make-local-variable ->
      make-local-hook.
      * lisp/progmodes/sh-script.el (sh-require-final-newline): Remove.
      (sh-set-shell): Don't set require-final-newline since it's already done
      by prog-mode.
      * lisp/progmodes/modula2.el (m2-mode): Don't make m2-end-comment-column
      since we never set it.
      * lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation):
      Use read-string and standard prompt.
      * lisp/progmodes/dcl-mode.el (dcl-mode-map): Move init into declaration.
      * lisp/progmodes/meta-mode.el (meta-mode-abbrev-table): Merge init and decl.
      (meta-common-mode-syntax-table): Rename from meta-mode-syntax-table.
      (meta-common-mode-map): Rename from meta-mode-map.
      Remove C-m binding, which is a user preference, not mode specific.
      (meta-common-mode): New major mode; replace meta-common-initialization.
      * lisp/progmodes/js.el (js-mode): Call syntax-propertize rather than messing
      around with font-lock.
      * lisp/progmodes/etags.el (select-tags-table-mode):
      Derive from special-mode.
      * lisp/progmodes/octave-mod.el (octave-mode):
      * lisp/progmodes/gdb-mi.el (gdb-inferior-io-mode, gdb-threads-mode)
      (gdb-memory-mode, gdb-disassembly-mode, gdb-breakpoints-mode)
      (gdb-frames-mode, gdb-locals-mode, gdb-registers-mode):
      Let define-derived-mode do its job.
      * lisp/progmodes/cpp.el (cpp-edit-mode-map):
      Move initialization into declaration.
      (cpp-edit-mode): Use define-derived-mode.
      (cpp-edit-load): Use derived-mode-p.
      * lisp/progmodes/mixal-mode.el (mixal-mode):
      * lisp/progmodes/f90.el (f90-mode):
      * lisp/progmodes/cfengine.el (cfengine-mode): Don't bother setting
      require-final-newline since prog-mode does it already.
      * lisp/progmodes/cc-cmds.el (c-update-modeline): Use match-string.
      * lisp/progmodes/asm-mode.el (asm-mode-map): Fix menu setup.
      * lisp/progmodes/antlr-mode.el: Require cc-mode upfront.
      (antlr-mode-syntax-table, antlr-action-syntax-table): Initialize in
      the declaration.
      (antlr-directory-dependencies, antlr-show-makefile-rules):
      Use derived-mode-p.
      (antlr-language-option): Don't assume point-min==1.
      (antlr-mode): Use define-derived-mode.
      * lisp/progmodes/ada-mode.el: Use derived-mode-p.
      (ada-mode): Use define-derived-mode.
      Use hack-local-variables-hook.
      
      * lisp/progmodes/vhdl-mode.el (vhdl-mode):
      * lisp/progmodes/verilog-mode.el (verilog-mode):
      * lisp/progmodes/vera-mode.el (vera-mode):
      * lisp/progmodes/sql.el (sql-mode):
      * lisp/progmodes/scheme.el (scheme-mode):
      * lisp/progmodes/perl-mode.el (perl-mode):
      * lisp/progmodes/octave-inf.el (inferior-octave-mode):
      * lisp/progmodes/autoconf.el (autoconf-mode):
      * lisp/progmodes/m4-mode.el (m4-mode):
      * lisp/progmodes/inf-lisp.el (inferior-lisp-mode):
      * lisp/progmodes/idlwave.el (idlwave-mode):
      * lisp/progmodes/icon.el (icon-mode):
      * lisp/progmodes/idlw-help.el (idlwave-help-mode):
      * lisp/progmodes/dcl-mode.el (dcl-mode):
      * lisp/progmodes/idlw-shell.el (idlwave-shell-mode):
      * lisp/progmodes/ebrowse.el (ebrowse-tree-mode, ebrowse-electric-list-mode)
      (ebrowse-member-mode, ebrowse-electric-position-mode):
      Use define-derived-mode.
      
      * lisp/progmodes/xscheme.el (xscheme-start)
      (local-set-scheme-interaction-buffer, scheme-interaction-mode):
      * lisp/progmodes/which-func.el (which-function):
      * lisp/progmodes/vhdl-mode.el (vhdl-set-style):
      * lisp/progmodes/verilog-mode.el (verilog-set-compile-command)
      (verilog-modify-compile-command, verilog-error-regexp-add-xemacs)
      (verilog-set-define, verilog-auto-reeval-locals):
      * lisp/progmodes/sql.el (sql-product-font-lock, sql-interactive-mode):
      * lisp/progmodes/simula.el (simula-mode):
      * lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode):
      * lisp/progmodes/python.el (python-check, python-mode):
      * lisp/progmodes/prolog.el (prolog-mode-variables):
      * lisp/progmodes/gud.el (gud-tooltip-activate-mouse-motions):
      * lisp/progmodes/ebrowse.el (ebrowse-view-file-other-frame):
      * lisp/progmodes/delphi.el (delphi-mode):
      * lisp/progmodes/cc-styles.el (c-setup-paragraph-variables):
      * lisp/progmodes/cc-mode.el (c-basic-common-init, c-common-init)
      (c-font-lock-init): Move make-local-variable to their setq.
      
      * lisp/progmodes/xscheme.el (exit-scheme-interaction-mode)
      (xscheme-enter-interaction-mode, xscheme-enter-debugger-mode)
      (xscheme-debugger-mode-p, xscheme-send-string-1):
      * lisp/progmodes/tcl.el (inferior-tcl-proc, tcl-current-word)
      (tcl-load-file, tcl-restart-with-file):
      * lisp/progmodes/ps-mode.el (ps-run-running):
      * lisp/progmodes/gdb-mi.el (gud-watch, gdb-mouse-set-clear-breakpoint):
      * lisp/progmodes/js.el (js--get-all-known-symbols):
      * lisp/progmodes/inf-lisp.el (inferior-lisp-proc):
      * lisp/progmodes/idlwave.el (idlwave-beginning-of-statement)
      (idlwave-template, idlwave-update-buffer-routine-info)
      (idlwave-update-current-buffer-info)
      (idlwave-get-routine-info-from-buffers, idlwave-choose)
      (idlwave-scan-class-info, idlwave-fix-keywords)
      (idlwave-list-buffer-load-path-shadows):
      * lisp/progmodes/idlw-toolbar.el (idlwave-toolbar, idlwave-toolbar-add)
      (idlwave-toolbar-remove):
      * lisp/progmodes/idlw-shell.el (idlwave-shell-save-and-action)
      (idlwave-shell-file-name, idlwave-shell-electric-debug-all-off)
      (idlwave-shell-menu-def):
      * lisp/progmodes/idlw-complete-structtag.el
      (idlwave-prepare-structure-tag-completion):
      * lisp/progmodes/gud.el (gud-set-buffer):
      * lisp/progmodes/f90.el (f90-backslash-not-special):
      * lisp/progmodes/delphi.el (delphi-find-unit): Use derived-mode-p.
      175069ef
  3. 07 Nov, 2010 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/smie.el: Simplify the smie-rules-function return values. · 674728d4
      Stefan Monnier authored
      (smie-precs->prec2): Rename from smie-precs-precedence-table.
      (smie-bnf->prec2): Rename from smie-bnf-precedence-table.
      (smie-prec2->grammar): Rename from smie-prec2-levels.
      (smie-grammar): Rename from smie-op-levels.
      (smie-indent--hanging-p): Rename from smie-hanging-p.
      (smie-rule-hanging-p): New alias.
      (smie-indent--bolp): Rename from smie-bolp.
      (smie-indent--hanging-p): New alias.
      (smie--token): New dynamically bound variable.
      (smie-indent--parent): New function.
      (smie-rule-parent-p): Use it; rename from smie-parent-p.
      (smie-rule-next-p): Rename from smie-next-p.
      (smie-rule-prev-p): Rename from smie-prev-p.
      (smie-rule-sibling-p, smie-rule-parent)
      (smie-indent--separator-outdent, smie-rule-separator): New functions.
      (smie-rule-separator-outdent): New var.
      (smie-indent--rule): Merge with smie-indent--column.
      (smie-indent-forward-token, smie-indent-backward-token):
      Also recognize close parens.
      (smie-indent-keyword): Don't use smie-indent--column any more.
      (smie-indent-after-keyword): Ignore closers by default.
      (smie-indent-line): Use with-demoted-errors.
      * lisp/progmodes/octave-mod.el (octave-smie-grammar):
      Rename from octave-smie-op-levels.
      (octave-smie-rules): Adjust to new behavior.
      * lisp/progmodes/prolog.el (prolog-smie-grammar):
      Rename from prolog-smie-op-levels.
      674728d4
  4. 06 Nov, 2010 1 commit
    • Glenn Morris's avatar
      Use line-end-position rather than end-of-line, etc. · 5ed619e0
      Glenn Morris authored
      * textmodes/texnfo-upd.el (texinfo-start-menu-description)
      (texinfo-update-menu-region-beginning, texinfo-menu-first-node)
      (texinfo-delete-existing-pointers, texinfo-find-pointer)
      (texinfo-clean-up-node-line, texinfo-insert-node-lines)
      (texinfo-multiple-files-update):
      * textmodes/table.el (table--probe-cell-left-up)
      (table--probe-cell-right-bottom):
      * textmodes/picture.el (picture-tab-search):
      * textmodes/page-ext.el (pages-copy-header-and-position)
      (pages-directory-for-addresses):
      * progmodes/vera-mode.el (vera-get-offset):
      * progmodes/simula.el (simula-calculate-indent):
      * progmodes/python.el (python-pdbtrack-overlay-arrow):
      * progmodes/prolog.el (end-of-prolog-clause):
      * progmodes/perl-mode.el (perl-calculate-indent, perl-indent-exp):
      * progmodes/icon.el (indent-icon-exp):
      * progmodes/etags.el (tag-re-match-p):
      * progmodes/ebrowse.el (ebrowse-show-file-name-at-point):
      * progmodes/ebnf2ps.el (ebnf-begin-file):
      * progmodes/dcl-mode.el (dcl-back-to-indentation-1)
      (dcl-save-local-variable):
      * play/life.el (life-setup):
      * play/gametree.el (gametree-looking-at-ply):
      * nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
      * mail/sendmail.el (mail-mode-auto-fill):
      * emacs-lisp/lisp-mode.el (calculate-lisp-indent):
      * emacs-lisp/edebug.el (edebug-overlay-arrow):
      * emacs-lisp/checkdoc.el (checkdoc-this-string-valid):
      * woman.el (woman-parse-numeric-value, woman2-TH, woman2-SH)
      (woman-tab-to-tab-stop, WoMan-warn-ignored):
      * type-break.el (type-break-file-keystroke-count):
      * term.el (term-replace-by-expanded-history-before-point)
      (term-skip-prompt, term-extract-string):
      * speedbar.el (speedbar-edit-line, speedbar-expand-line)
      (speedbar-contract-line, speedbar-toggle-line-expansion)
      (speedbar-parse-c-or-c++tag, speedbar-parse-tex-string)
      (speedbar-buffer-revert-buffer, speedbar-highlight-one-tag-line):
      * sort.el (sort-skip-fields):
      * skeleton.el (skeleton-internal-list):
      * simple.el (line-move-finish, line-move-to-column):
      * shell.el (shell-forward-command):
      * misc.el (copy-from-above-command):
      * makesum.el (double-column):
      * ebuff-menu.el (electric-buffer-update-highlight):
      * dired.el (dired-move-to-end-of-filename):
      * dframe.el (dframe-popup-kludge):
      * bookmark.el (bookmark-kill-line, bookmark-bmenu-show-filenames):
      * arc-mode.el (archive-get-lineno):
      Use line-end-position and line-beginning-position.
      
      * net/ange-ftp.el, progmodes/hideif.el, reposition.el:
      Same, but only in comments.
      5ed619e0
  5. 29 Oct, 2010 1 commit
    • Stefan Monnier's avatar
      SMIE: change indent rules format, improve smie-setup. · c4d17d50
      Stefan Monnier authored
      * lisp/emacs-lisp/smie.el (smie-precs-precedence-table)
      (smie-merge-prec2s, smie-bnf-precedence-table, smie-prec2-levels):
      Mark them pure so the tables gets built at compile time.
      (smie-bnf-precedence-table): Store the closer-alist in the table.
      (smie-prec2-levels): Preserve the closer-alist.
      (smie-blink-matching-open): Be more forgiving in case of indentation.
      (smie-hanging-p): Rename from smie-indent--hanging-p.
      (smie-bolp): Rename from smie-indent--bolp.
      (smie--parent, smie--after): New dynamic vars.
      (smie-parent-p, smie-next-p, smie-prev-p): New funs.
      (smie-indent-rules): Remove.
      (smie-indent--offset-rule): Remove fun.
      (smie-rules-function): New var.
      (smie-indent--rule): New fun.
      (smie-indent--offset, smie-indent-keyword, smie-indent-after-keyword)
      (smie-indent-exps): Use it.
      (smie-setup): Setup paren blinking; add keyword args for token
      functions; extract closer-alist from op-levels.
      (smie-indent-debug-log): Remove var.
      (smie-indent-debug): Remove fun.
      * lisp/progmodes/prolog.el (prolog-smie-indent-rules): Remove.
      (prolog-smie-rules): New fun to replace it.
      (prolog-mode-variables): Simplify.
      * lisp/progmodes/octave-mod.el (octave-smie-closer-alist): Remove, now that
      it's setup automatically.
      (octave-smie-indent-rules): Remove.
      (octave-smie-rules): New fun to replace it.
      (octave-mode): Simplify.
      c4d17d50
  6. 20 Sep, 2010 1 commit
  7. 18 Aug, 2010 1 commit
  8. 18 May, 2010 1 commit
  9. 17 May, 2010 1 commit
  10. 15 May, 2010 1 commit
  11. 13 Jan, 2010 1 commit
  12. 22 Aug, 2009 1 commit
  13. 19 Aug, 2009 1 commit
  14. 09 Jan, 2009 1 commit
  15. 05 Jan, 2009 1 commit
  16. 06 May, 2008 1 commit
  17. 07 Jan, 2008 1 commit
  18. 06 Dec, 2007 1 commit
  19. 20 Nov, 2007 1 commit
    • Dan Nicolaescu's avatar
      * progmodes/idlw-help.el: Require browse-url unconditionally, it · 153ef845
      Dan Nicolaescu authored
      is available by default.
      (idlwave-help-browse-url-available): Change default to t.
      
      * emulation/edt.el (defgroup, defcustom): Remove definition.
      (eval-when-compile): Remove.
      (c-mark-function):
      * textmodes/reftex-dcr.el (bibtex-beginning-of-entry):
      * textmodes/fill.el (comment-search-forward)
      (comment-string-strip):
      * progmodes/prolog.el (comint-mode, comint-send-string)
      (comint-send-region, comint-send-eof):
      * progmodes/dcl-mode.el (imenu-default-create-index-function):
      * emulation/viper-util.el (viper-forward-Word):
      * emulation/vi.el (c-mark-function):
      * emulation/edt-vt100.el (vt100-wide-mode):
      * emacs-lisp/timer.el (diary-entry-time): Declare as functions.
      
      * url-mailto.el (mail-send-and-exit):
      * url-http.el (url-dav-file-attributes):
      * url-file.el (ange-ftp-set-passwd, ange-ftp-copy-file-internal):
      Declare as functions.
      
      * url-privacy.el (url-device-type): Define unconditionally.
      153ef845
  20. 21 Oct, 2007 1 commit
    • Dan Nicolaescu's avatar
      * progmodes/prolog.el: Undo previous change. · 3cd79f62
      Dan Nicolaescu authored
      (comint-prompt-regexp, comint-process-echoes): Pacify
      byte-compiler.
      
      * progmodes/dcl-mode.el:
      * play/yow.el:
      * calendar/todo-mode.el:
      * calendar/cal-hebrew.el:
      * vc-hg.el: Undo previous change.
      
      * vms-patch.el: Likewise.
      (print-region-function): Pacify byte-compiler.
      3cd79f62
  21. 19 Oct, 2007 1 commit
    • Dan Nicolaescu's avatar
      * textmodes/two-column.el (2C-split, 2C-merge): · 7caf6803
      Dan Nicolaescu authored
      * textmodes/bib-mode.el (bib-find-key, mark-bib):
      * progmodes/idlw-shell.el (idlwave-shell-move-or-history):
      * progmodes/etags.el (find-tag-in-order, etags-tags-apropos)
      * progmodes/ada-xref.el (ada-get-all-references):
      * obsolete/mlsupport.el (ml-next-line, ml-previous-line):
      * emulation/vi.el (vi-previous-line-first-nonwhite)
      (vi-effective-range, vi-put-before):
      * emulation/edt.el (edt-next-line, edt-previous-line)
      (edt-paragraph-forward): Use forward-line.
      
      * progmodes/etags.el (tags-apropos): Require apropos at compile
      time too.
      
      * progmodes/prolog.el: Require comint when compiling.
      (inferior-prolog-flavor): Move defvar before use.
      7caf6803
  22. 25 Jul, 2007 1 commit
  23. 21 Jan, 2007 1 commit
  24. 07 Sep, 2006 1 commit
  25. 06 Sep, 2006 1 commit
    • Stefan Monnier's avatar
      Remove * in docstrings. · d364dee6
      Stefan Monnier authored
      (prolog-program-name): Add SWI prolog.
      (prolog-mode-menu): New menu.
      (prolog-mode): Set comment-add.
      (prolog-indent-line): Simplify.  Use indent-line-to.
      (inferior-prolog-buffer): New var.
      (inferior-prolog-run, inferior-prolog-process): New funs.
      (run-prolog, switch-to-prolog): Rewrite, using them.
      (prolog-consult-region): Use inferior-prolog-buffer.
      (inferior-prolog-load-file): New function.
      (prolog-mode-map): Add bindings for load-file and switch-to-prolog.
      d364dee6
  26. 10 Feb, 2006 1 commit
  27. 17 Nov, 2005 1 commit
  28. 30 Aug, 2005 1 commit
  29. 01 Aug, 2005 1 commit
  30. 04 Jul, 2005 3 commits
  31. 18 May, 2005 1 commit
  32. 01 Dec, 2004 1 commit
  33. 16 Apr, 2004 1 commit
  34. 08 Feb, 2004 1 commit
    • Stefan Monnier's avatar
      (prolog-program-name): Use gprolog if available. · 6cfd4f3a
      Stefan Monnier authored
      (prolog-mode-syntax-table, prolog-mode-abbrev-table, prolog-mode-map):
      Bring together declaration and initialization.
      (prolog-mode-variables): Don't set the syntax table.
      Don't set paragraph-start and comment-indent-function.
      Add /*..*/ to the comment regexps.
      (prolog-mode-commands): Remove.  Do it during init of prolog-mode-map.
      (prolog-mode-map): Don't bind TAB.
      (prolog-mode): Set the syntax table.
      (prolog-comment-indent): Remove.
      (inferior-prolog-mode-map): Initialize in the declaration.
      (inferior-prolog-mode-syntax-table)
      (inferior-prolog-mode-abbrev-table): New vars.
      (inferior-prolog-mode): Derive from comint-mode.
      (run-prolog): Avoid switch-to-buffer which can fail in dedicated and
      minibuffer windows.
      6cfd4f3a
  35. 08 Sep, 2003 1 commit
  36. 01 Sep, 2003 1 commit
  37. 01 Jun, 2002 1 commit