1. 25 Apr, 2019 1 commit
    • Stephen Leake's avatar
      Add new file completion tables, change project.el to allow using them · d2a5283a
      Stephen Leake authored
      * lisp/file-complete-root-relative.el: New file.
      
      * lisp/uniquify-files.el: New file.
      
      * test/lisp/progmodes/uniquify-files-resources/: New directory
      containing files for testing uniquify-files.
      
      * test/lisp/progmodes/uniquify-files-test.el: New file; test
      uniquify-files.
      
      * lisp/files.el (path-files): New function; useful with new completion
      tables.
      
      * lisp/progmodes/project.el (project-file-completion-table): Use
      file-complete-root-relative completion table.
      (project-find-file): Add optional FILENAME parameter.
      (project--completing-read-strict): Rewrite to just use the given
      completion table; extracting the common directory is now done by
      file-complete-root-relative. This also allows using the new
      uniquify-files completion table.
      
      * lisp/minibuffer.el (completion-category-defaults): Add
      uniquify-file.
      (completing-read-default): Add final step to call completion table
      with 'alist action if supported.
      d2a5283a
  2. 20 Mar, 2019 1 commit
  3. 19 Mar, 2019 1 commit
    • Paul Eggert's avatar
      Fix more regular expression typos · bc2a93d5
      Paul Eggert authored
      Problem reported by Mattias Engdegård in:
      https://lists.gnu.org/r/emacs-devel/2019-03/msg00548.html
      except that I didn’t address the issues involving Hebrew,
      or involving comint-prompt-regexp.
      * lisp/align.el (align-rules-list, align-exclude-rules-list):
      * lisp/auth-source-pass.el (auth-source-pass--parse-secret)
      (auth-source-pass--parse-data):
      * lisp/cedet/data-debug.el (data-debug-next)
      (data-debug-prev, data-debug-expand-or-contract):
      * lisp/comint.el (comint-within-quotes):
      * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
      * lisp/emulation/viper-ex.el (ex-cmd-complete):
      * lisp/gnus/gnus-cite.el (gnus-message-search-citation-line):
      * lisp/gnus/nnir.el (nnir-imap-end-of-input):
      * lisp/mail/mail-extr.el (mail-extr-all-letters):
      * lisp/minibuffer.el (minibuffer-maybe-quote-filename):
      * lisp/nxml/rng-nxml.el (rng-complete-tag)
      (rng-complete-end-tag, rng-complete-attribute-name):
      * lisp/obsolete/vip.el (vip-get-ex-token, vip-get-ex-pat):
      * lisp/org/org-pcomplete.el (org-thing-at-point):
      * lisp/org/org.el (org-set-tags)
      (org-increase-number-at-point)
      (org-fill-line-break-nobreak-p):
      * lisp/pcomplete.el (pcomplete-parse-comint-arguments):
      * lisp/progmodes/ada-mode.el (ada-compile-goto-error):
      * lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
      (cperl-find-pods-heres, cperl-not-bad-style-regexp)
      (cperl-regext-to-level-start):
      * lisp/progmodes/ebnf-yac.el (ebnf-yac-skip-spaces):
      * lisp/progmodes/flymake-proc.el (flymake-proc-master-tex-init):
      * lisp/progmodes/flymake.el (flymake-diag-region):
      * lisp/progmodes/fortran.el (fortran-current-line-indentation):
      * lisp/progmodes/idlw-complete-structtag.el:
      (idlwave-complete-structure-tag):
      * lisp/progmodes/idlwave.el (idlwave-complete-sysvar-or-tag):
      * lisp/progmodes/prolog.el (prolog-pred-end)
      (prolog-clause-info):
      * lisp/progmodes/ruby-mode.el (ruby-forward-sexp)
      (ruby-backward-sexp):
      * lisp/progmodes/verilog-mode.el (verilog-repair-open-comma):
      * lisp/term.el (term-within-quotes):
      * lisp/textmodes/bib-mode.el (bib-capitalize-title-stop-words):
      * lisp/textmodes/refbib.el (r2b-capitalize-title-stop-words):
      * lisp/textmodes/reftex-parse.el (reftex-nth-arg):
      * lisp/textmodes/rst.el (rst-svn-rev):
      * lisp/url/url-http.el (url-http-parse-response):
      * test/lisp/progmodes/f90-tests.el (f90-test-bug3730):
      Fix regular expression typos.
      bc2a93d5
  4. 05 Mar, 2019 1 commit
    • Paul Eggert's avatar
      Fix regular-expression glitches and typos · 3c94c7bc
      Paul Eggert authored
      Problems reported by Mattias Engdegård in:
      https://lists.gnu.org/r/emacs-devel/2019-03/msg00085.html
      * admin/admin.el (set-version):
      * lisp/allout.el (allout-latexify-one-item):
      * lisp/arc-mode.el (archive-arc-rename-entry)
      (archive-rar-summarize):
      * lisp/calc/calc-graph.el (calc-graph-set-styles)
      (calc-graph-hide):
      * lisp/calc/calc-help.el (calc-describe-key):
      * lisp/calc/calc-lang.el (math-compose-tex-func, eqn):
      * lisp/calc/calc.el (calcDigit-key):
      * lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list):
      * lisp/cedet/ede/speedbar.el (ede-tag-expand):
      * lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
      (semantic-sb-expand-group):
      * lisp/comint.el (comint-substitute-in-file-name):
      * lisp/dired.el (dired-actual-switches):
      * lisp/emacs-lisp/chart.el (chart-rmail-from):
      * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
      * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
      * lisp/emacs-lisp/rx.el (rx-not, rx-atomic-p):
      * lisp/emulation/viper-ex.el (viper-get-ex-token)
      (viper-get-ex-pat, ex-set-read-variable):
      * lisp/epg.el (epg--status-SIG_CREATED):
      * lisp/erc/erc-speedbar.el (erc-speedbar-expand-user):
      (erc-speedbar-expand-channel, erc-speedbar-expand-server)
      * lisp/erc/erc.el (erc-is-message-ctcp-and-not-action-p)
      (erc-banlist-update):
      * lisp/eshell/em-dirs.el (eshell-parse-drive-letter, eshell/pwd):
      * lisp/find-dired.el (find-dired):
      * lisp/frame.el (frame-set-background-mode):
      * lisp/generic-x.el (apache-log-generic-mode):
      * lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp):
      * lisp/gnus/gnus.el (gnus-short-group-name):
      * lisp/gnus/message.el (message-mailer-swallows-blank-line):
      * lisp/ibuffer.el (ibuffer-fontification-alist):
      * lisp/ido.el (ido-set-matches-1):
      * lisp/info-xref.el (info-xref-lock-file-p):
      * lisp/info.el (Info-dir-remove-duplicates)
      (Info-unescape-quotes, Info-split-parameter-string)
      (Info-speedbar-expand-node):
      * lisp/international/mule.el (sgml-html-meta-auto-coding-function):
      * lisp/isearch.el (isearch-pre-command-hook):
      * lisp/language/ethio-util.el (ethio-fidel-to-tex-buffer):
      * lisp/mail/rmail.el (rmail-collect-deleted):
      * lisp/mh-e/mh-alias.el (mh-alias-suggest-alias):
      * lisp/mh-e/mh-comp.el (mh-forward):
      * lisp/mh-e/mh-search.el (mh-index-next-folder)
      (mh-index-create-imenu-index):
      * lisp/mh-e/mh-xface.el (mh-picon-get-image):
      * lisp/minibuffer.el (completion--embedded-envvar-re):
      * lisp/net/ange-ftp.el (ange-ftp-ls-parser):
      * lisp/net/goto-addr.el (goto-address-mail-regexp)
      (goto-address-find-address-at-point):
      * lisp/net/pop3.el (pop3-read-response, pop3-user)
      (pop3-pass, pop3-apop):
      * lisp/net/tramp.el (tramp-ipv6-regexp)
      (tramp-replace-environment-variables):
      * lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
      * lisp/nxml/rng-uri.el (rng-uri-escape-multibyte):
      * lisp/nxml/rng-xsd.el (rng-xsd-convert-any-uri):
      * lisp/obsolete/pgg.el (pgg-fetch-key):
      * lisp/obsolete/vip.el (vip-get-ex-token):
      * lisp/org/ob-core.el (org-babel-string-read):
      * lisp/org/org-agenda.el:
      (org-agenda-add-entry-to-org-agenda-diary-file):
      * lisp/org/org-element.el (org-element-keyword-parser):
      * lisp/org/org-list.el (org-list-indent-item-generic):
      * lisp/org/org-mhe.el (org-mhe-get-message-folder-from-index):
      * lisp/org/org-mobile.el (org-mobile-apply):
      * lisp/org/org-mouse.el (org-mouse-context-menu):
      * lisp/org/org-plot.el (org-plot/gnuplot):
      * lisp/org/org-protocol.el (org-protocol-flatten-greedy):
      * lisp/org/org-table.el (org-table-copy-down)
      (org-table-formula-make-cmp-string)
      (org-table-get-stored-formulas, org-table-recalculate)
      (org-table-edit-formulas):
      * lisp/org/org.el (org-translate-link-from-planner)
      (org-fill-line-break-nobreak-p):
      * lisp/org/ox-ascii.el (org-ascii-item):
      * lisp/org/ox-latex.el (org-latex-clean-invalid-line-breaks):
      * lisp/org/ox.el (org-export-expand-include-keyword):
      * lisp/progmodes/ada-xref.el (ada-treat-cmd-string):
      * lisp/progmodes/cfengine.el (cfengine2-font-lock-keywords):
      * lisp/progmodes/cperl-mode.el (cperl-to-comment-or-eol)
      (cperl-find-pods-heres, cperl-fix-line-spacing)
      (cperl-have-help-regexp, cperl-word-at-point-hard)
      (cperl-make-regexp-x):
      * lisp/progmodes/dcl-mode.el (dcl-option-value-offset):
      * lisp/progmodes/etags.el (tag-implicit-name-match-p):
      * lisp/progmodes/fortran.el (fortran-fill):
      * lisp/progmodes/gdb-mi.el (gdb-speedbar-expand-node)
      (gdb-locals-handler-custom):
      * lisp/progmodes/grep.el (grep-mode-font-lock-keywords):
      * lisp/progmodes/gud.el (gud-jdb-find-source-using-classpath):
      * lisp/progmodes/js.el (js--continued-expression-p):
      * lisp/progmodes/m4-mode.el (m4-font-lock-keywords):
      * lisp/progmodes/meta-mode.el (meta-indent-level-count):
      * lisp/progmodes/mixal-mode.el (mixal-font-lock-keywords):
      * lisp/progmodes/opascal.el (opascal-find-unit-in-directory):
      * lisp/progmodes/pascal.el (pascal-progbeg-re):
      * lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re)
      (ruby-expr-beg, ruby-parse-partial)
      (ruby-toggle-string-quotes, ruby-font-lock-keywords):
      * lisp/progmodes/sql.el (sql--make-help-docstring):
      * lisp/progmodes/verilog-mode.el (verilog-coverpoint-re)
      (verilog-skip-forward-comment-p)
      (verilog-read-sub-decls-gate)
      (verilog-read-auto-template-middle):
      * lisp/progmodes/vhdl-mode.el (vhdl-resolve-env-variable)
      (vhdl-speedbar-expand-project, vhdl-speedbar-expand-entity)
      (vhdl-speedbar-expand-architecture)
      (vhdl-speedbar-expand-config, vhdl-speedbar-expand-package)
      (vhdl-speedbar-dired):
      * lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
      (speedbar-tag-expand):
      * lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords):
      * lisp/textmodes/flyspell.el (flyspell-debug-signal-word-checked):
      * lisp/textmodes/ispell.el (ispell-process-line):
      * lisp/textmodes/reftex-cite.el (reftex-end-of-bib-entry):
      * lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes):
      * lisp/url/url-parse.el (url-generic-parse-url):
      * lisp/url/url-util.el (url-truncate-url-for-viewing):
      * lisp/vc/diff-mode.el (diff-unified->context):
      * lisp/vc/vc-bzr.el (vc-bzr-error-regexp-alist):
      * lisp/vc/vc-cvs.el (vc-cvs-parse-status):
      * lisp/woman.el (woman0-el, woman-if-ignore)
      (woman-change-fonts):
      * lisp/xdg.el (xdg--substitute-home-env):
      Fix regular-expression infelicities and typos.
      
      Fix regular expression typos
      Fix typos reported by Mattias Engdegård in:
      that occurred in preloaded modules.
      * lisp/frame.el (frame-set-background-mode):
      * lisp/international/mule.el (sgml-html-meta-auto-coding-function):
      * lisp/isearch.el (isearch-pre-command-hook):
      * lisp/minibuffer.el (completion--embedded-envvar-re):
      3c94c7bc
  5. 19 Feb, 2019 1 commit
  6. 18 Feb, 2019 1 commit
  7. 14 Feb, 2019 2 commits
    • João Távora's avatar
      Change scoring strategy for 'flex' completion style · 0d19e08d
      João Távora authored
      The previous strategy had problems comparing scores of matches to
      strings of different lengths.  This one seems slightly more sensible,
      and uses a new constant `flex-score-match-tightness' instead of the
      more abstract `flex-score-falloff'.
      
      It's not completely without problems, and I think it shouldn't count
      "holes" at the front and at the back, but that needs a different
      "pattern-to-regexp" conversion in completion-pcm--hilit-commonality.
      
      (defun test ()
        (mapcar (lambda (a)
                  (cons (substring-no-properties a)
                        (get-text-property 0 'completion-score a)))
                (sort (completion-pcm--hilit-commonality
                        '(prefix "f" star "o" star "o" point)
                        '("foo"
                          "barfoobaz"
                          "foobarbaz"
                          "barbazfoo"
                          "fabrobazo"
                          "foot"
                          "foto"
                          "fotttttttttttttttttttttttto"))
            (lambda (a b)
              (> (get-text-property 0 'completion-score a)
                 (get-text-property 0 'completion-score b))))))
      
      (let ((flex-score-match-tightness 100)) (test))
      => (("foo" . 1.0)
          ("foot" . 0.375)
          ("foto" . 0.375)
          ("foobarbaz" . 0.16260162601626016) ;; one hole
          ("barbazfoo" . 0.16260162601626016) ;; one hole
          ("barfoobaz" . 0.10964912280701755) ;; two holes
          ("fabrobazo" . 0.10964912280701755) ;; two holes
          ("fotttttttttttttttttttttttto" . 0.04982561036372696))
      
      (let ((flex-score-match-tightness 0.1)) (test))
      => (("foo" . 1.0)
          ("foot" . 0.375)
          ("foto" . 0.375)
          ("barfoobaz" . 0.007751937984496124) ;; two holes
          ("fabrobazo" . 0.007751937984496124) ;; two holes
          ("foobarbaz" . 0.00641025641025641)  ;; one hole
          ("barbazfoo" . 0.00641025641025641)  ;; one hole
          ("fotttttttttttttttttttttttto" . 0.0004789272030651341))
      
      * lisp/minibuffer.el (flex-score-falloff): Rename to
      flex-score-match-tightness.
      (completion-pcm--hilit-commonality): Update function.
      0d19e08d
    • João Távora's avatar
  8. 13 Feb, 2019 2 commits
    • João Távora's avatar
      Score flex-style completions according to match tightness · b0e318d2
      João Távora authored
      The new completion style needs to score completion matches so that we
      can use it later on when sorting the completions.  This is because
      "foo" can flex-match "foobar", "frodo" and "barfromsober" but we
      probably want "foobar" to appear at the top of the completion list.
      
      This change introduces a scoring formula and adds scoring hints in the
      candidate string's `completion-score' property.
      
      * lisp/minibuffer.el (completion-pcm--hilit-commonality): Propertize
      completion with 'completion-score
      (flex-score-falloff): New variable.
      b0e318d2
    • João Távora's avatar
      Add a new 'flex' completion style · e4896fcb
      João Távora authored
      * lisp/minibuffer.el (completion-styles-alist): Add flex.
      (completion-substring--all-completions): Accept
      transform-pattern-fn arg.
      (completion-flex-all-completions, completion-flex-try-completion)
      (completion-flex--make-flex-pattern): New functions.
      e4896fcb
  9. 25 Jan, 2019 1 commit
  10. 23 Jan, 2019 2 commits
    • Stefan Monnier's avatar
      Rework last commit to icomplete and minibuffer.el. · 42732e2f
      Stefan Monnier authored
      Rather than let minibuffer-force-complete set up cycling and then undoing it,
      better tell it directly not to setup cycling.  Also be a bit more careful
      to remove the transient map.
      Additionally to bug#34077 and bug#34116, this also relates to bug#25644.
      
      * lisp/minibuffer.el (completion--flush-all-sorted-completions):
      Also take down the transient cycling map if applicable.
      (minibuffer-force-complete): New arg dont-cycle.
      Set completion-cycling to the actual function that takes down the
      transient map rather than just t.
      (minibuffer-force-complete-and-exit):
      * lisp/icomplete.el (icomplete-force-complete): Use new dont-cycle arg.
      42732e2f
    • João Távora's avatar
      Avoid cycling in minibuffer-force-complete-and-exit (bug#34116) · 210e592e
      João Távora authored
      * lisp/minibuffer.el (minibuffer-force-complete-and-exit): Check
      completion-cycling before minibuffer-force-complete.
      210e592e
  11. 01 Jan, 2019 1 commit
  12. 29 Dec, 2018 1 commit
  13. 25 Nov, 2018 1 commit
    • Michael Heerdegen's avatar
      Replace insignificant backquotes · 1808d254
      Michael Heerdegen authored
      Replace most insignificant occurrences of '`' with a straight quote,
      sharp quote or nothing.  This includes backquotes in 'pcase' patterns.
      
      * admin/admin.el:
      * lisp/apropos.el:
      * lisp/arc-mode.el:
      * lisp/auth-source.el:
      * lisp/avoid.el:
      * lisp/bindings.el:
      * lisp/bs.el:
      * lisp/calculator.el:
      * lisp/calendar/todo-mode.el:
      * lisp/cedet/semantic.el:
      * lisp/cedet/semantic/analyze/debug.el:
      * lisp/cedet/semantic/bovine.el:
      * lisp/cedet/semantic/dep.el:
      * lisp/cedet/semantic/grammar.el:
      * lisp/cedet/semantic/wisent/comp.el:
      * lisp/cedet/semantic/wisent/grammar.el:
      * lisp/cedet/srecode/mode.el:
      * lisp/cus-edit.el:
      * lisp/doc-view.el:
      * lisp/elec-pair.el:
      * lisp/electric.el:
      * lisp/emacs-lisp/autoload.el:
      * lisp/emacs-lisp/benchmark.el:
      * lisp/emacs-lisp/byte-opt.el:
      * lisp/emacs-lisp/bytecomp.el:
      * lisp/emacs-lisp/cconv.el:
      * lisp/emacs-lisp/cl-extra.el:
      * lisp/emacs-lisp/cl-generic.el:
      * lisp/emacs-lisp/cl-macs.el:
      * lisp/emacs-lisp/copyright.el:
      * lisp/emacs-lisp/debug.el:
      * lisp/emacs-lisp/eieio-compat.el:
      * lisp/emacs-lisp/ert.el:
      * lisp/emacs-lisp/generator.el:
      * lisp/emacs-lisp/inline.el:
      * lisp/emacs-lisp/macroexp.el:
      * lisp/emacs-lisp/map.el:
      * lisp/emacs-lisp/package-x.el:
      * lisp/emacs-lisp/package.el:
      * lisp/emacs-lisp/radix-tree.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/epa.el:
      * lisp/erc/erc-dcc.el:
      * lisp/erc/erc-track.el:
      * lisp/erc/erc.el:
      * lisp/eshell/em-ls.el:
      * lisp/eshell/esh-cmd.el:
      * lisp/files.el:
      * lisp/filesets.el:
      * lisp/font-lock.el:
      * lisp/frameset.el:
      * lisp/gnus/gnus-agent.el:
      * lisp/gnus/gnus-art.el:
      * lisp/gnus/gnus-cite.el:
      * lisp/gnus/gnus-group.el:
      * lisp/gnus/gnus-msg.el:
      * lisp/gnus/gnus-salt.el:
      * lisp/gnus/gnus-srvr.el:
      * lisp/gnus/gnus-sum.el:
      * lisp/gnus/gnus-topic.el:
      * lisp/gnus/gnus-util.el:
      * lisp/gnus/gnus.el:
      * lisp/gnus/message.el:
      * lisp/gnus/mm-util.el:
      * lisp/gnus/mml.el:
      * lisp/gnus/nnheader.el:
      * lisp/gnus/nnimap.el:
      * lisp/gnus/nnmairix.el:
      * lisp/gnus/spam.el:
      * lisp/hexl.el:
      * lisp/hi-lock.el:
      * lisp/ibuf-ext.el:
      * lisp/ibuffer.el:
      * lisp/ido.el:
      * lisp/info.el:
      * lisp/international/mule-cmds.el:
      * lisp/international/mule-util.el:
      * lisp/json.el:
      * lisp/jsonrpc.el:
      * lisp/language/cyrillic.el:
      * lisp/language/european.el:
      * lisp/language/georgian.el:
      * lisp/language/tibetan.el:
      * lisp/language/utf-8-lang.el:
      * lisp/language/vietnamese.el:
      * lisp/ldefs-boot.el:
      * lisp/mail/mail-extr.el:
      * lisp/man.el:
      * lisp/menu-bar.el:
      * lisp/mh-e/mh-acros.el:
      * lisp/mh-e/mh-folder.el:
      * lisp/mh-e/mh-mime.el:
      * lisp/mh-e/mh-show.el:
      * lisp/mh-e/mh-speed.el:
      * lisp/minibuffer.el:
      * lisp/mpc.el:
      * lisp/net/ange-ftp.el:
      * lisp/net/hmac-def.el:
      * lisp/net/newst-backend.el:
      * lisp/net/quickurl.el:
      * lisp/net/tramp-archive.el:
      * lisp/net/tramp-compat.el:
      * lisp/notifications.el:
      * lisp/obsolete/pgg-parse.el:
      * lisp/obsolete/vc-arch.el:
      * lisp/obsolete/xesam.el:
      * lisp/org/ob-C.el:
      * lisp/org/ob-core.el:
      * lisp/org/ob-exp.el:
      * lisp/org/ob-groovy.el:
      * lisp/org/ob-haskell.el:
      * lisp/org/ob-io.el:
      * lisp/org/ob-lisp.el:
      * lisp/org/ob-lob.el:
      * lisp/org/ob-lua.el:
      * lisp/org/ob-octave.el:
      * lisp/org/ob-perl.el:
      * lisp/org/ob-python.el:
      * lisp/org/ob-ref.el:
      * lisp/org/ob-ruby.el:
      * lisp/org/ob-sql.el:
      * lisp/org/org-agenda.el:
      * lisp/org/org-capture.el:
      * lisp/org/org-clock.el:
      * lisp/org/org-colview.el:
      * lisp/org/org-duration.el:
      * lisp/org/org-element.el:
      * lisp/org/org-entities.el:
      * lisp/org/org-gnus.el:
      * lisp/org/org-indent.el:
      * lisp/org/org-info.el:
      * lisp/org/org-inlinetask.el:
      * lisp/org/org-lint.el:
      * lisp/org/org-list.el:
      * lisp/org/org-mouse.el:
      * lisp/org/org-plot.el:
      * lisp/org/org-src.el:
      * lisp/org/org-table.el:
      * lisp/org/org.el:
      * lisp/org/ox-ascii.el:
      * lisp/org/ox-html.el:
      * lisp/org/ox-latex.el:
      * lisp/org/ox-man.el:
      * lisp/org/ox-md.el:
      * lisp/org/ox-org.el:
      * lisp/org/ox-publish.el:
      * lisp/org/ox-texinfo.el:
      * lisp/org/ox.el:
      * lisp/play/bubbles.el:
      * lisp/play/gamegrid.el:
      * lisp/progmodes/autoconf.el:
      * lisp/progmodes/cc-defs.el:
      * lisp/progmodes/cc-engine.el:
      * lisp/progmodes/cc-fonts.el:
      * lisp/progmodes/cc-langs.el:
      * lisp/progmodes/cperl-mode.el:
      * lisp/progmodes/ebrowse.el:
      * lisp/progmodes/elisp-mode.el:
      * lisp/progmodes/flymake-cc.el:
      * lisp/progmodes/flymake.el:
      * lisp/progmodes/fortran.el:
      * lisp/progmodes/grep.el:
      * lisp/progmodes/gud.el:
      * lisp/progmodes/idlwave.el:
      * lisp/progmodes/js.el:
      * lisp/progmodes/m4-mode.el:
      * lisp/progmodes/make-mode.el:
      * lisp/progmodes/mixal-mode.el:
      * lisp/progmodes/modula2.el:
      * lisp/progmodes/octave.el:
      * lisp/progmodes/opascal.el:
      * lisp/progmodes/prolog.el:
      * lisp/progmodes/ps-mode.el:
      * lisp/progmodes/python.el:
      * lisp/progmodes/ruby-mode.el:
      * lisp/progmodes/sh-script.el:
      * lisp/progmodes/sql.el:
      * lisp/progmodes/verilog-mode.el:
      * lisp/ps-mule.el:
      * lisp/rtree.el:
      * lisp/ruler-mode.el:
      * lisp/ses.el:
      * lisp/simple.el:
      * lisp/startup.el:
      * lisp/subr.el:
      * lisp/term/ns-win.el:
      * lisp/textmodes/bibtex.el:
      * lisp/textmodes/conf-mode.el:
      * lisp/textmodes/css-mode.el:
      * lisp/textmodes/refill.el:
      * lisp/textmodes/sgml-mode.el:
      * lisp/textmodes/tex-mode.el:
      * lisp/tutorial.el:
      * lisp/url/url-dav.el:
      * lisp/url/url-gw.el:
      * lisp/url/url-http.el:
      * lisp/url/url-methods.el:
      * lisp/url/url-privacy.el:
      * lisp/vc/cvs-status.el:
      * lisp/vc/diff-mode.el:
      * lisp/vc/ediff-init.el:
      * lisp/vc/ediff-ptch.el:
      * lisp/vc/log-edit.el:
      * lisp/vc/log-view.el:
      * lisp/vc/pcvs-info.el:
      * lisp/vc/pcvs.el:
      * lisp/vc/smerge-mode.el:
      * lisp/vc/vc-git.el:
      * lisp/vc/vc-hg.el:
      * lisp/vc/vc-mtn.el:
      * lisp/vc/vc-rcs.el:
      * lisp/whitespace.el:
      * lisp/window.el:
      * test/lisp/electric-tests.el:
      * test/lisp/emacs-lisp/cl-lib-tests.el:
      * test/lisp/emacs-lisp/ert-tests.el:
      * test/lisp/epg-tests.el:
      * test/lisp/jsonrpc-tests.el:
      * test/src/data-tests.el:
      * test/src/json-tests.el: Replace most insignificant backquotes.
      1808d254
  14. 03 May, 2018 1 commit
    • Basil L. Contovounesios's avatar
      Fix off-by-one history pruning (bug#31211) · f2c74543
      Basil L. Contovounesios authored
      * lisp/subr.el (add-to-history): Clarify docstring.
      Protect against negative history-length and unnecessary variable
      modification, as per read_minibuf.
      
      * lisp/ido.el (ido-record-command):
      * lisp/international/mule-cmds.el (deactivate-input-method):
      (set-language-environment-input-method):
      * lisp/isearch.el (isearch-done):
      * lisp/minibuffer.el (read-file-name-default):
      * lisp/net/eww.el (eww-save-history):
      * lisp/simple.el (edit-and-eval-command, repeat-complex-command):
      (command-execute, kill-new, push-mark):
      * src/callint.c (Fcall_interactively):
      * src/minibuf.c (read_minibuf): Delegate to add-to-history.
      
      * test/lisp/simple-tests.el (command-execute-prune-command-history):
      * test/src/callint-tests.el
      (call-interactively-prune-command-history): New tests.
      f2c74543
  15. 01 Apr, 2018 3 commits
  16. 27 Mar, 2018 1 commit
  17. 12 Mar, 2018 2 commits
  18. 05 Mar, 2018 1 commit
  19. 10 Feb, 2018 1 commit
    • Juri Linkov's avatar
      * lisp/window.el (display-buffer--maybe-at-bottom): New function (bug#30314). · 09465bfa
      Juri Linkov authored
      (display-buffer--maybe-pop-up-frame)
      (display-buffer--maybe-pop-up-window): New functions created from
      display-buffer--maybe-pop-up-frame-or-window.
      (display-buffer--maybe-pop-up-frame-or-window): Call
      display-buffer--maybe-pop-up-frame or
      display-buffer--maybe-pop-up-window.
      (display-buffer-at-bottom): Fix parens.
      
      * lisp/minibuffer.el (minibuffer-completion-help): Use
      display-buffer--maybe-pop-up-frame instead of let-binding
      pop-up-windows to nil.
      
      * lisp/files.el (hack-local-variables-confirm)
      (save-buffers-kill-emacs): Use display-buffer--maybe-at-bottom.
      09465bfa
  20. 08 Feb, 2018 1 commit
    • Glenn Morris's avatar
      Remove unused duplicate of minibuffer-completion-contents · d34dbc0b
      Glenn Morris authored
      * src/minibuf.c (Fminibuffer_completion_contents): Remove.
      Unused since introduction of minubuffer.el 2008-04-09.
      (syms_of_minibuf): Remove Sminibuffer_completion_contents.
      * lisp/minibuffer.el (minibuffer-completion-contents): Doc tweak.
      d34dbc0b
  21. 01 Jan, 2018 1 commit
  22. 11 Nov, 2017 1 commit
  23. 08 Nov, 2017 1 commit
  24. 07 Nov, 2017 1 commit
  25. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  26. 25 Jun, 2017 1 commit
    • Martin Rudalics's avatar
      Provide additional support for child frames · 1886246f
      Martin Rudalics authored
      Provide mouse dragging and resizing of frames.  Allow resizing
      frames proportionally.  Provide additional functionality for
      child frames.  Minor bug fixes.
      
      * lisp/frame.el (frame-border-width, frame-pixel-width)
      (frame-pixel-height): Alias to `frame-internal-border-width',
      `frame-native-width' and `frame-native-height'.
      (frame-inner-width, frame-inner-height, frame-outer-width)
      (frame-outer-height): New functions.
      * lisp/minibuffer.el (completion-auto-help): Fix typo.
      * lisp/mouse.el (mouse-drag-line, mouse-drag-mode-line)
      (mouse-drag-header-line): Allow moving a frame by dragging the
      mode line of its bottommost window (on a minibuffer-less frame)
      or the header line of its topmost window.
      (mouse-drag-vertical-line): Mention argument in doc-string.
      (mouse-resize-frame, mouse-drag-frame, mouse-drag-left-edge)
      (mouse-drag-top-left-corner, mouse-drag-top-edge)
      (mouse-drag-top-right-corner, mouse-drag-right-edge)
      (mouse-drag-bottom-right-corner, mouse-drag-bottom-edge)
      (mouse-drag-bottom-left-corner): New functions for resizing a
      frame by dragging its internal border together with
      corresponding key bindings.
      * lisp/tooltip.el (tooltip-frame-parameters): Add
      'no-special-glyphs' to default parameters and update version
      tag.
      * lisp/window.el (frame-auto-hide-function): Add choice to make
      frame invisible and update version tag.
      (window--delete): Handle 'auto-hide-function' frame parameter.
      (window--maybe-raise-frame): Respect 'no-focus-on-map' and
      'no-accept-focus' frame parameters.
      (display-buffer--action-function-custom-type): Add
      `display-buffer-in-child-frame'.
      (display-buffer): Mention `display-buffer-in-child-frame' in
      doc-string.
      (display-buffer-in-child-frame): New action function for
      `display-buffer'.
      (window--sanitize-margin): Return zero when MARGIN cannot be
      sanitized.
      (fit-frame-to-buffer): Major rewrite to handle child frames and
      'fit-frame-to-buffer-sizes' and 'fit-frame-to-buffer-margins'
      frame parameters.
      (window-largest-empty-rectangle--maximums-1)
      (window-largest-empty-rectangle--maximums)
      (window-largest-empty-rectangle--disjoint-maximums)
      (window-largest-empty-rectangle): New functions.
      
      * src/dispextern.h (WINDOW_WANTS_MODELINE_P)
      (WINDOW_WANTS_HEADER_LINE_P): Remove.  Functionality is now
      provided by corresponding functions window_wants_modeline and
      window_wants_header_line in window.c.  Adjust users.
      * src/dispnew.c (adjust_glyph_matrix)
      (buffer_posn_from_coords): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.
      * src/frame.c (keep_ratio): New function.
      (adjust_frame_size): Call keep_ratio for each of F's child
      frames.
      (make_frame): Initialize no_special_glyphs slot.
      (frame_internal_border_part): New function.
      (Fframe_pixel_width, Fframe_pixel_height, Fborder_width): Rename
      to Fframe_native_width, Fframe_native_height mand
      Fframe_internal_border_width.
      (frame_parm_table): Add Qno_special_glyphs entry.
      (frame_float_type): New enumeration type.
      (frame_float): New function to handle frame size and position
      ratios.
      (x_set_frame_parameters): Handle size and position ratios.
      (x_set_no_special_glyphs): New function
      (x_figure_window_size): Handle size and position ratios.
      (syms_of_frame): Add Qdisplay_monitor_attributes_list,
      Qno_special_glyphs, Qframe_edges, Qkeep_ratio, Qwidth_only,
      Qheight_only, Qleft_only and Qtop_only.
      * src/frame.h (internal_border_part): New enumeration type.
      (struct frame): New slot no_special_glyphs.
      (FRAME_NO_SPECIAL_GLYPHS): New macro.
      * src/gtkutil.c (xg_frame_restack): Return immediately for
      GTK versions before 2.18.0.
      * src/keyboard.c (internal_border_parts): New array constant.
      (make_lispy_position): For frames with border dragging enabled
      return internal border part.
      (syms_of_keyboard): New symbols Qdrag_internal_border,
      Qleft_edge, Qtop_left_corner, Qtop_edge, Qtop_right_corner,
      Qright_edge, Qbottom_right_corner, Qbottom_edge and
      Qbottom_left_corner.
      * src/minibuf.c (read_minibuf_unwind): When exiting the
      minibuffer deal with frames that have the 'minibuffer-exit'
      parameter set.
      (syms_of_minibuf): New symbol Qminibuffer_exit.
      * src/nsfns.m (frame_parm_handler): Add entry for
      x_set_no_special_glyphs.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      Intitialize new cursor types for dragging frame borders.
      * src/nsterm.h (struct ns_output): Add new cursor types for
      dragging frame borders.
      * src/w32fns.c (w32_frame_parm_handlers): Add entry for
      x_set_no_special_glyphs.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      Intitialize new cursor types for dragging frame borders.
      * src/w32term.h (struct w32_output): Add new cursor types for
      dragging frame borders.
      * src/window.c (coordinates_in_window)
      (Fwindow_line_height, window_internal_height): Use
      window_wants_modeline and window_wants_header_line instead of
      WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
      (Fwindow_lines_pixel_dimensions): New function.
      (window_parameter): New function.
      (Fwindow_parameter): Call window_parameter.
      (window_wants_mode_line, window_wants_header_line): New
      functions replacing the macros WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P from dispextern.h.
      (syms_of_window): New symbols Qmode_line_format and
      Qheader_line_format.
      * src/window.h: Reorganize and re-comment macros.  Use
      window_wants_modeline and window_wants_header_line instead of
      WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
      (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P): Minor rewrite.
      (WINDOW_BUFFER): New macro.
      (WINDOW_BOX_LEFT_EDGE_COL, WINDOW_BOX_RIGHT_EDGE_COL): Remove.
      * src/xdisp.c (window_text_bottom_y, window_box_height)
      (window_box, start_display)
      (compute_window_start_on_continuation_line)
      (try_cursor_movement, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id)
      (display_line, expose_window): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.
      (pos_visible_p, display_mode_lines): Respect W's
      'mode-line-format' and 'header-line-format' window parameters.
      (init_iterator): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.  For tip frames respect
      no_special_glyphs value.
      (note_mouse_highlight): Set frame border cursors when on
      internal border.
      (x_draw_right_divider, x_draw_bottom_divider): Try to improve
      drawing of window dividers.
      * src/xfns.c (mouse_cursor): Add entries for border parts.
      (mouse_cursor_types): Add entries for cursor types to drag
      frame borders.
      (INSTALL_CURSOR): Add entries for new cursor types to drag
      frame borders.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      (x_frame_parm_handlers): Add entry for
      x_set_no_special_glyphs.
      (Vx_window_left_edge_shape, Vx_window_top_left_corner_shape)
      (Vx_window_top_edge_shape, Vx_window_top_right_corner_shape)
      (Vx_window_right_edge_shape)
      (Vx_window_bottom_right_corner_shape)
      (Vx_window_bottom_edge_shape)
      (Vx_window_bottom_left_corner_shape): New variables.
      (x_frame_restack): Call xg_frame_restack only for GTK versions
      starting with 2.18.0.
      * src/xterm.c (x_free_frame_resources): Remove new cursors for
      dragging frame borders.
      * src/xterm.h (struct x_output): Add new cursor types for
      dragging frame borders.
      
      * doc/lispref/display.texi (Size of Displayed Text): Document
      `window-lines-pixel-dimensions'.
      * doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging
      Parameters".
      * doc/lispref/frames.texi (Frame Size): Replace
      frame-pixel-width/-height by frame-native-width/-height.  Add
      frame-inner-width/-height and frame-outer-width/-height docs.
      (Position Parameters): Describe specifying position as ratios.
      Clarify remark about positions relative to bottom/ridge display
      edge.
      (Size Parameters): Describe specifying sizes as ratios.
      Describe 'fit-frame-to-buffer-margins' and
      'fit-frame-to-buffer-sizes' parameters.
      (Layout Parameters): Describe 'no-special-glyphs' parameter.
      (Frame Interaction Parameters): Describe 'auto-hide-function',
      'minibuffer-exit' and 'keep-ratio' parameters.
      (Mouse Dragging Parameters): New section describing
      'drag-internal-border', 'drag-with-header-line',
      'drag-with-mode-line', 'snap-width', 'top-visible' and
      'bottom-visible' parameters.
      (Management Parameters): Mention that `override-redirect' has
      no effect on MS Windows.
      (Font and Color Parameters): Mention child frames for `alpha'
      parameter.
      (Child Frames): Rewrite section with description and cross
      references to new frame parameters added.
      * doc/lispref/modes.texi (Mode Line Basics): Mention
      'mode-line-format' and 'header-line-format' window parameters.
      * doc/lispref/windows.texi (Resizing Windows): Mention effect
      of `fit-frame-to-buffer-margins' for child frames.
      (Display Action Functions): New action function
      `display-buffer-in-child-frame'.
      (Quitting Windows): Mention `make-frame-invisible' as optional
      value of `frame-auto-hide-function' and `auto-hide-function'
      frame paameter.
      (Coordinates and Windows): Describe new function
      `window-largest-empty-rectangle'.
      (Window Parameters): Describe new parameters 'mode-line-format'
      and 'header-line-format'.  Index all window parameters described
      in this section.
      1886246f
  27. 21 Jun, 2017 1 commit
  28. 20 Apr, 2017 1 commit
    • Stefan Monnier's avatar
      Use substring completion for Info menus and index · cd56490f
      Stefan Monnier authored
      * lisp/info.el (Info-complete-menu-item): Add `category' metadata.
      (Info-menu): Simplify now that we use the `default' arg of completing-read.
      * lisp/minibuffer.el (completion-category-defaults): Use substring
      completion for `info-menu`.
      cd56490f
  29. 13 Mar, 2017 1 commit
    • Michael Albinus's avatar
      Require method in remote file name syntax · ed33337c
      Michael Albinus authored
      * lisp/minibuffer.el (completion--nth-completion):
      Do not bind `non-essential'.
      
      * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
      * lisp/net/tramp-sh.el (tramp-maybe-open-connection):
      * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call
      `tramp-check-proper-method-and-host'.
      
      * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces.
      (tramp-maybe-open-connection): Do not use argument for
      ´tramp-completion-mode-p'.
      
      * lisp/net/tramp.el (tramp-default-method-marker): New defconst.
      (tramp-prefix-format, tramp-postfix-method-format)
      (tramp-prefix-ipv6-format, tramp-postfix-ipv6-format)
      (tramp-prefix-port-format, tramp-postfix-host-format)
      (tramp-file-name-regexp, tramp-completion-file-name-regexp):
      Use `eq' instead of `eqal'.
      (tramp-method-regexp, tramp-domain-regexp)
      (tramp-remote-file-name-spec-regexp)
      (tramp-file-name-regexp-unified)
      (tramp-completion-file-name-regexp-unified)
      (tramp-completion-file-name-regexp-separate): Adapt regexp.
      (tramp-completion-file-name-handler-alist)
      (tramp-run-real-handler): Autoload them.
      (tramp-find-method): Handle `tramp-default-method-marker'.
      (tramp-check-proper-method-and-host)
      (tramp-completion-run-real-handler): Remove them.
      (tramp-error-with-buffer, tramp-connectable-p): Do not use
      argument for ´tramp-completion-mode-p'.
      (tramp-find-foreign-file-name-handler): Remove COMPLETION
      argument.  Do not apply heuristic for completion.
      (tramp-file-name-handler): Do not modify `non-essential'.
      (tramp-completion-file-name-handler): Change implementation.
      (tramp-autoload-file-name-handler)
      (tramp-completion-handle-file-name-all-completions):
      Call `tramp-run-real-handler'.
      (tramp-completion-mode-p): Do not autoload.  Remove argument.
      Do not apply heuristic for completion.
      (tramp-completion-dissect-file-name): Simplify implementation.
      (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'.
      
      * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
      (tramp-test02-file-name-dissect)
      (tramp-test03-file-name-defaults)
      (tramp-test06-directory-file-name): Adapt to the new syntax.
      (tramp-test11-copy-file, tramp-test12-rename-file)
      (tramp--test-check-files): Deactivate temporarily tests with
      quoted file names.
      (tramp-test16-directory-files, tramp-test17-insert-directory):
      Adapt tests.
      (tramp-test24-file-name-completion): Do not check for
      completion mode.
      (tramp-test31-make-auto-save-file-name): Deactivate temporarily
      two tests.
      ed33337c
  30. 09 Mar, 2017 1 commit
    • Michael Albinus's avatar
      Fix bug#23006 · 37b88d7b
      Michael Albinus authored
      * lisp/minibuffer.el (completion--nth-completion):
      Let-bind `non-essential'.
      
      * lisp/net/tramp.el (tramp-completion-mode): Fix docstring.
      (tramp-completion-mode-p): Optional parameter VEC.  Replace
      check for `last-input-event' by analysing VEC argument.
      (tramp-error-with-buffer, tramp-file-name-handler)
      (tramp-connectable-p, tramp-handle-file-name-as-directory):
      * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it.
      37b88d7b
  31. 01 Jan, 2017 1 commit
  32. 12 Dec, 2016 1 commit
    • Noam Postavsky's avatar
      Quote filenames containing '~' in prompts · a92a027d
      Noam Postavsky authored
      When in a directory named '~', the default value given by
      `read-file-name' should be quoted by prepending '/:', in order to
      prevent it from being interpreted as referring to the $HOME
      directory (Bug#16984).
      
      * lisp/minibuffer.el (minibuffer-maybe-quote-filename): New function.
      (completion--sifn-requote, read-file-name-default): Use it instead of
      `minibuffer--double-dollars'.
      * test/lisp/files-tests.el (files-test-read-file-in-~): Test it.
      a92a027d
  33. 13 Oct, 2016 1 commit
  34. 26 Sep, 2016 1 commit
    • Eli Zaretskii's avatar
      Improve documentation of 'expand-abbrev' and wrapper hooks · 9fc9988d
      Eli Zaretskii authored
      * lisp/simple.el (filter-buffer-substring-functions)
      (buffer-substring--filter): Add a link to 'with-wrapper-hook' as
      the place to look for documentation of wrapper hooks.
      * lisp/minibuffer.el (completion-in-region-functions)
      (completion--in-region): Add a link to 'with-wrapper-hook' as the
      place to look for documentation of wrapper hooks.
      * lisp/abbrev.el (expand-abbrev, abbrev--default-expand): Clarify
      the doc strings.  (Bug#24540)
      
      * doc/lispref/text.texi (Buffer Contents): Mention
      'with-wrapper-hook's doc string as the place to learn about that
      obsolete facility.
      9fc9988d