* Bug: 22.1.50.1; eldoc-argument-case ignored @ 2007-08-17 9:40 Nikolaj Schumacher 2007-08-17 20:17 ` Richard Stallman 0 siblings, 1 reply; 12+ messages in thread From: Nikolaj Schumacher @ 2007-08-17 9:40 UTC (permalink / raw) To: emacs-pretest-bug Hello, eldoc's new function argument highlighting seems to disregard `eldoc-argument-case', as setting it to 'downcase has no effect. regards, Nikolaj Schumacher ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-17 9:40 Bug: 22.1.50.1; eldoc-argument-case ignored Nikolaj Schumacher @ 2007-08-17 20:17 ` Richard Stallman 2007-08-18 23:52 ` Glenn Morris 0 siblings, 1 reply; 12+ messages in thread From: Richard Stallman @ 2007-08-17 20:17 UTC (permalink / raw) To: Nikolaj Schumacher; +Cc: emacs-pretest-bug Would someone please DTRT then ack? To: emacs-pretest-bug@gnu.org From: Nikolaj Schumacher <n_schumacher@web.de> Date: Fri, 17 Aug 2007 11:40:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Bug: 22.1.50.1; eldoc-argument-case ignored Hello, eldoc's new function argument highlighting seems to disregard `eldoc-argument-case', as setting it to 'downcase has no effect. regards, Nikolaj Schumacher ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-17 20:17 ` Richard Stallman @ 2007-08-18 23:52 ` Glenn Morris 2007-08-22 21:06 ` Nikolaj Schumacher 0 siblings, 1 reply; 12+ messages in thread From: Glenn Morris @ 2007-08-18 23:52 UTC (permalink / raw) To: rms; +Cc: emacs-pretest-bug, Nikolaj Schumacher Richard Stallman wrote: > Would someone please DTRT then ack? ack > To: emacs-pretest-bug@gnu.org > From: Nikolaj Schumacher <n_schumacher@web.de> > Date: Fri, 17 Aug 2007 11:40:08 +0200 [...] > eldoc's new function argument highlighting seems to disregard > `eldoc-argument-case', as setting it to 'downcase has no effect. Actually, I think it worked as well as it did before, which was only sometimes. I believe I have fixed it now, but it's possible I have just made a hideous mess. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-18 23:52 ` Glenn Morris @ 2007-08-22 21:06 ` Nikolaj Schumacher 2007-08-24 2:13 ` Richard Stallman 2007-08-24 2:36 ` Glenn Morris 0 siblings, 2 replies; 12+ messages in thread From: Nikolaj Schumacher @ 2007-08-22 21:06 UTC (permalink / raw) To: emacs-pretest-bug [-- Attachment #1: Type: text/plain, Size: 766 bytes --] Glenn Morris <rgm@gnu.org> wrote: >> eldoc's new function argument highlighting seems to disregard >> `eldoc-argument-case', as setting it to 'downcase has no effect. > > Actually, I think it worked as well as it did before, which was only > sometimes. I believe I have fixed it now, but it's possible I have > just made a hideous mess. Thanks. As far as I can see, there's just a small issue. `eldoc-argument-case' is called with these arguments: "(foo" "bar" "baz)" It should probably be: "foo" "bar" "baz" for best backwards compatibility. The attached patch should take care of that. On a related issue, I strongly suggest making the highlighting face customizable. Currently 'bold is hardcoded. Patch is attached, as well. regards, Nikolaj Schumacher [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: eldoc-argument-case patch --] [-- Type: text/x-patch, Size: 1034 bytes --] Index: lisp/emacs-lisp/eldoc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/eldoc.el,v retrieving revision 1.47 diff -d -u -r1.47 eldoc.el --- lisp/emacs-lisp/eldoc.el 19 Aug 2007 03:04:13 -0000 1.47 +++ lisp/emacs-lisp/eldoc.el 22 Aug 2007 20:53:25 -0000 @@ -471,11 +476,12 @@ (defun eldoc-function-argstring-format (argstring) "Apply `eldoc-argument-case' to each word in argstring. The words \"&rest\", \"&optional\" are returned unchanged." - (mapconcat (lambda (s) - (if (member s '("&optional" "&rest")) - s - (funcall eldoc-argument-case s))) - (split-string argstring) " ")) + (concat "(" (mapconcat (lambda (s) + (if (member s '("&optional" "&rest")) + s + (funcall eldoc-argument-case s))) + (split-string (substring argstring 1 -1)) " ") + ")")) \f ;; When point is in a sexp, the function args are not reprinted in the echo ;; area after every possible interactive command because some of them print [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #3: highlight face patch --] [-- Type: text/x-patch, Size: 1050 bytes --] Index: lisp/emacs-lisp/eldoc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/eldoc.el,v retrieving revision 1.47 diff -d -u -r1.47 eldoc.el --- lisp/emacs-lisp/eldoc.el 19 Aug 2007 03:04:13 -0000 1.47 +++ lisp/emacs-lisp/eldoc.el 22 Aug 2007 20:31:35 -0000 @@ -101,6 +101,11 @@ enable argument list to fit on one line" truncate-sym-name-if-fit)) :group 'eldoc) +(defface eldoc-highlight-function-argument-face + '((default (:weight bold))) + "*Face used for the argument at point in a function's argument list." + :group 'eldoc) + ;;; No user options below here. (defvar eldoc-message-commands-table-size 31 @@ -303,7 +308,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'." (let ((start nil) (end 0) - (argument-face 'bold)) + (argument-face 'eldoc-highlight-function-argument-face)) ;; Find the current argument in the argument string. We need to ;; handle `&rest' and informal `...' properly. ;; [-- Attachment #4: Type: text/plain, Size: 142 bytes --] _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-22 21:06 ` Nikolaj Schumacher @ 2007-08-24 2:13 ` Richard Stallman 2007-08-24 4:35 ` Miles Bader 2007-08-24 2:36 ` Glenn Morris 1 sibling, 1 reply; 12+ messages in thread From: Richard Stallman @ 2007-08-24 2:13 UTC (permalink / raw) To: emacs-pretest-bug; +Cc: Nikolaj Schumacher Would someone please verify this, then install it if correct? Then please ack. To: emacs-pretest-bug@gnu.org From: Nikolaj Schumacher <n_schumacher@web.de> In-Reply-To: <yehcmwo0yk.fsf@fencepost.gnu.org> (Glenn Morris's message of "Sat\, 18 Aug 2007 19\:52\:03 -0400") Date: Wed, 22 Aug 2007 23:06:15 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Subject: Re: Bug: 22.1.50.1; eldoc-argument-case ignored --=-=-= Glenn Morris <rgm@gnu.org> wrote: >> eldoc's new function argument highlighting seems to disregard >> `eldoc-argument-case', as setting it to 'downcase has no effect. > > Actually, I think it worked as well as it did before, which was only > sometimes. I believe I have fixed it now, but it's possible I have > just made a hideous mess. Thanks. As far as I can see, there's just a small issue. `eldoc-argument-case' is called with these arguments: "(foo" "bar" "baz)" It should probably be: "foo" "bar" "baz" for best backwards compatibility. The attached patch should take care of that. On a related issue, I strongly suggest making the highlighting face customizable. Currently 'bold is hardcoded. Patch is attached, as well. regards, Nikolaj Schumacher --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=emacs-eldoc-argument-case.patch Content-Description: eldoc-argument-case patch Index: lisp/emacs-lisp/eldoc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/eldoc.el,v retrieving revision 1.47 diff -d -u -r1.47 eldoc.el --- lisp/emacs-lisp/eldoc.el 19 Aug 2007 03:04:13 -0000 1.47 +++ lisp/emacs-lisp/eldoc.el 22 Aug 2007 20:53:25 -0000 @@ -471,11 +476,12 @@ (defun eldoc-function-argstring-format (argstring) "Apply `eldoc-argument-case' to each word in argstring. The words \"&rest\", \"&optional\" are returned unchanged." - (mapconcat (lambda (s) - (if (member s '("&optional" "&rest")) - s - (funcall eldoc-argument-case s))) - (split-string argstring) " ")) + (concat "(" (mapconcat (lambda (s) + (if (member s '("&optional" "&rest")) + s + (funcall eldoc-argument-case s))) + (split-string (substring argstring 1 -1)) " ") + ")")) \f ;; When point is in a sexp, the function args are not reprinted in the echo ;; area after every possible interactive command because some of them print --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=emacs-eldoc-highlight-face.patch Content-Description: highlight face patch Index: lisp/emacs-lisp/eldoc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/eldoc.el,v retrieving revision 1.47 diff -d -u -r1.47 eldoc.el --- lisp/emacs-lisp/eldoc.el 19 Aug 2007 03:04:13 -0000 1.47 +++ lisp/emacs-lisp/eldoc.el 22 Aug 2007 20:31:35 -0000 @@ -101,6 +101,11 @@ enable argument list to fit on one line" truncate-sym-name-if-fit)) :group 'eldoc) +(defface eldoc-highlight-function-argument-face + '((default (:weight bold))) + "*Face used for the argument at point in a function's argument list." + :group 'eldoc) + ;;; No user options below here. (defvar eldoc-message-commands-table-size 31 @@ -303,7 +308,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'." (let ((start nil) (end 0) - (argument-face 'bold)) + (argument-face 'eldoc-highlight-function-argument-face)) ;; Find the current argument in the argument string. We need to ;; handle `&rest' and informal `...' properly. ;; --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=-- ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-24 2:13 ` Richard Stallman @ 2007-08-24 4:35 ` Miles Bader 2007-08-24 11:15 ` Kim F. Storm 0 siblings, 1 reply; 12+ messages in thread From: Miles Bader @ 2007-08-24 4:35 UTC (permalink / raw) To: emacs-devel Richard Stallman <rms@gnu.org> writes: > +(defface eldoc-highlight-function-argument-face > + '((default (:weight bold))) Face names should not end with "-face", so this face should be called `eldoc-highlight-function-argument'. -Miles -- Come now, if we were really planning to harm you, would we be waiting here, beside the path, in the very darkest part of the forest? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-24 4:35 ` Miles Bader @ 2007-08-24 11:15 ` Kim F. Storm 2007-08-24 14:19 ` Stefan Monnier 0 siblings, 1 reply; 12+ messages in thread From: Kim F. Storm @ 2007-08-24 11:15 UTC (permalink / raw) To: Miles Bader; +Cc: emacs-devel Miles Bader <miles.bader@necel.com> writes: > Face names should not end with "-face", ... Which reminds me: Isn't it about time to install your changes to allow faces to be overriden per-buffer (or was it per-window) ? That feature is sorely missed. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-24 11:15 ` Kim F. Storm @ 2007-08-24 14:19 ` Stefan Monnier 2007-08-25 9:21 ` Miles Bader 0 siblings, 1 reply; 12+ messages in thread From: Stefan Monnier @ 2007-08-24 14:19 UTC (permalink / raw) To: Kim F. Storm; +Cc: emacs-devel, Miles Bader >> Face names should not end with "-face", ... > Which reminds me: > Isn't it about time to install your changes to allow > faces to be overriden per-buffer (or was it per-window) ? Yes, please, pretty please, Stefan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-24 14:19 ` Stefan Monnier @ 2007-08-25 9:21 ` Miles Bader 2007-08-25 20:36 ` Stefan Monnier 0 siblings, 1 reply; 12+ messages in thread From: Miles Bader @ 2007-08-25 9:21 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel, Kim F. Storm On 8/24/07, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > >> Face names should not end with "-face", ... > > Which reminds me: > > Isn't it about time to install your changes to allow > > faces to be overriden per-buffer (or was it per-window) ? > > Yes, please, pretty please, Richard objected to some details of the implementation, and at the time I didn't really have the energy to argue about it (there are obviously implementation details which aren't important, but there are details of the behavior which I think are necessary to make the feature behave sanely, and of course I want to preserve the latter). I still use it myself though, so at least I can say it hasn't bit-rotted. -Miles -- Do not taunt Happy Fun Ball. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-25 9:21 ` Miles Bader @ 2007-08-25 20:36 ` Stefan Monnier 0 siblings, 0 replies; 12+ messages in thread From: Stefan Monnier @ 2007-08-25 20:36 UTC (permalink / raw) To: Miles Bader; +Cc: emacs-devel, Kim F. Storm >> >> Face names should not end with "-face", ... >> > Which reminds me: >> > Isn't it about time to install your changes to allow >> > faces to be overriden per-buffer (or was it per-window) ? >> >> Yes, please, pretty please, > Richard objected to some details of the implementation, and at the > time I didn't really have the energy to argue about it (there are > obviously implementation details which aren't important, but there are > details of the behavior which I think are necessary to make the > feature behave sanely, and of course I want to preserve the latter). > I still use it myself though, so at least I can say it hasn't bit-rotted. Let's start the argument over. Do you have a NEWS or manual entry that describes the behavior? Stefan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-22 21:06 ` Nikolaj Schumacher 2007-08-24 2:13 ` Richard Stallman @ 2007-08-24 2:36 ` Glenn Morris 2007-08-24 7:25 ` Nikolaj Schumacher 1 sibling, 1 reply; 12+ messages in thread From: Glenn Morris @ 2007-08-24 2:36 UTC (permalink / raw) To: Nikolaj Schumacher; +Cc: emacs-pretest-bug Nikolaj Schumacher wrote: > As far as I can see, there's just a small issue. > `eldoc-argument-case' is called with these arguments: > "(foo" "bar" "baz)" > > It should probably be: > "foo" "bar" "baz" > for best backwards compatibility. Eh, it doesn't make any difference to the way the function was supposed to be used (changing case); and perhaps it's nicer to be able to format the () as well... > On a related issue, I strongly suggest making the highlighting face > customizable. Fine, applied (except face names should not end in -face). ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug: 22.1.50.1; eldoc-argument-case ignored 2007-08-24 2:36 ` Glenn Morris @ 2007-08-24 7:25 ` Nikolaj Schumacher 0 siblings, 0 replies; 12+ messages in thread From: Nikolaj Schumacher @ 2007-08-24 7:25 UTC (permalink / raw) To: emacs-pretest-bug Glenn Morris <rgm@gnu.org> wrote: >> "(foo" "bar" "baz)" > > Eh, it doesn't make any difference to the way the function was > supposed to be used (changing case); and perhaps it's nicer to be able > to format the () as well... Sure, its just as well :). I just wanted to point out that the old behavior was different, in case that mattered. regards, Nikolaj Schumacher ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-08-25 20:36 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-08-17 9:40 Bug: 22.1.50.1; eldoc-argument-case ignored Nikolaj Schumacher 2007-08-17 20:17 ` Richard Stallman 2007-08-18 23:52 ` Glenn Morris 2007-08-22 21:06 ` Nikolaj Schumacher 2007-08-24 2:13 ` Richard Stallman 2007-08-24 4:35 ` Miles Bader 2007-08-24 11:15 ` Kim F. Storm 2007-08-24 14:19 ` Stefan Monnier 2007-08-25 9:21 ` Miles Bader 2007-08-25 20:36 ` Stefan Monnier 2007-08-24 2:36 ` Glenn Morris 2007-08-24 7:25 ` Nikolaj Schumacher
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).