A note re:
[. . .]
I create a file project1.pas.
[. . .]
Lazarus also creates a files project1.lpr which seems a near-clone of project1.pas. Why?
and
It seems that editing project1.pas is ignored. I have to edit the *.lpr file???!!!
When you open or import (with "create project from file") a normal
.pas program, Lazarus creates a new project from it and renames the main program to
.lpr. If, like me, you prefer simple, console program sources to have the
.pas extension, simply use "File -> Save As ..." to save
whatever.lpr to
whatever.pas; this way Lazarus updates all the references in the project's info file
whatever.lpi, the project's session file
whatever.lps (if any), etc. From then on you'll be using
whatever.pas (see image for reference).
But
remember Murphy's Law and backup your original files!